gtk.window_controls

Module for [WindowControls] class

Types 3

gtk.window_controls.WindowControls shows window frame controls.

Typical window frame controls are minimize, maximize and close buttons, and the window icon.

!An example GtkWindowControls

gtk.window_controls.WindowControls only displays start or end side of the controls (see gtk.window_controls.WindowControls.side), so it's intended to be always used in pair with another gtk.window_controls.WindowControls for the opposite side, for example:

<object class="GtkBox">
  <child>
    <object class="GtkWindowControls">
      <property name="side">start</property>
    </object>
  </child>

  ...

  <child>
    <object class="GtkWindowControls">
      <property name="side">end</property>
    </object>
  </child>
</object>

CSS nodes

windowcontrols
├── [image.icon]
├── [button.minimize]
├── [button.maximize]
╰── [button.close]

A gtk.window_controls.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 gtk.window_controls.WindowControls.decorationLayout value.

When gtk.window_controls.WindowControls.empty is true, it gets the .empty style class.

Accessibility

gtk.window_controls.WindowControls uses the gtk.types.AccessibleRole.Group role.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
WindowControls self() nothrowReturns `this`, for use in `with` statements.
WindowControlsGidBuilder builder() static nothrowGet builder for [gtk.window_controls.WindowControls] Returns: New builder object
string decorationLayout() @property nothrowGet `decorationLayout` property. Returns: The decoration layout for window buttons.
void decorationLayout(string propval) @property nothrowSet `decorationLayout` property. Params: propval = The decoration layout for window buttons.
bool empty() @property nothrowGet `empty` property. Returns: Whether the widget has any window buttons.
gtk.types.PackType side() @property nothrowGet `side` property. Returns: Whether the widget shows start or end side of the decoration layout.
void side(gtk.types.PackType propval) @property nothrowSet `side` property. Params: propval = Whether the widget shows start or end side of the decoration layout.
string getDecorationLayout() nothrowGets the decoration layout of this [gtk.window_controls.WindowControls]. Returns: the decoration layout or null if it is unset
bool getEmpty() nothrowGets whether the widget has any window buttons. Returns: true if the widget has window buttons, otherwise false
gtk.types.PackType getSide() nothrowGets the side to which this [gtk.window_controls.WindowControls] instance belongs. Returns: the side
void setDecorationLayout(string layout = null) nothrowSets the decoration layout for the title buttons.
void setSide(gtk.types.PackType side) nothrowDetermines which part of decoration layout the [gtk.window_controls.WindowControls] uses.
Constructors
this(void * ptr, Flag!"Take" take)
this(gtk.types.PackType side)Creates a new [gtk.window_controls.WindowControls].

Fluent builder implementation template for gtk.window_controls.WindowControls

Methods
T decorationLayout(string propval) nothrowSet `decorationLayout` property. Params: propval = The decoration layout for window buttons.
T side(gtk.types.PackType propval) nothrowSet `side` property. Params: propval = Whether the widget shows start or end side of the decoration layout.
Methods
WindowControls build() nothrowCreate object from builder. Returns: New object