File: classGFC_1_1Gtk_1_1Menu.html

package info (click to toggle)
gfcui 2.3.1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 43,420 kB
  • ctags: 18,023
  • sloc: cpp: 53,967; sh: 31,555; makefile: 1,322; perl: 108
file content (990 lines) | stat: -rw-r--r-- 50,872 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>GTK+ Foundation Classes</title>
  <link href="gfc.css" rel="stylesheet" type="text/css">
  <meta content="The GFC Development Team" name="author">
  <meta content="Core Library Reference Manual" name="description">
</head>
<body style="color: rgb(0, 0, 0); background-color: rgb(243, 244, 248);"
 alink="#000099" link="#000099" vlink="#990099">
<table style="text-align: left; width: 1227px; height: 117px;"
 border="0" cellpadding="0" cellspacing="0">
  <tbody>
    <tr>
      <td
 style="text-align: center; background-color: rgb(255, 255, 255); width: 220px; vertical-align: top;"><img
 alt="GFC Logo" src="../images/gfc.png"
 style="width: 207px; height: 92px;"></td>
      <td
 style="text-align: center; background-color: rgb(87, 107, 152); vertical-align: middle;"><img
 alt="GFC Title Logo" src="../images/gfc-title.png"
 style="width: 418px; height: 76px;"><br>
      </td>
    </tr>
    <tr>
      <td
 style="text-align: center; background-color: rgb(65, 77, 104); vertical-align: middle;"><big><span
 style="color: rgb(255, 255, 153); font-weight: bold;">Reference Manual</span></big><br>
      </td>
      <td
 style="text-align: center; background-color: rgb(148, 164, 200); vertical-align: middle;"><small
 style="font-family: helvetica,arial,sans-serif;"><a
 href="../html/index.html">Main Page</a>&nbsp; |&nbsp; <a
 href="../html/namespaces.html">Namespace List</a>&nbsp; |&nbsp; <a
 href="classes.html">Alphabetical List</a>&nbsp; |&nbsp; <a
 href="../html/annotated.html">Class List</a>&nbsp; |&nbsp; <a
 href="../html/files.html">File List</a></small><br>
      </td>
    </tr>
  </tbody>
</table>
<small> </small>
</body>
</html>
<!-- Generated by Doxygen 1.3.8 -->
<h1>GFC::Gtk::Menu Class Reference</h1>A GtkMenu C++ wrapper class.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="menu_8hh-source.html">gfc/gtk/menu.hh</a>&gt;</code>
<p>
<p>Inheritance diagram for GFC::Gtk::Menu:
<p><center><img src="classGFC_1_1Gtk_1_1Menu.png" usemap="#GFC::Gtk::Menu_map" border="0" alt=""></center>
<map name="GFC::Gtk::Menu_map">
<area href="classGFC_1_1Gtk_1_1MenuShell.html" alt="GFC::Gtk::MenuShell" shape="rect" coords="73,336,210,360">
<area href="classGFC_1_1Gtk_1_1Container.html" alt="GFC::Gtk::Container" shape="rect" coords="73,280,210,304">
<area href="classGFC_1_1Gtk_1_1Widget.html" alt="GFC::Gtk::Widget" shape="rect" coords="73,224,210,248">
<area href="classGFC_1_1Gtk_1_1Object.html" alt="GFC::Gtk::Object" shape="rect" coords="0,168,137,192">
<area href="classGFC_1_1Atk_1_1Implementor.html" alt="GFC::Atk::Implementor" shape="rect" coords="147,168,284,192">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Object.html" alt="GFC::G::Object" shape="rect" coords="0,112,137,136">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInterface.html" alt="GFC::G::TypeInterface" shape="rect" coords="147,112,284,136">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInstance.html" alt="GFC::G::TypeInstance" shape="rect" coords="0,56,137,80">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInstance.html" alt="GFC::G::TypeInstance" shape="rect" coords="147,56,284,80">
<area doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html" alt="GFC::Trackable" shape="rect" coords="0,0,137,24">
<area doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html" alt="GFC::Trackable" shape="rect" coords="147,0,284,24">
</map>
<a href="classGFC_1_1Gtk_1_1Menu-members.html">List of all members.</a><h2>Public Types</h2>
<ul>
<li>typedef sigc::slot&lt; void,<br>
 int *, int *, bool * &gt; <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#w0">MenuPositionSlot</a>
<dl class="el"><dd class="mdescRight">Signature of the callback slot to be called when a popup menu is displayed by calling <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_0">popup()</a>; this slot controls the position of the popup menu.  <a href="#w0"></a><br></dl></ul>
<h2>Public Member Functions</h2>
<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
<ul>
<li><a class="anchor" name="z638_0" doxytag="GFC::Gtk::Menu::Menu" ></a>
<a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z638_0">Menu</a> ()
<dl class="el"><dd class="mdescRight">Construct a new <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a>. <br></dl><li><a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z638_1">Menu</a> (const <a class="el" href="classGFC_1_1Gtk_1_1AccelGroup.html">AccelGroup</a> &amp;accel_group)
<dl class="el"><dd class="mdescRight">Construct a new <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a> with an accelerator group which holds global accelerators for the menu.  <a href="#z638_1"></a><br></dl><li><a class="anchor" name="z638_2" doxytag="GFC::Gtk::Menu::~Menu" ></a>
virtual <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z638_2">~Menu</a> ()
<dl class="el"><dd class="mdescRight">Destructor. <br></dl></ul>
<tr><td colspan="2"><div class="groupHeader">Accessors</div></td></tr>
<ul>
<li><a class="anchor" name="z639_0" doxytag="GFC::Gtk::Menu::gtk_menu" ></a>
GtkMenu * <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z639_0">gtk_menu</a> () const
<dl class="el"><dd class="mdescRight">Get a pointer to the GtkMenu structure. <br></dl><li><a class="anchor" name="z639_1" doxytag="GFC::Gtk::Menu::operator GtkMenu *" ></a>
<a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z639_1">operator GtkMenu *</a> () const
<dl class="el"><dd class="mdescRight">Conversion operator; safely converts a <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a> to a GtkMenu pointer. <br></dl><li><a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> * <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z639_2">get_active</a> () const
<dl class="el"><dd class="mdescRight">Get the selected menu item from the menu.  <a href="#z639_2"></a><br></dl><li><a class="anchor" name="z639_3" doxytag="GFC::Gtk::Menu::get_accel_group" ></a>
<a class="el" href="classGFC_1_1Gtk_1_1AccelGroup.html">AccelGroup</a> * <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z639_3">get_accel_group</a> () const
<dl class="el"><dd class="mdescRight">Gets the <a class="el" href="classGFC_1_1Gtk_1_1AccelGroup.html">AccelGroup</a> which holds global accelerators for the menu (see <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_6">set_accel_group()</a>). <br></dl><li><a class="anchor" name="z639_4" doxytag="GFC::Gtk::Menu::get_attach_widget" ></a>
<a class="el" href="classGFC_1_1Gtk_1_1Widget.html">Widget</a> * <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z639_4">get_attach_widget</a> () const
<dl class="el"><dd class="mdescRight">Returns the <a class="el" href="classGFC_1_1Gtk_1_1Widget.html">Widget</a> that the menu is attached to. <br></dl><li>bool <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z639_5">get_tearoff_state</a> () const
<dl class="el"><dd class="mdescRight">Returns whether the menu is torn off (see <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_11">set_tearoff_state()</a>).  <a href="#z639_5"></a><br></dl><li><a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z639_6">get_title</a> () const
<dl class="el"><dd class="mdescRight">Returns the title of the menu (see <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_13">set_title()</a>).  <a href="#z639_6"></a><br></dl></ul>
<tr><td colspan="2"><div class="groupHeader">Methods</div></td></tr>
<ul>
<li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_0">popup</a> (<a class="el" href="classGFC_1_1Gtk_1_1MenuShell.html">MenuShell</a> &amp;parent_shell, <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> &amp;parent_item, unsigned int button, const <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#w0">MenuPositionSlot</a> &amp;position, unsigned int activate_time=GDK_CURRENT_TIME)
<dl class="el"><dd class="mdescRight">Displays a menu and makes it available for selection.  <a href="#z640_0"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_1">popup</a> (unsigned int button, const <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#w0">MenuPositionSlot</a> &amp;position, unsigned int activate_time=GDK_CURRENT_TIME)
<dl class="el"><dd class="mdescRight">Displays a menu and makes it available for selection.  <a href="#z640_1"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_2">popup</a> (unsigned int button, unsigned int activate_time=GDK_CURRENT_TIME)
<dl class="el"><dd class="mdescRight">Displays a menu and makes it available for selection.  <a href="#z640_2"></a><br></dl><li><a class="anchor" name="z640_3" doxytag="GFC::Gtk::Menu::reposition" ></a>
void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_3">reposition</a> ()
<dl class="el"><dd class="mdescRight">Repositions the menu according to its position slot. <br></dl><li><a class="anchor" name="z640_4" doxytag="GFC::Gtk::Menu::popdown" ></a>
void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_4">popdown</a> ()
<dl class="el"><dd class="mdescRight">Removes the menu from the screen. <br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_5">set_active</a> (unsigned int index)
<dl class="el"><dd class="mdescRight">Selects the specified menu item within the menu.  <a href="#z640_5"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_6">set_accel_group</a> (const <a class="el" href="classGFC_1_1Gtk_1_1AccelGroup.html">AccelGroup</a> *accel_group)
<dl class="el"><dd class="mdescRight">Set the <a class="el" href="classGFC_1_1Gtk_1_1AccelGroup.html">AccelGroup</a> which holds global accelerators for the menu.  <a href="#z640_6"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_8">set_accel_path</a> (const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &amp;accel_path)
<dl class="el"><dd class="mdescRight">Sets an accelerator path for this menu from which accelerator paths for its immediate children, its menu items, can be constructed.  <a href="#z640_8"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_9">attach_to_widget</a> (<a class="el" href="classGFC_1_1Gtk_1_1Widget.html">Widget</a> &amp;attach_widget)
<dl class="el"><dd class="mdescRight">Attaches the menu to the <em>widget</em>.  <a href="#z640_9"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_10">detach</a> ()
<dl class="el"><dd class="mdescRight">Detaches the menu from the widget to which it had been attached.  <a href="#z640_10"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_11">set_tearoff_state</a> (bool torn_off)
<dl class="el"><dd class="mdescRight">Changes the tearoff state of the menu.  <a href="#z640_11"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_13">set_title</a> (const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &amp;title)
<dl class="el"><dd class="mdescRight">Sets the title string for the menu.  <a href="#z640_13"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_14">reorder_child</a> (const <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> &amp;child, int position)
<dl class="el"><dd class="mdescRight">Moves a <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> to a new position within the <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a>.  <a href="#z640_14"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_15">set_screen</a> (const <a class="el" href="classGFC_1_1Gdk_1_1Screen.html">Gdk::Screen</a> *screen)
<dl class="el"><dd class="mdescRight">Sets the <a class="el" href="classGFC_1_1Gdk_1_1Screen.html">Gdk::Screen</a> on which the menu will be displayed.  <a href="#z640_15"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_16">attach</a> (<a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> &amp;child, unsigned int left_attach, unsigned int right_attach, unsigned int top_attach, unsigned int bottom_attach)
<dl class="el"><dd class="mdescRight">Adds a new <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> to a (table) menu.  <a href="#z640_16"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_17">set_monitor</a> (int monitor_num)
<dl class="el"><dd class="mdescRight">Informs GTK+ on which monitor a menu should be popped up (see <a class="el" href="classGFC_1_1Gdk_1_1Screen.html#z198_16">Gdk::Screen::get_monitor_geometry()</a>).  <a href="#z640_17"></a><br></dl></ul>
<h2>Protected Member Functions</h2>
<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
<ul>
<li><a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z636_0">Menu</a> (GtkMenu *menu, bool <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html#z143_1">owns_reference</a>=false)
<dl class="el"><dd class="mdescRight">Construct a new <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a> from an existing GtkMenu.  <a href="#z636_0"></a><br></dl></ul>
<tr><td colspan="2"><div class="groupHeader">Methods</div></td></tr>
<ul>
<li>virtual void <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z637_0">on_menu_detach</a> (<a class="el" href="classGFC_1_1Gtk_1_1Widget.html">Widget</a> &amp;attach_widget)
<dl class="el"><dd class="mdescRight">Called when a menu previously attached to a widget by calling <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_9">attach_to_widget()</a> is later detached from the widget by calling <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_10">detach()</a>.  <a href="#z637_0"></a><br></dl></ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A GtkMenu C++ wrapper class. 
<p>
A <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a> is a <a class="el" href="classGFC_1_1Gtk_1_1MenuShell.html">MenuShell</a> that implements a drop down menu consisting of a list of <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> objects which can be navigated and activated by the user to perform application functions. A <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a> is most commonly dropped down by activating a <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> in a <a class="el" href="classGFC_1_1Gtk_1_1MenuBar.html">MenuBar</a> or popped up by activating a <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> in another <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a>. A <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a> can also be popped up by activating an OptionMenu. Other composite widgets such as the <a class="el" href="classGFC_1_1Gtk_1_1Notebook.html">Notebook</a> can pop up a <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a> as well. Applications can display a <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a> as a popup menu by calling the <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_0">popup()</a> method. The example below shows how an application can pop up a menu when the 3rd mouse button is pressed.<p>
<b>Example 1:</b> Connecting the popup signal handler. <div class="fragment"><pre>    <span class="comment">// Declare a button_press_event handler in you window class.</span>
    <span class="keywordtype">bool</span> on_button_press(GdkEventButton *event);
   
    <span class="comment">// Then connect the window button_press_event to the popup signal handler.</span>
    <a class="code" href="classGFC_1_1Gtk_1_1Widget.html#z1062_2">sig_button_press_event</a>().connect(slot(<span class="keyword">this</span>, &amp;MyWindow::on_button_press));
</pre></div><p>
<b>Example 2:</b> A signal handler which displays a popup menu. <div class="fragment"><pre>    <span class="comment">// Construct the popup menu somewhere first, then pop it up here.</span>
    <span class="keywordtype">bool</span> MyWindow::on_button_press(GdkEventButton *event)
    {
        menu-&gt;popup(event-&gt;button, event-&gt;time);
        <span class="keywordflow">return</span> <span class="keyword">true</span>;
    }
</pre></div>There is a complete example of this in the menu example programs in the &lt;examples/menu&gt; subdirectory. 
<p>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="w0" doxytag="GFC::Gtk::Menu::MenuPositionSlot" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef sigc::slot&lt;void, int*, int*, bool*&gt; <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#w0">GFC::Gtk::Menu::MenuPositionSlot</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Signature of the callback slot to be called when a popup menu is displayed by calling <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_0">popup()</a>; this slot controls the position of the popup menu. 
<p>
<b>Example:</b> Method signature for MenuPositionSlot. <div class="fragment"><pre>             <span class="keywordtype">void</span> method(<span class="keywordtype">int</span> *x, <span class="keywordtype">int</span> *y, <span class="keywordtype">bool</span> *push_in);
             <span class="comment">// x: The address of the int representing the horizontal position where the menu shall be drawn.</span>
             <span class="comment">// y: The address of the int representing the vertical position where the menu shall be drawn.</span>
             <span class="comment">// push_in: If true, when the popup menu runs off the screen it is moved so it is displayed</span>
             <span class="comment">//          wholely on the screen. The default is false.</span>
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="z636_0" doxytag="GFC::Gtk::Menu::Menu" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> GFC::Gtk::Menu::Menu           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">GtkMenu *&nbsp;</td>
          <td class="mdname" nowrap> <em>menu</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>owns_reference</em> = <code>false</code></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [explicit, protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Construct a new <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a> from an existing GtkMenu. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>menu</em>&nbsp;</td><td>A pointer to a GtkMenu. </td></tr>
    <tr><td></td><td valign=top><em>owns_reference</em>&nbsp;</td><td>Set false if the initial reference count is floating, set true if it's not.</td></tr>
  </table>
</dl>
<br>
The <em>menu</em> can be a newly created GtkMenu or an existing GtkMenu (see <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Object.html#z68_0">G::Object::Object</a>).     </td>
  </tr>
</table>
<a class="anchor" name="z638_1" doxytag="GFC::Gtk::Menu::Menu" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> GFC::Gtk::Menu::Menu           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1AccelGroup.html">AccelGroup</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>accel_group</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Construct a new <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a> with an accelerator group which holds global accelerators for the menu. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>accel_group</em>&nbsp;</td><td>The <a class="el" href="classGFC_1_1Gtk_1_1AccelGroup.html">AccelGroup</a> to be associated with the menu.</td></tr>
  </table>
</dl>
<br>
This accelerator group also needs to be added to all windows that this menu is being used in with <a class="el" href="classGFC_1_1Gtk_1_1Window.html#z1073_5">Gtk::Window::add_accel_group()</a>, in order for those windows to support all the accelerators contained in this group.     </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="z640_16" doxytag="GFC::Gtk::Menu::attach" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::attach           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>child</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>left_attach</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>right_attach</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>top_attach</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>bottom_attach</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Adds a new <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> to a (table) menu. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>child</em>&nbsp;</td><td>A <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a>. </td></tr>
    <tr><td></td><td valign=top><em>left_attach</em>&nbsp;</td><td>The column number to attach the left side of the item to. </td></tr>
    <tr><td></td><td valign=top><em>right_attach</em>&nbsp;</td><td>The column number to attach the right side of the item to. </td></tr>
    <tr><td></td><td valign=top><em>top_attach</em>&nbsp;</td><td>The row number to attach the top of the item to. </td></tr>
    <tr><td></td><td valign=top><em>bottom_attach</em>&nbsp;</td><td>The row number to attach the bottom of the item to.</td></tr>
  </table>
</dl>
<br>
The number of 'cells' that an item will occupy is specified by left_attach, right_attach, top_attach and bottom_attach. These each represent the leftmost, rightmost, uppermost and lower column and row numbers of the table. (Columns and rows are indexed from zero).     </td>
  </tr>
</table>
<a class="anchor" name="z640_9" doxytag="GFC::Gtk::Menu::attach_to_widget" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::attach_to_widget           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classGFC_1_1Gtk_1_1Widget.html">Widget</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>attach_widget</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Attaches the menu to the <em>widget</em>. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>attach_widget</em>&nbsp;</td><td>The <a class="el" href="classGFC_1_1Gtk_1_1Widget.html">Widget</a> that the menu will be attached to.</td></tr>
  </table>
</dl>
<br>
When the menu calls <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_10">detach()</a> during its destruction the virtual <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z637_0">on_menu_detach()</a> method is called.     </td>
  </tr>
</table>
<a class="anchor" name="z640_10" doxytag="GFC::Gtk::Menu::detach" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::detach           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Detaches the menu from the widget to which it had been attached. 
<p>
Calling this method invokes the virtual <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z637_0">on_menu_detach()</a> method.     </td>
  </tr>
</table>
<a class="anchor" name="z639_2" doxytag="GFC::Gtk::Menu::get_active" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a>* GFC::Gtk::Menu::get_active           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the selected menu item from the menu. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> that was last selected in the menu.</dd></dl>
<br>
If a selection has not yet been made, the first menu item is selected. This is used by the OptionMenu.     </td>
  </tr>
</table>
<a class="anchor" name="z639_5" doxytag="GFC::Gtk::Menu::get_tearoff_state" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool GFC::Gtk::Menu::get_tearoff_state           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns whether the menu is torn off (see <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_11">set_tearoff_state()</a>). 
<p>
<dl compact><dt><b>Returns:</b></dt><dd><em>true</em> if the menu is currently torn off. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="z639_6" doxytag="GFC::Gtk::Menu::get_title" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> GFC::Gtk::Menu::get_title           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the title of the menu (see <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_13">set_title()</a>). 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The title of the menu, or null if the menu has no title set on it. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="z637_0" doxytag="GFC::Gtk::Menu::on_menu_detach" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void GFC::Gtk::Menu::on_menu_detach           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classGFC_1_1Gtk_1_1Widget.html">Widget</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>attach_widget</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Called when a menu previously attached to a widget by calling <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_9">attach_to_widget()</a> is later detached from the widget by calling <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_10">detach()</a>. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>attach_widget</em>&nbsp;</td><td>The <a class="el" href="classGFC_1_1Gtk_1_1Widget.html">Widget</a> that the menu is being detached from. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="z640_2" doxytag="GFC::Gtk::Menu::popup" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::popup           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>button</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>activate_time</em> = <code>GDK_CURRENT_TIME</code></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Displays a menu and makes it available for selection. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>button</em>&nbsp;</td><td>The button which was pressed to initiate the event. </td></tr>
    <tr><td></td><td valign=top><em>activate_time</em>&nbsp;</td><td>The time at which the activation event occurred.</td></tr>
  </table>
</dl>
<br>
Applications can use this function to display context-sensitive menus. The default menu positioning function will position the menu at the current pointer position.     </td>
  </tr>
</table>
<a class="anchor" name="z640_1" doxytag="GFC::Gtk::Menu::popup" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::popup           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>button</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#w0">MenuPositionSlot</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>position</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>activate_time</em> = <code>GDK_CURRENT_TIME</code></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Displays a menu and makes it available for selection. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>button</em>&nbsp;</td><td>The button which was pressed to initiate the event. </td></tr>
    <tr><td></td><td valign=top><em>position</em>&nbsp;</td><td>A MenuPositionSlot that is called to control the positon of the menu. </td></tr>
    <tr><td></td><td valign=top><em>activate_time</em>&nbsp;</td><td>The time at which the activation event occurred.</td></tr>
  </table>
</dl>
<br>
Applications can use this function to display context-sensitive menus.     </td>
  </tr>
</table>
<a class="anchor" name="z640_0" doxytag="GFC::Gtk::Menu::popup" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::popup           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classGFC_1_1Gtk_1_1MenuShell.html">MenuShell</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>parent_shell</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>parent_item</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>button</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#w0">MenuPositionSlot</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>position</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>activate_time</em> = <code>GDK_CURRENT_TIME</code></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Displays a menu and makes it available for selection. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>parent_shell</em>&nbsp;</td><td>The menu shell containing the triggering menu item. </td></tr>
    <tr><td></td><td valign=top><em>parent_item</em>&nbsp;</td><td>The menu item whose activation triggered the popup. </td></tr>
    <tr><td></td><td valign=top><em>button</em>&nbsp;</td><td>The button which was pressed to initiate the event. </td></tr>
    <tr><td></td><td valign=top><em>position</em>&nbsp;</td><td>A MenuPositionSlot that is called to control the positon of the menu. </td></tr>
    <tr><td></td><td valign=top><em>activate_time</em>&nbsp;</td><td>The time at which the activation event occurred.</td></tr>
  </table>
</dl>
<br>
Applications can use this function to display context-sensitive menus.     </td>
  </tr>
</table>
<a class="anchor" name="z640_14" doxytag="GFC::Gtk::Menu::reorder_child" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::reorder_child           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>child</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>position</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Moves a <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> to a new position within the <a class="el" href="classGFC_1_1Gtk_1_1Menu.html">Menu</a>. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>child</em>&nbsp;</td><td>The <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a> to move. </td></tr>
    <tr><td></td><td valign=top><em>position</em>&nbsp;</td><td>The new position to place child. Positions are numbered from 0 to n-1. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="z640_6" doxytag="GFC::Gtk::Menu::set_accel_group" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::set_accel_group           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1AccelGroup.html">AccelGroup</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>accel_group</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the <a class="el" href="classGFC_1_1Gtk_1_1AccelGroup.html">AccelGroup</a> which holds global accelerators for the menu. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>accel_group</em>&nbsp;</td><td>The <a class="el" href="classGFC_1_1Gtk_1_1AccelGroup.html">AccelGroup</a> to be associated with the menu.</td></tr>
  </table>
</dl>
<br>
This accelerator group also needs to be added to all windows that this menu is being used in with <a class="el" href="classGFC_1_1Gtk_1_1Window.html#z1073_5">Gtk::Window::add_accel_group()</a>, in order for those windows to support all the accelerators contained in this group.     </td>
  </tr>
</table>
<a class="anchor" name="z640_8" doxytag="GFC::Gtk::Menu::set_accel_path" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::set_accel_path           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>accel_path</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets an accelerator path for this menu from which accelerator paths for its immediate children, its menu items, can be constructed. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>accel_path</em>&nbsp;</td><td>A valid accelerator path.</td></tr>
  </table>
</dl>
<br>
The main purpose of this method is to spare the programmer the inconvenience of having to call <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_8">set_accel_path()</a> on each menu item that should support runtime user changable accelerators. Instead, by just calling <a class="el" href="classGFC_1_1Gtk_1_1Menu.html#z640_8">set_accel_path()</a> on their parent, each menu item of this menu, that contains a label describing its purpose, automatically gets an accel path assigned. For example, a menu containing menu items "New" and "Exit", will, after set_accel_path("&lt;Gnumeric-Sheet&gt;/File") has been called, assign its items the accel paths: "&lt;Gnumeric-Sheet&gt;/File/New" and "&lt;Gnumeric-Sheet&gt;/File/Exit". 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="el" href="classGFC_1_1Gtk_1_1AccelMap.html#e4">Gtk::AccelMap::add_entry()</a>. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>accel_path</em>&nbsp;</td><td>A valid accelerator path. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="z640_5" doxytag="GFC::Gtk::Menu::set_active" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::set_active           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>index</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Selects the specified menu item within the menu. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>index</em>&nbsp;</td><td>The index of the menu item to select. Index values are from 0 to n-1.</td></tr>
  </table>
</dl>
<br>
This is used by the OptionMenu and should not be used by anyone else.     </td>
  </tr>
</table>
<a class="anchor" name="z640_17" doxytag="GFC::Gtk::Menu::set_monitor" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::set_monitor           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>monitor_num</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Informs GTK+ on which monitor a menu should be popped up (see <a class="el" href="classGFC_1_1Gdk_1_1Screen.html#z198_16">Gdk::Screen::get_monitor_geometry()</a>). 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>monitor_num</em>&nbsp;</td><td>The number of the monitor on which the menu should be popped up.</td></tr>
  </table>
</dl>
<br>
This function should be called from a MenuPositionSlot if the menu should not appear on the same monitor as the pointer. This information can't be reliably inferred from the coordinates returned by a MenuPositionSlot, since, for very long menus, these coordinates may extend beyond the monitor boundaries or even the screen boundaries.     </td>
  </tr>
</table>
<a class="anchor" name="z640_15" doxytag="GFC::Gtk::Menu::set_screen" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::set_screen           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gdk_1_1Screen.html">Gdk::Screen</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>screen</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the <a class="el" href="classGFC_1_1Gdk_1_1Screen.html">Gdk::Screen</a> on which the menu will be displayed. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>screen</em>&nbsp;</td><td>A <a class="el" href="classGFC_1_1Gdk_1_1Screen.html">Gdk::Screen</a>, or null if the screen should be determined by the widget the menu is attached to. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="z640_11" doxytag="GFC::Gtk::Menu::set_tearoff_state" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::set_tearoff_state           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">bool&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>torn_off</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Changes the tearoff state of the menu. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>torn_off</em>&nbsp;</td><td>If <em>true</em>, the menu is displayed as a tearoff menu.</td></tr>
  </table>
</dl>
<br>
A menu is normally displayed as drop down menu which persists as long as the menu is active. It can also be displayed as a tearoff menu which persists until it is closed or reattached.     </td>
  </tr>
</table>
<a class="anchor" name="z640_13" doxytag="GFC::Gtk::Menu::set_title" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void GFC::Gtk::Menu::set_title           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>title</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the title string for the menu. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>title</em>&nbsp;</td><td>A string containing the title for the menu.</td></tr>
  </table>
</dl>
<br>
The title is displayed when the menu is shown as a tearoff menu.     </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="menu_8hh-source.html">menu.hh</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Aug 24 00:34:40 2004 for GFC-UI by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>