sugar4.graphics.palettewindow
Attributes
Classes
Detects mouse movement speed for palette activation. |
|
Base class for palette windows. |
|
Base class for palette invokers. |
|
Invoker for general widgets. |
|
Invoker that tracks cursor position. |
|
A palette invoker for toolbar buttons and other items. this invoker |
|
Invoker for TreeView cells. |
Module Contents
- class sugar4.graphics.palettewindow.MouseSpeedDetector(delay, thresh)[source]
Bases:
gi.repository.GObject.GObjectDetects mouse movement speed for palette activation.
Create MouseSpeedDetector object.
- Parameters:
delay – delay in msec
thresh – threshold in pixels (per tick of ‘delay’ msec)
- class sugar4.graphics.palettewindow.PaletteWindow(**kwargs)[source]
Bases:
gi.repository.GObject.GObjectBase class for palette windows.
- class sugar4.graphics.palettewindow.Invoker[source]
Bases:
gi.repository.GObject.GObjectBase class for palette invokers.
- get_position_for_alignment(alignment, palette_dim)[source]
Get position for specific alignment if it fits on screen.
- notify_right_click(x=None, y=None)[source]
Notify the palette invoker of a right click and expand the palette as required. The x and y args should be that of where the event happened, relative to the root of the screen.
- Args
- x (float): the x coord of the event relative to the root
of the screen, eg.
Gdk.EventTouch.x_root- y (float): the y coord of the event relative to the root
of the screen, eg.
Gdk.EventTouch.y_root
- class sugar4.graphics.palettewindow.WidgetInvoker(parent=None, widget=None)[source]
Bases:
InvokerInvoker for general widgets.
- class sugar4.graphics.palettewindow.CursorInvoker(parent=None)[source]
Bases:
InvokerInvoker that tracks cursor position.
- class sugar4.graphics.palettewindow.ToolInvoker(parent=None)[source]
Bases:
WidgetInvokerA palette invoker for toolbar buttons and other items. this invoker will properly align the palette so that is perpendicular to the toolbar (a horizontal toolbar will spawn a palette going downwards). it also draws the highlights specific to a toolitem.
for
sugar4.graphics.toolbutton.toolbuttonand subclasses, you should not use the toolinvoker directly. instead, just subclass the tool button and override the create_palette function.- Parameters:
parent (gtk.widget) – toolitem to connect invoker to
- attach_tool(widget)[source]
Attach a toolitem to the invoker. Same behaviour as passing the parent argument to the constructor.
- Parameters:
widget (Gtk.Widget) – toolitem to connect invoker to