1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
|
<!-- ##### SECTION Title ##### -->
GtkMenuShell
<!-- ##### SECTION Short_Description ##### -->
A base class for menu objects
<!-- ##### SECTION Long_Description ##### -->
<para>
A #GtkMenuShell is the abstract base class used to derive the
#GtkMenu and #GtkMenuBar subclasses.
</para>
<para>
A #GtkMenuShell is a container of #GtkMenuItem objects arranged in a
list which can be navigated, selected, and activated by the user to perform
application functions. A #GtkMenuItem can have a submenu associated with it,
allowing for nested hierarchical menus.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkMenuShell ##### -->
<para>
The #GtkMenuShell-struct struct contains the following fields.
(These fields should be considered read-only. They should never be set by
an application.)
<informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody>
<row>
<entry>#GList *children;</entry>
<entry>The list of #GtkMenuItem objects contained by this #GtkMenuShell.
</entry>
</row>
</tbody></tgroup></informaltable>
</para>
<!-- ##### SIGNAL GtkMenuShell::activate-current ##### -->
<para>
An action signal that activates the current menu item within the menu
shell.
</para>
@menushell: the object which received the signal.
@force_hide: if TRUE, hide the menu after activating the menu item.
<!-- ##### SIGNAL GtkMenuShell::cancel ##### -->
<para>
An action signal which cancels the selection within the menu shell.
Causes the GtkMenuShell::selection-done signal to be emitted.
</para>
@menushell: the object which received the signal.
<!-- ##### SIGNAL GtkMenuShell::cycle-focus ##### -->
<para>
</para>
@menushell: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkMenuShell::deactivate ##### -->
<para>
This signal is emitted when a menu shell is deactivated.
</para>
@menushell: the object which received the signal.
<!-- ##### SIGNAL GtkMenuShell::move-current ##### -->
<para>
An action signal which moves the current menu item in the direction
specified by @direction.
</para>
@menushell: the object which received the signal.
@direction: the direction to move.
<!-- ##### SIGNAL GtkMenuShell::move-selected ##### -->
<para>
</para>
@menushell: the object which received the signal.
@arg1:
@Returns:
<!-- ##### SIGNAL GtkMenuShell::selection-done ##### -->
<para>
This signal is emitted when a selection has been completed within a menu
shell.
</para>
@menushell: the object which received the signal.
<!-- ##### ARG GtkMenuShell:take-focus ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_menu_shell_append ##### -->
<para>
Adds a new #GtkMenuItem to the end of the menu shell's item list.
</para>
@menu_shell: a #GtkMenuShell.
@child: The #GtkMenuItem to add.
<!-- ##### FUNCTION gtk_menu_shell_prepend ##### -->
<para>
Adds a new #GtkMenuItem to the beginning of the menu shell's item list.
</para>
@menu_shell: a #GtkMenuShell.
@child: The #GtkMenuItem to add.
<!-- ##### FUNCTION gtk_menu_shell_insert ##### -->
<para>
Adds a new #GtkMenuItem to the menu shell's item list at the position
indicated by @position.
</para>
@menu_shell: a #GtkMenuShell.
@child: The #GtkMenuItem to add.
@position: The position in the item list where @child is added.
Positions are numbered from 0 to n-1.
<!-- ##### FUNCTION gtk_menu_shell_deactivate ##### -->
<para>
Deactivates the menu shell. Typically this results in the menu shell
being erased from the screen.
</para>
@menu_shell: a #GtkMenuShell.
<!-- ##### FUNCTION gtk_menu_shell_select_item ##### -->
<para>
Selects the menu item from the menu shell.
</para>
@menu_shell: a #GtkMenuShell.
@menu_item: The #GtkMenuItem to select.
<!-- ##### FUNCTION gtk_menu_shell_select_first ##### -->
<para>
</para>
@menu_shell:
@search_sensitive:
<!-- ##### FUNCTION gtk_menu_shell_deselect ##### -->
<para>
Deselects the currently selected item from the menu shell, if any.
</para>
@menu_shell: a #GtkMenuShell.
<!-- ##### FUNCTION gtk_menu_shell_activate_item ##### -->
<para>
Activates the menu item within the menu shell.
</para>
@menu_shell: a #GtkMenuShell.
@menu_item: The #GtkMenuItem to activate.
@force_deactivate: If TRUE, force the deactivation of the menu shell
after the menu item is activated.
<!-- ##### FUNCTION gtk_menu_shell_cancel ##### -->
<para>
</para>
@menu_shell:
<!-- ##### FUNCTION gtk_menu_shell_set_take_focus ##### -->
<para>
</para>
@menu_shell:
@take_focus:
<!-- ##### FUNCTION gtk_menu_shell_get_take_focus ##### -->
<para>
</para>
@menu_shell:
@Returns:
<!-- ##### ENUM GtkMenuDirectionType ##### -->
<para>
An enumeration representing directional movements within a menu.
</para>
@GTK_MENU_DIR_PARENT: To the parent menu shell.
@GTK_MENU_DIR_CHILD: To the submenu, if any, associated with the item.
@GTK_MENU_DIR_NEXT: To the next menu item.
@GTK_MENU_DIR_PREV: To the previous menu item.
|