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
|
<?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-gtktoolpalette">
<refnamediv>
<refname>gtk.ToolPalette</refname>
<refpurpose>a tool palette with categories (new in PyGTK 2.22)</refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<classsynopsis language="python">
<ooclass><classname>gtk.ToolPalette</classname></ooclass>
<ooclass><classname><link linkend="class-gtkcontainer">gtk.Container</link></classname></ooclass>
<constructorsynopsis language="python">
<methodname><link linkend="constructor-gtktoolpalette">gtk.ToolPalette</link></methodname>
<methodparam></methodparam>
</constructorsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--set-group-position">set_group_position</link></methodname>
<methodparam><parameter role="keyword">group</parameter></methodparam>
<methodparam><parameter role="keyword">position</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--set-exclusive">set_exclusive</link></methodname>
<methodparam><parameter role="keyword">group</parameter></methodparam>
<methodparam><parameter role="keyword">exclusive</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--set-expand">set_expand</link></methodname>
<methodparam><parameter role="keyword">group</parameter></methodparam>
<methodparam><parameter role="keyword">expand</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--get-group-position">get_group_position</link></methodname>
<methodparam><parameter role="keyword">group</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--get-exclusive">get_exclusive</link></methodname>
<methodparam><parameter role="keyword">group</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--get-expand">get_expand</link></methodname>
<methodparam><parameter role="keyword">group</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--set-icon-size">set_icon_size</link></methodname>
<methodparam><parameter role="keyword">icon_size</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--unset-icon-size">unset_icon_size</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--set-style">set_style</link></methodname>
<methodparam><parameter role="keyword">style</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--unset-style">unset_style</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--get-icon-size">get_icon_size</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--get-style">get_style</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--get-drop-item">get_drop_item</link></methodname>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--get-drop-group">get_drop_group</link></methodname>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--get-drag-item">get_drag_item</link></methodname>
<methodparam><parameter role="keyword">selection</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--set-drag-source">set_drag_source</link></methodname>
<methodparam><parameter role="keyword">targets</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--add-drag-dest">add_drag_dest</link></methodname>
<methodparam><parameter role="keyword">widget</parameter></methodparam>
<methodparam><parameter role="keyword">flags</parameter></methodparam>
<methodparam><parameter role="keyword">targets</parameter></methodparam>
<methodparam><parameter role="keyword">actions</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--get-hadjustment">get_hadjustment</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtktoolpalette--get-vadjustment">get_vadjustment</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
</classsynopsis>
</refsect1>
<refsect1>
<title>Ancestry</title>
<synopsis>+-- <link linkend="class-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-gtktoolpalette">gtk.ToolPalette</link>
</synopsis>
</refsect1>
<refsect1>
<title>Implemented Interfaces</title>
<para>
<link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link>
implements
<link linkend="class-atkimplementor"><classname>atk.ImplementorIFace</classname></link>,
<link linkend="class-gtkbuildable"><classname>gtk.Buildable</classname></link>,
</para>
</refsect1>
<refsect1 id="properties-gtktoolpalette">
<title>gtk.ToolPalette 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>"icon-size"</entry>
<entry>Read-Write</entry>
<entry>Whether the group has been collapsed and items are hidden.
Default value: <literal>False</literal>.
This property is available in GTK+ 2.20 and above.</entry>
</row>
<row valign="top">
<entry>"icon-size-set"</entry>
<entry>Read-Write</entry>
<entry>Ellipsize for item group headers.
Default value: <literal>pango.ELLIPSIZE_NONE</literal>.
This property is available in GTK+ 2.20 and above.</entry>
</row>
<row valign="top">
<entry>"toolbar-style"</entry>
<entry>Read-Write</entry>
<entry>Relief of the group header button.
Default value: <literal>gtk.RELIEF_NORMAL</literal>.
This property is available in GTK+ 2.20 and above.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</blockquote>
</refsect1>
<refsect1 id="child-properties-gtktoolpalette">
<title>gtk.ToolPalette Child Properties</title>
<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>"exclusive"</entry>
<entry>Read-Write</entry>
<entry>Whether the item should receive extra space when the group grows.
Default value: <literal>False</literal>.
This property is available in GTK+ 2.20 and above.</entry>
</row>
<row valign="top">
<entry>"expand"</entry>
<entry>Read-Write</entry>
<entry>Whether the item should fill the available space.
Default value: <literal>True</literal>.
This property is available in GTK+ 2.20 and above.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</blockquote>
</refsect1>
<refsect1 id="style-properties-gtktoolpalette">
<title>gtk.ToolPalette Style Properties</title>
<para><link linkend="style-properties-gtkwidget">gtk.Widget Style Properties</link></para>
</refsect1>
<refsect1 id="signal-prototypes-gtktoolpalette">
<title>gtk.ToolPalette 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-gtktoolpalette--set-scroll-adjustments">set-scroll-adjustments</link>"</term>
<listitem>
<methodsynopsis language="python"><methodname>callback</methodname>
<methodparam><parameter>toolpalette</parameter></methodparam>
<methodparam><parameter>hadjustment</parameter></methodparam>
<methodparam><parameter>vadjustment</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<note>
<para>This widget is available in PyGTK 2.22 and above.</para>
</note>
<para>A <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link>
is used together with <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link>
to add <link linkend="class-gtktoolitem"><classname>gtk.ToolItem</classname></link> objects to
a palette like container with different categories and drag and drop support.</para>
</refsect1>
<refsect1>
<title>Constructor</title>
<programlisting><constructorsynopsis language="python">
<methodname><link linkend="constructor-gtktoolpalette">gtk.ToolPalette</link></methodname>
<methodparam></methodparam>
</constructorsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a new <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link></simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This constructor is available in PyGTK 2.22 and above.</para>
</note>
<para>Creates a new tool palette.</para>
</refsect1>
<refsect1>
<title>Methods</title>
<refsect2 id="method-gtktoolpalette--set-group-position">
<title>gtk.ToolPalette.set_group_position</title>
<programlisting><methodsynopsis language="python">
<methodname>set_group_position</methodname>
<methodparam><parameter role="keyword">group</parameter></methodparam>
<methodparam><parameter role="keyword">position</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">group</parameter> :</term>
<listitem><simpara>a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link> which is a child of palette</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">position</parameter> :</term>
<listitem><simpara>a new index for group</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>The <methodname>set_group_position</methodname>() method sets the position of the group as an index of the tool palette.
If position is 0 the group will become the first child, if position is
-1 it will become the last child.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--set-exclusive">
<title>gtk.ToolPalette.set_exclusive</title>
<programlisting><methodsynopsis language="python">
<methodname>set_exclusive</methodname>
<methodparam><parameter role="keyword">group</parameter></methodparam>
<methodparam><parameter role="keyword">exclusive</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">group</parameter> :</term>
<listitem><simpara>a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link> which is a child of palette</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">exclusive</parameter> :</term>
<listitem><simpara>whether the group should be exclusive or not</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Sets whether the group should be exclusive or not.
If an exclusive group is expanded all other groups are collapsed.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--set-expand">
<title>gtk.ToolPalette.set_expand</title>
<programlisting><methodsynopsis language="python">
<methodname>set_expand</methodname>
<methodparam><parameter role="keyword">group</parameter></methodparam>
<methodparam><parameter role="keyword">expand</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">group</parameter> :</term>
<listitem><simpara>a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link> which is a child of palette</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">expand</parameter> :</term>
<listitem><simpara>whether the group should be given extra space</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Sets whether the group should be given extra space.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--get-group-position">
<title>gtk.ToolPalette.get_group_position</title>
<programlisting><methodsynopsis language="python">
<methodname>get_group_position</methodname>
<methodparam><parameter role="keyword">group</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">group</parameter> :</term>
<listitem><simpara>a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link></simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the index of group or -1 if <parameter>group</parameter> is not a child of <parameter>palette</parameter></simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Gets the position of <parameter>group</parameter> in <parameter>palette</parameter> as index.
See <link linkend="method-gtktoolpalette--set-group-position"><methodname>gtk.ToolPalette.set_group_position</methodname></link>.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--get-exclusive">
<title>gtk.ToolPalette.get_exclusive</title>
<programlisting><methodsynopsis language="python">
<methodname>get_exclusive</methodname>
<methodparam><parameter role="keyword">group</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">group</parameter> :</term>
<listitem><simpara>a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link> which is a child of palette</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if <parameter>group</parameter> is exclusive</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Gets whether <parameter>group</parameter> is exclusive or not.
See <link linkend="method-gtktoolpalette--set-exclusive"><methodname>gtk.ToolPalette.set_exclusive</methodname></link>.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--get-expand">
<title>gtk.ToolPalette.get_expand</title>
<programlisting><methodsynopsis language="python">
<methodname>get_expand</methodname>
<methodparam><parameter role="keyword">group</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">group</parameter> :</term>
<listitem><simpara>a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link> which is a child of palette</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if group should be given extra space, <literal>False</literal> otherwise</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Gets whether group should be given extra space.
See <link linkend="method-gtktoolpalette--set-expand"><methodname>gtk.ToolPalette.set_expand</methodname></link>.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--set-icon-size">
<title>gtk.ToolPalette.set_icon_size</title>
<programlisting><methodsynopsis language="python">
<methodname>set_icon_size</methodname>
<methodparam><parameter role="keyword">icon_size</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">icon_size</parameter> :</term>
<listitem><simpara>one of the <xref linkend="gtk-icon-size-constants" endterm="gtk-icon-size-constants-title"></xref> that icons in the tool palette shall have</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>The <methodname>set_icon_size</methodname>() method sets the size of icons in the tool palette.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--unset-icon-size">
<title>gtk.ToolPalette.unset_icon_size</title>
<programlisting><methodsynopsis language="python">
<methodname>unset_icon_size</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Unsets the tool palette icon size set with <link linkend="method-gtktoolpalette--set-icon-size"><methodname>gtk.ToolPalette.set_icon_size</methodname></link>,
so that user preferences will be used to determine the icon size.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--set-style">
<title>gtk.ToolPalette.set_style</title>
<programlisting><methodsynopsis language="python">
<methodname>set_style</methodname>
<methodparam><parameter role="keyword">style</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">style</parameter> :</term>
<listitem><simpara>one of the <xref linkend="gtk-toolbar-style-constants" endterm="gtk-toolbar-style-constants-title"></xref> that items in the tool palette shall have</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>The <methodname>set_style</methodname>() method sets the style (text, icons or both) of items in the tool palette.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--unset-style">
<title>gtk.ToolPalette.unset_style</title>
<programlisting><methodsynopsis language="python">
<methodname>unset_style</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Unsets a toolbar style set with <link linkend="method-gtktoolpalette--set-style"><methodname>gtk.ToolPalette.set_style</methodname></link>,
so that user preferences will be used to determine the toolbar style.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--get-icon-size">
<title>gtk.ToolPalette.get_icon_size</title>
<programlisting><methodsynopsis language="python">
<methodname>get_icon_size</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>one of the <xref linkend="gtk-icon-size-constants" endterm="gtk-icon-size-constants-title"></xref></simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Gets the size of icons in the tool palette.
See <link linkend="method-gtktoolpalette--set-icon-size"><methodname>gtk.ToolPalette.set_icon_size</methodname></link>.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--get-style">
<title>gtk.ToolPalette.get_style</title>
<programlisting><methodsynopsis language="python">
<methodname>get_style</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>one of the <xref linkend="gtk-toolbar-style-constants" endterm="gtk-toolbar-style-constants-title"></xref></simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Gets the style (icons, text or both) of items in the tool palette.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--get-drop-item">
<title>gtk.ToolPalette.get_drop_item</title>
<programlisting><methodsynopsis language="python">
<methodname>get_drop_item</methodname>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">x</parameter> :</term>
<listitem><simpara>the x position</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">y</parameter> :</term>
<listitem><simpara>the y position</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the <link linkend="class-gtktoolitem"><classname>gtk.ToolItem</classname></link> at position or <literal>None</literal> if there is no such item</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Gets the item at position (x, y).
See <link linkend="method-gtktoolpalette--get-drop-group"><methodname>gtk.ToolPalette.get_drop_group</methodname></link>.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--get-drop-group">
<title>gtk.ToolPalette.get_drop_group</title>
<programlisting><methodsynopsis language="python">
<methodname>get_drop_group</methodname>
<methodparam><parameter role="keyword">x</parameter></methodparam>
<methodparam><parameter role="keyword">y</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">x</parameter> :</term>
<listitem><simpara>the x position</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">y</parameter> :</term>
<listitem><simpara>the y position</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link> at position or <literal>None</literal> if there is no such group</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Gets the group at position (x, y).</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--get-drag-item">
<title>gtk.ToolPalette.get_drag_item</title>
<programlisting><methodsynopsis language="python">
<methodname>get_drag_item</methodname>
<methodparam><parameter role="keyword">selection</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">selection</parameter> :</term>
<listitem><simpara>a <link linkend="class-gtkselectiondata"><classname>gtk.SelectionData</classname></link></simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the dragged item in selection</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Get the dragged item from the selection.
This could be a <link linkend="class-gtktoolitem"><classname>gtk.ToolItem</classname></link> or a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link>.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--set-drag-source">
<title>gtk.ToolPalette.set_drag_source</title>
<programlisting><methodsynopsis language="python">
<methodname>set_drag_source</methodname>
<methodparam><parameter role="keyword">targets</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">targets</parameter> :</term>
<listitem><simpara>the <literal>GtkToolPaletteDragTarget</literal><!-- -->s which the widget should support</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>The <methodname>set_drag_source</methodname>() method sets the tool palette as a drag source.
Enables all groups and items in the tool palette as drag sources
on button 1 and button 3 press with copy and move actions.
See <link linkend="method-gtkwidget--drag-source-set"><methodname>gtk.Widget.drag_source_set</methodname></link>.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--add-drag-dest">
<title>gtk.ToolPalette.add_drag_dest</title>
<programlisting><methodsynopsis language="python">
<methodname>add_drag_dest</methodname>
<methodparam><parameter role="keyword">widget</parameter></methodparam>
<methodparam><parameter role="keyword">flags</parameter></methodparam>
<methodparam><parameter role="keyword">targets</parameter></methodparam>
<methodparam><parameter role="keyword">actions</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">widget</parameter> :</term>
<listitem><simpara>a <link linkend="class-gtkwidget"><classname>gtk.Widget</classname></link> which should be a drag destination for <parameter>palette</parameter></simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">flags</parameter> :</term>
<listitem><simpara>the flags that specify what actions GTK+ should take for drops on that widget</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">targets</parameter> :</term>
<listitem><simpara>the <literal>GtkToolPaletteDragTarget</literal><!-- -->s which the widget should support</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">actions</parameter> :</term>
<listitem><simpara>the <literal>GdkDragAction</literal><!-- -->s which the widget should suppport</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Sets <parameter>palette</parameter> as drag source (see <link linkend="method-gtktoolpalette--set-drag-source"><methodname>gtk.ToolPalette.set_drag_source</methodname></link>)
and sets <parameter>widget</parameter> as a drag destination for drags from <parameter>palette</parameter>.
See <link linkend="method-gtkwidget--drag-dest-set"><methodname>gtk.Widget.drag_dest_set</methodname></link>.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--get-hadjustment">
<title>gtk.ToolPalette.get_hadjustment</title>
<programlisting><methodsynopsis language="python">
<methodname>get_hadjustment</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the horizontal adjustment of <parameter>palette</parameter></simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Gets the horizontal adjustment of the tool palette.</para>
</refsect2>
<refsect2 id="method-gtktoolpalette--get-vadjustment">
<title>gtk.ToolPalette.get_vadjustment</title>
<programlisting><methodsynopsis language="python">
<methodname>get_vadjustment</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the vertical adjustment of <parameter>palette</parameter></simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.22 and above.</para>
</note>
<para>Gets the vertical adjustment of the tool palette.</para>
</refsect2>
</refsect1>
<refsect1>
<title>Signals</title>
<refsect2 id="signal-gtktoolpalette--set-scroll-adjustments">
<title>The "set-scroll-adjustments" gtk.ToolPalette Signal</title>
<programlisting><methodsynopsis language="python">
<methodname>callback</methodname>
<methodparam><parameter>toolpalette</parameter></methodparam>
<methodparam><parameter>hadjustment </parameter></methodparam>
<methodparam><parameter>vadjustment </parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>toolpalette</parameter> :</term>
<listitem><simpara>the toolpalette that received the signal</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>hadjustment</parameter> :</term>
<listitem><simpara>the horizontal adjustment</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>vadjustment</parameter> :</term>
<listitem><simpara>the vertical adjustment</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.20 and above.</para>
</note>
<para>The "set-scroll-adjustments" signal is emitted when one or both
adjustments (specified by <parameter>hadjustment</parameter> and
<parameter>vadjustment</parameter>) are set on textview.</para>
</refsect2>
</refsect1>
</refentry>
|