New upstream version 3.23.2
This commit is contained in:
@ -3,12 +3,12 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>GtkMenu: GTK+ 3 Reference Manual</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
|
||||
<link rel="up" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
|
||||
<link rel="prev" href="GtkComboBoxText.html" title="GtkComboBoxText">
|
||||
<link rel="next" href="GtkMenuBar.html" title="GtkMenuBar">
|
||||
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
|
||||
<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@ -337,7 +337,7 @@
|
||||
<td class="property_flags">Read / Write</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="property_type"><a href="../html/gdk3-Windows.html#GdkAnchorHints"><span class="type">GdkAnchorHints</span></a></td>
|
||||
<td class="property_type"><span class="type">GdkAnchorHints</span></td>
|
||||
<td class="property_name"><a class="link" href="GtkMenu.html#GtkMenu--anchor-hints" title="The “anchor-hints” property">anchor-hints</a></td>
|
||||
<td class="property_flags">Read / Write / Construct</td>
|
||||
</tr>
|
||||
@ -348,7 +348,7 @@
|
||||
<td class="property_flags">Read / Write</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="property_type"><a href="../html/gdk3-Windows.html#GdkWindowTypeHint"><span class="type">GdkWindowTypeHint</span></a></td>
|
||||
<td class="property_type"><span class="type">GdkWindowTypeHint</span></td>
|
||||
<td class="property_name"><a class="link" href="GtkMenu.html#GtkMenu--menu-type-hint" title="The “menu-type-hint” property">menu-type-hint</a></td>
|
||||
<td class="property_flags">Read / Write / Construct</td>
|
||||
</tr>
|
||||
@ -521,7 +521,7 @@
|
||||
<a name="GtkMenu.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
|
||||
<p>
|
||||
GtkMenu implements
|
||||
AtkImplementor and <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
|
||||
AtkImplementorIface and <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="GtkMenu.includes"></a><h2>Includes</h2>
|
||||
@ -544,56 +544,113 @@ Other composite widgets such as the <a class="link" href="GtkNotebook.html" titl
|
||||
can pop up a menu when the 3rd mouse button is pressed. </p>
|
||||
<div class="refsect3">
|
||||
<a name="id-1.3.13.4.12.6"></a><h4>Connecting the popup signal handler.</h4>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
// connect our handler which will popup the menu
|
||||
g_signal_connect_swapped (window, "button_press_event",
|
||||
G_CALLBACK (my_popup_handler), menu);
|
||||
</pre></div>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="comment">// connect our handler which will popup the menu</span>
|
||||
<span class="function">g_signal_connect_swapped</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">window</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"button_press_event"</span><span class="symbol">,</span>
|
||||
<span class="function">G_CALLBACK</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">my_popup_handler</span><span class="symbol">),</span><span class="normal"> menu</span><span class="symbol">);</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="id-1.3.13.4.12.7"></a><h4>Signal handler which displays a popup menu.</h4>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
static gint
|
||||
my_popup_handler (GtkWidget *widget, GdkEvent *event)
|
||||
{
|
||||
GtkMenu *menu;
|
||||
GdkEventButton *event_button;
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>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</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> gint</span>
|
||||
<span class="function">my_popup_handler</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GtkWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">widget</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">GdkEvent</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">event</span><span class="symbol">)</span>
|
||||
<span class="cbracket">{</span>
|
||||
<span class="normal"> </span><span class="usertype">GtkMenu</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">menu</span><span class="symbol">;</span>
|
||||
<span class="normal"> </span><span class="usertype">GdkEventButton</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">event_button</span><span class="symbol">;</span>
|
||||
|
||||
g_return_val_if_fail (widget != NULL, FALSE);
|
||||
g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
<span class="normal"> </span><span class="function">g_return_val_if_fail</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget </span><span class="symbol">!=</span><span class="normal"> NULL</span><span class="symbol">,</span><span class="normal"> FALSE</span><span class="symbol">);</span>
|
||||
<span class="normal"> </span><span class="function">g_return_val_if_fail</span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_IS_MENU</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget</span><span class="symbol">),</span><span class="normal"> FALSE</span><span class="symbol">);</span>
|
||||
<span class="normal"> </span><span class="function">g_return_val_if_fail</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">event </span><span class="symbol">!=</span><span class="normal"> NULL</span><span class="symbol">,</span><span class="normal"> FALSE</span><span class="symbol">);</span>
|
||||
|
||||
// The "widget" is the menu that was supplied when
|
||||
// g_signal_connect_swapped() was called.
|
||||
menu = GTK_MENU (widget);
|
||||
<span class="normal"> </span><span class="comment">// The "widget" is the menu that was supplied when </span>
|
||||
<span class="normal"> </span><span class="comment">// g_signal_connect_swapped() was called.</span>
|
||||
<span class="normal"> menu </span><span class="symbol">=</span><span class="normal"> </span><span class="function">GTK_MENU</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget</span><span class="symbol">);</span>
|
||||
|
||||
if (event->type == GDK_BUTTON_PRESS)
|
||||
{
|
||||
event_button = (GdkEventButton *) event;
|
||||
if (event_button->button == GDK_BUTTON_SECONDARY)
|
||||
{
|
||||
gtk_menu_popup (menu, NULL, NULL, NULL, NULL,
|
||||
event_button->button, event_button->time);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">event</span><span class="symbol">-></span><span class="normal">type </span><span class="symbol">==</span><span class="normal"> GDK_BUTTON_PRESS</span><span class="symbol">)</span>
|
||||
<span class="normal"> </span><span class="cbracket">{</span>
|
||||
<span class="normal"> event_button </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">GdkEventButton </span><span class="symbol">*)</span><span class="normal"> event</span><span class="symbol">;</span>
|
||||
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">event_button</span><span class="symbol">-></span><span class="normal">button </span><span class="symbol">==</span><span class="normal"> GDK_BUTTON_SECONDARY</span><span class="symbol">)</span>
|
||||
<span class="normal"> </span><span class="cbracket">{</span>
|
||||
<span class="normal"> </span><span class="function"><a href="GtkMenu.html#gtk-menu-popup">gtk_menu_popup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">menu</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">,</span><span class="normal"> NULL</span><span class="symbol">,</span><span class="normal"> </span>
|
||||
<span class="normal"> event_button</span><span class="symbol">-></span><span class="normal">button</span><span class="symbol">,</span><span class="normal"> event_button</span><span class="symbol">-></span><span class="normal">time</span><span class="symbol">);</span>
|
||||
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> TRUE</span><span class="symbol">;</span>
|
||||
<span class="normal"> </span><span class="cbracket">}</span>
|
||||
<span class="normal"> </span><span class="cbracket">}</span>
|
||||
|
||||
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> FALSE</span><span class="symbol">;</span>
|
||||
<span class="cbracket">}</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
</pre></div>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="refsect2">
|
||||
<a name="id-1.3.13.4.12.8"></a><h3>CSS nodes</h3>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
menu
|
||||
├── arrow.top
|
||||
├── <child>
|
||||
┊
|
||||
├── <child>
|
||||
╰── arrow.bottom
|
||||
</pre></div>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="normal">menu</span>
|
||||
<span class="normal">├── arrow</span><span class="symbol">.</span><span class="normal">top</span>
|
||||
<span class="normal">├── </span><span class="symbol"><</span><span class="normal">child</span><span class="symbol">></span>
|
||||
<span class="normal">┊</span>
|
||||
<span class="normal">├── </span><span class="symbol"><</span><span class="normal">child</span><span class="symbol">></span>
|
||||
<span class="normal">╰── arrow</span><span class="symbol">.</span><span class="normal">bottom</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
<p>The main CSS node of GtkMenu has name menu, and there are two subnodes
|
||||
with name arrow, for scrolling menu arrows. These subnodes get the
|
||||
@ -652,8 +709,8 @@ attach widget or on any of its parent widgets.</p>
|
||||
<a name="gtk-menu-set-screen"></a><h3>gtk_menu_set_screen ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
gtk_menu_set_screen (<em class="parameter"><code><a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> *menu</code></em>,
|
||||
<em class="parameter"><code><a href="../html/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> *screen</code></em>);</pre>
|
||||
<p>Sets the <a href="../html/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> on which the menu will be displayed.</p>
|
||||
<em class="parameter"><code><span class="type">GdkScreen</span> *screen</code></em>);</pre>
|
||||
<p>Sets the <span class="type">GdkScreen</span> on which the menu will be displayed.</p>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-menu-set-screen.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
@ -670,7 +727,7 @@ gtk_menu_set_screen (<em class="parameter"><code><a class="link" href="GtkMenu.h
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>screen</p></td>
|
||||
<td class="parameter_description"><p>a <a href="../html/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a>, or <code class="literal">NULL</code> if the screen should be
|
||||
<td class="parameter_description"><p>a <span class="type">GdkScreen</span>, or <code class="literal">NULL</code> if the screen should be
|
||||
determined by the widget the menu is attached to. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
@ -790,11 +847,11 @@ rightmost, uppermost and lower column and row numbers of the table.
|
||||
<a name="gtk-menu-popup-at-rect"></a><h3>gtk_menu_popup_at_rect ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
gtk_menu_popup_at_rect (<em class="parameter"><code><a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> *menu</code></em>,
|
||||
<em class="parameter"><code><a href="../html/gdk3-Windows.html#GdkWindow-struct"><span class="type">GdkWindow</span></a> *rect_window</code></em>,
|
||||
<em class="parameter"><code>const <a href="../html/gdk3-Points-Rectangles-and-Regions.html#GdkRectangle"><span class="type">GdkRectangle</span></a> *rect</code></em>,
|
||||
<em class="parameter"><code><a href="../html/gdk3-Windows.html#GdkGravity"><span class="type">GdkGravity</span></a> rect_anchor</code></em>,
|
||||
<em class="parameter"><code><a href="../html/gdk3-Windows.html#GdkGravity"><span class="type">GdkGravity</span></a> menu_anchor</code></em>,
|
||||
<em class="parameter"><code>const <a href="../html/gdk3-Event-Structures.html#GdkEvent"><span class="type">GdkEvent</span></a> *trigger_event</code></em>);</pre>
|
||||
<em class="parameter"><code><span class="type">GdkWindow</span> *rect_window</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">GdkRectangle</span> *rect</code></em>,
|
||||
<em class="parameter"><code><span class="type">GdkGravity</span> rect_anchor</code></em>,
|
||||
<em class="parameter"><code><span class="type">GdkGravity</span> menu_anchor</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">GdkEvent</span> *trigger_event</code></em>);</pre>
|
||||
<p>Displays <em class="parameter"><code>menu</code></em>
|
||||
and makes it available for selection.</p>
|
||||
<p>See <a class="link" href="GtkMenu.html#gtk-menu-popup-at-widget" title="gtk_menu_popup_at_widget ()"><code class="function">gtk_menu_popup_at_widget()</code></a> and <a class="link" href="GtkMenu.html#gtk-menu-popup-at-pointer" title="gtk_menu_popup_at_pointer ()"><code class="function">gtk_menu_popup_at_pointer()</code></a>, which
|
||||
@ -835,13 +892,13 @@ direction is right-to-left.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>rect_window</p></td>
|
||||
<td class="parameter_description"><p>the <a href="../html/gdk3-Windows.html#GdkWindow-struct"><span class="type">GdkWindow</span></a> <em class="parameter"><code>rect</code></em>
|
||||
<td class="parameter_description"><p>the <span class="type">GdkWindow</span> <em class="parameter"><code>rect</code></em>
|
||||
is relative to. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>rect</p></td>
|
||||
<td class="parameter_description"><p>the <a href="../html/gdk3-Points-Rectangles-and-Regions.html#GdkRectangle"><span class="type">GdkRectangle</span></a> to align <em class="parameter"><code>menu</code></em>
|
||||
<td class="parameter_description"><p>the <span class="type">GdkRectangle</span> to align <em class="parameter"><code>menu</code></em>
|
||||
with. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></td>
|
||||
</tr>
|
||||
@ -861,7 +918,7 @@ to align with <em class="parameter"><code>rect</code></em>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>trigger_event</p></td>
|
||||
<td class="parameter_description"><p>the <a href="../html/gdk3-Event-Structures.html#GdkEvent"><span class="type">GdkEvent</span></a> that initiated this request or
|
||||
<td class="parameter_description"><p>the <span class="type">GdkEvent</span> that initiated this request or
|
||||
<code class="literal">NULL</code> if it's the current event. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
|
||||
</tr>
|
||||
@ -876,9 +933,9 @@ to align with <em class="parameter"><code>rect</code></em>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
gtk_menu_popup_at_widget (<em class="parameter"><code><a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> *menu</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
|
||||
<em class="parameter"><code><a href="../html/gdk3-Windows.html#GdkGravity"><span class="type">GdkGravity</span></a> widget_anchor</code></em>,
|
||||
<em class="parameter"><code><a href="../html/gdk3-Windows.html#GdkGravity"><span class="type">GdkGravity</span></a> menu_anchor</code></em>,
|
||||
<em class="parameter"><code>const <a href="../html/gdk3-Event-Structures.html#GdkEvent"><span class="type">GdkEvent</span></a> *trigger_event</code></em>);</pre>
|
||||
<em class="parameter"><code><span class="type">GdkGravity</span> widget_anchor</code></em>,
|
||||
<em class="parameter"><code><span class="type">GdkGravity</span> menu_anchor</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">GdkEvent</span> *trigger_event</code></em>);</pre>
|
||||
<p>Displays <em class="parameter"><code>menu</code></em>
|
||||
and makes it available for selection.</p>
|
||||
<p>See <a class="link" href="GtkMenu.html#gtk-menu-popup-at-pointer" title="gtk_menu_popup_at_pointer ()"><code class="function">gtk_menu_popup_at_pointer()</code></a> to pop up a menu at the master pointer.
|
||||
@ -938,7 +995,7 @@ to align with <em class="parameter"><code>widget</code></em>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>trigger_event</p></td>
|
||||
<td class="parameter_description"><p>the <a href="../html/gdk3-Event-Structures.html#GdkEvent"><span class="type">GdkEvent</span></a> that initiated this request or
|
||||
<td class="parameter_description"><p>the <span class="type">GdkEvent</span> that initiated this request or
|
||||
<code class="literal">NULL</code> if it's the current event. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
|
||||
</tr>
|
||||
@ -952,7 +1009,7 @@ to align with <em class="parameter"><code>widget</code></em>
|
||||
<a name="gtk-menu-popup-at-pointer"></a><h3>gtk_menu_popup_at_pointer ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
gtk_menu_popup_at_pointer (<em class="parameter"><code><a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> *menu</code></em>,
|
||||
<em class="parameter"><code>const <a href="../html/gdk3-Event-Structures.html#GdkEvent"><span class="type">GdkEvent</span></a> *trigger_event</code></em>);</pre>
|
||||
<em class="parameter"><code>const <span class="type">GdkEvent</span> *trigger_event</code></em>);</pre>
|
||||
<p>Displays <em class="parameter"><code>menu</code></em>
|
||||
and makes it available for selection.</p>
|
||||
<p>See <a class="link" href="GtkMenu.html#gtk-menu-popup-at-widget" title="gtk_menu_popup_at_widget ()"><code class="function">gtk_menu_popup_at_widget()</code></a> to pop up a menu at a widget.
|
||||
@ -981,7 +1038,7 @@ out how it was actually positioned.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>trigger_event</p></td>
|
||||
<td class="parameter_description"><p>the <a href="../html/gdk3-Event-Structures.html#GdkEvent"><span class="type">GdkEvent</span></a> that initiated this request or
|
||||
<td class="parameter_description"><p>the <span class="type">GdkEvent</span> that initiated this request or
|
||||
<code class="literal">NULL</code> if it's the current event. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
|
||||
</tr>
|
||||
@ -995,7 +1052,7 @@ out how it was actually positioned.</p>
|
||||
<a name="gtk-menu-popup-for-device"></a><h3>gtk_menu_popup_for_device ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
gtk_menu_popup_for_device (<em class="parameter"><code><a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> *menu</code></em>,
|
||||
<em class="parameter"><code><a href="../html/GdkDevice.html#GdkDevice-struct"><span class="type">GdkDevice</span></a> *device</code></em>,
|
||||
<em class="parameter"><code><span class="type">GdkDevice</span> *device</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *parent_menu_shell</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *parent_menu_item</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="GtkMenu.html#GtkMenuPositionFunc" title="GtkMenuPositionFunc ()"><span class="type">GtkMenuPositionFunc</span></a> func</code></em>,
|
||||
@ -1053,7 +1110,7 @@ have this problem.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>device</p></td>
|
||||
<td class="parameter_description"><p>a <a href="../html/GdkDevice.html#GdkDevice-struct"><span class="type">GdkDevice</span></a>. </p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GdkDevice</span>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1407,7 +1464,7 @@ and should not be modified or freed.</p>
|
||||
gtk_menu_set_monitor (<em class="parameter"><code><a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> *menu</code></em>,
|
||||
<em class="parameter"><code><span class="type">gint</span> monitor_num</code></em>);</pre>
|
||||
<p>Informs GTK+ on which monitor a menu should be popped up.
|
||||
See <a href="../html/GdkMonitor.html#gdk-monitor-get-geometry"><code class="function">gdk_monitor_get_geometry()</code></a>.</p>
|
||||
See <code class="function">gdk_monitor_get_geometry()</code>.</p>
|
||||
<p>This function should be called from a <a class="link" href="GtkMenu.html#GtkMenuPositionFunc" title="GtkMenuPositionFunc ()"><span class="type">GtkMenuPositionFunc</span></a>
|
||||
if the menu should not appear on the same monitor as the pointer.
|
||||
This information can’t be reliably inferred from the coordinates
|
||||
@ -1472,7 +1529,7 @@ be popped up or -1, if no monitor has been set</p>
|
||||
<a name="gtk-menu-place-on-monitor"></a><h3>gtk_menu_place_on_monitor ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
gtk_menu_place_on_monitor (<em class="parameter"><code><a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> *menu</code></em>,
|
||||
<em class="parameter"><code><a href="../html/GdkMonitor.html#GdkMonitor-struct"><span class="type">GdkMonitor</span></a> *monitor</code></em>);</pre>
|
||||
<em class="parameter"><code><span class="type">GdkMonitor</span> *monitor</code></em>);</pre>
|
||||
<p>Places <em class="parameter"><code>menu</code></em>
|
||||
on the given monitor.</p>
|
||||
<div class="refsect3">
|
||||
@ -2030,13 +2087,13 @@ menu item is selected.</p>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="GtkMenu--anchor-hints"></a><h3>The <code class="literal">“anchor-hints”</code> property</h3>
|
||||
<pre class="programlisting"> “anchor-hints” <a href="../html/gdk3-Windows.html#GdkAnchorHints"><span class="type">GdkAnchorHints</span></a></pre>
|
||||
<pre class="programlisting"> “anchor-hints” <span class="type">GdkAnchorHints</span></pre>
|
||||
<p>Positioning hints for aligning the menu relative to a rectangle.</p>
|
||||
<p>These hints determine how the menu should be positioned in the case that
|
||||
the menu would fall off-screen if placed in its ideal position.</p>
|
||||
<p><span class="inlinemediaobject"><img src="popup-flip.png"></span></p>
|
||||
<p>For example, <a href="../html/gdk3-Windows.html#GDK-ANCHOR-FLIP-Y:CAPS"><code class="literal">GDK_ANCHOR_FLIP_Y</code></a> will replace <a href="../html/gdk3-Windows.html#GDK-GRAVITY-NORTH-WEST:CAPS"><code class="literal">GDK_GRAVITY_NORTH_WEST</code></a> with
|
||||
<a href="../html/gdk3-Windows.html#GDK-GRAVITY-SOUTH-WEST:CAPS"><code class="literal">GDK_GRAVITY_SOUTH_WEST</code></a> and vice versa if the menu extends beyond the
|
||||
<p>For example, <code class="literal">GDK_ANCHOR_FLIP_Y</code> will replace <code class="literal">GDK_GRAVITY_NORTH_WEST</code> with
|
||||
<code class="literal">GDK_GRAVITY_SOUTH_WEST</code> and vice versa if the menu extends beyond the
|
||||
bottom edge of the monitor.</p>
|
||||
<p>See <a class="link" href="GtkMenu.html#gtk-menu-popup-at-rect" title="gtk_menu_popup_at_rect ()"><code class="function">gtk_menu_popup_at_rect()</code></a>, <a class="link" href="GtkMenu.html#gtk-menu-popup-at-widget" title="gtk_menu_popup_at_widget ()"><code class="function">gtk_menu_popup_at_widget()</code></a>,
|
||||
<a class="link" href="GtkMenu.html#gtk-menu-popup-at-pointer" title="gtk_menu_popup_at_pointer ()"><code class="function">gtk_menu_popup_at_pointer()</code></a>, <a class="link" href="GtkMenu.html#GtkMenu--rect-anchor-dx" title="The “rect-anchor-dx” property"><span class="type">“rect-anchor-dx”</span></a>,
|
||||
@ -2058,8 +2115,8 @@ use <a class="link" href="GtkMenu.html#gtk-menu-attach-to-widget" title="gtk_men
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="GtkMenu--menu-type-hint"></a><h3>The <code class="literal">“menu-type-hint”</code> property</h3>
|
||||
<pre class="programlisting"> “menu-type-hint” <a href="../html/gdk3-Windows.html#GdkWindowTypeHint"><span class="type">GdkWindowTypeHint</span></a></pre>
|
||||
<p>The <a href="../html/gdk3-Windows.html#GdkWindowTypeHint"><span class="type">GdkWindowTypeHint</span></a> to use for the menu's <a href="../html/gdk3-Windows.html#GdkWindow-struct"><span class="type">GdkWindow</span></a>.</p>
|
||||
<pre class="programlisting"> “menu-type-hint” <span class="type">GdkWindowTypeHint</span></pre>
|
||||
<p>The <span class="type">GdkWindowTypeHint</span> to use for the menu's <span class="type">GdkWindow</span>.</p>
|
||||
<p>See <a class="link" href="GtkMenu.html#gtk-menu-popup-at-rect" title="gtk_menu_popup_at_rect ()"><code class="function">gtk_menu_popup_at_rect()</code></a>, <a class="link" href="GtkMenu.html#gtk-menu-popup-at-widget" title="gtk_menu_popup_at_widget ()"><code class="function">gtk_menu_popup_at_widget()</code></a>,
|
||||
<a class="link" href="GtkMenu.html#gtk-menu-popup-at-pointer" title="gtk_menu_popup_at_pointer ()"><code class="function">gtk_menu_popup_at_pointer()</code></a>, <a class="link" href="GtkMenu.html#GtkMenu--anchor-hints" title="The “anchor-hints” property"><span class="type">“anchor-hints”</span></a>,
|
||||
<a class="link" href="GtkMenu.html#GtkMenu--rect-anchor-dx" title="The “rect-anchor-dx” property"><span class="type">“rect-anchor-dx”</span></a>, <a class="link" href="GtkMenu.html#GtkMenu--rect-anchor-dy" title="The “rect-anchor-dy” property"><span class="type">“rect-anchor-dy”</span></a>, and <a class="link" href="GtkMenu.html#GtkMenu-popped-up" title="The “popped-up” signal"><span class="type">“popped-up”</span></a>.</p>
|
||||
@ -2391,6 +2448,6 @@ backend can't obtain it. </p></td>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.27</div>
|
||||
<hr>Generated by GTK-Doc V1.28</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user