Panel.Widget¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Widget (183), GObject.Object (37), Gtk.Accessible (17), Gtk.Buildable (1)
- Structs:
Panel.WidgetClass (2), Gtk.WidgetClass (18), GObject.ObjectClass (5)
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r |
If the widget is busy, such as loading or saving a file |
||
r/w/en |
Can Maximize |
||
r/w/en |
Child |
||
r/w/en |
A |
||
r/w/en |
Icon Name |
||
r/w/en |
The identifier for the widget which can be used for saving state |
||
r/w/en |
The kind of panel widget |
||
r/w/en |
Menu Model |
||
r/w/en |
If the widget contains unsaved state |
||
r/w/en |
Needs Attention |
||
r/w/en |
If the panel may be reordered |
||
r/w/en |
A save delegate to perform a save operation on the page |
||
r/w/en |
Title |
||
r/w/en |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Gets the default widget to focus within the |
|
The “presented” signal is emitted when the widget is brought to the front of a frame. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Panel.Widget(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Panel.Widgetis the base widget class for widgets added to aPanel.Frame. It can be use as-is or you can subclass it.- classmethod install_action(action_name, parameter_type, activate)¶
- Parameters:
action_name (
str) – a prefixed action name, such as “clipboard.paste”activate (
Gtk.WidgetActionActivateFunc) – callback to use when the action is activated
This should be called at class initialization time to specify actions to be added for all instances of this class.
Actions installed by this function are stateless. The only state they have is whether they are enabled or not.
- classmethod install_property_action(action_name, property_name)¶
- Parameters:
Installs an action called action_name on self and binds its state to the value of the property_name property.
This function will perform a few santity checks on the property selected via property_name. Namely, the property must exist, must be readable, writable and must not be construct-only. There are also restrictions on the type of the given property, it must be boolean, int, unsigned int, double or string. If any of these conditions are not met, a critical warning will be printed and no action will be added.
The state type of the action matches the property type.
If the property is boolean, the action will have no parameter and toggle the property value. Otherwise, the action will have a parameter of the same type as the property.
- classmethod new()¶
- Returns:
a newly created
Panel.Widget- Return type:
Create a new
Panel.Widget.
- close()¶
- force_close()¶
Closes the widget without any save dialogs.
- get_child()¶
- Returns:
a
Gtk.WidgetorNone- Return type:
Gtk.WidgetorNone
Gets the child widget of the panel.
- get_default_focus()¶
- Returns:
the default widget to focus within the
Panel.Widget.- Return type:
Gtk.WidgetorNone
Discovers the widget that should be focused as the default widget for the
Panel.Widget.For example, if you want to focus a text editor by default, you might return the
Gtk.TextViewinside your widgetry.
- get_icon_name()¶
-
Gets the icon name for the widget.
- Returns:
- Return type:
Gets the
Gio.MenuModelfor the widget.Panel.FrameHeadermay use this model to display additional options for the page to the user via menus.
- get_modified()¶
- Returns:
the modified status of the panel widget.
- Return type:
Gets the modified status of a panel widget
- get_position()¶
- Returns:
a
Panel.PositionorNoneif the widget isn’t within aPanel.Frame.- Return type:
Gets teh position of the widget within the dock.
- get_save_delegate()¶
- Returns:
a
Panel.SaveDelegateorNone- Return type:
Gets the
Panel.Widget:save-delegateproperty.The save delegate may be used to perform save operations on the content within the widget.
Document editors might use this to save the file to disk.
- get_tooltip()¶
-
Gets the tooltip for the widget.
- insert_action_group(prefix, group)¶
- Parameters:
prefix (
str) –group (
Gio.ActionGroup) –
- mark_busy()¶
- maximize()¶
- raise_()¶
- set_child(child)¶
- Parameters:
child (
Gtk.WidgetorNone) – aGtk.WidgetorNone
Sets the child widget of the panel.
- set_icon_name(icon_name)¶
-
Sets the icon name for the widget.
- set_id(id)¶
- Parameters:
id (
str) – the id to set for the panel widget.
Sets the id of the panel widget.
- set_kind(kind)¶
-
Sets the kind of the widget.
- Parameters:
menu_model (
Gio.MenuModelorNone) – aGio.MenuModel
Sets the
Gio.MenuModelfor the widget.Panel.FrameHeadermay use this model to display additional options for the page to the user via menus.
- set_modified(modified)¶
- Parameters:
modified (
bool) – the modified status
Sets the modified status of a panel widget.
- set_save_delegate(save_delegate)¶
- Parameters:
save_delegate (
Panel.SaveDelegateorNone) – aPanel.SaveDelegateorNone
Sets the
Panel.Widget:save-delegateproperty.The save delegate may be used to perform save operations on the content within the widget.
Document editors might use this to save the file to disk.
- set_title(title)¶
-
Sets the title for the widget.
- set_tooltip(tooltip)¶
-
Sets the tooltip for the widget to be displayed in tabs.
- unmark_busy()¶
- unmaximize()¶
- do_get_default_focus() virtual¶
- Returns:
the default widget to focus within the
Panel.Widget.- Return type:
Gtk.WidgetorNone
Discovers the widget that should be focused as the default widget for the
Panel.Widget.For example, if you want to focus a text editor by default, you might return the
Gtk.TextViewinside your widgetry.
- do_presented() virtual¶
Signal Details¶
- Panel.Widget.signals.get_default_focus(widget)¶
- Signal Name:
get-default-focus- Flags:
- Parameters:
widget (
Panel.Widget) – The object which received the signal- Returns:
a
Gtk.WidgetwithinPanel.WidgetorNone.- Return type:
Gtk.WidgetorNone
Gets the default widget to focus within the
Panel.Widget. The first handler for this signal is expected to return a widget, orNoneif there is nothing to focus.
- Panel.Widget.signals.presented(widget)¶
- Signal Name:
presented- Flags:
- Parameters:
widget (
Panel.Widget) – The object which received the signal
The “presented” signal is emitted when the widget is brought to the front of a frame.
Property Details¶
- Panel.Widget.props.busy¶
-
If the widget is busy, such as loading or saving a file
- Panel.Widget.props.can_maximize¶
- Name:
can-maximize- Type:
- Default Value:
- Flags:
Can Maximize
- Panel.Widget.props.child¶
- Name:
child- Type:
- Default Value:
- Flags:
The child inside this widget.
- Panel.Widget.props.icon¶
- Name:
icon- Type:
- Default Value:
- Flags:
The icon for this widget.
- Panel.Widget.props.icon_name¶
- Name:
icon-name- Type:
- Default Value:
- Flags:
The icon name for this widget.
- Panel.Widget.props.id¶
- Name:
id- Type:
- Default Value:
- Flags:
The identifier for the widget which can be used for saving state
- Panel.Widget.props.kind¶
- Name:
kind- Type:
- Default Value:
'unknown'- Flags:
The kind of panel widget
- Name:
menu-model- Type:
- Default Value:
- Flags:
A menu model to display additional options for the page to the user via menus.
- Panel.Widget.props.modified¶
- Name:
modified- Type:
- Default Value:
- Flags:
If the widget contains unsaved state
- Panel.Widget.props.needs_attention¶
- Name:
needs-attention- Type:
- Default Value:
- Flags:
Needs Attention
- Panel.Widget.props.reorderable¶
- Name:
reorderable- Type:
- Default Value:
- Flags:
If the panel may be reordered
- Panel.Widget.props.save_delegate¶
- Name:
save-delegate- Type:
- Default Value:
- Flags:
The save delegate attached to this widget.
- Panel.Widget.props.title¶
- Name:
title- Type:
- Default Value:
- Flags:
The title for this widget.