|
__init__(self,
x=0,
y=0,
w=1,
h=1,
action=<__builtin__.function object>,
scroll=<__builtin__.function object>,
mouse_move=<__builtin__.function object>,
mouse_drag=<__builtin__.function object>,
enter=<__builtin__.function object>,
exit=<__builtin__.function object>,
border=0,
cBorder=( ' toolspace.layer.border ' , ( 0.5, 0.5, 0.5, 0.5) ) ,
tooltip='
' ,
cBG=None,
**kw)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pt_in_rect(self,
x,
y,
em)
Returns True if (x, y) Layer-relative coordinates are inside this
SubLayer. |
source code
|
|
|
invalidate(self)
Marks this SubLayer as needing a repaint, and calls OnInvalidate. |
source code
|
|
|
draw(self,
context,
w,
h,
appearance)
Override this method to paint the SubLayer. |
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
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
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()
|
|
x
number of 'M' widths between Layer's left and SubLayer's left
|
|
y
number of 'M' widths between Layer's top and SubLayer's top
|
|
w
actual width, in pixels
|
|
h
actual height, in pixels
|
|
cBG
background COLORREF, or None for transparent
|
|
OnChangeTooltip
WeakEvent(SubLayer)
|
|
OnHideTooltip
WeakEvent(SubLayer) subclasses can call to request
tooltip hide
|
|
OnInvalidate
WeakEvent(SubLayer) called when it needs repainting
|
|
border
width of border in pixels
|
|
cBorder
border COLORREF
|
|
invalid
True if it needs to be repainted
|
|
rq_h
requested height, in 'M' units
|
|
rq_w
requested width, in 'M' units
|