New upstream version 3.23.0
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 Vsnapshot">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<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.25 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@ -544,113 +544,56 @@ 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">
|
||||
<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>
|
||||
|
||||
<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>
|
||||
<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">
|
||||
<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>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
static gint
|
||||
my_popup_handler (GtkWidget *widget, GdkEvent *event)
|
||||
{
|
||||
GtkMenu *menu;
|
||||
GdkEventButton *event_button;
|
||||
|
||||
<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>
|
||||
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="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>
|
||||
// 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="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>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
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">
|
||||
<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>
|
||||
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
menu
|
||||
├── arrow.top
|
||||
├── <child>
|
||||
┊
|
||||
├── <child>
|
||||
╰── arrow.bottom
|
||||
</pre></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
|
||||
@ -727,7 +670,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 <span class="type">GdkScreen</span>, 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>
|
||||
@ -892,13 +835,13 @@ direction is right-to-left.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>rect_window</p></td>
|
||||
<td class="parameter_description"><p>the <span class="type">GdkWindow</span> <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 <span class="type">GdkRectangle</span> 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>
|
||||
@ -918,7 +861,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 <span class="type">GdkEvent</span> 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>
|
||||
@ -926,20 +869,6 @@ to align with <em class="parameter"><code>rect</code></em>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
|
||||
<p class="stability">Stability Level: <acronym title="Unstable interfaces are experimental or transitional. They are typically used to
|
||||
give outside developers early access to new or rapidly changing technology, or
|
||||
to provide an interim solution to a problem where a more general solution is
|
||||
anticipated. No claims are made about either source or binary compatibility from
|
||||
one minor release to the next.
|
||||
|
||||
The Unstable interface level is a warning that these interfaces are subject to
|
||||
change without warning and should not be used in unbundled products.
|
||||
|
||||
Given such caveats, customer impact need not be a factor when considering
|
||||
incompatible changes to an Unstable interface in a major or minor release.
|
||||
Nonetheless, when such changes are introduced, the changes should still be
|
||||
mentioned in the release notes for the affected release.
|
||||
"><span class="acronym">Unstable</span></acronym></p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
@ -989,7 +918,7 @@ direction is right-to-left.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>widget</p></td>
|
||||
<td class="parameter_description"><p>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> to align <em class="parameter"><code>menu</code></em>
|
||||
<td class="parameter_description"><p> the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> 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>
|
||||
@ -1009,7 +938,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 <span class="type">GdkEvent</span> 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>
|
||||
@ -1017,20 +946,6 @@ to align with <em class="parameter"><code>widget</code></em>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
|
||||
<p class="stability">Stability Level: <acronym title="Unstable interfaces are experimental or transitional. They are typically used to
|
||||
give outside developers early access to new or rapidly changing technology, or
|
||||
to provide an interim solution to a problem where a more general solution is
|
||||
anticipated. No claims are made about either source or binary compatibility from
|
||||
one minor release to the next.
|
||||
|
||||
The Unstable interface level is a warning that these interfaces are subject to
|
||||
change without warning and should not be used in unbundled products.
|
||||
|
||||
Given such caveats, customer impact need not be a factor when considering
|
||||
incompatible changes to an Unstable interface in a major or minor release.
|
||||
Nonetheless, when such changes are introduced, the changes should still be
|
||||
mentioned in the release notes for the affected release.
|
||||
"><span class="acronym">Unstable</span></acronym></p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
@ -1066,7 +981,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 <span class="type">GdkEvent</span> 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>
|
||||
@ -1074,20 +989,6 @@ out how it was actually positioned.</p>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
|
||||
<p class="stability">Stability Level: <acronym title="Unstable interfaces are experimental or transitional. They are typically used to
|
||||
give outside developers early access to new or rapidly changing technology, or
|
||||
to provide an interim solution to a problem where a more general solution is
|
||||
anticipated. No claims are made about either source or binary compatibility from
|
||||
one minor release to the next.
|
||||
|
||||
The Unstable interface level is a warning that these interfaces are subject to
|
||||
change without warning and should not be used in unbundled products.
|
||||
|
||||
Given such caveats, customer impact need not be a factor when considering
|
||||
incompatible changes to an Unstable interface in a major or minor release.
|
||||
Nonetheless, when such changes are introduced, the changes should still be
|
||||
mentioned in the release notes for the affected release.
|
||||
"><span class="acronym">Unstable</span></acronym></p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
@ -1152,36 +1053,36 @@ have this problem.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>device</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GdkDevice</span>. </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>
|
||||
<td class="parameter_name"><p>parent_menu_shell</p></td>
|
||||
<td class="parameter_description"><p>the menu shell containing the triggering
|
||||
<td class="parameter_description"><p> the menu shell containing the triggering
|
||||
menu item, or <code class="literal">NULL</code>. </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>
|
||||
<td class="parameter_name"><p>parent_menu_item</p></td>
|
||||
<td class="parameter_description"><p>the menu item whose activation triggered
|
||||
<td class="parameter_description"><p> the menu item whose activation triggered
|
||||
the popup, or <code class="literal">NULL</code>. </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>
|
||||
<td class="parameter_name"><p>func</p></td>
|
||||
<td class="parameter_description"><p>a user supplied function used to position the menu,
|
||||
<td class="parameter_description"><p> a user supplied function used to position the menu,
|
||||
or <code class="literal">NULL</code>. </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>
|
||||
<td class="parameter_name"><p>data</p></td>
|
||||
<td class="parameter_description"><p>user supplied data to be passed to <em class="parameter"><code>func</code></em>
|
||||
<td class="parameter_description"><p> user supplied data to be passed to <em class="parameter"><code>func</code></em>
|
||||
. </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>
|
||||
<td class="parameter_name"><p>destroy</p></td>
|
||||
<td class="parameter_description"><p>destroy notify for <em class="parameter"><code>data</code></em>
|
||||
<td class="parameter_description"><p> destroy notify for <em class="parameter"><code>data</code></em>
|
||||
. </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>
|
||||
@ -1259,19 +1160,19 @@ have this problem.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>parent_menu_shell</p></td>
|
||||
<td class="parameter_description"><p>the menu shell containing the
|
||||
<td class="parameter_description"><p> the menu shell containing the
|
||||
triggering menu item, or <code class="literal">NULL</code>. </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>
|
||||
<td class="parameter_name"><p>parent_menu_item</p></td>
|
||||
<td class="parameter_description"><p>the menu item whose activation
|
||||
<td class="parameter_description"><p> the menu item whose activation
|
||||
triggered the popup, or <code class="literal">NULL</code>. </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>
|
||||
<td class="parameter_name"><p>func</p></td>
|
||||
<td class="parameter_description"><p>a user supplied function used to position
|
||||
<td class="parameter_description"><p> a user supplied function used to position
|
||||
the menu, or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
@ -1322,7 +1223,7 @@ contained in this group.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>accel_group</p></td>
|
||||
<td class="parameter_description"><p>the <a class="link" href="gtk3-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> to be associated
|
||||
<td class="parameter_description"><p> the <a class="link" href="gtk3-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> to be associated
|
||||
with the menu. </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>
|
||||
@ -1354,7 +1255,7 @@ menu. See <a class="link" href="GtkMenu.html#gtk-menu-set-accel-group" title="gt
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-menu-get-accel-group.returns"></a><h4>Returns</h4>
|
||||
<p>the <a class="link" href="gtk3-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> associated with the menu. </p>
|
||||
<p> the <a class="link" href="gtk3-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> associated with the menu. </p>
|
||||
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -1373,9 +1274,9 @@ Instead, by just calling <a class="link" href="GtkMenu.html#gtk-menu-set-accel-p
|
||||
each menu item of this menu, that contains a label describing its
|
||||
purpose, automatically gets an accel path assigned.</p>
|
||||
<p>For example, a menu containing menu items “New” and “Exit”, will, after
|
||||
<code class="literal">gtk_menu_set_accel_path (menu, "&lt;Gnumeric-Sheet>/File");</code> has been
|
||||
called, assign its items the accel paths: <code class="literal">"&lt;Gnumeric-Sheet>/File/New"</code>
|
||||
and <code class="literal">"&lt;Gnumeric-Sheet>/File/Exit"</code>.</p>
|
||||
<code class="literal">gtk_menu_set_accel_path (menu, "<Gnumeric-Sheet>/File");</code> has been
|
||||
called, assign its items the accel paths: <code class="literal">"<Gnumeric-Sheet>/File/New"</code>
|
||||
and <code class="literal">"<Gnumeric-Sheet>/File/Exit"</code>.</p>
|
||||
<p>Assigning accel paths to menu items then enables the user to change
|
||||
their accelerators at runtime. More details about accelerator paths
|
||||
and their default setups can be found at <a class="link" href="gtk3-Accelerator-Maps.html#gtk-accel-map-add-entry" title="gtk_accel_map_add_entry ()"><code class="function">gtk_accel_map_add_entry()</code></a>.</p>
|
||||
@ -1399,8 +1300,8 @@ it first with <code class="function">g_intern_static_string()</code>.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>accel_path</p></td>
|
||||
<td class="parameter_description"><p>a valid accelerator path. </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>
|
||||
<td class="parameter_description"><p> a valid accelerator path, or <code class="literal">NULL</code> to unset the path. </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>
|
||||
</tbody>
|
||||
</table></div>
|
||||
@ -1462,8 +1363,9 @@ text as that menu item’s label.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>title</p></td>
|
||||
<td class="parameter_description"><p>a string containing the title for the menu</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
<td class="parameter_description"><p> a string containing the title for the menu, or <code class="literal">NULL</code> to
|
||||
inherit the title of the parent menu item, if any. </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>
|
||||
</tbody>
|
||||
</table></div>
|
||||
@ -1753,7 +1655,7 @@ gtk_menu_get_active (<em class="parameter"><code><a class="link" href="GtkMenu.h
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-menu-get-active.returns"></a><h4>Returns</h4>
|
||||
<p>the <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> that was last selected
|
||||
<p> the <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> that was last selected
|
||||
in the menu. If a selection has not yet been made, the
|
||||
first menu item is selected. </p>
|
||||
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||||
@ -1860,7 +1762,7 @@ widgets moves between screens.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>detacher</p></td>
|
||||
<td class="parameter_description"><p>the user supplied callback function
|
||||
<td class="parameter_description"><p> the user supplied callback function
|
||||
that will be called when the menu calls <a class="link" href="GtkMenu.html#gtk-menu-detach" title="gtk_menu_detach ()"><code class="function">gtk_menu_detach()</code></a>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
|
||||
</tr>
|
||||
@ -1916,7 +1818,7 @@ gtk_menu_get_attach_widget (<em class="parameter"><code><a class="link" href="Gt
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-menu-get-attach-widget.returns"></a><h4>Returns</h4>
|
||||
<p>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that the menu is attached to. </p>
|
||||
<p> the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that the menu is attached to. </p>
|
||||
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -1944,7 +1846,7 @@ This list is owned by GTK+ and must not be modified.</p>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="gtk-menu-get-for-attach-widget.returns"></a><h4>Returns</h4>
|
||||
<p>the list
|
||||
<p> the list
|
||||
of menus attached to his widget. </p>
|
||||
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkWidget][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||||
</div>
|
||||
@ -1983,19 +1885,19 @@ called.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>x</p></td>
|
||||
<td class="parameter_description"><p>address of the <span class="type">gint</span> representing the horizontal
|
||||
<td class="parameter_description"><p> address of the <span class="type">gint</span> representing the horizontal
|
||||
position where the menu shall be drawn. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>y</p></td>
|
||||
<td class="parameter_description"><p>address of the <span class="type">gint</span> representing the vertical position
|
||||
<td class="parameter_description"><p> address of the <span class="type">gint</span> representing the vertical position
|
||||
where the menu shall be drawn. This is an output parameter. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>push_in</p></td>
|
||||
<td class="parameter_description"><p>This parameter controls how menus placed outside
|
||||
<td class="parameter_description"><p> This parameter controls how menus placed outside
|
||||
the monitor are handled. If this is set to <code class="literal">TRUE</code> and part of
|
||||
the menu is outside the monitor then GTK+ pushes the window
|
||||
into the visible area, effectively modifying the popup
|
||||
@ -2142,20 +2044,6 @@ bottom edge of the monitor.</p>
|
||||
<p>Flags: Read / Write / Construct</p>
|
||||
<p>Default value: GDK_ANCHOR_FLIP_X | GDK_ANCHOR_FLIP_Y | GDK_ANCHOR_SLIDE_X | GDK_ANCHOR_SLIDE_Y | GDK_ANCHOR_RESIZE_X | GDK_ANCHOR_RESIZE_Y</p>
|
||||
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
|
||||
<p class="stability">Stability Level: <acronym title="Unstable interfaces are experimental or transitional. They are typically used to
|
||||
give outside developers early access to new or rapidly changing technology, or
|
||||
to provide an interim solution to a problem where a more general solution is
|
||||
anticipated. No claims are made about either source or binary compatibility from
|
||||
one minor release to the next.
|
||||
|
||||
The Unstable interface level is a warning that these interfaces are subject to
|
||||
change without warning and should not be used in unbundled products.
|
||||
|
||||
Given such caveats, customer impact need not be a factor when considering
|
||||
incompatible changes to an Unstable interface in a major or minor release.
|
||||
Nonetheless, when such changes are introduced, the changes should still be
|
||||
mentioned in the release notes for the affected release.
|
||||
"><span class="acronym">Unstable</span></acronym></p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
@ -2178,20 +2066,6 @@ use <a class="link" href="GtkMenu.html#gtk-menu-attach-to-widget" title="gtk_men
|
||||
<p>Flags: Read / Write / Construct</p>
|
||||
<p>Default value: GDK_WINDOW_TYPE_HINT_POPUP_MENU</p>
|
||||
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
|
||||
<p class="stability">Stability Level: <acronym title="Unstable interfaces are experimental or transitional. They are typically used to
|
||||
give outside developers early access to new or rapidly changing technology, or
|
||||
to provide an interim solution to a problem where a more general solution is
|
||||
anticipated. No claims are made about either source or binary compatibility from
|
||||
one minor release to the next.
|
||||
|
||||
The Unstable interface level is a warning that these interfaces are subject to
|
||||
change without warning and should not be used in unbundled products.
|
||||
|
||||
Given such caveats, customer impact need not be a factor when considering
|
||||
incompatible changes to an Unstable interface in a major or minor release.
|
||||
Nonetheless, when such changes are introduced, the changes should still be
|
||||
mentioned in the release notes for the affected release.
|
||||
"><span class="acronym">Unstable</span></acronym></p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
@ -2215,20 +2089,6 @@ anchor.</p>
|
||||
<p>Flags: Read / Write / Construct</p>
|
||||
<p>Default value: 0</p>
|
||||
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
|
||||
<p class="stability">Stability Level: <acronym title="Unstable interfaces are experimental or transitional. They are typically used to
|
||||
give outside developers early access to new or rapidly changing technology, or
|
||||
to provide an interim solution to a problem where a more general solution is
|
||||
anticipated. No claims are made about either source or binary compatibility from
|
||||
one minor release to the next.
|
||||
|
||||
The Unstable interface level is a warning that these interfaces are subject to
|
||||
change without warning and should not be used in unbundled products.
|
||||
|
||||
Given such caveats, customer impact need not be a factor when considering
|
||||
incompatible changes to an Unstable interface in a major or minor release.
|
||||
Nonetheless, when such changes are introduced, the changes should still be
|
||||
mentioned in the release notes for the affected release.
|
||||
"><span class="acronym">Unstable</span></acronym></p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
@ -2241,20 +2101,6 @@ mentioned in the release notes for the affected release.
|
||||
<p>Flags: Read / Write / Construct</p>
|
||||
<p>Default value: 0</p>
|
||||
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
|
||||
<p class="stability">Stability Level: <acronym title="Unstable interfaces are experimental or transitional. They are typically used to
|
||||
give outside developers early access to new or rapidly changing technology, or
|
||||
to provide an interim solution to a problem where a more general solution is
|
||||
anticipated. No claims are made about either source or binary compatibility from
|
||||
one minor release to the next.
|
||||
|
||||
The Unstable interface level is a warning that these interfaces are subject to
|
||||
change without warning and should not be used in unbundled products.
|
||||
|
||||
Given such caveats, customer impact need not be a factor when considering
|
||||
incompatible changes to an Unstable interface in a major or minor release.
|
||||
Nonetheless, when such changes are introduced, the changes should still be
|
||||
mentioned in the release notes for the affected release.
|
||||
"><span class="acronym">Unstable</span></acronym></p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
@ -2509,14 +2355,14 @@ and the red menu is <em class="parameter"><code>final_rect</code></em>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>flipped_rect</p></td>
|
||||
<td class="parameter_description"><p>the position of <em class="parameter"><code>menu</code></em>
|
||||
<td class="parameter_description"><p> the position of <em class="parameter"><code>menu</code></em>
|
||||
after any possible
|
||||
flipping or <code class="literal">NULL</code> if the backend can't obtain it. </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>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>final_rect</p></td>
|
||||
<td class="parameter_description"><p>the final position of <em class="parameter"><code>menu</code></em>
|
||||
<td class="parameter_description"><p> the final position of <em class="parameter"><code>menu</code></em>
|
||||
or <code class="literal">NULL</code> if the
|
||||
backend can't obtain it. </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>
|
||||
@ -2541,24 +2387,10 @@ backend can't obtain it. </p></td>
|
||||
</div>
|
||||
<p>Flags: Run First</p>
|
||||
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
|
||||
<p class="stability">Stability Level: <acronym title="Unstable interfaces are experimental or transitional. They are typically used to
|
||||
give outside developers early access to new or rapidly changing technology, or
|
||||
to provide an interim solution to a problem where a more general solution is
|
||||
anticipated. No claims are made about either source or binary compatibility from
|
||||
one minor release to the next.
|
||||
|
||||
The Unstable interface level is a warning that these interfaces are subject to
|
||||
change without warning and should not be used in unbundled products.
|
||||
|
||||
Given such caveats, customer impact need not be a factor when considering
|
||||
incompatible changes to an Unstable interface in a major or minor release.
|
||||
Nonetheless, when such changes are introduced, the changes should still be
|
||||
mentioned in the release notes for the affected release.
|
||||
"><span class="acronym">Unstable</span></acronym></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.27</div>
|
||||
<hr>Generated by GTK-Doc V1.25</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user