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
|
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="class-gtkmenushell">
<refnamediv>
<refname>gtk.MenuShell</refname>
<refpurpose>a base class for menu objects.</refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<classsynopsis language="python">
<ooclass><classname>gtk.MenuShell</classname></ooclass>
<ooclass><classname><link
linkend="class-gtkcontainer">gtk.Container</link></classname></ooclass>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmenushell--append">append</link></methodname>
<methodparam><parameter
role="keyword">child</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmenushell--prepend">prepend</link></methodname>
<methodparam><parameter
role="keyword">child</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmenushell--insert">insert</link></methodname>
<methodparam><parameter
role="keyword">child</parameter></methodparam>
<methodparam><parameter
role="keyword">position</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmenushell--deactivate">deactivate</link></methodname>
<methodparam></methodparam> </methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmenushell--select-item">select_item</link></methodname>
<methodparam><parameter
role="keyword">menu_item</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmenushell--deselect">deselect</link></methodname>
<methodparam></methodparam> </methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmenushell--activate-item">activate_item</link></methodname>
<methodparam><parameter
role="keyword">menu_item</parameter></methodparam>
<methodparam><parameter
role="keyword">force_deactivate</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmenushell--select-first">select_first</link></methodname>
<methodparam><parameter
role="keyword">search_sensitive</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmenushell--cancel">cancel</link></methodname>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmenushell--set-take-focus">set_take_focus</link></methodname>
<methodparam><parameter
role="keyword">take_focus</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtkmenushell--get-take-focus">get_take_focus</link></methodname>
</methodsynopsis>
</classsynopsis>
</refsect1>
<refsect1>
<title>Ancestry</title>
<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+-- <link linkend="class-gtkobject">gtk.Object</link>
+-- <link linkend="class-gtkwidget">gtk.Widget</link>
+-- <link linkend="class-gtkcontainer">gtk.Container</link>
+-- <link linkend="class-gtkmenushell">gtk.MenuShell</link>
</synopsis>
</refsect1>
<refsect1>
<title>Implemented Interfaces</title>
<para>
<link linkend="class-gtkmenushell"><classname>gtk.MenuShell</classname></link>
implements
<link linkend="class-gtkbuildable"><classname>gtk.Buildable</classname></link>
</para>
</refsect1>
<refsect1 id="properties-gtkmenushell">
<title>gtk.MenuShell Properties</title>
<para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
<para><link linkend="properties-gtkwidget">gtk.Widget Properties</link></para>
<para><link linkend="properties-gtkcontainer">gtk.Container Properties</link></para>
<blockquote role="properties">
<informaltable pgwide="1" frame="none">
<tgroup cols="3">
<colspec column="1" colwidth="1in"/>
<colspec column="2" colwidth="1in"/>
<colspec column="3" colwidth="4in"/>
<tbody>
<row valign="top">
<entry>"take-focus"</entry>
<entry>Read-Write</entry>
<entry>If <literal>True</literal> the menu and its submenus grab
the keyboard focus on popup. Default value: <literal>True</literal>.
Available in GTK+ 2.8 and above.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</blockquote>
</refsect1>
<refsect1 id="style-properties-gtkmenushell">
<title>gtk.MenuShell Style Properties</title>
<para><link linkend="style-properties-gtkwidget">gtk.Widget Style Properties</link></para>
</refsect1>
<refsect1 id="signal-prototypes-gtkmenushell">
<title>gtk.MenuShell Signal Prototypes</title>
<para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
<para><link linkend="signal-prototypes-gtkobject">gtk.Object Signal Prototypes</link></para>
<para><link linkend="signal-prototypes-gtkwidget">gtk.Widget Signal Prototypes</link></para>
<para><link linkend="signal-prototypes-gtkcontainer">gtk.Container Signal Prototypes</link></para>
<variablelist>
<varlistentry>
<term>"<link
linkend="signal-gtkmenushell--activate-current">activate-current</link>"</term>
<listitem>
<methodsynopsis
language="python"><methodname>callback</methodname>
<methodparam><parameter>menushell</parameter>
</methodparam>
<methodparam><parameter>force_hide</parameter>
</methodparam>
<methodparam><parameter>user_param1</parameter>
</methodparam>
<methodparam><parameter>...</parameter>
</methodparam>
</methodsynopsis>
</listitem>
</varlistentry>
<varlistentry>
<term>"<link
linkend="signal-gtkmenushell--cancel">cancel</link>"</term>
<listitem>
<methodsynopsis
language="python"><methodname>callback</methodname>
<methodparam><parameter>menushell</parameter>
</methodparam>
<methodparam><parameter>user_param1</parameter>
</methodparam>
<methodparam><parameter>...</parameter>
</methodparam>
</methodsynopsis>
</listitem>
</varlistentry>
<varlistentry>
<term>"<link
linkend="signal-gtkmenushell--cycle-focus">cycle-focus</link>"</term>
<listitem>
<methodsynopsis
language="python"><methodname>callback</methodname>
<methodparam><parameter>menushell</parameter>
</methodparam>
<methodparam><parameter>direction</parameter>
</methodparam>
<methodparam><parameter>user_param1</parameter>
</methodparam>
<methodparam><parameter>...</parameter>
</methodparam>
</methodsynopsis>
</listitem>
</varlistentry>
<varlistentry>
<term>"<link
linkend="signal-gtkmenushell--deactivate">deactivate</link>"</term>
<listitem>
<methodsynopsis
language="python"><methodname>callback</methodname>
<methodparam><parameter>menushell</parameter>
</methodparam>
<methodparam><parameter>user_param1</parameter>
</methodparam>
<methodparam><parameter>...</parameter>
</methodparam>
</methodsynopsis>
</listitem>
</varlistentry>
<varlistentry>
<term>"<link
linkend="signal-gtkmenushell--move-current">move-current</link>"</term>
<listitem>
<methodsynopsis
language="python"><methodname>callback</methodname>
<methodparam><parameter>menushell</parameter>
</methodparam>
<methodparam><parameter>direction</parameter>
</methodparam>
<methodparam><parameter>user_param1</parameter>
</methodparam>
<methodparam><parameter>...</parameter>
</methodparam>
</methodsynopsis>
</listitem>
</varlistentry>
<varlistentry>
<term>"<link
linkend="signal-gtkmenushell--move-selected">move-selected</link>"</term>
<listitem>
<methodsynopsis
language="python"><methodname>callback</methodname>
<methodparam><parameter>menushell</parameter>
</methodparam>
<methodparam><parameter>distance</parameter>
</methodparam>
<methodparam><parameter>user_param1</parameter>
</methodparam>
<methodparam><parameter>...</parameter>
</methodparam>
</methodsynopsis>
</listitem>
</varlistentry>
<varlistentry>
<term>"<link
linkend="signal-gtkmenushell--selection-done">selection-done</link>"</term>
<listitem>
<methodsynopsis
language="python"><methodname>callback</methodname>
<methodparam><parameter>menushell</parameter>
</methodparam>
<methodparam><parameter>user_param1</parameter>
</methodparam>
<methodparam><parameter>...</parameter>
</methodparam>
</methodsynopsis>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>A <link
linkend="class-gtkmenushell"><classname>gtk.MenuShell</classname></link> is
the abstract base class used to derive the <link
linkend="class-gtkmenu"><classname>gtk.Menu</classname></link> and <link
linkend="class-gtkmenubar"><classname>gtk.MenuBar</classname></link>
subclasses. A <link
linkend="class-gtkmenushell"><classname>gtk.MenuShell</classname></link> is
a container of <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link>
objects arranged in a list which can be navigated, selected, and activated
by the user to perform application functions. A <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> can
have a submenu associated with it, allowing for nested hierarchical
menus.</para>
</refsect1>
<refsect1>
<title>Methods</title>
<refsect2 id="method-gtkmenushell--append">
<title>gtk.MenuShell.append</title>
<programlisting><methodsynopsis language="python">
<methodname>append</methodname>
<methodparam><parameter
role="keyword">child</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">child</parameter> :</term>
<listitem><simpara>The <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> to
add.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>append</methodname>() method adds a new <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link>
specified by <parameter>child</parameter> to the end of the menu shell's
item list.</para>
</refsect2>
<refsect2 id="method-gtkmenushell--prepend">
<title>gtk.MenuShell.prepend</title>
<programlisting><methodsynopsis language="python">
<methodname>prepend</methodname>
<methodparam><parameter
role="keyword">child</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">child</parameter> :</term>
<listitem><simpara>The <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> to
add.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>prepend</methodname>() method adds a new <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link>
specified by <parameter>child</parameter> to the beginning of the menu
shell's item list.</para>
</refsect2>
<refsect2 id="method-gtkmenushell--insert">
<title>gtk.MenuShell.insert</title>
<programlisting><methodsynopsis language="python">
<methodname>insert</methodname>
<methodparam><parameter
role="keyword">child</parameter></methodparam>
<methodparam><parameter
role="keyword">position</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">child</parameter> :</term>
<listitem><simpara>The <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> to
add.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">position</parameter> :</term>
<listitem><simpara>The position in the item list where child
should be added. Positions are numbered starting from
0.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>insert</methodname>() method adds a new <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link>
specified by <parameter>child</parameter> to the menu shell's item list at
the position specified by <parameter>position</parameter>. </para>
</refsect2>
<refsect2 id="method-gtkmenushell--deactivate">
<title>gtk.MenuShell.deactivate</title>
<programlisting><methodsynopsis language="python">
<methodname>deactivate</methodname>
<methodparam></methodparam> </methodsynopsis></programlisting>
<para>The <methodname>deactivate</methodname>() method deactivates the
menu shell. Typically this results in the menu shell being removed from the
screen.</para>
</refsect2>
<refsect2 id="method-gtkmenushell--select-item">
<title>gtk.MenuShell.select_item</title>
<programlisting><methodsynopsis language="python">
<methodname>select_item</methodname>
<methodparam><parameter
role="keyword">menu_item</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">menu_item</parameter> :</term>
<listitem><simpara>The <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> to
select.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>select_item</methodname>() method selects the
menu item specified by <parameter>menu_item</parameter> from the menu
shell.</para>
</refsect2>
<refsect2 id="method-gtkmenushell--deselect">
<title>gtk.MenuShell.deselect</title>
<programlisting><methodsynopsis language="python">
<methodname>deselect</methodname>
<methodparam></methodparam> </methodsynopsis></programlisting>
<para>The <methodname>deselect</methodname>() method deselects the
currently selected item from the menu shell, if any.</para>
</refsect2>
<refsect2 id="method-gtkmenushell--activate-item">
<title>gtk.MenuShell.activate_item</title>
<programlisting><methodsynopsis language="python">
<methodname>activate_item</methodname>
<methodparam><parameter
role="keyword">menu_item</parameter></methodparam>
<methodparam><parameter
role="keyword">force_deactivate</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter
role="keyword">menu_item</parameter> :</term>
<listitem><simpara>The <link
linkend="class-gtkmenuitem"><classname>gtk.MenuItem</classname></link> to
activate.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter
role="keyword">force_deactivate</parameter> :</term>
<listitem><simpara>If <literal>True</literal>, force the
deactivation of the menu shell after the menu item is
activated.</simpara></listitem>
</varlistentry>
</variablelist>
<para>The <methodname>activate_item</methodname>() method activates
the menu item specified by<parameter> menu_item</parameter>. If
<parameter>force_deactivate</parameter> is <literal>True</literal> the
menushell is forcibly deactivated after<parameter> menu_item</parameter> is
activated.</para>
</refsect2>
<refsect2 id="method-gtkmenushell--select-first">
<title>gtk.MenuShell.select_first</title>
<programlisting><methodsynopsis language="python">
<methodname>select_first</methodname>
<methodparam><parameter role="keyword">search_sensitive</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">search_sensitive</parameter> :</term>
<listitem><simpara>if <literal>True</literal>, search for the
first selectable menu item, otherwise select nothing if the first
item isn't sensitive.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.2 and above.</para>
</note>
<para>The <methodname>select_first</methodname>() method selects the
first visible or selectable child of the menu shell if
<parameter>search_sensitive</parameter> is <literal>True</literal>. Don't
select tearoff items unless the only item is a tearoff item. If
<parameter>search_sensitive</parameter> is <literal>False</literal> select
nothing if the first item isn't sensitive.
<parameter>search_sensitive</parameter> should be <literal>False</literal>
if the menu is being popped up initially.</para>
</refsect2>
<refsect2 id="method-gtkmenushell--cancel">
<title>gtk.MenuShell.cancel</title>
<programlisting><methodsynopsis language="python">
<methodname>cancel</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<note>
<para>This method is available in PyGTK 2.4 and above.</para>
</note>
<para>The <methodname>cancel</methodname>() method cancels the
selection within the menu shell.</para>
</refsect2>
<refsect2 id="method-gtkmenushell--set-take-focus">
<title>gtk.MenuShell.set_take_focus</title>
<programlisting><methodsynopsis language="python">
<methodname>set_take_focus</methodname>
<methodparam><parameter role="keyword">take_focus</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">take_focus</parameter> :</term>
<listitem><simpara>if <literal>True</literal>, the menu shell should
take the keyboard focus on popup.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.8 and above.</para>
</note>
<para>The <methodname>set_take_focus</methodname>() method sets the
"take-focus" property to the value of <parameter>take_focus</parameter>. If
<parameter>take_focus</parameter> is <literal>True</literal> the menu shell
will take the keyboard focus so that it will receive all keyboard events to
enable keyboard navigation in menus.</para>
<para>Setting the "take-focus" property to <literal>False</literal> is
useful only for special applications like virtual keyboard implementations
which should not take keyboard focus.</para>
<para>The "take-focus" state of a menu or menu bar is automatically
propagated to submenus whenever a submenu is popped up, so you don't have to
worry about recursively setting it for your entire menu hierarchy. Only when
programmatically picking a submenu and popping it up manually, should the
"take-focus" property of the submenu be set explicitly.</para>
<para>Note that setting it to False has side-effects:</para>
<itemizedlist>
<listitem>
<para>If the focus is in some other app, it keeps the focus and
keyboard navigation in the menu doesn't work. Consequently, keyboard
navigation on the menu will only work if the focus is on some toplevel owned
by the onscreen keyboard.</para>
</listitem>
<listitem>
<para>To avoid confusing the user, menus with the "take-focus"
property set to <literal>False</literal> should not display mnemonics or
accelerators, since they may not work.</para>
</listitem>
</itemizedlist>
<para>Also see the <link
linkend="function-gdk--keyboard-grab"><function>gtk.gdk.keyboard_grab</function>()</link>
function for more information.</para>
</refsect2>
<refsect2 id="method-gtkmenushell--get-take-focus">
<title>gtk.MenuShell.get_take_focus</title>
<programlisting><methodsynopsis language="python">
<methodname>get_take_focus</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the men shell will
take keyboard foucs on popup.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.8 and above.</para>
</note>
<para>The <methodname>get_take_focus</methodname>() method returns the
value of the "take-focus" property. See the <link
linkend="method-gtkmenushell--set-take-focus"><methodname>set_take_focus</methodname>()</link>
method for more information.</para>
</refsect2>
</refsect1>
<refsect1>
<title>Signals</title>
<refsect2 id="signal-gtkmenushell--activate-current">
<title>The "activate-current" gtk.MenuShell Signal</title>
<programlisting><methodsynopsis language="python">
<methodname>callback</methodname>
<methodparam><parameter>menushell</parameter></methodparam>
<methodparam><parameter>force_hide</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>menushell</parameter> :</term>
<listitem><simpara>the menushell that received the
signal</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>force_hide</parameter> :</term>
<listitem><simpara>if True, hide the menu after activating the
menu item.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>user_param1</parameter> :</term>
<listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>...</parameter> :</term>
<listitem><simpara>additional user parameters (if
any)</simpara></listitem>
</varlistentry>
</variablelist>
<para>The "activate-current" signal is emitted to activate the current
menu item in the menushell.</para>
</refsect2>
<refsect2 id="signal-gtkmenushell--cancel">
<title>The "cancel" gtk.MenuShell Signal</title>
<programlisting><methodsynopsis language="python">
<methodname>callback</methodname>
<methodparam><parameter>menushell</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>menushell</parameter> :</term>
<listitem><simpara>the menushell that received the
signal</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>user_param1</parameter> :</term>
<listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>...</parameter> :</term>
<listitem><simpara>additional user parameters (if
any)</simpara></listitem>
</varlistentry>
</variablelist>
<para>The "cancel" signal is emitted to cancel the selection in the
menushell. Also causes the "<link
linkend="signal-gtkmenushell--selection-done">selection-done</link>" signal
to be emitted. </para>
</refsect2>
<refsect2 id="signal-gtkmenushell--cycle-focus">
<title>The "cycle-focus" gtk.MenuShell Signal</title>
<programlisting><methodsynopsis language="python">
<methodname>callback</methodname>
<methodparam><parameter>menushell</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>menushell</parameter> :</term>
<listitem><simpara>the menushell that received the
signal</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>direction</parameter> :</term>
<listitem><simpara>the direction to cycle the focus; one of:
<literal>gtk.DIR_TAB_FORWARD</literal>,
<literal>gtk.DIR_TAB_BACKWARD</literal>, <literal>gtk.DIR_UP</literal>,
<literal>gtk.DIR_DOWN</literal>, <literal>gtk.DIR_LEFT</literal> or
<literal>gtk.DIR_RIGHT</literal></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>user_param1</parameter> :</term>
<listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>...</parameter> :</term>
<listitem><simpara>additional user parameters (if
any)</simpara></listitem>
</varlistentry>
</variablelist>
<para>The "cycle-focus" signal is emitted when an action occurs requesting the focus move to the next menubar.</para>
</refsect2>
<refsect2 id="signal-gtkmenushell--deactivate">
<title>The "deactivate" gtk.MenuShell Signal</title>
<programlisting><methodsynopsis language="python">
<methodname>callback</methodname>
<methodparam><parameter>menushell</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>menushell</parameter> :</term>
<listitem><simpara>the menushell that received the
signal</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>user_param1</parameter> :</term>
<listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>...</parameter> :</term>
<listitem><simpara>additional user parameters (if
any)</simpara></listitem>
</varlistentry>
</variablelist>
<para>The "deactivate" signal is emitted when the menushell is
deactivated.</para>
</refsect2>
<refsect2 id="signal-gtkmenushell--move-current">
<title>The "move-current" gtk.MenuShell Signal</title>
<programlisting><methodsynopsis language="python">
<methodname>callback</methodname>
<methodparam><parameter>menushell</parameter></methodparam>
<methodparam><parameter>direction</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>menushell</parameter> :</term>
<listitem><simpara>the menushell that received the
signal</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>direction</parameter> :</term>
<listitem><simpara>the direction to move; one of:
<literal>gtk.MENU_DIR_PARENT</literal>,
<literal>gtk.MENU_DIR_CHILD</literal>, <literal>gtk.MENU_DIR_NEXT</literal>
or <literal>gtk.MENU_DIR_PREV</literal></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>user_param1</parameter> :</term>
<listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>...</parameter> :</term>
<listitem><simpara>additional user parameters (if
any)</simpara></listitem>
</varlistentry>
</variablelist>
<para>The "move-current" signal is emitted when the current menu item
is to be moved in the direction specified by
<parameter>direction</parameter> which is one of:</para>
<variablelist>
<varlistentry>
<term><literal>gtk.MENU_DIR_PARENT</literal></term>
<listitem>
<simpara>To the parent menu shell.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>gtk.MENU_DIR_CHILD</literal></term>
<listitem>
<simpara>To the submenu, if any, associated with the
item.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>gtk.MENU_DIR_NEXT</literal></term>
<listitem>
<simpara>To the next menu item.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>gtk.MENU_DIR_PREV</literal></term>
<listitem>
<simpara>To the previous menu item.</simpara>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 id="signal-gtkmenushell--move-selected">
<title>The "move-selected" gtk.MenuShell Signal</title>
<programlisting><methodsynopsis language="python">
<methodname>callback</methodname>
<methodparam><parameter>menushell</parameter></methodparam>
<methodparam><parameter>distance</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>menushell</parameter> :</term>
<listitem><simpara>the menushell that received the
signal</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>distance</parameter> :</term>
<listitem><simpara>+1 to move to the next item,
-1 to move to the previous</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>user_param1</parameter> :</term>
<listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>...</parameter> :</term>
<listitem><simpara>additional user parameters (if
any)</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This signal is available in GTK+ 2.12 and above.</para>
</note>
<para>The "move-selected" signal is emitted to move the selection to another item.</para>
</refsect2>
<refsect2 id="signal-gtkmenushell--selection-done">
<title>The "selection-done" gtk.MenuShell Signal</title>
<programlisting><methodsynopsis language="python">
<methodname>callback</methodname>
<methodparam><parameter>menushell</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>menushell</parameter> :</term>
<listitem><simpara>the menushell that received the
signal</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>user_param1</parameter> :</term>
<listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>...</parameter> :</term>
<listitem><simpara>additional user parameters (if
any)</simpara></listitem>
</varlistentry>
</variablelist>
<para>The "selection-done" signal is emitted when a selection has been
completed within a menu shell.</para>
</refsect2>
</refsect1>
</refentry>
|