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

Class SubLayer_Range

source code

object --+    
         |    
  SubLayer --+
             |
            SubLayer_Range

A slightly nonstandard scroll bar; grab the left or right edge to resize the thumb.

Instance Methods [hide private]
 
__init__(self, lo, hi, quantum, *args, **kw)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
set_bounds(self, x, event_if_moved=True) source code
 
set_range(self, l, r, event_if_moved=True, by_mouse=False) source code
 
set_left(self, x) source code
 
set_right(self, x) source code
 
doOnSet(self, by_mouse=False) source code
 
set_quantum(self, x) source code
 
x2p(self, x) source code
 
p2x(self, p) source code
 
__mouse_move(self, x, y, e) source code
 
__exit(self) source code
 
button_press(self, x, y, e)
Override this method to handle mouse-down (by default, click: action(x,y,e)).
source code
 
button_release(self, x, y, e)
Override this method to handle mouse-up (by default, click: action(x,y,e)).
source code
 
__mouse_drag(self, x, y, e) source code
 
draw(self, context, w, h, appearance)
Override this method to paint the SubLayer.
source code

Inherited from SubLayer: 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]
  bounds
(lo, hi) smallest and largest possible value
  left
value at left edge of thumb
  right
value at right edge of thumb
  quantum
smallest delta value
  OnMoving
WeakEvent(SubLayer_Range, left, right) called when the user is still dragging
  OnSet
WeakEvent(SubLayer_Range, left, right, by_mouse) called when left and/or right have changed

Inherited from 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 SubLayer: layer, tooltip

Inherited from object: __class__

Method Details [hide private]

__init__(self, lo, hi, quantum, *args, **kw)
(Constructor)

source code 

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

Parameters:
  • x - number of 'M' widths from the Layer's left edge
  • y - number of 'M' widths from the Layer's top edge
  • w - w >= 0: number of 'M' widths across; w < 0: number of 'M's between SubLayer's right and Layer's right
  • h - h >= 0: number of 'M' widths tall; h < 0: number of 'M's between SubLayer's bottom and Layer's bottom
  • action - when clicked, calls action(x, y, event)
  • scroll - when mouse-scroll-wheeled upon, calls scroll(x, y, event, offset)
  • mouse_move - when the mouse moves over it, calls mouse_move(x, y, event)
  • mouse_drag - when the mouse moves with the button down, calls mouse_drag(x, y, event)
  • enter - when the mouse enters, calls mouse_enter(x, y, event)
  • exit - when the mouse leaves, calls mouse_exit()
  • border - width in pixels of border
  • cBorder - COLORREF of border
  • cBG - COLORREF of background, or None for transparent
  • tooltip - mouse-over info
Overrides: object.__init__
(inherited documentation)

button_press(self, x, y, e)

source code 

Override this method to handle mouse-down (by default, click: action(x,y,e)).

Overrides: SubLayer.button_press
(inherited documentation)

button_release(self, x, y, e)

source code 

Override this method to handle mouse-up (by default, click: action(x,y,e)).

Overrides: SubLayer.button_release
(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: SubLayer.draw
(inherited documentation)

Instance Variable Details [hide private]

bounds

(lo, hi) smallest and largest possible value
Get Method:
unreachable(self)
Set Method:
unreachable(self, x)

left

value at left edge of thumb
Get Method:
unreachable(self)
Set Method:
unreachable(self, x)

right

value at right edge of thumb
Get Method:
unreachable(self)
Set Method:
unreachable(self, x)

quantum

smallest delta value
Get Method:
unreachable(self)
Set Method:
unreachable(self, x)