class MenuButton(Gtk.HBox): (source)
Known subclasses: zim.gui.mainwindow.BackLinksMenuButton
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 |
zim.gui.mainwindow.BackLinksMenuButton
Parameters | |
label | the label to show on the button (string or Gtk.Label) |
menu | the menu to show on button click |
status_bar_style | when True all padding and border is removed so the button fits in the status bar |
zim.gui.mainwindow.BackLinksMenuButton
Parameters | |
event | the gdk event that triggered this action |
Unknown Field: implementation | |
can be overloaded, e.g. to populate the menu dynamically. |