gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.HeaderBar

Contents

Description

GtkHeaderBar is similar to a horizontal Box. It allows children to be placed at the start or the end. In addition, it allows a title and subtitle to be displayed. The title will be centered with respect to the width of the box, even if the children at either side take up different amounts of space. The height of the titlebar will be set to provide sufficient space for the subtitle, even if none is currently set. If a subtitle is not needed, the space reservation can be turned off with headerBarSetHasSubtitle.

GtkHeaderBar can add typical window frame controls, such as minimize, maximize and close buttons, or the window icon.

Synopsis

Exported types

Methods

getCustomTitle

headerBarGetCustomTitle Source #

Arguments

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

bar: a HeaderBar

-> m (Maybe Widget)

Returns: the custom title widget of the header, or Nothing if none has been set explicitly.

Retrieves the custom title widget of the header. See headerBarSetCustomTitle.

Since: 3.10

getDecorationLayout

headerBarGetDecorationLayout Source #

Arguments

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

bar: a HeaderBar

-> m Text

Returns: the decoration layout

Gets the decoration layout set with headerBarSetDecorationLayout.

Since: 3.12

getHasSubtitle

headerBarGetHasSubtitle Source #

Arguments

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

bar: a HeaderBar

-> m Bool

Returns: True if the header bar reserves space for a subtitle

Retrieves whether the header bar reserves space for a subtitle, regardless if one is currently set or not.

Since: 3.12

getShowCloseButton

headerBarGetShowCloseButton Source #

Arguments

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

bar: a HeaderBar

-> m Bool

Returns: True if the decorations are shown

Returns whether this header bar shows the standard window decorations.

Since: 3.10

getSubtitle

headerBarGetSubtitle Source #

Arguments

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

bar: a HeaderBar

-> m (Maybe Text)

Returns: the subtitle of the header, or Nothing if none has been set explicitly. The returned string is owned by the widget and must not be modified or freed.

Retrieves the subtitle of the header. See headerBarSetSubtitle.

Since: 3.10

getTitle

headerBarGetTitle Source #

Arguments

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

bar: a HeaderBar

-> m (Maybe Text)

Returns: the title of the header, or Nothing if none has been set explicitly. The returned string is owned by the widget and must not be modified or freed.

Retrieves the title of the header. See headerBarSetTitle.

Since: 3.10

new

headerBarNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m HeaderBar

Returns: a new HeaderBar

Creates a new HeaderBar widget.

Since: 3.10

packEnd

data HeaderBarPackEndMethodInfo Source #

Instances

((~) * signature (b -> m ()), MonadIO m, IsHeaderBar a, IsWidget b) => MethodInfo * HeaderBarPackEndMethodInfo a signature Source # 

headerBarPackEnd Source #

Arguments

:: (HasCallStack, MonadIO m, IsHeaderBar a, IsWidget b) 
=> a

bar: A HeaderBar

-> b

child: the Widget to be added to bar

-> m () 

Adds child to bar, packed with reference to the end of the bar.

Since: 3.10

packStart

data HeaderBarPackStartMethodInfo Source #

Instances

((~) * signature (b -> m ()), MonadIO m, IsHeaderBar a, IsWidget b) => MethodInfo * HeaderBarPackStartMethodInfo a signature Source # 

headerBarPackStart Source #

Arguments

:: (HasCallStack, MonadIO m, IsHeaderBar a, IsWidget b) 
=> a

bar: A HeaderBar

-> b

child: the Widget to be added to bar

-> m () 

Adds child to bar, packed with reference to the start of the bar.

Since: 3.10

setCustomTitle

headerBarSetCustomTitle Source #

Arguments

:: (HasCallStack, MonadIO m, IsHeaderBar a, IsWidget b) 
=> a

bar: a HeaderBar

-> Maybe b

titleWidget: a custom widget to use for a title

-> m () 

Sets a custom title for the HeaderBar.

The title should help a user identify the current view. This supersedes any title set by headerBarSetTitle or headerBarSetSubtitle. To achieve the same style as the builtin title and subtitle, use the “title” and “subtitle” style classes.

You should set the custom title to Nothing, for the header title label to be visible again.

Since: 3.10

setDecorationLayout

headerBarSetDecorationLayout Source #

Arguments

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

bar: a HeaderBar

-> Maybe Text

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

-> m () 

Sets the decoration layout for this header bar, overriding the Settings:gtk-decoration-layout setting.

There can be valid reasons for overriding the setting, such as a header bar design that does not allow for buttons to take room on the right, or only offers room for a single close button. Split header bars are another example for overriding the 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, icon (the window icon) and menu (a menu button for the fallback app menu).

For example, “menu:minimize,maximize,close” specifies a menu on the left, and minimize, maximize and close buttons on the right.

Since: 3.12

setHasSubtitle

headerBarSetHasSubtitle Source #

Arguments

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

bar: a HeaderBar

-> Bool

setting: True to reserve space for a subtitle

-> m () 

Sets whether the header bar should reserve space for a subtitle, even if none is currently set.

Since: 3.12

setShowCloseButton

headerBarSetShowCloseButton Source #

Arguments

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

bar: a HeaderBar

-> Bool

setting: True to show standard widow decorations

-> m () 

Sets whether this header bar shows the standard window decorations, including close, maximize, and minimize.

Since: 3.10

setSubtitle

headerBarSetSubtitle Source #

Arguments

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

bar: a HeaderBar

-> Maybe Text

subtitle: a subtitle, or Nothing

-> m () 

Sets the subtitle of the HeaderBar. The title should give a user an additional detail to help him identify the current view.

Note that GtkHeaderBar by default reserves room for the subtitle, even if none is currently set. If this is not desired, set the HeaderBar:has-subtitle property to False.

Since: 3.10

setTitle

data HeaderBarSetTitleMethodInfo Source #

Instances

((~) * signature (Maybe Text -> m ()), MonadIO m, IsHeaderBar a) => MethodInfo * HeaderBarSetTitleMethodInfo a signature Source # 

headerBarSetTitle Source #

Arguments

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

bar: a HeaderBar

-> Maybe Text

title: a title, or Nothing

-> m () 

Sets the title of the HeaderBar. The title should help a user identify the current view. A good title should not include the application name.

Since: 3.10

Properties

customTitle

data HeaderBarCustomTitlePropertyInfo Source #

Instances

AttrInfo HeaderBarCustomTitlePropertyInfo Source # 
type AttrOrigin HeaderBarCustomTitlePropertyInfo Source # 
type AttrLabel HeaderBarCustomTitlePropertyInfo Source # 
type AttrGetType HeaderBarCustomTitlePropertyInfo Source # 
type AttrBaseTypeConstraint HeaderBarCustomTitlePropertyInfo Source # 
type AttrSetTypeConstraint HeaderBarCustomTitlePropertyInfo Source # 
type AttrAllowedOps HeaderBarCustomTitlePropertyInfo Source # 

decorationLayout

data HeaderBarDecorationLayoutPropertyInfo Source #

Instances

AttrInfo HeaderBarDecorationLayoutPropertyInfo Source # 
type AttrOrigin HeaderBarDecorationLayoutPropertyInfo Source # 
type AttrLabel HeaderBarDecorationLayoutPropertyInfo Source # 
type AttrGetType HeaderBarDecorationLayoutPropertyInfo Source # 
type AttrBaseTypeConstraint HeaderBarDecorationLayoutPropertyInfo Source # 
type AttrSetTypeConstraint HeaderBarDecorationLayoutPropertyInfo Source # 
type AttrAllowedOps HeaderBarDecorationLayoutPropertyInfo Source # 

decorationLayoutSet

data HeaderBarDecorationLayoutSetPropertyInfo Source #

Instances

AttrInfo HeaderBarDecorationLayoutSetPropertyInfo Source # 
type AttrOrigin HeaderBarDecorationLayoutSetPropertyInfo Source # 
type AttrLabel HeaderBarDecorationLayoutSetPropertyInfo Source # 
type AttrGetType HeaderBarDecorationLayoutSetPropertyInfo Source # 
type AttrBaseTypeConstraint HeaderBarDecorationLayoutSetPropertyInfo Source # 
type AttrSetTypeConstraint HeaderBarDecorationLayoutSetPropertyInfo Source # 
type AttrAllowedOps HeaderBarDecorationLayoutSetPropertyInfo Source # 

hasSubtitle

data HeaderBarHasSubtitlePropertyInfo Source #

Instances

AttrInfo HeaderBarHasSubtitlePropertyInfo Source # 
type AttrOrigin HeaderBarHasSubtitlePropertyInfo Source # 
type AttrLabel HeaderBarHasSubtitlePropertyInfo Source # 
type AttrGetType HeaderBarHasSubtitlePropertyInfo Source # 
type AttrBaseTypeConstraint HeaderBarHasSubtitlePropertyInfo Source # 
type AttrSetTypeConstraint HeaderBarHasSubtitlePropertyInfo Source # 
type AttrAllowedOps HeaderBarHasSubtitlePropertyInfo Source # 

showCloseButton

data HeaderBarShowCloseButtonPropertyInfo Source #

Instances

AttrInfo HeaderBarShowCloseButtonPropertyInfo Source # 
type AttrOrigin HeaderBarShowCloseButtonPropertyInfo Source # 
type AttrLabel HeaderBarShowCloseButtonPropertyInfo Source # 
type AttrGetType HeaderBarShowCloseButtonPropertyInfo Source # 
type AttrBaseTypeConstraint HeaderBarShowCloseButtonPropertyInfo Source # 
type AttrSetTypeConstraint HeaderBarShowCloseButtonPropertyInfo Source # 
type AttrAllowedOps HeaderBarShowCloseButtonPropertyInfo Source # 

spacing

data HeaderBarSpacingPropertyInfo Source #

Instances

AttrInfo HeaderBarSpacingPropertyInfo Source # 
type AttrOrigin HeaderBarSpacingPropertyInfo Source # 
type AttrLabel HeaderBarSpacingPropertyInfo Source # 
type AttrGetType HeaderBarSpacingPropertyInfo Source # 
type AttrBaseTypeConstraint HeaderBarSpacingPropertyInfo Source # 
type AttrSetTypeConstraint HeaderBarSpacingPropertyInfo Source # 
type AttrAllowedOps HeaderBarSpacingPropertyInfo Source # 

subtitle

data HeaderBarSubtitlePropertyInfo Source #

Instances

AttrInfo HeaderBarSubtitlePropertyInfo Source # 
type AttrOrigin HeaderBarSubtitlePropertyInfo Source # 
type AttrLabel HeaderBarSubtitlePropertyInfo Source # 
type AttrGetType HeaderBarSubtitlePropertyInfo Source # 
type AttrBaseTypeConstraint HeaderBarSubtitlePropertyInfo Source # 
type AttrSetTypeConstraint HeaderBarSubtitlePropertyInfo Source # 
type AttrAllowedOps HeaderBarSubtitlePropertyInfo Source # 

title

data HeaderBarTitlePropertyInfo Source #

Instances

AttrInfo HeaderBarTitlePropertyInfo Source # 
type AttrOrigin HeaderBarTitlePropertyInfo Source # 
type AttrLabel HeaderBarTitlePropertyInfo Source # 
type AttrGetType HeaderBarTitlePropertyInfo Source # 
type AttrBaseTypeConstraint HeaderBarTitlePropertyInfo Source # 
type AttrSetTypeConstraint HeaderBarTitlePropertyInfo Source # 
type AttrAllowedOps HeaderBarTitlePropertyInfo Source # 

setHeaderBarTitle :: (MonadIO m, IsHeaderBar o) => o -> Text -> m () Source #