forked from AuroraMiddleware/gtk
new introduction section.
Thu Jan 22 01:46:45 2004 Jonathan Blandford <jrb@gnome.org> * gtk/tmpl/gtktreemodelsort.sgml: new introduction section.
This commit is contained in:
parent
56913b4b3b
commit
7fed66df42
@ -1,3 +1,7 @@
|
||||
Thu Jan 22 01:46:45 2004 Jonathan Blandford <jrb@gnome.org>
|
||||
|
||||
* gtk/tmpl/gtktreemodelsort.sgml: new introduction section.
|
||||
|
||||
2004-01-20 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtk-sections.txt: Added gtk_paned_get_child[12].
|
||||
|
@ -52,3 +52,14 @@ End:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_file_info ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filename:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
@ -57,3 +57,63 @@ will fail with the same error.
|
||||
@data: user data passed to gdk_pixbuf_save_to_callback().
|
||||
@Returns: %TRUE if successful, %FALSE (with @error set) if failed.
|
||||
@Since: 2.4
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_save_to_callback ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@save_func:
|
||||
@user_data:
|
||||
@type:
|
||||
@error:
|
||||
@Varargs:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_save_to_callbackv ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@save_func:
|
||||
@user_data:
|
||||
@type:
|
||||
@option_keys:
|
||||
@option_values:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_save_to_buffer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@buffer:
|
||||
@buffer_size:
|
||||
@type:
|
||||
@error:
|
||||
@Varargs:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_save_to_bufferv ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@buffer:
|
||||
@buffer_size:
|
||||
@type:
|
||||
@option_keys:
|
||||
@option_values:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
@ -80,13 +80,13 @@ fields.
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader:
|
||||
@gdkpixbufloader:
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::area-updated ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader:
|
||||
@gdkpixbufloader:
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
|
@ -294,6 +294,7 @@ is loaded and must set the function pointers of the #GdkPixbufModule.
|
||||
@load_increment: continues an incremental load.
|
||||
@load_animation: loads an animation from a file.
|
||||
@save: saves a #GdkPixbuf to a file.
|
||||
@save_to_callback:
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimationClass ##### -->
|
||||
<para>
|
||||
|
@ -213,6 +213,15 @@ of an X display. All its fields are private and should not be accessed directly.
|
||||
@msec:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_set_double_click_distance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@distance:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_pointer ##### -->
|
||||
<para>
|
||||
|
||||
@ -306,3 +315,12 @@ Applications should never have any reason to use this facility
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_default_group ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
@ -254,3 +254,51 @@ when GDK gets multihead support.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_spawn_on_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@working_directory:
|
||||
@argv:
|
||||
@envp:
|
||||
@flags:
|
||||
@child_setup:
|
||||
@user_data:
|
||||
@child_pid:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_spawn_on_screen_with_pipes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@working_directory:
|
||||
@argv:
|
||||
@envp:
|
||||
@flags:
|
||||
@child_setup:
|
||||
@user_data:
|
||||
@child_pid:
|
||||
@standard_input:
|
||||
@standard_output:
|
||||
@standard_error:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_spawn_command_line_on_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@command_line:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
@ -291,3 +291,12 @@ used directly — consider it private.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_set_lock_functions ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@enter_fn:
|
||||
@leave_fn:
|
||||
|
||||
|
||||
|
@ -741,6 +741,15 @@ Registers a window as a potential drop destination.
|
||||
@override_redirect:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_accept_focus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@accept_focus:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_add_filter ##### -->
|
||||
<para>
|
||||
|
||||
@ -1220,6 +1229,15 @@ Like the X Window System, GDK supports 8 modifier keys and 5 mouse buttons.
|
||||
@leader:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_group ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_set_decorations ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -507,6 +507,16 @@ Since: 2.2
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_register_standard_event_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@event_base:
|
||||
@n_events:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_drawable_get_xdisplay ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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:
|
||||
|
||||
|
||||
|
@ -32,6 +32,7 @@ GtkCellLayout
|
||||
@add_attribute:
|
||||
@set_cell_data_func:
|
||||
@clear_attributes:
|
||||
@reorder:
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkCellLayoutDataFunc ##### -->
|
||||
<para>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -322,3 +322,4 @@ sgml-parent-document: ("../gtk-docs.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
|
@ -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.
|
||||
|
@ -131,3 +131,12 @@ then call gtk_dialog_add_buttons().
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_message_dialog_set_markup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@message_dialog:
|
||||
@str:
|
||||
|
||||
|
||||
|
@ -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 ##### -->
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
||||
|
@ -45,6 +45,11 @@ Sharing settings between applications
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkSettings:gtk-double-click-distance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkSettings:gtk-double-click-time ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
@ -171,6 +171,11 @@ linkend="GtkTreeModel">GtkTreeModel</link> interface.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTreeView:fixed-height-mode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTreeView:hadjustment ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user