gtk.MenuToolButton

gtk.MenuToolButton — A gtk.ToolItem containing a button with an additional dropdown menu (new in PyGTK 2.6)

Synopsis

class gtk.MenuToolButton(gtk.ToolButton):
    gtk.MenuToolButton(stock_id)
gtk.MenuToolButton(icon_widget, label)
def set_menu(menu)
def get_menu()
def set_arrow_tooltip(tooltips, tip_text, tip_private=None)
def set_arrow_tooltip_markup(markup)
def set_arrow_tooltip_text(text)

Ancestry

+-- gobject.GObject
  +-- gtk.Object
    +-- gtk.Widget
      +-- gtk.Container
        +-- gtk.Bin
          +-- gtk.ToolItem
            +-- gtk.ToolButton
              +-- gtk.MenuToolButton

Implemented Interfaces

gtk.MenuToolButton implements gtk.Buildable

gtk.MenuToolButton Properties

gtk.Object Properties

gtk.Widget Properties

gtk.Container Properties

gtk.ToolItem Properties

gtk.ToolButton Properties

"menu"Read-WriteThe dropdown gtk.Menu.

gtk.MenuToolButton Style Properties

gtk.Widget Style Properties

gtk.ToolButton Style Properties

gtk.MenuToolButton Signal Prototypes

gobject.GObject Signal Prototypes

gtk.Object Signal Prototypes

gtk.Widget Signal Prototypes

gtk.Container Signal Prototypes

gtk.ToolItem Signal Prototypes

gtk.ToolButton Signal Prototypes

"show-menu"

def callback(menutoolbutton, user_param1, ...)

Description

Note

This widget is available in PyGTK 2.6 and above.

A gtk.MenuToolButton is a gtk.ToolItem that contains a button and a small additional button with an arrow. When clicked, the arrow button pops up a dropdown menu.

Constructor

gtk.MenuToolButton

    gtk.MenuToolButton(stock_id)

stock_id :

Returns :

a new gtk.MenuToolButton

Note

This constructor is available in PyGTK 2.6 and above.

Creates a new gtk.MenuToolButton using from the stock item specified by stock_id. The new gtk.MenuToolButton will contain the icon and label associated with stock_id.

gtk.MenuToolButton

    gtk.MenuToolButton(icon_widget, label)

icon_widget :

a widget that will be used as icon widget, or None

label :

a string that will be used as label, or None

Returns :

a new gtk.MenuToolButton

Note

This constructor is available in PyGTK 2.6 and above.

Creates a new gtk.MenuToolButton using the icon specified by icon_widget and the label specified by label.

Methods

gtk.MenuToolButton.set_menu

    def set_menu(menu)

menu :

a gtk.Menu

Note

This method is available in PyGTK 2.6 and above.

The set_menu() method sets the "menu" property to the gtk.Menu specified by menu.

gtk.MenuToolButton.get_menu

    def get_menu()

Returns :

the associated gtk.Menu

Note

This method is available in PyGTK 2.6 and above.

The get_menu() method returns the value of the "menu" property that contains the associated gtk.Menu.

gtk.MenuToolButton.set_arrow_tooltip

    def set_arrow_tooltip(tooltips, tip_text, tip_private=None)

tooltips :

A gtk.Tooltips object.

tip_text :

The text to use as the tooltip or None

tip_private :

Opitonal private tooltip text or None. Defaults to None.

Warning

This method is deprecated in PyGTK 2.12 and above.

The set_arrow_tooltip() method sets the tooltip data specified by tip_text for the arrow button using the gtk.Tooltips object specified by tooltips.

gtk.MenuToolButton.set_arrow_tooltip_markup

    def set_arrow_tooltip_markup(markup)

markup :

Markup text to be used as tooltip text for button's arrow button.

Note

This method is available in PyGTK 2.12 and above.

The set_arrow_tooltip_markup() method sets the tooltip markup to be used as tooltip for the arrow button which pops up the menu. See gtk.ToolItem.set_tooltip() for setting a tooltip on the whole gtk.MenuToolButton.

gtk.MenuToolButton.set_arrow_tooltip_text

    def set_arrow_tooltip_text(text)

text :

Text to be used as tooltip text for button's arrow button.

Note

This method is available in PyGTK 2.12 and above.

The set_arrow_tooltip_markup() method sets the tooltip text to be used as tooltip for the arrow button which pops up the menu. See gtk.ToolItem.set_tooltip() for setting a tooltip on the whole gtk.MenuToolButton.

Signals

The "show-menu" gtk.MenuToolButton Signal

    def callback(menutoolbutton, user_param1, ...)

menutoolbutton :

the menutoolbutton that received the signal

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

Note

This signal is available in GTK+ 2.6 and above.

The "show-menu" signal is emitted before the dropdown menu is displayed.