qubx :: toolspace :: Layer_Toolbar :: Class Layer_Toolbar
[hide private]
[frames] | no frames]

Class Layer_Toolbar

source code

object --+    
         |    
     Layer --+
             |
            Layer_Toolbar

Layer containing a row or column of buttons; automatically laid out; spotlighted on rollover with tooltips.

Instance Methods [hide private]
 
__init__(self, dim=0, *args, **kw)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
add_tool(self, label, sublayer, tool=None, active=False)
Adds a SubLayer (button) with its label (tooltip) and associated Tool.
source code
 
motion_notify(self, x, y, event)
Override this method to handle mouse motion.
source code
 
pick_tool(self, toolsub, tool, sub_action, x, y, e)
button click handler
source code
 
draw(self, context)
Override this method to draw on the layer itself.
source code
 
layout(self) source code
 
enter_tool(self, sub, tool, label, sub_enter, x, y, e) source code
 
exit_tool(self, sub_exit) source code

Inherited from Layer: add_sublayer, button_press, button_release, clear_sublayers, find_sub, invalidate, mouse_enter, mouse_exit, on_hide, on_show, pt_in_rect, remove_sublayer, render, render_to, scroll, set_h, set_h_min, set_space, set_sub_hover, set_w, set_w_min, set_x, set_y, sub_press, sub_release

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

Instance Variables [hide private]
  dim
0: horizontal; 1: vertical
  toolsub
SubLayer corresponding to currently picked tool

Inherited from Layer: OnInvalidate, appearance, border, cBG, cBorder, h, h_min, invalid, rq_h, rq_w, rq_x, rq_y, subs, surface, w, w_min, x, y

Properties [hide private]

Inherited from Layer: space, sub_hover

Inherited from object: __class__

Method Details [hide private]

__init__(self, dim=0, *args, **kw)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • x - x >= 0: number of 'M' widths from the ToolSpace's left edge; x < 0: number of ... ToolSpace's right edge
  • y - y >= 0: number of 'M' widths from the ToolSpace's top edge; y < 0: number of ... ToolSpace's bottom edge
  • w - w >= 0: number of 'M' widths across; w < 0: number of 'M's between Layer's right and ToolSpace's right
  • h - h >= 0: number of 'M' widths tall; h < 0: number of 'M's between Layer's bottom and ToolSpace's bottom
  • cBG - COLORREF of background
  • border - width in pixels of border
  • cBorder - COLORREF of border
  • w_min - minimum number of 'M' widths across, if w is negative
  • h_min - minimum number of 'M' widths tall, if h is negative
Overrides: object.__init__
(inherited documentation)

add_tool(self, label, sublayer, tool=None, active=False)

source code 

Adds a SubLayer (button) with its label (tooltip) and associated Tool. If tool != None, but self.toolsub == None (no tool picked yet), simulates a click on sublayer.

motion_notify(self, x, y, event)

source code 

Override this method to handle mouse motion.

Overrides: Layer.motion_notify
(inherited documentation)

draw(self, context)

source code 

Override this method to draw on the layer itself.

Overrides: Layer.draw
(inherited documentation)