Package qubx :: Module notebookGTK :: Class SubLayer_Notebook
[hide private]
[frames] | no frames]

Class SubLayer_Notebook

source code

          object --+        
                   |        
  toolspace.SubLayer --+    
                       |    
toolspace.SubLayer_Popup --+
                           |
                          SubLayer_Notebook

A notebook icon, which shows a menu when clicked.

Instance Methods [hide private]
 
__init__(self, x, y, w, h, show_options_always=True, *args, **kw)
See also: SubLayer.__init__
source code
 
set_items(self, x) source code
 
__onPopup(self) source code
 
__onSendDefault(self, item, nb_item) source code
 
__onSend(self, item, target_ix, nb_item) source code
 
draw(self, context, w, h, appearance)
Override this method to paint the SubLayer.
source code
 
__onOptions(self, item) source code

Inherited from toolspace.SubLayer_Popup: do_popup

Inherited from toolspace.SubLayer: button_press, button_release, invalidate, pt_in_rect, set_actual_x, set_actual_y, set_cBG, set_h, set_layer, set_tooltip, set_w, set_x, set_y

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
  items
list of qubx.notebook.NbItem
  menuitems
list of gtk.MenuItem for the end of the menu

Inherited from toolspace.SubLayer: OnChangeTooltip, OnHideTooltip, OnInvalidate, action, border, cBG, cBorder, enter, exit, h, invalid, mouse_drag, mouse_move, rq_h, rq_w, scroll, w, x, y

Properties [hide private]

Inherited from toolspace.SubLayer_Popup: on_popup

Inherited from toolspace.SubLayer: layer, tooltip

Inherited from object: __class__

Method Details [hide private]

__init__(self, x, y, w, h, show_options_always=True, *args, **kw)
(Constructor)

source code 

See also: SubLayer.__init__

Parameters:
  • popup - a gtk.Menu
  • color - COLORREF for the circle and triangle
  • tooltip - a string to display on mouse-over
  • on_popup - lambda: should_show to modify popup contents or cancel, before showing
Overrides: object.__init__
(inherited documentation)

draw(self, context, w, h, appearance)

source code 

Override this method to paint the SubLayer. Don't forget to call SubLayer.draw(context, w, h, appearance).

Overrides: toolspace.SubLayer.draw
(inherited documentation)