Documentation for the module cream.gui.mtk¶
API Documentation¶
- class cream.gui.mtk.Event(type, x, y)¶
An object representing CMT events.
- Currently we support support the following events:
- cream.gui.cmt.EVENT_ENTER
- cream.gui.cmt.EVENT_LEAVE
- cream.gui.cmt.EVENT_MOTION
- cream.gui.cmt.EVENT_CLICK
Parameters: - type – The type of the event.
- x (int) – The horizontal position of the pointer during this event.
- y (int) – The vertical position of the pointer during this event.
- restrict(x, y, width, height)¶
TODO!
- translate(x, y)¶
Translate the position of the event by x and y, e. g. while delegating an event to a child widget.
Parameters: - x (int) – The horizontal translation.
- y (int) – The vertical translation.
- class cream.gui.mtk.Position(x=-1, y=-1)¶
An object representing the position of a Widget on a Pinboard widget or something similiar.
Parameters: - x (int) – The horizontal position.
- y (int) – The vertical position.
- class cream.gui.mtk.Size(width=-1, height=-1)¶
An object representing the size of a Widget.
Parameters: - width (int) – The horizontal dimension.
- height (int) – The vertical dimension.