PROPOSAL: GTK_WIDGET_COMPOSITE_CHILD flag



hey all,

currently GUI builders like Glade or GLE have the problem
of identifiyng widgets that have been created from within
gtk itself. for any give child of a GtkFileSelection, there
is no reliable way to tell wether it has been created by the
fileselection code itself or by a GtkFileselection user.

to solve this issue, i'd like to see all child widgets that
have been created by Gtk internally to be flagged with a new
widget flag GTK_WIDGET_COMPOSITE_CHILD.
so if i create a new FS dialog, the FS itself should not
be flagged, but FS->button_area should. if i then add a
new widget (e.g. button) to FS->button_area, this widget
should also not be flagged as a composite child.
to achive this for widgets that are created internally, and
to ease the burden on the Gtk/widget programmer, i propose
the addtion (and actuall application) of two functions (and
the additional GTK_WIDGET_COMPOSITE_CHILD flag):

void         gtk_widget_push_composite (void);
void         gtk_widget_pop_composite  (void);

widgets that have been created after an invokation of
gtk_widget_push_composite(), will be flagged with
GTK_WIDGET_COMPOSITE_CHILD automatically. a subsequent
call to gtk_widget_pop_composite() will restore the
the behaviour that was current before the last call to
gtk_widget_push_composite(). thus, the composite child
creation hook can be stacked, this is needed, if for instance
a fileselection adds a GtkCombo to itself.

comments? better ideas to solve the GUI builder problem?

---
ciaoTJ



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]