class documentation

class MenuButton(Gtk.HBox): (source)

Known subclasses: zim.gui.mainwindow.BackLinksMenuButton

View In Hierarchy

This class implements a button which pops up a menu when clicked. It behaves different from a combobox because it is not a selector and the button does not show the selected item. So it more like a normal menu. Main example where this class is used is the button with backlinks in the statusbar of the main window.

This module is based loosely on gedit-status-combo-box.c from the gedit sources.

Method __init__ Constructor
Method popup_menu This method actually pops up the menu. @param event: the gdk event that triggered this action
Instance Variable button Undocumented
Instance Variable eventbox Undocumented
Instance Variable label Undocumented
Instance Variable menu Undocumented
Method _deactivate_menu Undocumented
Instance Variable _clicked_signal Undocumented
def __init__(self, label, menu, status_bar_style=False): (source)
Constructor
Parameters
labelthe label to show on the button (string or Gtk.Label)
menuthe menu to show on button click
status_bar_stylewhen True all padding and border is removed so the button fits in the status bar
def popup_menu(self, event=None): (source)
This method actually pops up the menu.
Parameters
eventthe gdk event that triggered this action
Unknown Field: implementation
can be overloaded, e.g. to populate the menu dynamically.
button = (source)

Undocumented

eventbox = (source)

Undocumented

label = (source)

Undocumented

def _deactivate_menu(self, menu): (source)

Undocumented

_clicked_signal = (source)

Undocumented