|
|
__init__(self,
x=0,
y=0,
w=10,
h=10,
cBG=('toolspace.layer.bg', (0.12, 0.12, 0.12, 0.85)),
border=0,
cBorder=('toolspace.layer.border', (0.5, 0.5, 0.5, 0.5)),
w_min=1,
h_min=1)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pt_in_rect(self,
x,
y)
Returns True if x,y is inside this layer. |
source code
|
|
|
|
invalidate(self,
sub=None)
Requests repaint. |
source code
|
|
|
|
| __reposition(self,
space_w,
space_h,
appearance,
resurface=True) |
source code
|
|
|
|
render(self,
space_w,
space_h,
appearance)
Repaints (and repositions) surface, if needed. |
source code
|
|
|
|
render_to(self,
context,
space_w,
space_h,
appearance)
Paints directly into a cairo context, as for copy/print. |
source code
|
|
|
|
|
|
|
|
|
|
clear_sublayers(self)
Removes all sublayers. |
source code
|
|
|
|
draw(self,
context)
Override this method to draw on the layer itself. |
source code
|
|
|
|
on_show(self)
Override this method to do something when the layer is added to a ToolSpace. |
source code
|
|
|
|
on_hide(self)
Override this method to do something when the layer is removed from a
ToolSpace. |
source code
|
|
|
|
mouse_enter(self)
Override this method to do something when the mouse enters the layer. |
source code
|
|
|
|
mouse_exit(self)
Override this method to do something when the mouse leaves the layer. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| set_sub_hover(self,
sub_hover,
x=0,
y=0,
event=None) |
source code
|
|
|
|
motion_notify(self,
x,
y,
event)
Override this method to handle mouse motion. |
source code
|
|
|
|
scroll(self,
x,
y,
event,
offset)
Override this event to handle the mouse scroll wheel. |
source code
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|
|
|
x
actual x coord, in pixels
|
|
|
y
actualy coord, in pixels
|
|
|
w
actual width, in pixels
|
|
|
h
actual height, in pixels
|
|
|
w_min
minimum requested width in ems, if rq_w is negative
|
|
|
h_min
minimum requested height in ems, if rq_h is negative
|
|
|
OnInvalidate
WeakEvent(Layer) called when it needs repainting
|
|
|
appearance
TS_Appearance of the ToolSpace
|
|
|
border
width of border in pixels
|
|
|
cBG
background COLORREF
|
|
|
cBorder
border COLORREF
|
|
|
invalid
True if surface needs to be repainted
|
|
|
rq_h
requested height, in units of appearance.emsize; negative to specify
distance from bottom
|
|
|
rq_w
requested width, in units of appearance.emsize; negative to specify
distance from right edge
|
|
|
rq_x
requested x coord, in units of appearance.emsize
|
|
|
rq_y
requested y coord, in units of appearance.emsize
|
|
|
subs
list of SubLayer
|
|
|
surface
cairo image surface for double buffering
|