Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- newtype WindowControls = WindowControls (ManagedPtr WindowControls)
- class (GObject o, IsDescendantOf WindowControls o) => IsWindowControls o
- toWindowControls :: (MonadIO m, IsWindowControls o) => o -> m WindowControls
- windowControlsGetDecorationLayout :: (HasCallStack, MonadIO m, IsWindowControls a) => a -> m (Maybe Text)
- windowControlsGetEmpty :: (HasCallStack, MonadIO m, IsWindowControls a) => a -> m Bool
- windowControlsGetSide :: (HasCallStack, MonadIO m, IsWindowControls a) => a -> m PackType
- windowControlsNew :: (HasCallStack, MonadIO m) => PackType -> m WindowControls
- windowControlsSetDecorationLayout :: (HasCallStack, MonadIO m, IsWindowControls a) => a -> Maybe Text -> m ()
- windowControlsSetSide :: (HasCallStack, MonadIO m, IsWindowControls a) => a -> PackType -> m ()
- clearWindowControlsDecorationLayout :: (MonadIO m, IsWindowControls o) => o -> m ()
- constructWindowControlsDecorationLayout :: (IsWindowControls o, MonadIO m) => Text -> m (GValueConstruct o)
- getWindowControlsDecorationLayout :: (MonadIO m, IsWindowControls o) => o -> m (Maybe Text)
- setWindowControlsDecorationLayout :: (MonadIO m, IsWindowControls o) => o -> Text -> m ()
- getWindowControlsEmpty :: (MonadIO m, IsWindowControls o) => o -> m Bool
- constructWindowControlsSide :: (IsWindowControls o, MonadIO m) => PackType -> m (GValueConstruct o)
- getWindowControlsSide :: (MonadIO m, IsWindowControls o) => o -> m PackType
- setWindowControlsSide :: (MonadIO m, IsWindowControls o) => o -> PackType -> m ()
Exported types
newtype WindowControls Source #
Memory-managed wrapper type.
WindowControls (ManagedPtr WindowControls) |
Instances
Eq WindowControls Source # | |
Defined in GI.Gtk.Objects.WindowControls (==) :: WindowControls -> WindowControls -> Bool # (/=) :: WindowControls -> WindowControls -> Bool # | |
GObject WindowControls Source # | |
Defined in GI.Gtk.Objects.WindowControls | |
ManagedPtrNewtype WindowControls Source # | |
Defined in GI.Gtk.Objects.WindowControls toManagedPtr :: WindowControls -> ManagedPtr WindowControls | |
TypedObject WindowControls Source # | |
Defined in GI.Gtk.Objects.WindowControls | |
HasParentTypes WindowControls Source # | |
Defined in GI.Gtk.Objects.WindowControls | |
IsGValue (Maybe WindowControls) Source # | Convert |
Defined in GI.Gtk.Objects.WindowControls gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe WindowControls -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe WindowControls) | |
type ParentTypes WindowControls Source # | |
Defined in GI.Gtk.Objects.WindowControls |
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
(GObject o, IsDescendantOf WindowControls o) => IsWindowControls o Source # | |
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
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 #
:: (HasCallStack, MonadIO m, IsWindowControls a) | |
=> a |
|
-> m (Maybe Text) | Returns: the decoration layout or |
Gets the decoration layout of this GtkWindowControls
.
getEmpty
windowControlsGetEmpty Source #
:: (HasCallStack, MonadIO m, IsWindowControls a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether the widget has any window buttons.
getSide
windowControlsGetSide Source #
:: (HasCallStack, MonadIO m, IsWindowControls a) | |
=> a |
|
-> m PackType | Returns: the side |
Gets the side to which this GtkWindowControls
instance belongs.
new
:: (HasCallStack, MonadIO m) | |
=> PackType |
|
-> m WindowControls | Returns: a new |
Creates a new GtkWindowControls
.
setDecorationLayout
windowControlsSetDecorationLayout Source #
:: (HasCallStack, MonadIO m, IsWindowControls a) | |
=> a |
|
-> Maybe Text |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsWindowControls a) | |
=> a |
|
-> PackType |
|
-> m () |
Determines which part of decoration layout the GtkWindowControls
uses.
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 ]