~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy

« back to all changes in this revision

Viewing changes to docs/reference/gtk/html/GtkMenu.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-05-04 12:24:25 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20070504122425-0m8midgzrp40y8w2
Tags: 2.10.12-1ubuntu1
* Sync with Debian
* New upstream version:
  Fixed bugs:
  - 379414 file chooser warnings when changing path in the entry
  - 418585 GtkFileChooserDefault sizing code is not DPI independent
  - 419568 Crash in search if start with special letter
  - 435062 build dies with icon cache validation
  - 379399 Segfault to call gtk_print_operation_run twice.
  - 387889 cups backend has problems when there are too many printers
  - 418531 invalid read to gtkicontheme.c gtk_icon_theme_lookup_icon...
  - 423916 crash in color scheme code
  - 424042 Segmentation fault while quickly pressing Alt+arrows
  - 415260 Protect against negative indices when setting values in G...
  - 419171 XGetVisualInfo() may not set nxvisuals
  - 128852 Gdk cursors don't look good on win32
  - 344657 Ctrl-H doesn't toggle "Show Hidden Files" setting
  - 345345 PrintOperation::paginate is not emitted for class handler
  - 347567 GtkPrintOperation::end-print is not emitted if it's cance...
  - 369112 gtk_ui_manager_add_ui should accept unnamed separator
  - 392015 Selected menu item invisible on Windows Vista
  - 399253 MS-Windows Theme Bottom Tab placement rendering glitches
  - 399425 gtk_input_dialog_fill_axes() adds child to gtkscrolledwin...
  - 403251 [patch] little memory leak in GtkPrintJob
  - 403267 [patch] memory leak in GtkPageSetupUnixDialog
  - 403470 MS-Windows Theme tab placement other than on top leaks a ...
  - 404506 Windows system fonts that have multi-byte font names cann...
  - 405089 Incorrect window placement for GtkEventBox private window
  - 405515 Minor leak in gtkfilesystemmodel.c
  - 405539 gdk_pixbuf_save() for PNG saver can return FALSE without ...
  - 415681 gdk_window_clear_area includes an extra line and column o...
  - 418219 GtkRecentChooser should apply filter before sorting and c...
  - 418403 Scroll to printer after selecting it from settings
  - 421985 _gtk_print_operation_platform_backend_launch_preview
  - 421990 gtk_print_job_get_surface
  - 421993 gtk_print_operation_init
  - 423064 Conditional jump or move depends on uninitialised value(s...
  - 423722 Fix printing header in gtk-demo
  - 424168 gtk_print_operation_run on async preview
  - 425655 Don't install gtk+-unix-print-2.0.pc on non-UNIX platforms
  - 425786 GDK segfaults if XineramaQueryScreens fails
  - 428665 Lpr Backend gets stuck in infinite loop during gtk_enumer...
  - 429902 GtkPrintOperation leaks cairo contextes
  - 431997 First delay of GdkPixbufAnimationIter is wrong
  - 433242 Inconsistent scroll arrow position calculations
  - 433972 Placing gtk.Expander inside a gtk.TextView() changes gtk....
  - 434261 _gtk_toolbar_elide_underscores incorrectly handles some s...
  - 383354 ctrl-L should make 'Location' entry disappear
  - 418673 gtk_recent_manager_add_item
  - 429732 gtk_accel_group_finalize accesses invalid memory
  - 435028 WM_CLIENT_LEADER is wrong on the leader_window
  - 431067 Background of the header window is not updated
  - 338843 add recent files support inside the ui manager
  - 148535 add drop shadow to menus, tooltips, etc. under Windows XP
* debian/control.in:
  - Conflicts on ubuntulooks (<= 0.9.11-1)
* debian/patches/15_default-fallback-icon-theme.patch:
  - patch from Debian, fallback on gnome icon theme

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 
5
<title>GtkMenu</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
 
7
<link rel="start" href="index.html" title="GTK+ Reference Manual">
 
8
<link rel="up" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
 
9
<link rel="prev" href="GtkComboBoxEntry.html" title="GtkComboBoxEntry">
 
10
<link rel="next" href="GtkMenuBar.html" title="GtkMenuBar">
 
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
<link rel="part" href="gtk.html" title="Part&#160;I.&#160;GTK+ Overview">
 
14
<link rel="part" href="gtkbase.html" title="Part&#160;II.&#160;GTK+ Core Reference">
 
15
<link rel="part" href="gtkobjects.html" title="Part&#160;III.&#160;GTK+ Widgets and Objects">
 
16
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
 
17
<link rel="chapter" href="ch02.html" title="Widget Gallery">
 
18
<link rel="chapter" href="WindowWidgets.html" title="Windows">
 
19
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
 
20
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
 
21
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
 
22
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
 
23
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
 
24
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
 
25
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
 
26
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
 
27
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
 
28
<link rel="chapter" href="Ornaments.html" title="Ornaments">
 
29
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
 
30
<link rel="chapter" href="Printing.html" title="Printing">
 
31
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
 
32
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
 
33
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
 
34
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
 
35
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
 
36
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
 
37
<link rel="part" href="migrating.html" title="Part&#160;IV.&#160;Migrating from Previous Versions of GTK+">
 
38
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
 
39
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
 
40
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
 
41
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and GtkComboBoxEntry">
 
42
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
 
43
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
 
44
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
 
45
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
 
46
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
 
47
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
 
48
<link rel="part" href="pt05.html" title="Part&#160;V.&#160;GTK+ Tools">
 
49
<link rel="glossary" href="glossary.html" title="Glossary">
 
50
<link rel="index" href="ix01.html" title="Index">
 
51
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
 
52
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
 
53
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
 
54
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
 
55
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
 
56
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
 
57
</head>
 
58
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
59
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
60
<tr valign="middle">
 
61
<td><a accesskey="p" href="GtkComboBoxEntry.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
62
<td><a accesskey="u" href="MenusAndCombos.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
63
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
64
<th width="100%" align="center">GTK+ Reference Manual</th>
 
65
<td><a accesskey="n" href="GtkMenuBar.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
66
</tr>
 
67
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3335533" class="shortcut">Top</a>
 
68
                  &#160;|&#160;
 
69
                  <a href="#id3336669" class="shortcut">Description</a>
 
70
                  &#160;|&#160;
 
71
                  <a href="#id3336315" class="shortcut">Object Hierarchy</a>
 
72
                  &#160;|&#160;
 
73
                  <a href="#id3336385" class="shortcut">Implemented Interfaces</a>
 
74
                  &#160;|&#160;
 
75
                  <a href="#id3336407" class="shortcut">Properties</a>
 
76
                  &#160;|&#160;
 
77
                  <a href="#id3336458" class="shortcut">Child Properties</a>
 
78
                  &#160;|&#160;
 
79
                  <a href="#id3336542" class="shortcut">Style Properties</a>
 
80
                  &#160;|&#160;
 
81
                  <a href="#id3336641" class="shortcut">Signals</a></nobr></td></tr>
 
82
</table>
 
83
<div class="refentry" lang="en">
 
84
<a name="GtkMenu"></a><div class="titlepage"></div>
 
85
<div class="refnamediv"><table width="100%"><tr>
 
86
<td valign="top">
 
87
<h2>
 
88
<a name="id3335533"></a><span class="refentrytitle">GtkMenu</span>
 
89
</h2>
 
90
<p>GtkMenu &#8212; A menu widget</p>
 
91
</td>
 
92
<td valign="top" align="right"></td>
 
93
</tr></table></div>
 
94
<div class="refsynopsisdiv">
 
95
<h2>Synopsis</h2>
 
96
<pre class="synopsis">
 
97
 
 
98
#include &lt;gtk/gtk.h&gt;
 
99
 
 
100
 
 
101
                    <a href="GtkMenu.html#GtkMenu-struct">GtkMenu</a>;
 
102
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          <a href="GtkMenu.html#gtk-menu-new">gtk_menu_new</a>                        (void);
 
103
void                <a href="GtkMenu.html#gtk-menu-set-screen">gtk_menu_set_screen</a>                 (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
104
                                                         <a
 
105
href="../gdk/GdkScreen.html"
 
106
>GdkScreen</a> *screen);
 
107
#define             <a href="GtkMenu.html#gtk-menu-append">gtk_menu_append</a>                     (menu,child)
 
108
#define             <a href="GtkMenu.html#gtk-menu-prepend">gtk_menu_prepend</a>                    (menu,child)
 
109
#define             <a href="GtkMenu.html#gtk-menu-insert">gtk_menu_insert</a>                     (menu,child,pos)
 
110
void                <a href="GtkMenu.html#gtk-menu-reorder-child">gtk_menu_reorder_child</a>              (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
111
                                                         <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child,
 
112
                                                         gint position);
 
113
void                <a href="GtkMenu.html#gtk-menu-attach">gtk_menu_attach</a>                     (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
114
                                                         <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child,
 
115
                                                         guint left_attach,
 
116
                                                         guint right_attach,
 
117
                                                         guint top_attach,
 
118
                                                         guint bottom_attach);
 
119
void                <a href="GtkMenu.html#gtk-menu-popup">gtk_menu_popup</a>                      (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
120
                                                         <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *parent_menu_shell,
 
121
                                                         <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *parent_menu_item,
 
122
                                                         <a href="GtkMenu.html#GtkMenuPositionFunc">GtkMenuPositionFunc</a> func,
 
123
                                                         gpointer data,
 
124
                                                         guint button,
 
125
                                                         guint32 activate_time);
 
126
void                <a href="GtkMenu.html#gtk-menu-set-accel-group">gtk_menu_set_accel_group</a>            (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
127
                                                         <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group);
 
128
<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a>*      <a href="GtkMenu.html#gtk-menu-get-accel-group">gtk_menu_get_accel_group</a>            (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
 
129
void                <a href="GtkMenu.html#gtk-menu-set-accel-path">gtk_menu_set_accel_path</a>             (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
130
                                                         const gchar *accel_path);
 
131
void                <a href="GtkMenu.html#gtk-menu-set-title">gtk_menu_set_title</a>                  (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
132
                                                         const gchar *title);
 
133
gboolean            <a href="GtkMenu.html#gtk-menu-get-tearoff-state">gtk_menu_get_tearoff_state</a>          (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
 
134
const gchar*        <a href="GtkMenu.html#gtk-menu-get-title">gtk_menu_get_title</a>                  (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
 
135
 
 
136
void                <a href="GtkMenu.html#gtk-menu-popdown">gtk_menu_popdown</a>                    (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
 
137
void                <a href="GtkMenu.html#gtk-menu-reposition">gtk_menu_reposition</a>                 (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
 
138
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          <a href="GtkMenu.html#gtk-menu-get-active">gtk_menu_get_active</a>                 (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
 
139
void                <a href="GtkMenu.html#gtk-menu-set-active">gtk_menu_set_active</a>                 (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
140
                                                         guint index_);
 
141
void                <a href="GtkMenu.html#gtk-menu-set-tearoff-state">gtk_menu_set_tearoff_state</a>          (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
142
                                                         gboolean torn_off);
 
143
void                <a href="GtkMenu.html#gtk-menu-attach-to-widget">gtk_menu_attach_to_widget</a>           (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
144
                                                         <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *attach_widget,
 
145
                                                         <a href="GtkMenu.html#GtkMenuDetachFunc">GtkMenuDetachFunc</a> detacher);
 
146
void                <a href="GtkMenu.html#gtk-menu-detach">gtk_menu_detach</a>                     (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
 
147
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          <a href="GtkMenu.html#gtk-menu-get-attach-widget">gtk_menu_get_attach_widget</a>          (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
 
148
GList*              <a href="GtkMenu.html#gtk-menu-get-for-attach-widget">gtk_menu_get_for_attach_widget</a>      (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
 
149
void                (<a href="GtkMenu.html#GtkMenuPositionFunc">*GtkMenuPositionFunc</a>)              (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
150
                                                         gint *x,
 
151
                                                         gint *y,
 
152
                                                         gboolean *push_in,
 
153
                                                         gpointer user_data);
 
154
void                (<a href="GtkMenu.html#GtkMenuDetachFunc">*GtkMenuDetachFunc</a>)                (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *attach_widget,
 
155
                                                         <a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);
 
156
void                <a href="GtkMenu.html#gtk-menu-set-monitor">gtk_menu_set_monitor</a>                (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
157
                                                         gint monitor_num);
 
158
 
 
159
 
 
160
</pre>
 
161
</div>
 
162
<div class="refsect1" lang="en">
 
163
<a name="id3336315"></a><h2>Object Hierarchy</h2>
 
164
<pre class="synopsis">
 
165
 
 
166
  GObject
 
167
   +----GInitiallyUnowned
 
168
         +----<a href="GtkObject.html" title="GtkObject">GtkObject</a>
 
169
               +----<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
 
170
                     +----<a href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
 
171
                           +----<a href="GtkMenuShell.html" title="GtkMenuShell">GtkMenuShell</a>
 
172
                                 +----GtkMenu
 
173
                                       +----<a href="GtkRecentChooserMenu.html" title="GtkRecentChooserMenu">GtkRecentChooserMenu</a>
 
174
</pre>
 
175
</div>
 
176
<div class="refsect1" lang="en">
 
177
<a name="id3336385"></a><h2>Implemented Interfaces</h2>
 
178
<p>
 
179
GtkMenu implements
 
180
 AtkImplementorIface.</p>
 
181
</div>
 
182
<div class="refsect1" lang="en">
 
183
<a name="id3336407"></a><h2>Properties</h2>
 
184
<pre class="synopsis">
 
185
 
 
186
  "<a href="GtkMenu.html#GtkMenu--tearoff-state">tearoff-state</a>"            gboolean              : Read / Write
 
187
  "<a href="GtkMenu.html#GtkMenu--tearoff-title">tearoff-title</a>"            gchararray            : Read / Write
 
188
</pre>
 
189
</div>
 
190
<div class="refsect1" lang="en">
 
191
<a name="id3336458"></a><h2>Child Properties</h2>
 
192
<pre class="synopsis">
 
193
 
 
194
  "<a href="GtkMenu.html#GtkMenu--bottom-attach">bottom-attach</a>"            gint                  : Read / Write
 
195
  "<a href="GtkMenu.html#GtkMenu--left-attach">left-attach</a>"              gint                  : Read / Write
 
196
  "<a href="GtkMenu.html#GtkMenu--right-attach">right-attach</a>"             gint                  : Read / Write
 
197
  "<a href="GtkMenu.html#GtkMenu--top-attach">top-attach</a>"               gint                  : Read / Write
 
198
</pre>
 
199
</div>
 
200
<div class="refsect1" lang="en">
 
201
<a name="id3336542"></a><h2>Style Properties</h2>
 
202
<pre class="synopsis">
 
203
 
 
204
  "<a href="GtkMenu.html#GtkMenu--double-arrows">double-arrows</a>"            gboolean              : Read
 
205
  "<a href="GtkMenu.html#GtkMenu--horizontal-offset">horizontal-offset</a>"        gint                  : Read
 
206
  "<a href="GtkMenu.html#GtkMenu--horizontal-padding">horizontal-padding</a>"       gint                  : Read
 
207
  "<a href="GtkMenu.html#GtkMenu--vertical-offset">vertical-offset</a>"          gint                  : Read
 
208
  "<a href="GtkMenu.html#GtkMenu--vertical-padding">vertical-padding</a>"         gint                  : Read
 
209
</pre>
 
210
</div>
 
211
<div class="refsect1" lang="en">
 
212
<a name="id3336641"></a><h2>Signals</h2>
 
213
<pre class="synopsis">
 
214
 
 
215
  "<a href="GtkMenu.html#GtkMenu-move-scroll">move-scroll</a>"                                    : Run Last / Action
 
216
</pre>
 
217
</div>
 
218
<div class="refsect1" lang="en">
 
219
<a name="id3336669"></a><h2>Description</h2>
 
220
<p>
 
221
A <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> is a <a href="GtkMenuShell.html" title="GtkMenuShell"><span class="type">GtkMenuShell</span></a> that implements a drop down menu consisting of
 
222
a list of <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> objects which can be navigated and activated by the 
 
223
user to perform application functions.
 
224
</p>
 
225
<p>
 
226
A <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> is most commonly dropped down by activating a <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> in a 
 
227
<a href="GtkMenuBar.html" title="GtkMenuBar"><span class="type">GtkMenuBar</span></a> or popped up by activating a <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> in another <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.  
 
228
</p>
 
229
<p>
 
230
A <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> can also be popped up by activating a <a href="GtkOptionMenu.html" title="GtkOptionMenu"><span class="type">GtkOptionMenu</span></a>.  
 
231
Other composite widgets such as the <a href="GtkNotebook.html" title="GtkNotebook"><span class="type">GtkNotebook</span></a> can pop up a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> 
 
232
as well.
 
233
</p>
 
234
<p>
 
235
Applications can display a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> as a popup menu by calling the 
 
236
<a href="GtkMenu.html#gtk-menu-popup"><code class="function">gtk_menu_popup()</code></a> function.  The example below shows how an application
 
237
can pop up a menu when the 3rd mouse button is pressed.  
 
238
</p>
 
239
<div class="example">
 
240
<a name="id3336815"></a><p class="title"><b>Example&#160;19.&#160;Connecting the popup signal handler.</b></p>
 
241
<div class="example-contents"><pre class="programlisting">
 
242
    /* connect our handler which will popup the menu */
 
243
    g_signal_connect_swapped (window, "button_press_event",
 
244
        G_CALLBACK (my_popup_handler), menu);
 
245
</pre></div>
 
246
</div>
 
247
<br class="example-break"><div class="example">
 
248
<a name="id3336830"></a><p class="title"><b>Example&#160;20.&#160;Signal handler which displays a popup menu.</b></p>
 
249
<div class="example-contents"><pre class="programlisting">
 
250
static gint
 
251
my_popup_handler (GtkWidget *widget, GdkEvent *event)
 
252
{
 
253
  GtkMenu *menu;
 
254
  GdkEventButton *event_button;
 
255
 
 
256
  g_return_val_if_fail (widget != NULL, FALSE);
 
257
  g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
 
258
  g_return_val_if_fail (event != NULL, FALSE);
 
259
 
 
260
  /* The "widget" is the menu that was supplied when 
 
261
   * g_signal_connect_swapped() was called.
 
262
   */
 
263
  menu = GTK_MENU (widget);
 
264
 
 
265
  if (event-&gt;type == GDK_BUTTON_PRESS)
 
266
    {
 
267
      event_button = (GdkEventButton *) event;
 
268
      if (event_button-&gt;button == 3)
 
269
        {
 
270
          gtk_menu_popup (menu, NULL, NULL, NULL, NULL, 
 
271
                          event_button-&gt;button, event_button-&gt;time);
 
272
          return TRUE;
 
273
        }
 
274
    }
 
275
 
 
276
  return FALSE;
 
277
}
 
278
</pre></div>
 
279
</div>
 
280
<br class="example-break">
 
281
</div>
 
282
<div class="refsect1" lang="en">
 
283
<a name="id3336856"></a><h2>Details</h2>
 
284
<div class="refsect2" lang="en">
 
285
<a name="id3336866"></a><h3>
 
286
<a name="GtkMenu-struct"></a>GtkMenu</h3>
 
287
<a class="indexterm" name="id3336879"></a><pre class="programlisting">typedef struct _GtkMenu GtkMenu;</pre>
 
288
<p>
 
289
The <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> struct contains private data only, and
 
290
should be accessed using the functions below.
 
291
</p>
 
292
</div>
 
293
<hr>
 
294
<div class="refsect2" lang="en">
 
295
<a name="id3336904"></a><h3>
 
296
<a name="gtk-menu-new"></a>gtk_menu_new ()</h3>
 
297
<a class="indexterm" name="id3336917"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_menu_new                        (void);</pre>
 
298
<p>
 
299
Creates a new <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
300
</p>
 
301
<div class="variablelist"><table border="0">
 
302
<col align="left" valign="top">
 
303
<tbody><tr>
 
304
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
305
<td>a new <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
306
 
 
307
 
 
308
</td>
 
309
</tr></tbody>
 
310
</table></div>
 
311
</div>
 
312
<hr>
 
313
<div class="refsect2" lang="en">
 
314
<a name="id3336969"></a><h3>
 
315
<a name="gtk-menu-set-screen"></a>gtk_menu_set_screen ()</h3>
 
316
<a class="indexterm" name="id3336985"></a><pre class="programlisting">void                gtk_menu_set_screen                 (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
317
                                                         <a
 
318
href="../gdk/GdkScreen.html"
 
319
>GdkScreen</a> *screen);</pre>
 
320
<p>
 
321
Sets the <a
 
322
href="../gdk/GdkScreen.html"
 
323
><span class="type">GdkScreen</span></a> on which the menu will be displayed.</p>
 
324
<p>
 
325
 
 
326
</p>
 
327
<div class="variablelist"><table border="0">
 
328
<col align="left" valign="top">
 
329
<tbody>
 
330
<tr>
 
331
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
332
<td> a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
333
</td>
 
334
</tr>
 
335
<tr>
 
336
<td><span class="term"><em class="parameter"><code>screen</code></em>&#160;:</span></td>
 
337
<td> a <a
 
338
href="../gdk/GdkScreen.html"
 
339
><span class="type">GdkScreen</span></a>, or <a
 
340
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
 
341
><code class="literal">NULL</code></a> if the screen should be
 
342
         determined by the widget the menu is attached to.
 
343
</td>
 
344
</tr>
 
345
</tbody>
 
346
</table></div>
 
347
<p class="since">Since  2.2
 
348
</p>
 
349
</div>
 
350
<hr>
 
351
<div class="refsect2" lang="en">
 
352
<a name="id3337098"></a><h3>
 
353
<a name="gtk-menu-append"></a>gtk_menu_append()</h3>
 
354
<a class="indexterm" name="id3337113"></a><pre class="programlisting">#define gtk_menu_append(menu,child)       gtk_menu_shell_append  ((GtkMenuShell *)(menu),(child))
 
355
</pre>
 
356
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
357
<h3 class="title">Warning</h3>
 
358
<p><code class="literal">gtk_menu_append</code> is deprecated and should not be used in newly-written code. Use <a href="GtkMenuShell.html#gtk-menu-shell-append"><code class="function">gtk_menu_shell_append()</code></a> instead.</p>
 
359
</div>
 
360
<p>
 
361
Adds a new <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to the end of the menu's item list.
 
362
</p>
 
363
<div class="variablelist"><table border="0">
 
364
<col align="left" valign="top">
 
365
<tbody>
 
366
<tr>
 
367
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
368
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
369
</td>
 
370
</tr>
 
371
<tr>
 
372
<td><span class="term"><em class="parameter"><code>child</code></em>&#160;:</span></td>
 
373
<td>The <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to add.
 
374
</td>
 
375
</tr>
 
376
</tbody>
 
377
</table></div>
 
378
</div>
 
379
<hr>
 
380
<div class="refsect2" lang="en">
 
381
<a name="id3337210"></a><h3>
 
382
<a name="gtk-menu-prepend"></a>gtk_menu_prepend()</h3>
 
383
<a class="indexterm" name="id3337226"></a><pre class="programlisting">#define gtk_menu_prepend(menu,child)    gtk_menu_shell_prepend ((GtkMenuShell *)(menu),(child))
 
384
</pre>
 
385
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
386
<h3 class="title">Warning</h3>
 
387
<p><code class="literal">gtk_menu_prepend</code> is deprecated and should not be used in newly-written code. Use <a href="GtkMenuShell.html#gtk-menu-shell-prepend"><code class="function">gtk_menu_shell_prepend()</code></a> instead.</p>
 
388
</div>
 
389
<p>
 
390
Adds a new <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to the beginning of the menu's item list.
 
391
</p>
 
392
<div class="variablelist"><table border="0">
 
393
<col align="left" valign="top">
 
394
<tbody>
 
395
<tr>
 
396
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
397
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
398
</td>
 
399
</tr>
 
400
<tr>
 
401
<td><span class="term"><em class="parameter"><code>child</code></em>&#160;:</span></td>
 
402
<td>The <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to add.
 
403
</td>
 
404
</tr>
 
405
</tbody>
 
406
</table></div>
 
407
</div>
 
408
<hr>
 
409
<div class="refsect2" lang="en">
 
410
<a name="id3337324"></a><h3>
 
411
<a name="gtk-menu-insert"></a>gtk_menu_insert()</h3>
 
412
<a class="indexterm" name="id3337340"></a><pre class="programlisting">#define gtk_menu_insert(menu,child,pos)   gtk_menu_shell_insert ((GtkMenuShell *)(menu),(child),(pos))
 
413
</pre>
 
414
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
415
<h3 class="title">Warning</h3>
 
416
<p><code class="literal">gtk_menu_insert</code> is deprecated and should not be used in newly-written code. Use <a href="GtkMenuShell.html#gtk-menu-shell-insert"><code class="function">gtk_menu_shell_insert()</code></a> instead.</p>
 
417
</div>
 
418
<p>
 
419
Adds a new <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to the menu's item list at the position
 
420
indicated by <em class="parameter"><code>position</code></em>. 
 
421
</p>
 
422
<div class="variablelist"><table border="0">
 
423
<col align="left" valign="top">
 
424
<tbody>
 
425
<tr>
 
426
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
427
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
428
</td>
 
429
</tr>
 
430
<tr>
 
431
<td><span class="term"><em class="parameter"><code>child</code></em>&#160;:</span></td>
 
432
<td>The <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to add.
 
433
</td>
 
434
</tr>
 
435
<tr>
 
436
<td><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
 
437
<td>The position in the item list where <em class="parameter"><code>child</code></em> is added.
 
438
      Positions are numbered from 0 to n-1.
 
439
</td>
 
440
</tr>
 
441
</tbody>
 
442
</table></div>
 
443
</div>
 
444
<hr>
 
445
<div class="refsect2" lang="en">
 
446
<a name="id3337464"></a><h3>
 
447
<a name="gtk-menu-reorder-child"></a>gtk_menu_reorder_child ()</h3>
 
448
<a class="indexterm" name="id3337477"></a><pre class="programlisting">void                gtk_menu_reorder_child              (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
449
                                                         <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child,
 
450
                                                         gint position);</pre>
 
451
<p>
 
452
Moves a <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to a new position within the <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
453
</p>
 
454
<div class="variablelist"><table border="0">
 
455
<col align="left" valign="top">
 
456
<tbody>
 
457
<tr>
 
458
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
459
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
460
</td>
 
461
</tr>
 
462
<tr>
 
463
<td><span class="term"><em class="parameter"><code>child</code></em>&#160;:</span></td>
 
464
<td>the <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to move.
 
465
</td>
 
466
</tr>
 
467
<tr>
 
468
<td><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></td>
 
469
<td>the new position to place <em class="parameter"><code>child</code></em>.  Positions are numbered from 
 
470
0 to n-1.
 
471
 
 
472
 
 
473
</td>
 
474
</tr>
 
475
</tbody>
 
476
</table></div>
 
477
</div>
 
478
<hr>
 
479
<div class="refsect2" lang="en">
 
480
<a name="id3337606"></a><h3>
 
481
<a name="gtk-menu-attach"></a>gtk_menu_attach ()</h3>
 
482
<a class="indexterm" name="id3337620"></a><pre class="programlisting">void                gtk_menu_attach                     (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
483
                                                         <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *child,
 
484
                                                         guint left_attach,
 
485
                                                         guint right_attach,
 
486
                                                         guint top_attach,
 
487
                                                         guint bottom_attach);</pre>
 
488
<p>
 
489
Adds a new <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to a (table) menu. The number of 'cells' that
 
490
an item will occupy is specified by <em class="parameter"><code>left_attach</code></em>, <em class="parameter"><code>right_attach</code></em>,
 
491
<em class="parameter"><code>top_attach</code></em> and <em class="parameter"><code>bottom_attach</code></em>. These each represent the leftmost,
 
492
rightmost, uppermost and lower column and row numbers of the table.
 
493
(Columns and rows are indexed from zero).
 
494
</p>
 
495
<p>
 
496
Note that this function is not related to <a href="GtkMenu.html#gtk-menu-detach"><code class="function">gtk_menu_detach()</code></a>.</p>
 
497
<p>
 
498
 
 
499
</p>
 
500
<div class="variablelist"><table border="0">
 
501
<col align="left" valign="top">
 
502
<tbody>
 
503
<tr>
 
504
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
505
<td> a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
506
</td>
 
507
</tr>
 
508
<tr>
 
509
<td><span class="term"><em class="parameter"><code>child</code></em>&#160;:</span></td>
 
510
<td> a <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a>.
 
511
</td>
 
512
</tr>
 
513
<tr>
 
514
<td><span class="term"><em class="parameter"><code>left_attach</code></em>&#160;:</span></td>
 
515
<td> The column number to attach the left side of the item to.
 
516
</td>
 
517
</tr>
 
518
<tr>
 
519
<td><span class="term"><em class="parameter"><code>right_attach</code></em>&#160;:</span></td>
 
520
<td> The column number to attach the right side of the item to.
 
521
</td>
 
522
</tr>
 
523
<tr>
 
524
<td><span class="term"><em class="parameter"><code>top_attach</code></em>&#160;:</span></td>
 
525
<td> The row number to attach the top of the item to.
 
526
</td>
 
527
</tr>
 
528
<tr>
 
529
<td><span class="term"><em class="parameter"><code>bottom_attach</code></em>&#160;:</span></td>
 
530
<td> The row number to attach the bottom of the item to.
 
531
</td>
 
532
</tr>
 
533
</tbody>
 
534
</table></div>
 
535
<p class="since">Since  2.4
 
536
</p>
 
537
</div>
 
538
<hr>
 
539
<div class="refsect2" lang="en">
 
540
<a name="id3337854"></a><h3>
 
541
<a name="gtk-menu-popup"></a>gtk_menu_popup ()</h3>
 
542
<a class="indexterm" name="id3337866"></a><pre class="programlisting">void                gtk_menu_popup                      (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
543
                                                         <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *parent_menu_shell,
 
544
                                                         <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *parent_menu_item,
 
545
                                                         <a href="GtkMenu.html#GtkMenuPositionFunc">GtkMenuPositionFunc</a> func,
 
546
                                                         gpointer data,
 
547
                                                         guint button,
 
548
                                                         guint32 activate_time);</pre>
 
549
<p>
 
550
Displays a menu and makes it available for selection.  Applications can use
 
551
this function to display context-sensitive menus, and will typically supply
 
552
<a
 
553
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
 
554
><code class="literal">NULL</code></a> for the <em class="parameter"><code>parent_menu_shell</code></em>, <em class="parameter"><code>parent_menu_item</code></em>, <em class="parameter"><code>func</code></em> and <em class="parameter"><code>data</code></em> 
 
555
parameters. The default menu positioning function will position the menu
 
556
at the current mouse cursor position.
 
557
</p>
 
558
<p>
 
559
The <em class="parameter"><code>button</code></em> parameter should be the mouse button pressed to initiate
 
560
the menu popup. If the menu popup was initiated by something other than
 
561
a mouse button press, such as a mouse button release or a keypress,
 
562
<em class="parameter"><code>button</code></em> should be 0.
 
563
</p>
 
564
<p>
 
565
The <em class="parameter"><code>activate_time</code></em> parameter should be the time stamp of the event that
 
566
initiated the popup. If such an event is not available, use
 
567
<a href="gtk-General.html#gtk-get-current-event-time"><code class="function">gtk_get_current_event_time()</code></a> instead.</p>
 
568
<div class="variablelist"><table border="0">
 
569
<col align="left" valign="top">
 
570
<tbody>
 
571
<tr>
 
572
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
573
<td> a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
574
</td>
 
575
</tr>
 
576
<tr>
 
577
<td><span class="term"><em class="parameter"><code>parent_menu_shell</code></em>&#160;:</span></td>
 
578
<td> the menu shell containing the triggering menu item, or <a
 
579
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
 
580
><code class="literal">NULL</code></a>
 
581
</td>
 
582
</tr>
 
583
<tr>
 
584
<td><span class="term"><em class="parameter"><code>parent_menu_item</code></em>&#160;:</span></td>
 
585
<td> the menu item whose activation triggered the popup, or <a
 
586
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
 
587
><code class="literal">NULL</code></a>
 
588
</td>
 
589
</tr>
 
590
<tr>
 
591
<td><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></td>
 
592
<td> a user supplied function used to position the menu, or <a
 
593
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
 
594
><code class="literal">NULL</code></a>
 
595
</td>
 
596
</tr>
 
597
<tr>
 
598
<td><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
 
599
<td> user supplied data to be passed to <em class="parameter"><code>func</code></em>.
 
600
</td>
 
601
</tr>
 
602
<tr>
 
603
<td><span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
 
604
<td> the mouse button which was pressed to initiate the event.
 
605
</td>
 
606
</tr>
 
607
<tr>
 
608
<td><span class="term"><em class="parameter"><code>activate_time</code></em>&#160;:</span></td>
 
609
<td> the time at which the activation event occurred.
 
610
</td>
 
611
</tr>
 
612
</tbody>
 
613
</table></div>
 
614
</div>
 
615
<hr>
 
616
<div class="refsect2" lang="en">
 
617
<a name="id3338173"></a><h3>
 
618
<a name="gtk-menu-set-accel-group"></a>gtk_menu_set_accel_group ()</h3>
 
619
<a class="indexterm" name="id3338186"></a><pre class="programlisting">void                gtk_menu_set_accel_group            (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
620
                                                         <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group);</pre>
 
621
<p>
 
622
Set the <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> which holds global accelerators for the menu.
 
623
This accelerator group needs to also be added to all windows that
 
624
this menu is being used in with <a href="GtkWindow.html#gtk-window-add-accel-group"><code class="function">gtk_window_add_accel_group()</code></a>, in order
 
625
for those windows to support all the accelerators contained in this group.
 
626
</p>
 
627
<div class="variablelist"><table border="0">
 
628
<col align="left" valign="top">
 
629
<tbody>
 
630
<tr>
 
631
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
632
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
633
</td>
 
634
</tr>
 
635
<tr>
 
636
<td><span class="term"><em class="parameter"><code>accel_group</code></em>&#160;:</span></td>
 
637
<td>the <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> to be associated with the menu.
 
638
 
 
639
 
 
640
</td>
 
641
</tr>
 
642
</tbody>
 
643
</table></div>
 
644
</div>
 
645
<hr>
 
646
<div class="refsect2" lang="en">
 
647
<a name="id3338295"></a><h3>
 
648
<a name="gtk-menu-get-accel-group"></a>gtk_menu_get_accel_group ()</h3>
 
649
<a class="indexterm" name="id3338307"></a><pre class="programlisting"><a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a>*      gtk_menu_get_accel_group            (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
 
650
<p>
 
651
Gets the <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> which holds global accelerators for the menu.
 
652
See <a href="GtkMenu.html#gtk-menu-set-accel-group"><code class="function">gtk_menu_set_accel_group()</code></a>.
 
653
</p>
 
654
<div class="variablelist"><table border="0">
 
655
<col align="left" valign="top">
 
656
<tbody>
 
657
<tr>
 
658
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
659
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
660
</td>
 
661
</tr>
 
662
<tr>
 
663
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
664
<td>the <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> associated with the menu.
 
665
 
 
666
 
 
667
</td>
 
668
</tr>
 
669
</tbody>
 
670
</table></div>
 
671
</div>
 
672
<hr>
 
673
<div class="refsect2" lang="en">
 
674
<a name="id3338401"></a><h3>
 
675
<a name="gtk-menu-set-accel-path"></a>gtk_menu_set_accel_path ()</h3>
 
676
<a class="indexterm" name="id3338414"></a><pre class="programlisting">void                gtk_menu_set_accel_path             (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
677
                                                         const gchar *accel_path);</pre>
 
678
<p>
 
679
Sets an accelerator path for this menu from which accelerator paths
 
680
for its immediate children, its menu items, can be constructed.
 
681
The main purpose of this function is to spare the programmer the
 
682
inconvenience of having to call <a href="GtkMenuItem.html#gtk-menu-item-set-accel-path"><code class="function">gtk_menu_item_set_accel_path()</code></a> on
 
683
each menu item that should support runtime user changable accelerators.
 
684
Instead, by just calling <a href="GtkMenu.html#gtk-menu-set-accel-path"><code class="function">gtk_menu_set_accel_path()</code></a> on their parent,
 
685
each menu item of this menu, that contains a label describing its purpose,
 
686
automatically gets an accel path assigned. For example, a menu containing
 
687
menu items "New" and "Exit", will, after 
 
688
<code class="literal">gtk_menu_set_accel_path (menu, "&lt;Gnumeric-Sheet&gt;/File");</code>
 
689
has been called, assign its items the accel paths:
 
690
<code class="literal">"&lt;Gnumeric-Sheet&gt;/File/New"</code> and <code class="literal">"&lt;Gnumeric-Sheet&gt;/File/Exit"</code>.
 
691
Assigning accel paths to menu items then enables the user to change
 
692
their accelerators at runtime. More details about accelerator paths
 
693
and their default setups can be found at <a href="gtk-Accelerator-Maps.html#gtk-accel-map-add-entry"><code class="function">gtk_accel_map_add_entry()</code></a>.</p>
 
694
<p>
 
695
 
 
696
</p>
 
697
<div class="variablelist"><table border="0">
 
698
<col align="left" valign="top">
 
699
<tbody>
 
700
<tr>
 
701
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
702
<td>       a valid <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>
 
703
</td>
 
704
</tr>
 
705
<tr>
 
706
<td><span class="term"><em class="parameter"><code>accel_path</code></em>&#160;:</span></td>
 
707
<td> a valid accelerator path
 
708
</td>
 
709
</tr>
 
710
</tbody>
 
711
</table></div>
 
712
</div>
 
713
<hr>
 
714
<div class="refsect2" lang="en">
 
715
<a name="id3338561"></a><h3>
 
716
<a name="gtk-menu-set-title"></a>gtk_menu_set_title ()</h3>
 
717
<a class="indexterm" name="id3338574"></a><pre class="programlisting">void                gtk_menu_set_title                  (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
718
                                                         const gchar *title);</pre>
 
719
<p>
 
720
Sets the title string for the menu.  The title is displayed when the menu
 
721
is shown as a tearoff menu.  If <em class="parameter"><code>title</code></em> is <a
 
722
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
 
723
><code class="literal">NULL</code></a>, the menu will see if it is
 
724
attached to a parent menu item, and if so it will try to use the same text as
 
725
that menu item's label.</p>
 
726
<p>
 
727
</p>
 
728
<div class="variablelist"><table border="0">
 
729
<col align="left" valign="top">
 
730
<tbody>
 
731
<tr>
 
732
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
733
<td> a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>
 
734
</td>
 
735
</tr>
 
736
<tr>
 
737
<td><span class="term"><em class="parameter"><code>title</code></em>&#160;:</span></td>
 
738
<td> a string containing the title for the menu.
 
739
</td>
 
740
</tr>
 
741
</tbody>
 
742
</table></div>
 
743
</div>
 
744
<hr>
 
745
<div class="refsect2" lang="en">
 
746
<a name="id3338674"></a><h3>
 
747
<a name="gtk-menu-get-tearoff-state"></a>gtk_menu_get_tearoff_state ()</h3>
 
748
<a class="indexterm" name="id3338688"></a><pre class="programlisting">gboolean            gtk_menu_get_tearoff_state          (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
 
749
<p>
 
750
Returns whether the menu is torn off. See
 
751
<a href="GtkMenu.html#gtk-menu-set-tearoff-state"><code class="function">gtk_menu_set_tearoff_state()</code></a>.</p>
 
752
<p>
 
753
 
 
754
</p>
 
755
<div class="variablelist"><table border="0">
 
756
<col align="left" valign="top">
 
757
<tbody>
 
758
<tr>
 
759
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
760
<td> a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>
 
761
</td>
 
762
</tr>
 
763
<tr>
 
764
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
765
<td> <code class="literal">TRUE</code> if the menu is currently torn off.
 
766
</td>
 
767
</tr>
 
768
</tbody>
 
769
</table></div>
 
770
</div>
 
771
<hr>
 
772
<div class="refsect2" lang="en">
 
773
<a name="id3338777"></a><h3>
 
774
<a name="gtk-menu-get-title"></a>gtk_menu_get_title ()</h3>
 
775
<a class="indexterm" name="id3338790"></a><pre class="programlisting">const gchar*        gtk_menu_get_title                  (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
 
776
<p>
 
777
Returns the title of the menu. See <a href="GtkMenu.html#gtk-menu-set-title"><code class="function">gtk_menu_set_title()</code></a>.</p>
 
778
<p>
 
779
 
 
780
</p>
 
781
<div class="variablelist"><table border="0">
 
782
<col align="left" valign="top">
 
783
<tbody>
 
784
<tr>
 
785
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
786
<td> a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>
 
787
</td>
 
788
</tr>
 
789
<tr>
 
790
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
791
<td> the title of the menu, or <a
 
792
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
 
793
><code class="literal">NULL</code></a> if the menu has no
 
794
title set on it. This string is owned by the widget and should
 
795
not be modified or freed.
 
796
</td>
 
797
</tr>
 
798
</tbody>
 
799
</table></div>
 
800
</div>
 
801
<hr>
 
802
<div class="refsect2" lang="en">
 
803
<a name="id3338882"></a><h3>
 
804
<a name="gtk-menu-popdown"></a>gtk_menu_popdown ()</h3>
 
805
<a class="indexterm" name="id3338895"></a><pre class="programlisting">void                gtk_menu_popdown                    (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
 
806
<p>
 
807
Removes the menu from the screen.
 
808
</p>
 
809
<div class="variablelist"><table border="0">
 
810
<col align="left" valign="top">
 
811
<tbody><tr>
 
812
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
813
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
814
 
 
815
 
 
816
</td>
 
817
</tr></tbody>
 
818
</table></div>
 
819
</div>
 
820
<hr>
 
821
<div class="refsect2" lang="en">
 
822
<a name="id3338950"></a><h3>
 
823
<a name="gtk-menu-reposition"></a>gtk_menu_reposition ()</h3>
 
824
<a class="indexterm" name="id3338963"></a><pre class="programlisting">void                gtk_menu_reposition                 (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
 
825
<p>
 
826
Repositions the menu according to its position function.
 
827
</p>
 
828
<div class="variablelist"><table border="0">
 
829
<col align="left" valign="top">
 
830
<tbody><tr>
 
831
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
832
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
833
 
 
834
 
 
835
</td>
 
836
</tr></tbody>
 
837
</table></div>
 
838
</div>
 
839
<hr>
 
840
<div class="refsect2" lang="en">
 
841
<a name="id3339018"></a><h3>
 
842
<a name="gtk-menu-get-active"></a>gtk_menu_get_active ()</h3>
 
843
<a class="indexterm" name="id3339031"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_menu_get_active                 (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
 
844
<p>
 
845
Returns the selected menu item from the menu.  This is used by the 
 
846
<a href="GtkOptionMenu.html" title="GtkOptionMenu"><span class="type">GtkOptionMenu</span></a>.
 
847
</p>
 
848
<div class="variablelist"><table border="0">
 
849
<col align="left" valign="top">
 
850
<tbody>
 
851
<tr>
 
852
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
853
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
854
</td>
 
855
</tr>
 
856
<tr>
 
857
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
858
<td>the <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> that was last selected in the menu.  If a 
 
859
selection has not yet been made, the first menu item is selected.
 
860
 
 
861
 
 
862
</td>
 
863
</tr>
 
864
</tbody>
 
865
</table></div>
 
866
</div>
 
867
<hr>
 
868
<div class="refsect2" lang="en">
 
869
<a name="id3339114"></a><h3>
 
870
<a name="gtk-menu-set-active"></a>gtk_menu_set_active ()</h3>
 
871
<a class="indexterm" name="id3339128"></a><pre class="programlisting">void                gtk_menu_set_active                 (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
872
                                                         guint index_);</pre>
 
873
<p>
 
874
Selects the specified menu item within the menu.  This is used by the
 
875
<a href="GtkOptionMenu.html" title="GtkOptionMenu"><span class="type">GtkOptionMenu</span></a> and should not be used by anyone else.
 
876
</p>
 
877
<div class="variablelist"><table border="0">
 
878
<col align="left" valign="top">
 
879
<tbody>
 
880
<tr>
 
881
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
882
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
883
</td>
 
884
</tr>
 
885
<tr>
 
886
<td><span class="term"><em class="parameter"><code>index_</code></em>&#160;:</span></td>
 
887
<td>the index of the menu item to select.  Index values are from
 
888
0 to n-1.
 
889
 
 
890
 
 
891
</td>
 
892
</tr>
 
893
</tbody>
 
894
</table></div>
 
895
</div>
 
896
<hr>
 
897
<div class="refsect2" lang="en">
 
898
<a name="id3339214"></a><h3>
 
899
<a name="gtk-menu-set-tearoff-state"></a>gtk_menu_set_tearoff_state ()</h3>
 
900
<a class="indexterm" name="id3339228"></a><pre class="programlisting">void                gtk_menu_set_tearoff_state          (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
901
                                                         gboolean torn_off);</pre>
 
902
<p>
 
903
Changes the tearoff state of the menu.  A menu is normally displayed 
 
904
as drop down menu which persists as long as the menu is active.  It can 
 
905
also be displayed as a tearoff menu which persists until it is closed 
 
906
or reattached.
 
907
</p>
 
908
<div class="variablelist"><table border="0">
 
909
<col align="left" valign="top">
 
910
<tbody>
 
911
<tr>
 
912
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
913
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
914
</td>
 
915
</tr>
 
916
<tr>
 
917
<td><span class="term"><em class="parameter"><code>torn_off</code></em>&#160;:</span></td>
 
918
<td>If <code class="literal">TRUE</code>, menu is displayed as a tearoff menu.
 
919
 
 
920
 
 
921
</td>
 
922
</tr>
 
923
</tbody>
 
924
</table></div>
 
925
</div>
 
926
<hr>
 
927
<div class="refsect2" lang="en">
 
928
<a name="id3339318"></a><h3>
 
929
<a name="gtk-menu-attach-to-widget"></a>gtk_menu_attach_to_widget ()</h3>
 
930
<a class="indexterm" name="id3339332"></a><pre class="programlisting">void                gtk_menu_attach_to_widget           (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
931
                                                         <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *attach_widget,
 
932
                                                         <a href="GtkMenu.html#GtkMenuDetachFunc">GtkMenuDetachFunc</a> detacher);</pre>
 
933
<p>
 
934
Attaches the menu to the widget and provides a callback function that will
 
935
be invoked when the menu calls <a href="GtkMenu.html#gtk-menu-detach"><code class="function">gtk_menu_detach()</code></a> during its destruction.
 
936
</p>
 
937
<div class="variablelist"><table border="0">
 
938
<col align="left" valign="top">
 
939
<tbody>
 
940
<tr>
 
941
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
942
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
943
</td>
 
944
</tr>
 
945
<tr>
 
946
<td><span class="term"><em class="parameter"><code>attach_widget</code></em>&#160;:</span></td>
 
947
<td>the <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that the menu will be attached to.
 
948
</td>
 
949
</tr>
 
950
<tr>
 
951
<td><span class="term"><em class="parameter"><code>detacher</code></em>&#160;:</span></td>
 
952
<td>the user supplied callback function that will be called when 
 
953
the menu calls <a href="GtkMenu.html#gtk-menu-detach"><code class="function">gtk_menu_detach()</code></a>.
 
954
 
 
955
 
 
956
</td>
 
957
</tr>
 
958
</tbody>
 
959
</table></div>
 
960
</div>
 
961
<hr>
 
962
<div class="refsect2" lang="en">
 
963
<a name="id3339462"></a><h3>
 
964
<a name="gtk-menu-detach"></a>gtk_menu_detach ()</h3>
 
965
<a class="indexterm" name="id3339474"></a><pre class="programlisting">void                gtk_menu_detach                     (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
 
966
<p>
 
967
Detaches the menu from the widget to which it had been attached.  
 
968
This function will call the callback function, <em class="parameter"><code>detacher</code></em>, provided
 
969
when the <a href="GtkMenu.html#gtk-menu-attach-to-widget"><code class="function">gtk_menu_attach_to_widget()</code></a> function was called.
 
970
</p>
 
971
<div class="variablelist"><table border="0">
 
972
<col align="left" valign="top">
 
973
<tbody><tr>
 
974
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
975
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
976
 
 
977
 
 
978
</td>
 
979
</tr></tbody>
 
980
</table></div>
 
981
</div>
 
982
<hr>
 
983
<div class="refsect2" lang="en">
 
984
<a name="id3339548"></a><h3>
 
985
<a name="gtk-menu-get-attach-widget"></a>gtk_menu_get_attach_widget ()</h3>
 
986
<a class="indexterm" name="id3339562"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_menu_get_attach_widget          (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
 
987
<p>
 
988
Returns the <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that the menu is attached to.
 
989
</p>
 
990
<div class="variablelist"><table border="0">
 
991
<col align="left" valign="top">
 
992
<tbody>
 
993
<tr>
 
994
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
995
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
996
</td>
 
997
</tr>
 
998
<tr>
 
999
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1000
<td>the <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that the menu is attached to.
 
1001
 
 
1002
 
 
1003
</td>
 
1004
</tr>
 
1005
</tbody>
 
1006
</table></div>
 
1007
</div>
 
1008
<hr>
 
1009
<div class="refsect2" lang="en">
 
1010
<a name="id3339643"></a><h3>
 
1011
<a name="gtk-menu-get-for-attach-widget"></a>gtk_menu_get_for_attach_widget ()</h3>
 
1012
<a class="indexterm" name="id3339659"></a><pre class="programlisting">GList*              gtk_menu_get_for_attach_widget      (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
 
1013
<p>
 
1014
Returns a list of the menus which are attached to this widget.
 
1015
This list is owned by GTK+ and must not be modified.</p>
 
1016
<p>
 
1017
 
 
1018
</p>
 
1019
<div class="variablelist"><table border="0">
 
1020
<col align="left" valign="top">
 
1021
<tbody>
 
1022
<tr>
 
1023
<td><span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></td>
 
1024
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
 
1025
</td>
 
1026
</tr>
 
1027
<tr>
 
1028
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1029
<td> the list of menus attached to his widget.
 
1030
 
 
1031
</td>
 
1032
</tr>
 
1033
</tbody>
 
1034
</table></div>
 
1035
<p class="since">Since  2.6
 
1036
</p>
 
1037
</div>
 
1038
<hr>
 
1039
<div class="refsect2" lang="en">
 
1040
<a name="id3339736"></a><h3>
 
1041
<a name="GtkMenuPositionFunc"></a>GtkMenuPositionFunc ()</h3>
 
1042
<a class="indexterm" name="id3339750"></a><pre class="programlisting">void                (*GtkMenuPositionFunc)              (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
1043
                                                         gint *x,
 
1044
                                                         gint *y,
 
1045
                                                         gboolean *push_in,
 
1046
                                                         gpointer user_data);</pre>
 
1047
<p>
 
1048
A user function supplied when calling <a href="GtkMenu.html#gtk-menu-popup"><code class="function">gtk_menu_popup()</code></a> which controls the
 
1049
positioning of the menu when it is displayed.  The function sets the <em class="parameter"><code>x</code></em>
 
1050
and <em class="parameter"><code>y</code></em> parameters to the coordinates where the menu is to be drawn.
 
1051
</p>
 
1052
<div class="variablelist"><table border="0">
 
1053
<col align="left" valign="top">
 
1054
<tbody>
 
1055
<tr>
 
1056
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
1057
<td>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>.
 
1058
</td>
 
1059
</tr>
 
1060
<tr>
 
1061
<td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
 
1062
<td>address of the <span class="type">gint</span> representing the horizontal position where the
 
1063
menu shall be drawn.  This is an output parameter.
 
1064
</td>
 
1065
</tr>
 
1066
<tr>
 
1067
<td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
 
1068
<td>address of the <span class="type">gint</span> representing the vertical position where the
 
1069
menu shall be drawn.  This is an output parameter.
 
1070
</td>
 
1071
</tr>
 
1072
<tr>
 
1073
<td><span class="term"><em class="parameter"><code>push_in</code></em>&#160;:</span></td>
 
1074
<td>whether the menu should be pushed in to be completely inside the
 
1075
  screen instead of just clamped to the size to the screen.
 
1076
</td>
 
1077
</tr>
 
1078
<tr>
 
1079
<td><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
 
1080
<td>the data supplied by the user in the <a href="GtkMenu.html#gtk-menu-popup"><code class="function">gtk_menu_popup()</code></a> <em class="parameter"><code>data</code></em>
 
1081
parameter.
 
1082
 
 
1083
 
 
1084
</td>
 
1085
</tr>
 
1086
</tbody>
 
1087
</table></div>
 
1088
</div>
 
1089
<hr>
 
1090
<div class="refsect2" lang="en">
 
1091
<a name="id3339953"></a><h3>
 
1092
<a name="GtkMenuDetachFunc"></a>GtkMenuDetachFunc ()</h3>
 
1093
<a class="indexterm" name="id3339966"></a><pre class="programlisting">void                (*GtkMenuDetachFunc)                (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *attach_widget,
 
1094
                                                         <a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu);</pre>
 
1095
<p>
 
1096
A user function supplied when calling <a href="GtkMenu.html#gtk-menu-attach-to-widget"><code class="function">gtk_menu_attach_to_widget()</code></a> which 
 
1097
will be called when the menu is later detached from the widget.
 
1098
</p>
 
1099
<div class="variablelist"><table border="0">
 
1100
<col align="left" valign="top">
 
1101
<tbody>
 
1102
<tr>
 
1103
<td><span class="term"><em class="parameter"><code>attach_widget</code></em>&#160;:</span></td>
 
1104
<td>the <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that the menu is being detached from.
 
1105
</td>
 
1106
</tr>
 
1107
<tr>
 
1108
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
1109
<td>the <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> being detached.
 
1110
 
 
1111
 
 
1112
</td>
 
1113
</tr>
 
1114
</tbody>
 
1115
</table></div>
 
1116
</div>
 
1117
<hr>
 
1118
<div class="refsect2" lang="en">
 
1119
<a name="id3340064"></a><h3>
 
1120
<a name="gtk-menu-set-monitor"></a>gtk_menu_set_monitor ()</h3>
 
1121
<a class="indexterm" name="id3340079"></a><pre class="programlisting">void                gtk_menu_set_monitor                (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *menu,
 
1122
                                                         gint monitor_num);</pre>
 
1123
<p>
 
1124
Informs GTK+ on which monitor a menu should be popped up. 
 
1125
See <a
 
1126
href="../gdk/GdkScreen.html#gdk-screen-get-monitor-geometry"
 
1127
><code class="function">gdk_screen_get_monitor_geometry()</code></a>.
 
1128
</p>
 
1129
<p>
 
1130
This function should be called from a <a href="GtkMenu.html#GtkMenuPositionFunc"><span class="type">GtkMenuPositionFunc</span></a> if the
 
1131
menu should not appear on the same monitor as the pointer. This 
 
1132
information can't be reliably inferred from the coordinates returned
 
1133
by a <a href="GtkMenu.html#GtkMenuPositionFunc"><span class="type">GtkMenuPositionFunc</span></a>, since, for very long menus, these coordinates 
 
1134
may extend beyond the monitor boundaries or even the screen boundaries.</p>
 
1135
<p>
 
1136
 
 
1137
</p>
 
1138
<div class="variablelist"><table border="0">
 
1139
<col align="left" valign="top">
 
1140
<tbody>
 
1141
<tr>
 
1142
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
1143
<td> a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a>
 
1144
</td>
 
1145
</tr>
 
1146
<tr>
 
1147
<td><span class="term"><em class="parameter"><code>monitor_num</code></em>&#160;:</span></td>
 
1148
<td> the number of the monitor on which the menu should
 
1149
   be popped up
 
1150
</td>
 
1151
</tr>
 
1152
</tbody>
 
1153
</table></div>
 
1154
<p class="since">Since  2.4
 
1155
</p>
 
1156
</div>
 
1157
</div>
 
1158
<div class="refsect1" lang="en">
 
1159
<a name="id3340206"></a><h2>Property Details</h2>
 
1160
<div class="refsect2" lang="en">
 
1161
<a name="id3340217"></a><h3>
 
1162
<a name="GtkMenu--tearoff-state"></a>The "<code class="literal">tearoff-state</code>" property</h3>
 
1163
<a class="indexterm" name="id3340233"></a><pre class="programlisting">  "tearoff-state"            gboolean              : Read / Write</pre>
 
1164
<p>
 
1165
A boolean that indicates whether the menu is torn-off.</p>
 
1166
<p>
 
1167
 
 
1168
</p>
 
1169
<p>Default value: FALSE</p>
 
1170
<p>Since  2.6
 
1171
</p>
 
1172
</div>
 
1173
<hr>
 
1174
<div class="refsect2" lang="en">
 
1175
<a name="id3340269"></a><h3>
 
1176
<a name="GtkMenu--tearoff-title"></a>The "<code class="literal">tearoff-title</code>" property</h3>
 
1177
<a class="indexterm" name="id3340286"></a><pre class="programlisting">  "tearoff-title"            gchararray            : Read / Write</pre>
 
1178
<p>A title that may be displayed by the window manager when this menu is torn-off.</p>
 
1179
<p>Default value: ""</p>
 
1180
</div>
 
1181
</div>
 
1182
<div class="refsect1" lang="en">
 
1183
<a name="id3340314"></a><h2>Child Property Details</h2>
 
1184
<div class="refsect2" lang="en">
 
1185
<a name="id3340325"></a><h3>
 
1186
<a name="GtkMenu--bottom-attach"></a>The "<code class="literal">bottom-attach</code>" child property</h3>
 
1187
<a class="indexterm" name="id3340342"></a><pre class="programlisting">  "bottom-attach"            gint                  : Read / Write</pre>
 
1188
<p>The row number to attach the bottom of the child to.</p>
 
1189
<p>Allowed values: &gt;= -1</p>
 
1190
<p>Default value: -1</p>
 
1191
</div>
 
1192
<hr>
 
1193
<div class="refsect2" lang="en">
 
1194
<a name="id3340373"></a><h3>
 
1195
<a name="GtkMenu--left-attach"></a>The "<code class="literal">left-attach</code>" child property</h3>
 
1196
<a class="indexterm" name="id3340389"></a><pre class="programlisting">  "left-attach"              gint                  : Read / Write</pre>
 
1197
<p>The column number to attach the left side of the child to.</p>
 
1198
<p>Allowed values: &gt;= -1</p>
 
1199
<p>Default value: -1</p>
 
1200
</div>
 
1201
<hr>
 
1202
<div class="refsect2" lang="en">
 
1203
<a name="id3340420"></a><h3>
 
1204
<a name="GtkMenu--right-attach"></a>The "<code class="literal">right-attach</code>" child property</h3>
 
1205
<a class="indexterm" name="id3340436"></a><pre class="programlisting">  "right-attach"             gint                  : Read / Write</pre>
 
1206
<p>The column number to attach the right side of the child to.</p>
 
1207
<p>Allowed values: &gt;= -1</p>
 
1208
<p>Default value: -1</p>
 
1209
</div>
 
1210
<hr>
 
1211
<div class="refsect2" lang="en">
 
1212
<a name="id3340467"></a><h3>
 
1213
<a name="GtkMenu--top-attach"></a>The "<code class="literal">top-attach</code>" child property</h3>
 
1214
<a class="indexterm" name="id3340483"></a><pre class="programlisting">  "top-attach"               gint                  : Read / Write</pre>
 
1215
<p>The row number to attach the top of the child to.</p>
 
1216
<p>Allowed values: &gt;= -1</p>
 
1217
<p>Default value: -1</p>
 
1218
</div>
 
1219
</div>
 
1220
<div class="refsect1" lang="en">
 
1221
<a name="id3340515"></a><h2>Style Property Details</h2>
 
1222
<div class="refsect2" lang="en">
 
1223
<a name="id3340526"></a><h3>
 
1224
<a name="GtkMenu--double-arrows"></a>The "<code class="literal">double-arrows</code>" style property</h3>
 
1225
<a class="indexterm" name="id3340542"></a><pre class="programlisting">  "double-arrows"            gboolean              : Read</pre>
 
1226
<p>When scrolling, always show both arrows.</p>
 
1227
<p>Default value: TRUE</p>
 
1228
</div>
 
1229
<hr>
 
1230
<div class="refsect2" lang="en">
 
1231
<a name="id3340569"></a><h3>
 
1232
<a name="GtkMenu--horizontal-offset"></a>The "<code class="literal">horizontal-offset</code>" style property</h3>
 
1233
<a class="indexterm" name="id3340585"></a><pre class="programlisting">  "horizontal-offset"        gint                  : Read</pre>
 
1234
<p>When the menu is a submenu, position it this number of pixels offset horizontally.</p>
 
1235
<p>Default value: -2</p>
 
1236
</div>
 
1237
<hr>
 
1238
<div class="refsect2" lang="en">
 
1239
<a name="id3340613"></a><h3>
 
1240
<a name="GtkMenu--horizontal-padding"></a>The "<code class="literal">horizontal-padding</code>" style property</h3>
 
1241
<a class="indexterm" name="id3340630"></a><pre class="programlisting">  "horizontal-padding"       gint                  : Read</pre>
 
1242
<p>Extra space at the left and right edges of the menu.</p>
 
1243
<p>Allowed values: &gt;= 0</p>
 
1244
<p>Default value: 0</p>
 
1245
</div>
 
1246
<hr>
 
1247
<div class="refsect2" lang="en">
 
1248
<a name="id3340661"></a><h3>
 
1249
<a name="GtkMenu--vertical-offset"></a>The "<code class="literal">vertical-offset</code>" style property</h3>
 
1250
<a class="indexterm" name="id3340677"></a><pre class="programlisting">  "vertical-offset"          gint                  : Read</pre>
 
1251
<p>When the menu is a submenu, position it this number of pixels offset vertically.</p>
 
1252
<p>Default value: 0</p>
 
1253
</div>
 
1254
<hr>
 
1255
<div class="refsect2" lang="en">
 
1256
<a name="id3340705"></a><h3>
 
1257
<a name="GtkMenu--vertical-padding"></a>The "<code class="literal">vertical-padding</code>" style property</h3>
 
1258
<a class="indexterm" name="id3340721"></a><pre class="programlisting">  "vertical-padding"         gint                  : Read</pre>
 
1259
<p>Extra space at the top and bottom of the menu.</p>
 
1260
<p>Allowed values: &gt;= 0</p>
 
1261
<p>Default value: 1</p>
 
1262
</div>
 
1263
</div>
 
1264
<div class="refsect1" lang="en">
 
1265
<a name="id3340753"></a><h2>Signal Details</h2>
 
1266
<div class="refsect2" lang="en">
 
1267
<a name="id3340763"></a><h3>
 
1268
<a name="GtkMenu-move-scroll"></a>The "move-scroll" signal</h3>
 
1269
<a class="indexterm" name="id3340774"></a><pre class="programlisting">void                user_function                      (<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a>      *menu,
 
1270
                                                        <a href="gtk-Standard-Enumerations.html#GtkScrollType">GtkScrollType</a> arg1,
 
1271
                                                        gpointer      user_data)      : Run Last / Action</pre>
 
1272
<p>
 
1273
 
 
1274
</p>
 
1275
<div class="variablelist"><table border="0">
 
1276
<col align="left" valign="top">
 
1277
<tbody>
 
1278
<tr>
 
1279
<td><span class="term"><em class="parameter"><code>menu</code></em>&#160;:</span></td>
 
1280
<td>the object which received the signal.
 
1281
</td>
 
1282
</tr>
 
1283
<tr>
 
1284
<td><span class="term"><em class="parameter"><code>arg1</code></em>&#160;:</span></td>
 
1285
<td>
 
1286
 
 
1287
</td>
 
1288
</tr>
 
1289
<tr>
 
1290
<td><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
 
1291
<td>user data set when the signal handler was connected.</td>
 
1292
</tr>
 
1293
</tbody>
 
1294
</table></div>
 
1295
</div>
 
1296
</div>
 
1297
</div>
 
1298
</body>
 
1299
</html>