Package qubx :: Module fit_space :: Class Layer_Param
[hide private]
[frames] | no frames]

Class Layer_Param

source code

     object --+    
              |    
toolspace.Layer --+
                  |
                 Layer_Param

Presents details about one parameter, as when the user clicks "..." in the upper-left param list; you run() it like a dialog.

Instance Methods [hide private]
 
__init__(self, cBG, cText, cNumber, cButton, *args, **kw)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__onClickValue(self, x, y, e) source code
 
__onScrollValue(self, x, y, e, o) source code
 
__onClickLow(self, x, y, e) source code
 
__onClickHigh(self, x, y, e) source code
 
__onToggle(self, *args) source code
 
__onClickCancel(self, x, y, e) source code
 
click_cancel(self) source code
 
__onClickOK(self, x, y, e) source code
 
click_ok(self) source code
 
run(self, space, nm, val, lo, hi, err, can_fit, on_ok, on_close)
Displays this layer on the space; fills the blanks with (nm, val, lo, hi, err, can_fit); returns immediately.
source code

Inherited from toolspace.Layer: add_sublayer, button_press, button_release, clear_sublayers, draw, find_sub, invalidate, motion_notify, 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]

Inherited from toolspace.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 toolspace.Layer: space, sub_hover

Inherited from object: __class__

Method Details [hide private]

__init__(self, cBG, cText, cNumber, cButton, *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)

run(self, space, nm, val, lo, hi, err, can_fit, on_ok, on_close)

source code 

Displays this layer on the space; fills the blanks with (nm, val, lo, hi, err, can_fit); returns immediately.

Parameters:
  • on_ok - when the user clicks OK, this layer is hidden, then it calls on_ok(nm, val, lo, hi, can_fit)
  • on_close - when the user clicks Cancel, or after on_ok, it calls on_close()