Typo.
[cl-gtk2.git] / doc / gtk.objects.texi
index a2eb1d1..c9a8fa3 100644 (file)
@@ -21,7 +21,6 @@
 * i-m-context::
 * icon-factory::
 * icon-theme::
-* item-factory::
 * list-store::
 * page-setup::
 * print-context::
@@ -44,7 +43,6 @@
 * text-tag-table::
 * toggle-action::
 * tooltip::
-* tooltips::
 * tree-lisp-store::
 * tree-model-filter::
 * tree-model-sort::
@@ -61,7 +59,7 @@
 @Class accel-group
 Superclass: @ref{g-object}
 
-An @ref{accel-group} represents a group of keyboard accelerators, typically attached to a toplevel @ref{gtk-window} (with gtk_window_add_accel_group()). Usually you won't need to create an @ref{accel-group} directly; instead, when using @ref{item-factory}, GTK+ automatically sets up the accelerators for your menus in the item factory's @ref{accel-group}s.
+An @ref{accel-group} represents a group of keyboard accelerators, typically attached to a toplevel @ref{gtk-window} (with gtk_window_add_accel_group()). Usually you won't need to create an @ref{accel-group} directly.
 
 Note that accelerators are different from mnemonics. Accelerators are shortcuts for activating a menu item; they appear alongside the menu item they're a shortcut for. For example "Ctrl+Q" might appear alongside the "Quit" menu item. Mnemonics are shortcuts for GUI elements such as text entries or buttons; they appear as underlined characters. See @ref{slot.label.mnemonic-widget,label-mnemonic-widget}. Menu items can have both accelerators and mnemonics, of course.
 
@@ -1193,7 +1191,7 @@ Superclass: @ref{g-object} @ref{buildable} @ref{cell-layout}
 
 @ref{entry-completion} is an auxiliary object to be used in conjunction with @ref{entry} to provide the completion functionality. It implements the @ref{cell-layout} interface, to allow the user to add extra cells to the @ref{tree-view} with completion matches.
 
-"Completion functionality" means that when the user modifies the text in the entry, @ref{entry-completion} checks which rows in the model match the current content of the entry, and displays a list of matches. By default, the matching is done by comparing the entry text case-insensitively against the text column of the model (see @SlotRef{entry-completion,text-column}), but this can be overridden with a custom match function (see gtk_entry_completion_set_match_func()).
+"Completion functionality" means that when the user modifies the text in the entry, @ref{entry-completion} checks which rows in the model match the current content of the entry, and displays a list of matches. By default, the matching is done by comparing the entry text case-insensitively against the text column of the model (see @SlotRef{entry-completion,text-column}), but this can be overridden with a custom match function (see @SlotRef{entry-completion,match-function}).
 
 When the user selects a completion, the content of the entry is updated. By default, the content of the entry is replaced by the text column of the model, but this can be overridden by connecting to the @SignalRef{entry-completion,match-selected} signal and updating the entry in the signal handler. Note that you should return TRUE from the signal handler to suppress the default behaviour.
 
@@ -1203,6 +1201,9 @@ In addition to regular completion matches, which will be inserted into the entry
 
 Slots:
 @itemize
+@item @anchor{slot.entry-completion.entry}entry. Type: @ref{entry}. Accessor: @anchor{fn.entry-completion-entry}@code{entry-completion-entry}. Read-only.
+
+The entry completion has been attached to.
 @item @anchor{slot.entry-completion.inline-completion}inline-completion. Type: @code{boolean}. Accessor: @anchor{fn.entry-completion-inline-completion}@code{entry-completion-inline-completion}.
 
 Determines whether the common prefix of the possible completions should be inserted automatically in the entry. Note that this requires text-column to be set, even if you are using a custom match function.
@@ -1213,6 +1214,11 @@ Default value: FALSE
 Determines whether the possible completions on the popup will appear in the entry as you navigate through them.
 
 Default value: FALSE
+@item @anchor{slot.entry-completion.match-function}match-function. Type: function. Accessor: @anchor{fn.entry-completion-match-function}@code{entry-completion-match-function}. Write-only.
+
+Sets the match function for completion. The match function is used to determine if a row should or should not be in the completion list.
+
+The match function has the following signature: (completion @ref{entry-completion}), (key @code{string}), (tree-iter @ref{tree-iter}) @result should-be-displayed-p. This function which decides whether the row indicated by @var{tree-iter} matches a given @var{key}, and should be displayed as a possible completion for @var{key}. Note that key is normalized and case-folded (see g_utf8_normalize() and g_utf8_casefold()). If this is not appropriate, match functions have access to the unmodified key via @SlotRef{entry,text} of @SlotRef{entry-completion,entry}.
 @item @anchor{slot.entry-completion.minimum-key-length}minimum-key-length. Type: @code{integer}. Accessor: @anchor{fn.entry-completion-minimum-key-length}@code{entry-completion-minimum-key-length}.
 
 Minimum length of the search key in order to look up matches.
@@ -1264,7 +1270,47 @@ Applications may connect to this signal in order to insert only a smaller part o
 Gets emitted when a match from the list is selected. The default behaviour is to replace the contents of the entry with the contents of the text column in the row pointed to by iter.
 @end itemize
 
+@RMethod entry-completion-complete
+@lisp
+(entry-completion-complete completion)
+@end lisp
+
+Requests a completion operation, or in other words a refiltering of the current list with completions, using the current key. The completion list view will be updated accordingly.
+
+@RMethod entry-completion-completion-prefix
+@lisp
+(entry-completion-completion-prefix completion) @result{} string
+@end lisp
+
+Get the original text entered by the user that triggered the completion or NULL if there's no completion ongoing.
+
+@RMethod entry-completion-insert-prefix
+@lisp
+(entry-completion-insert-prefix completion)
+@end lisp
+
+Requests a prefix insertion.
 
+@RMethod entry-completion-insert-action-text
+@lisp
+(entry-completion-insert-action-text completion index text)
+@end lisp
+
+Inserts an action in completion's action item list at position @var{index} with text @var{text}. If you want the action item to have markup, use @ref{entry-completion-insert-action-markup}.
+
+@RMethod entry-completion-insert-action-markup
+@lisp
+(entry-completion-insert-action-markup completion index markup)
+@end lisp
+
+Inserts an action in completion's action item list at position @var{index} with markup @var{markup}.
+
+@RMethod entry-completion-delete-action
+@lisp
+(entry-completion-delete-action completion index)
+@end lisp
+
+Deletes the action at @var{index} from completion's action list.
 
 
 @node file-filter
@@ -1295,7 +1341,7 @@ Signals:
 @Class gtk-object
 Superclass: @ref{g-initially-unowned}
 
-Subclasses: @ref{item-factory} @ref{tooltips} @ref{recent-filter} @ref{file-filter} @ref{cell-renderer} @ref{tree-view-column} @ref{adjustment} @ref{widget}
+Subclasses: @ref{recent-filter} @ref{file-filter} @ref{cell-renderer} @ref{tree-view-column} @ref{adjustment} @ref{widget}
 
 @ref{gtk-object} is the base class for all widgets, and for a few non-widget objects such as @ref{adjustment}. @ref{gtk-object} predates @ref{g-object}; non-widgets that derive from @ref{gtk-object} rather than @ref{g-object} do so for backward compatibility reasons.
 
@@ -1424,26 +1470,6 @@ Signals:
 
 
 
-@node item-factory
-@section item-factory
-@Class item-factory
-Superclass: @ref{gtk-object}
-
-@ref{item-factory} has been deprecated in favour of @ref{ui-manager}.
-
-
-Slots:
-@itemize
-@end itemize
-
-
-Signals:
-@itemize
-@end itemize
-
-
-
-
 @node list-store
 @section list-store
 @Class list-store
@@ -1484,8 +1510,6 @@ Signals:
 @end itemize
 
 
-
-
 @node print-context
 @section print-context
 @Class print-context
@@ -1761,38 +1785,143 @@ Signals:
 @Class status-icon
 Superclass: @ref{g-object}
 
+The "system tray" or notification area is normally used for transient icons that indicate some special state. For example, a system tray icon might appear to tell the user that they have new mail, or have an incoming instant message, or something along those lines. The basic idea is that creating an icon in the notification area is less annoying than popping up a dialog.
+
+A @ref{status-icon} object can be used to display an icon in a "system tray". The icon can have a tooltip, and the user can interact with it by activating it or popping up a context menu. Critical information should not solely be displayed in a @ref{status-icon}, since it may not be visible (e.g. when the user doesn't have a notification area on his panel). This can be checked with @SlotRef{status-icon,embedded}.
+
+On X11, the implementation follows the freedesktop.org "System Tray" specification. Implementations of the "tray" side of this specification can be found e.g. in the GNOME and KDE panel applications.
+
+Note that a @ref{status-icon} is not a @ref{widget}, but just a @ref{g-object}. Making it a widget would be impractical, since the system tray on Win32 doesn't allow to embed arbitrary widgets.
+
 Slots:
 @itemize
 @item @anchor{slot.status-icon.blinking}blinking. Type: @code{boolean}. Accessor: @anchor{fn.status-icon-blinking}@code{status-icon-blinking}.
+
+Whether or not the status icon is blinking.
+
+Default value: FALSE
 @item @anchor{slot.status-icon.embedded}embedded. Type: @code{boolean}. Accessor: @anchor{fn.status-icon-embedded}@code{status-icon-embedded}. Read-only.
+
+TRUE if the statusicon is embedded in a notification area.
+
+Default value: FALSE
 @item @anchor{slot.status-icon.file}file. Type: @code{string}. Accessor: @anchor{fn.status-icon-file}@code{status-icon-file}. Write-only.
+
+Filename to load and display.
 @item @anchor{slot.status-icon.gicon}gicon. Type: @code{GIcon}. Accessor: @anchor{fn.status-icon-gicon}@code{status-icon-gicon}.
+
+The GIcon displayed in the GtkStatusIcon. For themed icons, the image will be updated automatically if the theme changes.
 @item @anchor{slot.status-icon.has-tooltip}has-tooltip. Type: @code{boolean}. Accessor: @anchor{fn.status-icon-has-tooltip}@code{status-icon-has-tooltip}.
+
+Enables or disables the emission of @SignalRef{status-icon,query-tooltip}. A value of TRUE indicates that status icon can have a tooltip, in this case the status icon will be queried using @SignalRef{status-icon,query-tooltip} to determine whether it will provide a tooltip or not.
+
+Note that setting this property to TRUE for the first time will change the event masks of the windows of this status icon to include leave-notify and motion-notify events. This will not be undone when the property is set to FALSE again.
+
+Whether this property is respected is platform dependent. For plain text tooltips, use @SlotRef{status-icon,tooltip-text} in preference.
+
+Default value: FALSE
 @item @anchor{slot.status-icon.icon-name}icon-name. Type: @code{string}. Accessor: @anchor{fn.status-icon-icon-name}@code{status-icon-icon-name}.
+
+The name of the icon from the icon theme.
 @item @anchor{slot.status-icon.orientation}orientation. Type: @ref{orientation}. Accessor: @anchor{fn.status-icon-orientation}@code{status-icon-orientation}. Read-only.
+
+The orientation of the tray in which the statusicon is embedded.
 @item @anchor{slot.status-icon.pixbuf}pixbuf. Type: @ref{pixbuf}. Accessor: @anchor{fn.status-icon-pixbuf}@code{status-icon-pixbuf}.
+
+
+A @ref{pixbuf} to display.
 @item @anchor{slot.status-icon.screen}screen. Type: @ref{screen}. Accessor: @anchor{fn.status-icon-screen}@code{status-icon-screen}.
+
+The screen where this status icon will be displayed.
 @item @anchor{slot.status-icon.size}size. Type: @code{integer}. Accessor: @anchor{fn.status-icon-size}@code{status-icon-size}. Read-only.
+
+The size of the icon.
+
+Allowed values: >= 0
+
+Default value: 0
 @item @anchor{slot.status-icon.stock}stock. Type: @code{string}. Accessor: @anchor{fn.status-icon-stock}@code{status-icon-stock}.
+
+Stock ID for a stock image to display.
+
+Default value: NULL
 @item @anchor{slot.status-icon.storage-type}storage-type. Type: @ref{image-type}. Accessor: @anchor{fn.status-icon-storage-type}@code{status-icon-storage-type}. Read-only.
+
+The representation being used for image data.
 @item @anchor{slot.status-icon.tooltip-markup}tooltip-markup. Type: @code{string}. Accessor: @anchor{fn.status-icon-tooltip-markup}@code{status-icon-tooltip-markup}.
+
+Sets the text of tooltip to be the given string, which is marked up with the Pango text markup language.
+
+This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL. @SlotRef{status-icon,has-tooltip} will automatically be set to TRUE and the default handler for the @SignalRef{status-icon,query-tooltip} signal will take care of displaying the tooltip.
+
+On some platforms, embedded markup will be ignored.
+
+Default value: NULL
 @item @anchor{slot.status-icon.tooltip-text}tooltip-text. Type: @code{string}. Accessor: @anchor{fn.status-icon-tooltip-text}@code{status-icon-tooltip-text}.
+
+Sets the text of tooltip to be the given string.
+
+This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL. @SlotRef{status-icon,has-tooltip} will automatically be set to TRUE and the default handler for the @SignalRef{status-icon,query-tooltip} signal will take care of displaying the tooltip.
+
+Default value: NULL
 @item @anchor{slot.status-icon.visible}visible. Type: @code{boolean}. Accessor: @anchor{fn.status-icon-visible}@code{status-icon-visible}.
+
+Whether or not the status icon is visible.
+
+Default value: TRUE
 @end itemize
 
 
 Signals:
 @itemize
 @item @anchor{signal.status-icon.activate}"activate". Signature: (instance @ref{status-icon}) @result{} void. Options: run-first, action.
-@item @anchor{signal.status-icon.button-press-event}"button-press-event". Signature: (instance @ref{status-icon}), (arg-1 @ref{event}) @result{} @code{boolean}. Options: run-last.
-@item @anchor{signal.status-icon.button-release-event}"button-release-event". Signature: (instance @ref{status-icon}), (arg-1 @ref{event}) @result{} @code{boolean}. Options: run-last.
-@item @anchor{signal.status-icon.popup-menu}"popup-menu". Signature: (instance @ref{status-icon}), (arg-1 @code{integer}), (arg-2 @code{integer}) @result{} void. Options: run-first, action.
-@item @anchor{signal.status-icon.query-tooltip}"query-tooltip". Signature: (instance @ref{status-icon}), (arg-1 @code{integer}), (arg-2 @code{integer}), (arg-3 @code{boolean}), (arg-4 @ref{tooltip}) @result{} @code{boolean}. Options: run-last.
-@item @anchor{signal.status-icon.scroll-event}"scroll-event". Signature: (instance @ref{status-icon}), (arg-1 @ref{event}) @result{} @code{boolean}. Options: run-last.
-@item @anchor{signal.status-icon.size-changed}"size-changed". Signature: (instance @ref{status-icon}), (arg-1 @code{integer}) @result{} @code{boolean}. Options: run-last.
-@end itemize
 
+Gets emitted when the user activates the status icon. If and how status icons can activated is platform-dependent.
+
+Unlike most G_SIGNAL_ACTION signals, this signal is meant to be used by applications and should be wrapped by language bindings.
+@item @anchor{signal.status-icon.button-press-event}"button-press-event". Signature: (instance @ref{status-icon}), (event @ref{event-button}) @result{} @code{boolean}. Options: run-last.
+
+This signal will be emitted when a button (typically from a mouse) is pressed.
+
+Whether this event is emitted is platform-dependent. Use the @SignalRef{status-icon,activate} and @SignalRef{status-icon,popup-menu} signals in preference.
+@item @anchor{signal.status-icon.button-release-event}"button-release-event". Signature: (instance @ref{status-icon}), (event @ref{event-button}) @result{} @code{boolean}. Options: run-last.
 
+This signal will be emitted when a button (typically from a mouse) is released.
+
+Whether this event is emitted is platform-dependent. Use the @SignalRef{status-icon,activate} and @SignalRef{status-icon,popup-menu} signals in preference.
+@item @anchor{signal.status-icon.popup-menu}"popup-menu". Signature: (instance @ref{status-icon}), (button @code{integer}), (activate-time @code{integer}) @result{} void. Options: run-first, action.
+
+Gets emitted when the user brings up the context menu of the status icon. Whether status icons can have context menus and how these are activated is platform-dependent.
+
+The button and activate-time parameters should be passed as the last to arguments to gtk_menu_popup().
+
+Unlike most G_SIGNAL_ACTION signals, this signal is meant to be used by applications and should be wrapped by language bindings.
+@item @anchor{signal.status-icon.query-tooltip}"query-tooltip". Signature: (instance @ref{status-icon}), (x @code{integer}), (y @code{integer}), (keyboard-mode @code{boolean}), (tooltip @ref{tooltip}) @result{} @code{boolean}. Options: run-last.
+
+Emitted when the "gtk-tooltip-timeout" has expired with the cursor hovering above status_icon; or emitted when status_icon got focus in keyboard mode.
+
+Using the given coordinates, the signal handler should determine whether a tooltip should be shown for status-icon. If this is the case TRUE should be returned, FALSE otherwise. Note that if keyboard-mode is TRUE, the values of x and y are undefined and should not be used.
+
+The signal handler is free to manipulate @var{tooltip} with the therefore destined function calls.
+
+Whether this signal is emitted is platform-dependent. For plain text tooltips, use @SlotRef{status-icon,tooltip-text} in preference.
+
+@var{x}, @var{y}: the x and y coordinates of the cursor position where the request has been emitted, relative to status-icon
+
+@var{keyboard-mode}: TRUE if the tooltip was trigged using the keyboard
+@item @anchor{signal.status-icon.scroll-event}"scroll-event". Signature: (instance @ref{status-icon}), (event @ref{event-scroll}) @result{} @code{boolean}. Options: run-last.
+
+This signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned.
+
+Whether this event is emitted is platform-dependent.
+@item @anchor{signal.status-icon.size-changed}"size-changed". Signature: (instance @ref{status-icon}), (size @code{integer}) @result{} @code{boolean}. Options: run-last.
+
+Gets emitted when the size available for the image changes, e.g. because the notification area got resized.
+
+Returns TRUE if the icon was updated for the new size. Otherwise, GTK+ will scale the icon as necessary.
+@end itemize
+
+TODO: gtk_status_icon_position_menu, gtk_status_icon_get_x11_window_id 
 
 
 @node style
@@ -2043,23 +2172,6 @@ Signals:
 
 
 
-@node tooltips
-@section tooltips
-@Class tooltips
-Superclass: @ref{gtk-object}
-
-Slots:
-@itemize
-@end itemize
-
-
-Signals:
-@itemize
-@end itemize
-
-
-
-
 @node tree-lisp-store
 @section tree-lisp-store
 @Class tree-lisp-store