gi-gtk-4.0.6: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.WindowControls

Description

GtkWindowControls shows window frame controls.

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

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

xml code

<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 GtkWindowControls' 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 WindowControls:decorationLayout value.

When WindowControls:empty is True, it gets the .empty style class.

Accessibility

GtkWindowControls uses the AccessibleRoleGroup role.

Synopsis

Exported types

newtype WindowControls Source #

Memory-managed wrapper type.

Constructors

WindowControls (ManagedPtr WindowControls) 

Instances

Instances details
Eq WindowControls Source # 
Instance details

Defined in GI.Gtk.Objects.WindowControls

GObject WindowControls Source # 
Instance details

Defined in GI.Gtk.Objects.WindowControls

ManagedPtrNewtype WindowControls Source # 
Instance details

Defined in GI.Gtk.Objects.WindowControls

TypedObject WindowControls Source # 
Instance details

Defined in GI.Gtk.Objects.WindowControls

Methods

glibType :: IO GType

HasParentTypes WindowControls Source # 
Instance details

Defined in GI.Gtk.Objects.WindowControls

IsGValue (Maybe WindowControls) Source #

Convert WindowControls to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.WindowControls

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe WindowControls -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe WindowControls)

type ParentTypes WindowControls Source # 
Instance details

Defined in GI.Gtk.Objects.WindowControls

type ParentTypes WindowControls = '[Widget, Object, Accessible, Buildable, ConstraintTarget]

class (GObject o, IsDescendantOf WindowControls o) => IsWindowControls o Source #

Type class for types which can be safely cast to WindowControls, for instance with toWindowControls.

Instances

Instances details
(GObject o, IsDescendantOf WindowControls o) => IsWindowControls o Source # 
Instance details

Defined in GI.Gtk.Objects.WindowControls

toWindowControls :: (MonadIO m, IsWindowControls o) => o -> m WindowControls Source #

Cast to WindowControls, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDecorationLayout, getDirection, getDisplay, getEmpty, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSide, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

Setters

setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDecorationLayout, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSide, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

getDecorationLayout

windowControlsGetDecorationLayout Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindowControls a) 
=> a

self: a GtkWindowControls

-> m (Maybe Text)

Returns: the decoration layout or Nothing if it is unset

Gets the decoration layout of this GtkWindowControls.

getEmpty

windowControlsGetEmpty Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindowControls a) 
=> a

self: a GtkWindowControls

-> m Bool

Returns: True if the widget has window buttons, otherwise False

Gets whether the widget has any window buttons.

getSide

windowControlsGetSide Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindowControls a) 
=> a

self: a GtkWindowControls

-> m PackType

Returns: the side

Gets the side to which this GtkWindowControls instance belongs.

new

windowControlsNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> PackType

side: the side

-> m WindowControls

Returns: a new GtkWindowControls.

Creates a new GtkWindowControls.

setDecorationLayout

windowControlsSetDecorationLayout Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindowControls a) 
=> a

self: a GtkWindowControls

-> Maybe Text

layout: a decoration layout, or Nothing to unset the layout

-> m () 

Sets the decoration layout for the title buttons.

This overrides the Settings:gtkDecorationLayout 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 WindowControls:side value is gTKPACKSTART, self will display the part before the colon, otherwise after that.

setSide

windowControlsSetSide Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindowControls a) 
=> a

self: a GtkWindowControls

-> PackType

side: a side

-> m () 

Determines which part of decoration layout the GtkWindowControls uses.

See WindowControls:decorationLayout.

Properties

decorationLayout

The decoration layout for window buttons.

If this property is not set, the Settings:gtkDecorationLayout setting is used.

clearWindowControlsDecorationLayout :: (MonadIO m, IsWindowControls o) => o -> m () Source #

Set the value of the “decoration-layout” property to Nothing. When overloading is enabled, this is equivalent to

clear #decorationLayout

constructWindowControlsDecorationLayout :: (IsWindowControls o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “decoration-layout” property. This is rarely needed directly, but it is used by new.

getWindowControlsDecorationLayout :: (MonadIO m, IsWindowControls o) => o -> m (Maybe Text) Source #

Get the value of the “decoration-layout” property. When overloading is enabled, this is equivalent to

get windowControls #decorationLayout

setWindowControlsDecorationLayout :: (MonadIO m, IsWindowControls o) => o -> Text -> m () Source #

Set the value of the “decoration-layout” property. When overloading is enabled, this is equivalent to

set windowControls [ #decorationLayout := value ]

empty

Whether the widget has any window buttons.

getWindowControlsEmpty :: (MonadIO m, IsWindowControls o) => o -> m Bool Source #

Get the value of the “empty” property. When overloading is enabled, this is equivalent to

get windowControls #empty

side

Whether the widget shows start or end side of the decoration layout.

See [propertygtk.WindowControls:decoration_layout].

constructWindowControlsSide :: (IsWindowControls o, MonadIO m) => PackType -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “side” property. This is rarely needed directly, but it is used by new.

getWindowControlsSide :: (MonadIO m, IsWindowControls o) => o -> m PackType Source #

Get the value of the “side” property. When overloading is enabled, this is equivalent to

get windowControls #side

setWindowControlsSide :: (MonadIO m, IsWindowControls o) => o -> PackType -> m () Source #

Set the value of the “side” property. When overloading is enabled, this is equivalent to

set windowControls [ #side := value ]