diff options
Diffstat (limited to 'docs/reference/gtk')
21 files changed, 504 insertions, 43 deletions
diff --git a/docs/reference/gtk/tmpl/gtk-unused.sgml b/docs/reference/gtk/tmpl/gtk-unused.sgml index 29f11c95a3..a46656dd00 100644 --- a/docs/reference/gtk/tmpl/gtk-unused.sgml +++ b/docs/reference/gtk/tmpl/gtk-unused.sgml @@ -550,6 +550,22 @@ This is a private struct used by GTK+ internally, don't worry about it. @old_accel_key: @old_accel_mods: +<!-- ##### SIGNAL GtkAction::connect-proxy ##### --> +<para> + +</para> + +@action: the object which received the signal. +@widget: + +<!-- ##### SIGNAL GtkAction::disconnect-proxy ##### --> +<para> + +</para> + +@action: the object which received the signal. +@widget: + <!-- ##### USER_FUNCTION GtkArgGetFunc ##### --> <para> Define a function pointer. Deprecated. diff --git a/docs/reference/gtk/tmpl/gtkaction.sgml b/docs/reference/gtk/tmpl/gtkaction.sgml index 59bcd796f8..fb425ead82 100644 --- a/docs/reference/gtk/tmpl/gtkaction.sgml +++ b/docs/reference/gtk/tmpl/gtkaction.sgml @@ -62,22 +62,11 @@ and should not be accessed directly. @action: the object which received the signal. -<!-- ##### SIGNAL GtkAction::connect-proxy ##### --> +<!-- ##### ARG GtkAction:action-group ##### --> <para> </para> -@action: the object which received the signal. -@widget: - -<!-- ##### SIGNAL GtkAction::disconnect-proxy ##### --> -<para> - -</para> - -@action: the object which received the signal. -@widget: - <!-- ##### ARG GtkAction:hide-if-empty ##### --> <para> @@ -123,6 +112,28 @@ and should not be accessed directly. </para> +<!-- ##### ARG GtkAction:visible-horizontal ##### --> +<para> + +</para> + +<!-- ##### ARG GtkAction:visible-vertical ##### --> +<para> + +</para> + +<!-- ##### FUNCTION gtk_action_new ##### --> +<para> + +</para> + +@name: +@label: +@tooltip: +@stock_id: +@Returns: + + <!-- ##### FUNCTION gtk_action_get_name ##### --> <para> @@ -132,6 +143,42 @@ and should not be accessed directly. @Returns: +<!-- ##### FUNCTION gtk_action_is_sensitive ##### --> +<para> + +</para> + +@action: +@Returns: + + +<!-- ##### FUNCTION gtk_action_get_sensitive ##### --> +<para> + +</para> + +@action: +@Returns: + + +<!-- ##### FUNCTION gtk_action_is_visible ##### --> +<para> + +</para> + +@action: +@Returns: + + +<!-- ##### FUNCTION gtk_action_get_visible ##### --> +<para> + +</para> + +@action: +@Returns: + + <!-- ##### FUNCTION gtk_action_activate ##### --> <para> diff --git a/docs/reference/gtk/tmpl/gtkactiongroup.sgml b/docs/reference/gtk/tmpl/gtkactiongroup.sgml index 6dd50153a9..6ec1b5fea0 100644 --- a/docs/reference/gtk/tmpl/gtkactiongroup.sgml +++ b/docs/reference/gtk/tmpl/gtkactiongroup.sgml @@ -40,11 +40,55 @@ members and should not be accessed directly. </para> +<!-- ##### SIGNAL GtkActionGroup::connect-proxy ##### --> +<para> + +</para> + +@actiongroup: the object which received the signal. +@arg1: +@widget: + +<!-- ##### SIGNAL GtkActionGroup::disconnect-proxy ##### --> +<para> + +</para> + +@actiongroup: the object which received the signal. +@arg1: +@widget: + +<!-- ##### SIGNAL GtkActionGroup::post-activate ##### --> +<para> + +</para> + +@actiongroup: the object which received the signal. +@arg1: + +<!-- ##### SIGNAL GtkActionGroup::pre-activate ##### --> +<para> + +</para> + +@actiongroup: the object which received the signal. +@arg1: + <!-- ##### ARG GtkActionGroup:name ##### --> <para> </para> +<!-- ##### ARG GtkActionGroup:sensitive ##### --> +<para> + +</para> + +<!-- ##### ARG GtkActionGroup:visible ##### --> +<para> + +</para> + <!-- ##### FUNCTION gtk_action_group_new ##### --> <para> @@ -63,6 +107,42 @@ members and should not be accessed directly. @Returns: +<!-- ##### FUNCTION gtk_action_group_get_sensitive ##### --> +<para> + +</para> + +@action_group: +@Returns: + + +<!-- ##### FUNCTION gtk_action_group_set_sensitive ##### --> +<para> + +</para> + +@action_group: +@sensitive: + + +<!-- ##### FUNCTION gtk_action_group_get_visible ##### --> +<para> + +</para> + +@action_group: +@Returns: + + +<!-- ##### FUNCTION gtk_action_group_set_visible ##### --> +<para> + +</para> + +@action_group: +@visible: + + <!-- ##### FUNCTION gtk_action_group_get_action ##### --> <para> @@ -91,6 +171,16 @@ members and should not be accessed directly. @action: +<!-- ##### FUNCTION gtk_action_group_add_action_with_accel ##### --> +<para> + +</para> + +@action_group: +@action: +@accelerator: + + <!-- ##### FUNCTION gtk_action_group_remove_action ##### --> <para> diff --git a/docs/reference/gtk/tmpl/gtkbutton.sgml b/docs/reference/gtk/tmpl/gtkbutton.sgml index 4b5c0be256..e80b7722ac 100644 --- a/docs/reference/gtk/tmpl/gtkbutton.sgml +++ b/docs/reference/gtk/tmpl/gtkbutton.sgml @@ -97,6 +97,16 @@ mouse cursor is. </para> +<!-- ##### ARG GtkButton:xalign ##### --> +<para> + +</para> + +<!-- ##### ARG GtkButton:yalign ##### --> +<para> + +</para> + <!-- ##### ARG GtkButton:child-displacement-x ##### --> <para> @@ -292,3 +302,23 @@ Returns the current relief style of the given #GtkButton. @Returns: +<!-- ##### FUNCTION gtk_button_set_alignment ##### --> +<para> + +</para> + +@button: +@xalign: +@yalign: + + +<!-- ##### FUNCTION gtk_button_get_alignment ##### --> +<para> + +</para> + +@button: +@xalign: +@yalign: + + diff --git a/docs/reference/gtk/tmpl/gtkcelllayout.sgml b/docs/reference/gtk/tmpl/gtkcelllayout.sgml index 430c336ff8..39bf7c3209 100644 --- a/docs/reference/gtk/tmpl/gtkcelllayout.sgml +++ b/docs/reference/gtk/tmpl/gtkcelllayout.sgml @@ -32,6 +32,7 @@ GtkCellLayout @add_attribute: @set_cell_data_func: @clear_attributes: +@reorder: <!-- ##### USER_FUNCTION GtkCellLayoutDataFunc ##### --> <para> diff --git a/docs/reference/gtk/tmpl/gtkcellrenderer.sgml b/docs/reference/gtk/tmpl/gtkcellrenderer.sgml index fd36185868..eeaa62d017 100644 --- a/docs/reference/gtk/tmpl/gtkcellrenderer.sgml +++ b/docs/reference/gtk/tmpl/gtkcellrenderer.sgml @@ -66,6 +66,13 @@ it cannot be individually modified. </para> +<!-- ##### SIGNAL GtkCellRenderer::editing-canceled ##### --> +<para> + +</para> + +@cellrenderer: the object which received the signal. + <!-- ##### ARG GtkCellRenderer:cell-background ##### --> <para> diff --git a/docs/reference/gtk/tmpl/gtkcellrenderertext.sgml b/docs/reference/gtk/tmpl/gtkcellrenderertext.sgml index 09056b7a2c..9a890809b9 100644 --- a/docs/reference/gtk/tmpl/gtkcellrenderertext.sgml +++ b/docs/reference/gtk/tmpl/gtkcellrenderertext.sgml @@ -94,6 +94,16 @@ Renders text in a cell </para> +<!-- ##### ARG GtkCellRendererText:language ##### --> +<para> + +</para> + +<!-- ##### ARG GtkCellRendererText:language-set ##### --> +<para> + +</para> + <!-- ##### ARG GtkCellRendererText:markup ##### --> <para> @@ -119,6 +129,11 @@ Renders text in a cell </para> +<!-- ##### ARG GtkCellRendererText:single-paragraph-mode ##### --> +<para> + +</para> + <!-- ##### ARG GtkCellRendererText:size ##### --> <para> diff --git a/docs/reference/gtk/tmpl/gtkclipboard.sgml b/docs/reference/gtk/tmpl/gtkclipboard.sgml index a04634dc8a..a2ede06747 100644 --- a/docs/reference/gtk/tmpl/gtkclipboard.sgml +++ b/docs/reference/gtk/tmpl/gtkclipboard.sgml @@ -322,3 +322,4 @@ sgml-parent-document: ("../gtk-docs.sgml" "book" "refsect2" "") End: --> + diff --git a/docs/reference/gtk/tmpl/gtkmenushell.sgml b/docs/reference/gtk/tmpl/gtkmenushell.sgml index 9e08cab8ab..6ce095e335 100644 --- a/docs/reference/gtk/tmpl/gtkmenushell.sgml +++ b/docs/reference/gtk/tmpl/gtkmenushell.sgml @@ -166,6 +166,14 @@ Activates the menu item within the menu shell. after the menu item is activated. +<!-- ##### FUNCTION gtk_menu_shell_cancel ##### --> +<para> + +</para> + +@menu_shell: + + <!-- ##### ENUM GtkMenuDirectionType ##### --> <para> An enumeration representing directional movements within a menu. diff --git a/docs/reference/gtk/tmpl/gtkmessagedialog.sgml b/docs/reference/gtk/tmpl/gtkmessagedialog.sgml index e93eb22f54..0857cdc58a 100644 --- a/docs/reference/gtk/tmpl/gtkmessagedialog.sgml +++ b/docs/reference/gtk/tmpl/gtkmessagedialog.sgml @@ -131,3 +131,12 @@ then call gtk_dialog_add_buttons(). @Returns: +<!-- ##### FUNCTION gtk_message_dialog_set_markup ##### --> +<para> + +</para> + +@message_dialog: +@str: + + diff --git a/docs/reference/gtk/tmpl/gtknotebook.sgml b/docs/reference/gtk/tmpl/gtknotebook.sgml index d2f35c20c6..ddc2d5a32a 100644 --- a/docs/reference/gtk/tmpl/gtknotebook.sgml +++ b/docs/reference/gtk/tmpl/gtknotebook.sgml @@ -201,6 +201,7 @@ The #GtkNotebookPage is an opaque implementation detail of #GtkNotebook. @notebook: @child: @tab_label: +@Returns: <!-- ##### FUNCTION gtk_notebook_append_page_menu ##### --> @@ -211,6 +212,7 @@ The #GtkNotebookPage is an opaque implementation detail of #GtkNotebook. @child: @tab_label: @menu_label: +@Returns: <!-- ##### FUNCTION gtk_notebook_prepend_page ##### --> @@ -220,6 +222,7 @@ The #GtkNotebookPage is an opaque implementation detail of #GtkNotebook. @notebook: @child: the @tab_label: +@Returns: <!-- ##### FUNCTION gtk_notebook_prepend_page_menu ##### --> @@ -230,6 +233,7 @@ The #GtkNotebookPage is an opaque implementation detail of #GtkNotebook. @child: @tab_label: @menu_label: +@Returns: <!-- ##### FUNCTION gtk_notebook_insert_page ##### --> @@ -240,6 +244,7 @@ The #GtkNotebookPage is an opaque implementation detail of #GtkNotebook. @child: @tab_label: @position: +@Returns: <!-- ##### FUNCTION gtk_notebook_insert_page_menu ##### --> @@ -251,6 +256,7 @@ The #GtkNotebookPage is an opaque implementation detail of #GtkNotebook. @tab_label: @menu_label: @position: +@Returns: <!-- ##### FUNCTION gtk_notebook_remove_page ##### --> diff --git a/docs/reference/gtk/tmpl/gtkpaned.sgml b/docs/reference/gtk/tmpl/gtkpaned.sgml index 45cd6a5c8f..c039e27f08 100644 --- a/docs/reference/gtk/tmpl/gtkpaned.sgml +++ b/docs/reference/gtk/tmpl/gtkpaned.sgml @@ -212,6 +212,24 @@ Adds a child to the bottom or right pane. @shrink: can this child be made smaller than its requsition. +<!-- ##### FUNCTION gtk_paned_get_child1 ##### --> +<para> + +</para> + +@paned: +@Returns: + + +<!-- ##### FUNCTION gtk_paned_get_child2 ##### --> +<para> + +</para> + +@paned: +@Returns: + + <!-- ##### MACRO gtk_paned_set_gutter_size ##### --> <para> In older versions of GTK+, this function used to set the width of the diff --git a/docs/reference/gtk/tmpl/gtkradioaction.sgml b/docs/reference/gtk/tmpl/gtkradioaction.sgml index c32924d4da..9f1f607ddf 100644 --- a/docs/reference/gtk/tmpl/gtkradioaction.sgml +++ b/docs/reference/gtk/tmpl/gtkradioaction.sgml @@ -31,11 +31,29 @@ only private members and should not be accessed directly. @radioaction: the object which received the signal. @arg1: +<!-- ##### ARG GtkRadioAction:group ##### --> +<para> + +</para> + <!-- ##### ARG GtkRadioAction:value ##### --> <para> </para> +<!-- ##### FUNCTION gtk_radio_action_new ##### --> +<para> + +</para> + +@name: +@label: +@tooltip: +@stock_id: +@value: +@Returns: + + <!-- ##### FUNCTION gtk_radio_action_get_group ##### --> <para> diff --git a/docs/reference/gtk/tmpl/gtksettings.sgml b/docs/reference/gtk/tmpl/gtksettings.sgml index e15fd0393d..3e00e1c300 100644 --- a/docs/reference/gtk/tmpl/gtksettings.sgml +++ b/docs/reference/gtk/tmpl/gtksettings.sgml @@ -45,6 +45,11 @@ Sharing settings between applications </para> +<!-- ##### ARG GtkSettings:gtk-double-click-distance ##### --> +<para> + +</para> + <!-- ##### ARG GtkSettings:gtk-double-click-time ##### --> <para> diff --git a/docs/reference/gtk/tmpl/gtktoggleaction.sgml b/docs/reference/gtk/tmpl/gtktoggleaction.sgml index 7703aee732..356bc22bdf 100644 --- a/docs/reference/gtk/tmpl/gtktoggleaction.sgml +++ b/docs/reference/gtk/tmpl/gtktoggleaction.sgml @@ -34,6 +34,18 @@ private members and should not be accessed directly. </para> +<!-- ##### FUNCTION gtk_toggle_action_new ##### --> +<para> + +</para> + +@name: +@label: +@tooltip: +@stock_id: +@Returns: + + <!-- ##### FUNCTION gtk_toggle_action_toggled ##### --> <para> diff --git a/docs/reference/gtk/tmpl/gtktoolbar.sgml b/docs/reference/gtk/tmpl/gtktoolbar.sgml index d21fd9a404..7b695a98f6 100644 --- a/docs/reference/gtk/tmpl/gtktoolbar.sgml +++ b/docs/reference/gtk/tmpl/gtktoolbar.sgml @@ -44,6 +44,12 @@ The #GtkToolbar struct only contains private data and should only be accessed through the function described below. </para> +@num_children: +@children: +@orientation: +@style: +@icon_size: +@tooltips: <!-- ##### SIGNAL GtkToolbar::focus-home-or-end ##### --> <para> diff --git a/docs/reference/gtk/tmpl/gtktreemodelsort.sgml b/docs/reference/gtk/tmpl/gtktreemodelsort.sgml index fbd5fdf0c4..7b21248ad4 100644 --- a/docs/reference/gtk/tmpl/gtktreemodelsort.sgml +++ b/docs/reference/gtk/tmpl/gtktreemodelsort.sgml @@ -2,21 +2,124 @@ GtkTreeModelSort <!-- ##### SECTION Short_Description ##### --> -A wrapper which makes an underlying tree model sortable +A GtkTreeModel which makes an underlying tree model sortable <!-- ##### SECTION Long_Description ##### --> <para> +The #GtkTreeModelSort is a model which implements the #GtkTreeSortable +interface. It does not hold any data itself, but rather is created with +a child model and proxies its data. It has identical column types to +this child model, and the changes in the child are propagated. The +primary purpose of this model is to provide a way to sort a different +model without modifying it. +</para> +<para> +The use of this is best demonstrated through an example. In the +following sample code we create two #GtkTreeView widgets each with a +view of the same data. As the model is wrapped here by a +#GtkTreeModelSort, the two #GtkTreeView<!-- -->s can each sort their +view of the data without affecting the other. By contrast, if we +simply put the same model in each widget, then sorting the first would +sort the second. +</para> +<para> +<example> +<title>Using a <structname>GtkTreeModelSort</structname></title> +<programlisting> +{ + GtkTreeView *tree_view1; + GtkTreeView *tree_view2; + GtkTreeModel *sort_model1; + GtkTreeModel *sort_model2; + GtkTreeModel *child_model; + + /* get the child model */ + child_model = get_my_model (); + + /* Create the first tree */ + sort_model1 = gtk_tree_model_sort_new_with_model (child_model); + tree_view1 = gtk_tree_view_new_with_model (sort_model1); + + /* Create the second tree */ + sort_model2 = gtk_tree_model_sort_new_with_model (child_model); + tree_view2 = gtk_tree_view_new_with_model (sort_model2); + + /* Now we can sort the two models independently */ + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sort_model1), + COLUMN_1, GTK_SORT_ASCENDING); + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sort_model2), + COLUMN_1, GTK_SORT_DESCENDING); +} +</programlisting> +</example> +</para> +<para> +To demonstrate how to access the underlying child model from the sort +model, the next example will be a callback for the #GtkTreeSelection +"changed" signal. In this callback, we get a string from COLUMN_1 of +the model. We then modify the string, find the same selected row on the +child model, and change the row there. </para> -<!-- ##### SECTION See_Also ##### --> <para> +<example> +<title>Accessing the child model of in a selection changed callback</title> +<programlisting> +void +selection_changed (GtkTreeSelection *selection, gpointer data) +{ + GtkTreeModel *sort_model = NULL; + GtkTreeModel *child_model; + GtkTreeIter sort_iter; + GtkTreeIter child_iter; + char *some_data = NULL; + char *modified_data; + + /* Get the current selected row and the model. */ + if (! gtk_tree_selection_get_selected (selection, + &sort_model, + &sort_iter)) + return; + + + /* Look up the current value on the selected row and get a new value + * to change it to. + */ + gtk_tree_model_get (GTK_TREE_MODEL (sort_model), &sort_iter, + COLUMN_1, &some_data, + -1); + + modified_data = change_the_data (some_data); + g_free (some_data); + + /* Get an iterator on the child model, instead of the sort model. */ + gtk_tree_model_sort_convert_iter_to_child_iter (GTK_TREE_MODEL_SORT (sort_model), + &child_iter, + &sort_iter); + + /* Get the child model and change the value of the row. In this + * example, the child model is a GtkListStore. It could be any other + * type of model, though. + */ + child_model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (sort_model)); + gtk_list_store_set (GTK_LIST_STORE (child_model), &child_iter, + COLUMN_1, &modified_data, + -1); + g_free (modified_data); +} +</programlisting> +</example> +</para> +<!-- ##### SECTION See_Also ##### --> +<para> +#GtkTreeModel, #GtkListStore, #GtkTreeStore, #GtkTreeSortable, #GtkTreeModelFilter </para> <!-- ##### STRUCT GtkTreeModelSort ##### --> <para> - +This should not be accessed directly. Use the accessor functions below. </para> diff --git a/docs/reference/gtk/tmpl/gtktreeview.sgml b/docs/reference/gtk/tmpl/gtktreeview.sgml index 8d7bd7a8f6..e5e15ea11c 100644 --- a/docs/reference/gtk/tmpl/gtktreeview.sgml +++ b/docs/reference/gtk/tmpl/gtktreeview.sgml @@ -171,6 +171,11 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface. </para> +<!-- ##### ARG GtkTreeView:fixed-height-mode ##### --> +<para> + +</para> + <!-- ##### ARG GtkTreeView:hadjustment ##### --> <para> diff --git a/docs/reference/gtk/tmpl/gtkuimanager.sgml b/docs/reference/gtk/tmpl/gtkuimanager.sgml index 1037f9ccbe..8355b05db4 100644 --- a/docs/reference/gtk/tmpl/gtkuimanager.sgml +++ b/docs/reference/gtk/tmpl/gtkuimanager.sgml @@ -199,6 +199,40 @@ members and should not be accessed directly. @uimanager: the object which received the signal. @widget: +<!-- ##### SIGNAL GtkUIManager::connect-proxy ##### --> +<para> + +</para> + +@uimanager: the object which received the signal. +@arg1: +@widget: + +<!-- ##### SIGNAL GtkUIManager::disconnect-proxy ##### --> +<para> + +</para> + +@uimanager: the object which received the signal. +@arg1: +@widget: + +<!-- ##### SIGNAL GtkUIManager::post-activate ##### --> +<para> + +</para> + +@uimanager: the object which received the signal. +@arg1: + +<!-- ##### SIGNAL GtkUIManager::pre-activate ##### --> +<para> + +</para> + +@uimanager: the object which received the signal. +@arg1: + <!-- ##### ARG GtkUIManager:add-tearoffs ##### --> <para> @@ -282,6 +316,16 @@ members and should not be accessed directly. @Returns: +<!-- ##### FUNCTION gtk_ui_manager_get_toplevels ##### --> +<para> + +</para> + +@self: +@types: +@Returns: + + <!-- ##### FUNCTION gtk_ui_manager_get_action ##### --> <para> diff --git a/docs/reference/gtk/tmpl/gtkwindow.sgml b/docs/reference/gtk/tmpl/gtkwindow.sgml index 261f7d30be..3414d41555 100644 --- a/docs/reference/gtk/tmpl/gtkwindow.sgml +++ b/docs/reference/gtk/tmpl/gtkwindow.sgml @@ -66,6 +66,11 @@ Toplevel which can contain other widgets @window: the object which received the signal. @widget: +<!-- ##### ARG GtkWindow:accept-focus ##### --> +<para> + +</para> + <!-- ##### ARG GtkWindow:allow-grow ##### --> <para> @@ -702,6 +707,15 @@ Deprecated alias for gtk_window_set_position(). @setting: +<!-- ##### FUNCTION gtk_window_set_accept_focus ##### --> +<para> + +</para> + +@window: +@setting: + + <!-- ##### FUNCTION gtk_window_get_decorated ##### --> <para> @@ -872,6 +886,15 @@ Deprecated alias for gtk_window_set_position(). @Returns: +<!-- ##### FUNCTION gtk_window_get_accept_focus ##### --> +<para> + +</para> + +@window: +@Returns: + + <!-- ##### FUNCTION gtk_window_move ##### --> <para> diff --git a/docs/reference/gtk/tree_widget.sgml b/docs/reference/gtk/tree_widget.sgml index 4b16d4b93a..eb999e2919 100644 --- a/docs/reference/gtk/tree_widget.sgml +++ b/docs/reference/gtk/tree_widget.sgml @@ -15,47 +15,44 @@ <refsect1> <title>Overview</title> <para> - To create a tree or list in GTK+, you need to use the <link - linkend="GtkTreeModel">GtkTreeModel</link> interface, in + To create a tree or list in GTK+, use the <link + linkend="GtkTreeModel">GtkTreeModel</link> interface in conjunction with the <link - linkend="GtkTreeView">GtkTreeView</link> widget. - </para> - <para> - This widget is designed around a - <firstterm>Model/View/Controller</firstterm> design and consists - of four major parts: + linkend="GtkTreeView">GtkTreeView</link> widget. This widget is + designed around a <firstterm>Model/View/Controller</firstterm> + design and consists of four major parts: <simplelist> - <member>the tree view widget (<structname>GtkTreeView</structname>)</member> - <member>the view column (<structname>GtkTreeViewColumn</structname>)</member> - <member>the cell renderers (<structname>GtkCellRenderer</structname> etc.)</member> - <member>and the model interface (<structname>GtkTreeModel</structname>)</member> + <member>The tree view widget (<structname>GtkTreeView</structname>)</member> + <member>The view column (<structname>GtkTreeViewColumn</structname>)</member> + <member>The cell renderers (<structname>GtkCellRenderer</structname> etc.)</member> + <member>The model interface (<structname>GtkTreeModel</structname>)</member> </simplelist> - The <emphasis>View</emphasis> is composed of the first three, - while the last is the <emphasis>Model</emphasis>. One of the - prime benefits of the MVC design is that multiple views can be - created of a single model. For example, a model mapping the file - system could be created for a file manager. Many views could be - created to display various parts of the file system, but only one - copy need be kept in memory. + The <emphasis>View</emphasis> is composed of the first three + objects, while the last is the <emphasis>Model</emphasis>. One + of the prime benefits of the MVC design is that multiple views + can be created of a single model. For example, a model mapping + the file system could be created for a file manager. Many views + could be created to display various parts of the file system, + but only one copy need be kept in memory. </para> <para> The purpose of the cell renderers is to provide extensibility to the widget and to allow multiple ways of rendering the same type of data. - For example, consider how to render a boolean variable. Should you + For example, consider how to render a boolean variable. Should it render it as a string of "True" or "False", "On" or "Off", or should - you render it as a checkbox? + it be rendered as a checkbox? </para> </refsect1> <refsect1> <title>Creating a model</title> <para> - GTK+ 2.0 provides two types of models that can be used: - <link linkend="GtkListStore">GtkListStore</link> and - <link linkend="GtkTreeStore">GtkTreeStore</link>. GtkListStore is - used to model columned list widgets, while GtkTreeStore models - columned tree widgets. It is possible to develop a new type of model, - but the existing models should be satisfactory for all but the most - specialized of situations. Creating the model is quite simple: + GTK+ provides two simple models that can be used: the <link + linkend="GtkListStore">GtkListStore</link> and the <link + linkend="GtkTreeStore">GtkTreeStore</link>. GtkListStore is used + to model list widgets, while the GtkTreeStore models trees. It + is possible to develop a new type of model, but the existing + models should be satisfactory for all but the most specialized of + situations. Creating the model is quite simple: </para> <informalexample><programlisting><![CDATA[ GtkListStore *store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); |