sugar3.activity.widgets module¶
-
class
sugar3.activity.widgets.
ActivityButton
(activity, **kwargs)¶
-
class
sugar3.activity.widgets.
ActivityToolbar
(activity, orientation_left=False)¶ Bases:
gi.repository.Gtk.Toolbar
The Activity toolbar with the Journal entry title and sharing button
-
class
sugar3.activity.widgets.
ActivityToolbarButton
(activity, **kwargs)¶
-
class
sugar3.activity.widgets.
CopyButton
(**kwargs)¶
-
class
sugar3.activity.widgets.
DescriptionItem
(activity, **kwargs)¶ Bases:
sugar3.graphics.toolbutton.ToolButton
-
get_toolbar_box
()¶
-
set_expanded
(expanded)¶
-
toolbar_box
¶
-
-
class
sugar3.activity.widgets.
EditToolbar
¶ Bases:
gi.repository.Gtk.Toolbar
Provides the standard edit toolbar for Activities.
- Members:
- undo – the undo button redo – the redo button copy – the copy button paste – the paste button separator – A separator between undo/redo and copy/paste
This class only provides the ‘edit’ buttons in a standard layout, your activity will need to either hide buttons which make no sense for your Activity, or you need to connect the button events to your own callbacks:
## Example from Read.activity: # Create the edit toolbar: self._edit_toolbar = EditToolbar(self._view) # Hide undo and redo, they’re not needed self._edit_toolbar.undo.props.visible = False self._edit_toolbar.redo.props.visible = False # Hide the separator too: self._edit_toolbar.separator.props.visible = False
# As long as nothing is selected, copy needs to be insensitive: self._edit_toolbar.copy.set_sensitive(False) # When the user clicks the button, call _edit_toolbar_copy_cb() self._edit_toolbar.copy.connect(‘clicked’, self._edit_toolbar_copy_cb)
# Add the edit toolbar: toolbox.add_toolbar(_(‘Edit’), self._edit_toolbar) # And make it visible: self._edit_toolbar.show()
-
class
sugar3.activity.widgets.
PasteButton
(**kwargs)¶
-
class
sugar3.activity.widgets.
RedoButton
(**kwargs)¶
-
class
sugar3.activity.widgets.
StopButton
(activity, **kwargs)¶
-
class
sugar3.activity.widgets.
TitleEntry
(activity, **kwargs)¶ Bases:
gi.repository.Gtk.ToolItem
-
modify_bg
(state, color)¶
-
save_title
(activity)¶
-
-
class
sugar3.activity.widgets.
UndoButton
(**kwargs)¶