From e5ce8697ea29c41c872cbf16620807eb6df66095 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 1 Jul 2007 23:38:07 +0000 Subject: [PATCH] Document GtkBuilder UI definitions svn path=/trunk/; revision=18332 --- docs/reference/ChangeLog | 4 + docs/reference/gtk/tmpl/gtk-unused.sgml | 126 ------------------ docs/reference/gtk/tmpl/gtkactiongroup.sgml | 12 ++ docs/reference/gtk/tmpl/gtkbuilder.sgml | 21 ++- docs/reference/gtk/tmpl/gtkcelllayout.sgml | 27 ++++ docs/reference/gtk/tmpl/gtkcolorseldlg.sgml | 10 ++ docs/reference/gtk/tmpl/gtkcomboboxentry.sgml | 10 ++ docs/reference/gtk/tmpl/gtkcontainer.sgml | 110 ++++++++++----- docs/reference/gtk/tmpl/gtkdialog.sgml | 7 +- docs/reference/gtk/tmpl/gtkexpander.sgml | 67 ++++++---- docs/reference/gtk/tmpl/gtkfilechooser.sgml | 55 ++++++++ docs/reference/gtk/tmpl/gtkfontseldlg.sgml | 10 ++ docs/reference/gtk/tmpl/gtkframe.sgml | 23 ++++ docs/reference/gtk/tmpl/gtkliststore.sgml | 72 ++++++++-- docs/reference/gtk/tmpl/gtkmenu.sgml | 1 - docs/reference/gtk/tmpl/gtknotebook.sgml | 30 ++++- docs/reference/gtk/tmpl/gtkradiobutton.sgml | 10 +- docs/reference/gtk/tmpl/gtkrecentchooser.sgml | 50 +++++++ docs/reference/gtk/tmpl/gtkscalebutton.sgml | 1 - docs/reference/gtk/tmpl/gtksizegroup.sgml | 23 ++++ docs/reference/gtk/tmpl/gtktreemodel.sgml | 21 +++ docs/reference/gtk/tmpl/gtktreestore.sgml | 24 +++- docs/reference/gtk/tmpl/gtktreeview.sgml | 27 ++++ docs/reference/gtk/tmpl/gtkuimanager.sgml | 44 ++++++ docs/reference/gtk/tmpl/gtkvscrollbar.sgml | 10 +- docs/reference/gtk/tmpl/gtkwidget.sgml | 17 +++ 26 files changed, 593 insertions(+), 219 deletions(-) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index cd322e6845..031c53d199 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,7 @@ +2007-07-01 Matthias Clasen + + * gtk/tmpl/*.sgml: Document GtkBuilder ui definitions. + 2007-07-01 Johan Dahlin * gtk/gtk-builder-convert.xml: Updates diff --git a/docs/reference/gtk/tmpl/gtk-unused.sgml b/docs/reference/gtk/tmpl/gtk-unused.sgml index 7810f5017c..1f65c9c5b7 100644 --- a/docs/reference/gtk/tmpl/gtk-unused.sgml +++ b/docs/reference/gtk/tmpl/gtk-unused.sgml @@ -913,78 +913,12 @@ You may not attach these to signals created with the - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A set of bit flags used to specify the filter being set @@ -1266,66 +1200,6 @@ after other user handlers and the default handler. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/gtk/tmpl/gtkactiongroup.sgml b/docs/reference/gtk/tmpl/gtkactiongroup.sgml index 8f363a0fed..bed93558aa 100644 --- a/docs/reference/gtk/tmpl/gtkactiongroup.sgml +++ b/docs/reference/gtk/tmpl/gtkactiongroup.sgml @@ -28,6 +28,18 @@ toolitems take on this accelerator path. The GTK+ accelerator map code makes sure that the correct shortcut is displayed next to the menu item. + +GtkActionGroup as GtkBuildable + +The GtkActionGroup implementation of the GtkBuildable interface accepts +GtkAction objects as <child> elements in UI definitions. + + +Note that it is probably more common to define actions and action groups +in the code, since they are directly related to what the code can do. + + + diff --git a/docs/reference/gtk/tmpl/gtkbuilder.sgml b/docs/reference/gtk/tmpl/gtkbuilder.sgml index a882e3dcc4..6050b877f9 100644 --- a/docs/reference/gtk/tmpl/gtkbuilder.sgml +++ b/docs/reference/gtk/tmpl/gtkbuilder.sgml @@ -87,11 +87,24 @@ which are more limited in scope. Beyond this general structure, several object classes define their own XML DTD fragments for filling in the ANY placeholders. -See +These are explained in their own sections, see +GtkWidget, +GtkContainer, +GtkDialog, +GtkCellLayout, +GtkColorSelectionDialog, +GtkFontSelectionDialog, +GtkComboBoxEntry, +GtkExpander, +GtkFrame, +GtkListStore, +GtkTreeStore, +GtkNotebook, +GtkSizeGroup, +GtkTreeView, +GtkUIManager, +GtkActionGroup. - - GtkDialog as GtkBuildable - diff --git a/docs/reference/gtk/tmpl/gtkcelllayout.sgml b/docs/reference/gtk/tmpl/gtkcelllayout.sgml index b5ebf6fb16..4cc7ea12fe 100644 --- a/docs/reference/gtk/tmpl/gtkcelllayout.sgml +++ b/docs/reference/gtk/tmpl/gtkcelllayout.sgml @@ -23,6 +23,33 @@ gtk_cell_layout_set_cell_data_func() that is called to determine the value of the attribute for each cell that is rendered. + +GtkCellLayouts as GtkBuildable + +Implementations of GtkCellLayout which also implement the GtkBuildable +interface (#GtkCellView, #GtkIconView, #GtkComboBox, #GtkComboBoxEntry, +#GtkEntryCompletion, #GtkTreeViewColumn) accept GtkCellRenderer objects +as <child> elements in UI definitons. They support a custom +<attributes> element for their children, which can contain +multiple <attribute> elements. Each <attribute> element has +a name attribute which specifies a property of the cell renderer; the +content of the element is the attribute value. + + +A UI definition fragment specifying attributes + + + + + 0 + + " + +]]> + + + diff --git a/docs/reference/gtk/tmpl/gtkcolorseldlg.sgml b/docs/reference/gtk/tmpl/gtkcolorseldlg.sgml index 8ed57f505a..72cd0ba119 100644 --- a/docs/reference/gtk/tmpl/gtkcolorseldlg.sgml +++ b/docs/reference/gtk/tmpl/gtkcolorseldlg.sgml @@ -11,6 +11,16 @@ allows the user to select a color much like the #GtkFileSelection provides a standard dialog for file selection. + +GtkColorSelectionDialog as GtkBuildable + +The GtkColorSelectionDialog implementation of the GtkBuildable interface +exposes the embedded #GtkColorSelection as internal child with the +name "color_selection". It also exposes the buttons with the names +"ok_button", "cancel_button" and "help_button". + + + diff --git a/docs/reference/gtk/tmpl/gtkcomboboxentry.sgml b/docs/reference/gtk/tmpl/gtkcomboboxentry.sgml index a5d3646494..04d3a63797 100644 --- a/docs/reference/gtk/tmpl/gtkcomboboxentry.sgml +++ b/docs/reference/gtk/tmpl/gtkcomboboxentry.sgml @@ -43,6 +43,16 @@ it is possible to replace the child entry by a different widget using gtk_container_remove() and gtk_container_add(). + +GtkComboBoxEntry as GtkBuildable + +Beyond the <attributes> support that is shared by all +GtkCellLayout implementation, +GtkComboBoxEntry makes the entry available in UI definitions as an internal +child with name "entry". + + + #GtkComboBox diff --git a/docs/reference/gtk/tmpl/gtkcontainer.sgml b/docs/reference/gtk/tmpl/gtkcontainer.sgml index 8b3df0e601..3646fa7fca 100644 --- a/docs/reference/gtk/tmpl/gtkcontainer.sgml +++ b/docs/reference/gtk/tmpl/gtkcontainer.sgml @@ -6,66 +6,79 @@ Base class for widgets which contain other widgets -A GTK+ user interface is constructed by nesting widgets inside widgets. Container widgets are the inner -nodes in the resulting tree of widgets: they contain other widgets. So, for example, you might have a -#GtkWindow containing a #GtkFrame containing a GtkLabel. If you wanted an image instead of a textual label -inside the frame, you might replace the #GtkLabel widget with a #GtkImage widget. +A GTK+ user interface is constructed by nesting widgets inside widgets. +Container widgets are the inner nodes in the resulting tree of widgets: +they contain other widgets. So, for example, you might have a #GtkWindow +containing a #GtkFrame containing a GtkLabel. If you wanted an image instead +of a textual label inside the frame, you might replace the #GtkLabel widget +with a #GtkImage widget. -There are two major kinds of container widgets in GTK+. Both are subclasses of the abstract #GtkContainer -base class. +There are two major kinds of container widgets in GTK+. Both are subclasses +of the abstract #GtkContainer base class. -The first type of container widget has a single child widget and derives from #GtkBin. These containers -are decorators, which add some kind of functionality to the child. For example, -a #GtkButton makes its child into a clickable button; a #GtkFrame draws a frame around its child and -a #GtkWindow places its child widget inside a top-level window. +The first type of container widget has a single child widget and derives +from #GtkBin. These containers are decorators, which +add some kind of functionality to the child. For example, a #GtkButton makes +its child into a clickable button; a #GtkFrame draws a frame around its child +and a #GtkWindow places its child widget inside a top-level window. -The second type of container can have more than one child; its purpose is to manage -layout. This means that these containers assign sizes and positions to their children. -For example, a #GtkHBox arranges its children in a horizontal row, and a #GtkTable arranges the widgets it -contains in a two-dimensional grid. +The second type of container can have more than one child; its purpose is to +manage layout. This means that these containers assign +sizes and positions to their children. For example, a #GtkHBox arranges its +children in a horizontal row, and a #GtkTable arranges the widgets it contains +in a two-dimensional grid. -To fulfill its task, a layout container must negotiate the size requirements with its parent and its children. -This negotiation is carried out in two phases, size requisition and -size allocation. +To fulfill its task, a layout container must negotiate the size requirements +with its parent and its children. This negotiation is carried out in two +phases, size requisition and size +allocation. Size Requisition -The size requisition of a widget is it's desired width and height. This is represented by a #GtkRequisition. +The size requisition of a widget is it's desired width and height. +This is represented by a #GtkRequisition. -How a widget determines its desired size depends on the widget. A #GtkLabel, for example, requests enough space -to display all its text. Container widgets generally base their size request on the requisitions of their -children. +How a widget determines its desired size depends on the widget. +A #GtkLabel, for example, requests enough space to display all its text. +Container widgets generally base their size request on the requisitions +of their children. -The size requisition phase of the widget layout process operates top-down. It starts at a top-level widget, -typically a #GtkWindow. The top-level widget asks its child for its size requisition by calling -gtk_widget_size_request(). To determine its requisition, the child asks its own children for their requisitions -and so on. Finally, the top-level widget will get a requisition back from its child. +The size requisition phase of the widget layout process operates top-down. +It starts at a top-level widget, typically a #GtkWindow. The top-level widget +asks its child for its size requisition by calling gtk_widget_size_request(). +To determine its requisition, the child asks its own children for their +requisitions and so on. Finally, the top-level widget will get a requisition +back from its child. Size Allocation -When the top-level widget has determined how much space its child would like to have, the second phase of the -size negotiation, size allocation, begins. Depending on its configuration (see gtk_window_set_resizable()), the -top-level widget may be able to expand in order to satisfy the size request or it may have to ignore the size -request and keep its fixed size. It then tells its child widget how much space it gets by calling -gtk_widget_size_allocate(). The child widget divides the space among its children and tells each child how much -space it got, and so on. Under normal circumstances, a #GtkWindow will always give its child the amount of space -the child requested. +When the top-level widget has determined how much space its child would like +to have, the second phase of the size negotiation, size allocation, begins. +Depending on its configuration (see gtk_window_set_resizable()), the top-level +widget may be able to expand in order to satisfy the size request or it may +have to ignore the size request and keep its fixed size. It then tells its +child widget how much space it gets by calling gtk_widget_size_allocate(). +The child widget divides the space among its children and tells each child +how much space it got, and so on. Under normal circumstances, a #GtkWindow +will always give its child the amount of space the child requested. -A child's size allocation is represented by a #GtkAllocation. This struct contains not only a width and height, -but also a position (i.e. X and Y coordinates), so that containers can tell their children not only how much -space they have gotten, but also where they are positioned inside the space available to the container. +A child's size allocation is represented by a #GtkAllocation. This struct +contains not only a width and height, but also a position (i.e. X and Y +coordinates), so that containers can tell their children not only how much +space they have gotten, but also where they are positioned inside the space +available to the container. -Widgets are required to honor the size allocation they receive; a size request is only a request, and widgets -must be able to cope with any size. +Widgets are required to honor the size allocation they receive; a size +request is only a request, and widgets must be able to cope with any size. Child properties @@ -91,6 +104,29 @@ changes, use gtk_widget_child_notify(). + +GtkContainer as GtkBuildable + +The GtkContainer implementation of the GtkBuildable interface +supports a <packing> element for children, which can +contain multiple <property> elements that specify +child properties for the child. + + +Child properties in UI definitions + + + + + start + + + +]]> + + + diff --git a/docs/reference/gtk/tmpl/gtkdialog.sgml b/docs/reference/gtk/tmpl/gtkdialog.sgml index 73ed5cb864..d3e2b02e19 100644 --- a/docs/reference/gtk/tmpl/gtkdialog.sgml +++ b/docs/reference/gtk/tmpl/gtkdialog.sgml @@ -104,10 +104,11 @@ void quick_message (gchar *message) { -GtkDialog as a GtkBuildable +GtkDialog as GtkBuildable -GtkDialog exposes the @vbox and @action_area as internal children -with the names "vbox" and "action_area". +The GtkDialog implementation of the GtkBuildable interface exposes the +@vbox and @action_area as internal children with the names "vbox" and +"action_area". GtkDialog supports a custom <action-widgets> element, which diff --git a/docs/reference/gtk/tmpl/gtkexpander.sgml b/docs/reference/gtk/tmpl/gtkexpander.sgml index b23139f34b..37482eb787 100644 --- a/docs/reference/gtk/tmpl/gtkexpander.sgml +++ b/docs/reference/gtk/tmpl/gtkexpander.sgml @@ -6,32 +6,31 @@ A container which can hide its child -A #GtkExpander allows the user to hide or show its child by clicking on an expander triangle similar to -the triangles used in a #GtkTreeView. +A #GtkExpander allows the user to hide or show its child by clicking +on an expander triangle similar to the triangles used in a #GtkTreeView. - - Normally you use an expander as you would use any other descendant - of #GtkBin; you create the child widget and use - gtk_container_add() to add it to the expander. When the expander - is toggled, it will take care of showing and hiding the child - automatically. - + +Normally you use an expander as you would use any other descendant +of #GtkBin; you create the child widget and use gtk_container_add() +to add it to the expander. When the expander is toggled, it will take +care of showing and hiding the child automatically. + -
- Special Usage +
+Special Usage - - There are situations in which you may prefer to show and - hide the expanded widget yourself, such as when you want to - actually create the widget at expansion time. In this case, - create a #GtkExpander but do not add a child to it. The - expander widget has an expanded property - which can be used to monitor its expansion state. You should - watch this property with a signal connection as follows: - + +There are situations in which you may prefer to show and hide the +expanded widget yourself, such as when you want to actually create +the widget at expansion time. In this case, create a #GtkExpander +but do not add a child to it. The expander widget has an +expanded property which can be used to monitor +its expansion state. You should watch this property with a signal +connection as follows: + - + expander = gtk_expander_new_with_mnemonic ("_More Options"); g_signal_connect (expander, "notify::expanded", G_CALLBACK (expander_callback), NULL); @@ -56,9 +55,29 @@ expander_callback (GObject *object, /* Hide or destroy widgets */ } } - - -
+ +
+ +GtkExpander as GtkBuildable + +The GtkExpander implementation of the GtkBuildable interface +supports placing a child in the label position by specifying +"label" as the "type" attribute of a <child> element. + + +A UI definition fragment with GtkExpander + + + + + + + + +]]> + + diff --git a/docs/reference/gtk/tmpl/gtkfilechooser.sgml b/docs/reference/gtk/tmpl/gtkfilechooser.sgml index ef7f17a2fc..a24691a912 100644 --- a/docs/reference/gtk/tmpl/gtkfilechooser.sgml +++ b/docs/reference/gtk/tmpl/gtkfilechooser.sgml @@ -672,6 +672,61 @@ gtk_widget_destroy (chooser); @filechooser: the object which received the signal. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Describes whether a #GtkFileChooser is being used to open diff --git a/docs/reference/gtk/tmpl/gtkfontseldlg.sgml b/docs/reference/gtk/tmpl/gtkfontseldlg.sgml index 9afe5f60d1..f25b1a620b 100644 --- a/docs/reference/gtk/tmpl/gtkfontseldlg.sgml +++ b/docs/reference/gtk/tmpl/gtkfontseldlg.sgml @@ -20,6 +20,16 @@ To change the text which is shown in the preview area, use gtk_font_selection_dialog_set_preview_text(). + +GtkFontSelectionDialog as GtkBuildable + +The GtkFontSelectionDialog implementation of the GtkBuildable interface +exposes the embedded #GtkFontSelection as internal child with the +name "font_selection". It also exposes the buttons with the names +"ok_button", "cancel_button" and "apply_button". + + + diff --git a/docs/reference/gtk/tmpl/gtkframe.sgml b/docs/reference/gtk/tmpl/gtkframe.sgml index 901c06e1fe..8f2bb4f011 100644 --- a/docs/reference/gtk/tmpl/gtkframe.sgml +++ b/docs/reference/gtk/tmpl/gtkframe.sgml @@ -13,6 +13,29 @@ top side of the frame. The position of the label can be controlled with gtk_frame_set_label_align(). + +GtkFrame as GtkBuildable + +The GtkFrame implementation of the GtkBuildable interface +supports placing a child in the label position by specifying +"label" as the "type" attribute of a <child> element. + + +A UI definition fragment with GtkFrame + + + + + + + + +]]> + + + + diff --git a/docs/reference/gtk/tmpl/gtkliststore.sgml b/docs/reference/gtk/tmpl/gtkliststore.sgml index b5b8a716d7..3577740d47 100644 --- a/docs/reference/gtk/tmpl/gtkliststore.sgml +++ b/docs/reference/gtk/tmpl/gtkliststore.sgml @@ -93,18 +93,70 @@ run on older versions of GTK+, it is worth keeping the iter around. Atomic Operations -It is important to note that only the methods @gtk_list_store_insert_with_values and -@gtk_list_store_insert_with_valuesv are atomic, in the sense that the row is being appended -to the store and the values filled in in a single operation with regard to #GtkTreeModel signaling. -In contrast, using e.g. @gtk_list_store_append and then @gtk_list_store_set will first create a row, -which triggers the "row_inserted" #GtkTreeModel signal on #GtkListStore. The row, however, is still -empty, and any signal handler connecting to "row_inserted" on this particular store should be prepared -for the situation that the row might be empty. -This is especially important if you are wrapping the #GtkListStore inside a #GtkTreeModelFilter and are -using a #GtkTreeModelFilterVisibleFunc. Using any of the non-atomic operations to append rows to the #GtkListStore -will cause the #GtkTreeModelFilterVisibleFunc to be visited with an empty row first; the function must be prepared for that. +It is important to note that only the methods +gtk_list_store_insert_with_values() and gtk_list_store_insert_with_valuesv() +are atomic, in the sense that the row is being appended to the store and the +values filled in in a single operation with regard to #GtkTreeModel signaling. +In contrast, using e.g. gtk_list_store_append() and then gtk_list_store_set() +will first create a row, which triggers the #GtkTreeModel::row-inserted signal +on #GtkListStore. The row, however, is still empty, and any signal handler +connecting to "row-inserted" on this particular store should be prepared +for the situation that the row might be empty. This is especially important +if you are wrapping the #GtkListStore inside a #GtkTreeModelFilter and are +using a #GtkTreeModelFilterVisibleFunc. Using any of the non-atomic operations +to append rows to the #GtkListStore will cause the +#GtkTreeModelFilterVisibleFunc to be visited with an empty row first; the +function must be prepared for that. + +GtkListStore as GtkBuildable + +The GtkListStore implementation of the GtkBuildable interface allows +to specify the model columns with a <columns> element that may +contain multiple <column> elements, each specifying one model +column. The "type" attribute specifies the data type for the column. + + +Additionally, it is possible to specify content for the list store +in the UI definition, with the <data> element. It can contain +multiple <row> elements, each specifying to content for one +row of the list model. Inside a <row>, the <col> elements +specify the content for individual cells. + + +Note that it is probably more common to define your models +in the code, and one might consider it a layering violation +to specify the content of a list store in a UI definition, +data, not presentation, +and common wisdom is to separate the two, as far as possible. + + + +A UI Definition fragment for a list store + + + + + + + + + John + Doe + 25 + + + Johan + Dahlin + 50 + + + +]]> + + diff --git a/docs/reference/gtk/tmpl/gtkmenu.sgml b/docs/reference/gtk/tmpl/gtkmenu.sgml index d7a8e812d2..18f7fec9d1 100644 --- a/docs/reference/gtk/tmpl/gtkmenu.sgml +++ b/docs/reference/gtk/tmpl/gtkmenu.sgml @@ -407,7 +407,6 @@ will be called when the menu is later detached from the widget. @attach_widget: the #GtkWidget that the menu is being detached from. - @menu: the #GtkMenu being detached. diff --git a/docs/reference/gtk/tmpl/gtknotebook.sgml b/docs/reference/gtk/tmpl/gtknotebook.sgml index c2d94e67b1..ba0ad64d6a 100644 --- a/docs/reference/gtk/tmpl/gtknotebook.sgml +++ b/docs/reference/gtk/tmpl/gtknotebook.sgml @@ -19,13 +19,39 @@ will be a popup menu allowing the users to switch pages. (see gtk_notebook_enable_popup(), gtk_noteobook_disable_popup()) + +GtkNotebook as GtkBuildable + +The GtkNoteboopk implementation of the GtkBuildable interface +supports placing children into tabs by specifying "tab" as the +"type" attribbute of a <child> element. Note that the content +of the tab must be created before the tab can be filled. + + +A UI definition fragment with GtkNotebook + + + + Content + + + + + Tab + + + +]]> + + + #GtkContainer -For functions that apply to every #GtkContainer -(like #GtkList). +For functions that apply to every #GtkContainer diff --git a/docs/reference/gtk/tmpl/gtkradiobutton.sgml b/docs/reference/gtk/tmpl/gtkradiobutton.sgml index d29942539c..002b1d0d75 100644 --- a/docs/reference/gtk/tmpl/gtkradiobutton.sgml +++ b/docs/reference/gtk/tmpl/gtkradiobutton.sgml @@ -128,8 +128,10 @@ Creates a new #GtkRadioButton, adding it to the same group as @group. As with gtk_radio_button_new(), a widget should be packed into the radio button.
-@group: an existing #GtkRadioButton. +@radio_group_member: @Returns: a new radio button. + +@group: an existing #GtkRadioButton. @@ -149,9 +151,11 @@ Creates a new #GtkRadioButton with a text label, adding it to the same group as @group. -@group: an existing #GtkRadioButton. +@radio_group_member: @label: a text string to display next to the radio button. @Returns: a new radio button. + +@group: an existing #GtkRadioButton. @@ -169,7 +173,7 @@ as @group. -@group: +@radio_group_member: @label: @Returns: diff --git a/docs/reference/gtk/tmpl/gtkrecentchooser.sgml b/docs/reference/gtk/tmpl/gtkrecentchooser.sgml index 7464b86690..85013ba6f8 100644 --- a/docs/reference/gtk/tmpl/gtkrecentchooser.sgml +++ b/docs/reference/gtk/tmpl/gtkrecentchooser.sgml @@ -45,6 +45,56 @@ Recently used files are supported since GTK+ 2.10. @recentchooser: the object which received the signal. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/reference/gtk/tmpl/gtkscalebutton.sgml b/docs/reference/gtk/tmpl/gtkscalebutton.sgml index 4589ab99c2..88c2a5311d 100644 --- a/docs/reference/gtk/tmpl/gtkscalebutton.sgml +++ b/docs/reference/gtk/tmpl/gtkscalebutton.sgml @@ -12,7 +12,6 @@ applications, and GTK+ provides a #GtkVolumeButton subclass that is tailored for this use case. - diff --git a/docs/reference/gtk/tmpl/gtksizegroup.sgml b/docs/reference/gtk/tmpl/gtksizegroup.sgml index a8f07b8743..7784e3a1a5 100644 --- a/docs/reference/gtk/tmpl/gtksizegroup.sgml +++ b/docs/reference/gtk/tmpl/gtksizegroup.sgml @@ -44,6 +44,29 @@ vertical size from the vertical requisition of all widgets that can be reached from the widget by a chain of size groups of type %GTK_SIZE_GROUP_VERTICAL or %GTK_SIZE_GROUP_BOTH. + +GtkSizeGroup as GtkBuildable + +Size groups can be specified in a UI definition by placing an +<object> element with class="GtkSizeGroup" +somewhere in the UI definition. The widgets that belong to the +size group are specified by a <widgets> element that may +contain multiple <widget> elements, one for each member +of the size group. The name attribute gives the id of the widget. + + +A UI definition fragment with GtkSizeGroup + + GTK_SIZE_GROUP_HORIZONTAL + + + + + +]]> + + diff --git a/docs/reference/gtk/tmpl/gtktreemodel.sgml b/docs/reference/gtk/tmpl/gtktreemodel.sgml index 3bd3dfcc22..8b6c7408ca 100644 --- a/docs/reference/gtk/tmpl/gtktreemodel.sgml +++ b/docs/reference/gtk/tmpl/gtktreemodel.sgml @@ -188,6 +188,27 @@ enum + +GtkTreeModel as GtkBuildable + +The GtkTreeStore implementation of the GtkBuildable interface allows +to specify the model columns with a <columns> element that may +contain multiple <column> elements, each specifying one model +column. The "type" attribute specifies the data type for the column. + + +A UI definition fragment with GtkTreeStore + + + + + + +]]> + + + #GtkTreeView, #GtkTreeStore, #GtkListStore, GtkTreeDnd, #GtkTreeSortable diff --git a/docs/reference/gtk/tmpl/gtktreestore.sgml b/docs/reference/gtk/tmpl/gtktreestore.sgml index 95b450f229..b5a1b6ae27 100644 --- a/docs/reference/gtk/tmpl/gtktreestore.sgml +++ b/docs/reference/gtk/tmpl/gtktreestore.sgml @@ -12,9 +12,31 @@ can use all of the methods available there. It also implements the #GtkTreeSortable interface so it can be sorted by the view. Finally, it also implements the tree drag and drop interfaces. - + +GtkTreeStore as GtkBuildable + +The GtkTreeStore implementation of the GtkBuildable interface allows +to specify the model columns with a <columns> element that may +contain multiple <column> elements, each specifying one model +column. The "type" attribute specifies the data type for the column. + + +A UI Definition fragment for a tree store + + + + + + + +]]> + + + + #GtkTreeModel, #GtkTreeStore diff --git a/docs/reference/gtk/tmpl/gtktreeview.sgml b/docs/reference/gtk/tmpl/gtktreeview.sgml index faf41a4b72..1b981bed7d 100644 --- a/docs/reference/gtk/tmpl/gtktreeview.sgml +++ b/docs/reference/gtk/tmpl/gtktreeview.sgml @@ -42,6 +42,33 @@ former you can use gtk_tree_view_convert_widget_to_bin_window_coords() (and vice versa). + +GtkTreeView as GtkBuildable + +The GtkTreeView implementation of the GtkBuildable interface accepts +GtkTreeViewColumn objects as <child> elements in UI definitions. + + +A UI definition fragment with GtkTreeView + + liststore1 + + + Test + + + " + 1 + + + + + +]]> + + + #GtkTreeViewColumn, #GtkTreeSelection, #GtkTreeDnd, #GtkTreeMode, #GtkTreeSortable, #GtkTreeModelSort, #GtkListStore, #GtkTreeStore, #GtkCellRenderer, #GtkCellEditable, #GtkCellRendererPixbuf, #GtkCellRendererText, #GtkCellRendererToggle diff --git a/docs/reference/gtk/tmpl/gtkuimanager.sgml b/docs/reference/gtk/tmpl/gtkuimanager.sgml index 26e53df767..f08e5f088c 100644 --- a/docs/reference/gtk/tmpl/gtkuimanager.sgml +++ b/docs/reference/gtk/tmpl/gtkuimanager.sgml @@ -199,6 +199,50 @@ to which the submenu is associated.
+ +GtkUIManager as GtkBuildable + +The GtkUIManager implementation of the GtkBuildable interface accepts +GtkActionGroup objects as <child> elements in UI definitions. + + +A GtkUIManager UI definition as described above can be embedded in +an GtkUIManager <object> element in a GtkBuilder UI definition. + + +The widgets that are constructed by a GtkUIManager can be embedded in +other parts of the constructed user interface with the help of the +"constructor" attribute. See the example below. + + +An embedded GtkUIManager UI definition + + + + + + _File + + + + + + + + + + + + + + + + +]]> + + + #GtkBuilder diff --git a/docs/reference/gtk/tmpl/gtkvscrollbar.sgml b/docs/reference/gtk/tmpl/gtkvscrollbar.sgml index 9e73ef7752..01d75afd2d 100644 --- a/docs/reference/gtk/tmpl/gtkvscrollbar.sgml +++ b/docs/reference/gtk/tmpl/gtkvscrollbar.sgml @@ -2,21 +2,17 @@ GtkVScrollbar -A vertical scrollbar + -The #GtkVScrollbar widget is a widget arranged vertically creating a -scrollbar. See #GtkScrollbar for details on scrollbars. #GtkAdjustment -pointers may be added to handle the adjustment of the scrollbar or it -may be left %NULL in which case one will be created for you. See -#GtkAdjustment for details. + -#GtkScrollbar, #GtkScrolledWindow + diff --git a/docs/reference/gtk/tmpl/gtkwidget.sgml b/docs/reference/gtk/tmpl/gtkwidget.sgml index c2e26da700..d7de8d48c4 100644 --- a/docs/reference/gtk/tmpl/gtkwidget.sgml +++ b/docs/reference/gtk/tmpl/gtkwidget.sgml @@ -22,6 +22,23 @@ style properties and gtk_widget_style_get_property(), gtk_widget_style_get() or gtk_widget_style_get_valist() to obtain the value of a style property. + +GtkWidget as GtkBuildable + +The GtkWidget implementation of the GtkBuildable interface supports a +custom <accelerator> element, which has attributes named key, +modifiers and signal and allows to specify accelerators. + + +A UI definition fragment specifying an accelerator + + + +]]> + + +