Gtk.WindowControls¶
Example¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.WindowControls(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
GtkWindowControls
shows window frame controls.Typical window frame controls are minimize, maximize and close buttons, and the window icon.
An example
Gtk.WindowControls
GtkWindowControls
only displays start or end side of the controls (see [property`Gtk`.WindowControls:side]), so it’s intended to be always used in pair with anotherGtkWindowControls
for the opposite side, for example:```xml
<child>
start </object> </child>
…
<child>
end </object> </child> </object> ```
# CSS nodes
``` windowcontrols ├── [image.icon] ├── [button.minimize] ├── [button.maximize] ╰── [button.close] ```
A `:obj:Gtk.WindowControls`’ CSS node is called windowcontrols. It contains subnodes corresponding to each title button. Which of the title buttons exist and where they are placed exactly depends on the desktop environment and [property`Gtk`.WindowControls:decoration-layout] value.
When [property`Gtk`.WindowControls:empty] is
True
, it gets the .empty style class.# Accessibility
`:obj:Gtk.WindowControls` uses the
Gtk.AccessibleRole.GROUP
role.- classmethod new(side)[source]¶
- Parameters:
side (
Gtk.PackType
) – the side- Returns:
a new
GtkWindowControls
.- Return type:
Creates a new
GtkWindowControls
.
- get_side()[source]¶
- Returns:
the side
- Return type:
Gets the side to which this
GtkWindowControls
instance belongs.
- set_decoration_layout(layout)[source]¶
-
Sets the decoration layout for the title buttons.
This overrides the [property`Gtk`.Settings:gtk-decoration-layout] setting.
The format of the string is button names, separated by commas. A colon separates the buttons that should appear on the left from those on the right. Recognized button names are minimize, maximize, close and icon (the window icon).
For example, “icon:minimize,maximize,close” specifies a icon on the left, and minimize, maximize and close buttons on the right.
If [property`Gtk`.WindowControls:side] value is
Gtk.PackType.START
, self will display the part before the colon, otherwise after that.
- set_side(side)[source]¶
- Parameters:
side (
Gtk.PackType
) – a side
Determines which part of decoration layout the
GtkWindowControls
uses.See [property`Gtk`.WindowControls:decoration-layout].
Property Details¶
- Gtk.WindowControls.props.decoration_layout¶
- Name:
decoration-layout
- Type:
- Default Value:
- Flags:
The decoration layout for window buttons.
If this property is not set, the [property`Gtk`.Settings:gtk-decoration-layout] setting is used.
- Gtk.WindowControls.props.empty¶
- Name:
empty
- Type:
- Default Value:
- Flags:
Whether the widget has any window buttons.
- Gtk.WindowControls.props.side¶
- Name:
side
- Type:
- Default Value:
- Flags:
Whether the widget shows start or end side of the decoration layout.
See [property`Gtk`.WindowControls:decoration_layout].