gi-adwaita-1.0.3: Adwaita bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Adw.Objects.ComboRow

Description

A ListBoxRow used to choose from a list of items.

<picture> <source srcset="combo-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="combo-row.png" alt="combo-row"> </picture>

The AdwComboRow widget allows the user to choose from a list of valid choices. The row displays the selected choice. When activated, the row displays a popover which allows the user to make a new choice.

Example of an AdwComboRow UI definition:

xml code

<object class="AdwComboRow">
  <property name="title" translatable="yes">Combo Row</property>
  <property name="model">
    <object class="GtkStringList">
      <items>
        <item translatable="yes">Foo</item>
        <item translatable="yes">Bar</item>
        <item translatable="yes">Baz</item>
      </items>
    </object>
  </property>
</object>

The [propertycomboRow:selected] and [propertycomboRow:selected-item] properties can be used to keep track of the selected item and react to their changes.

AdwComboRow mirrors DropDown, see that widget for details.

AdwComboRow is ListBoxRow:activatable if a model is set.

CSS nodes

AdwComboRow has a main CSS node with name row and the .combo style class.

Its popover has the node named popover with the .menu style class, it contains a ScrolledWindow, which in turn contains a ListView, both are accessible via their regular nodes.

Accessibility

AdwComboRow uses the GTK_ACCESSIBLE_ROLE_COMBO_BOX role.

Since: 1.0

Synopsis

Exported types

newtype ComboRow Source #

Memory-managed wrapper type.

Constructors

ComboRow (ManagedPtr ComboRow) 

Instances

Instances details
Eq ComboRow Source # 
Instance details

Defined in GI.Adw.Objects.ComboRow

GObject ComboRow Source # 
Instance details

Defined in GI.Adw.Objects.ComboRow

ManagedPtrNewtype ComboRow Source # 
Instance details

Defined in GI.Adw.Objects.ComboRow

Methods

toManagedPtr :: ComboRow -> ManagedPtr ComboRow

TypedObject ComboRow Source # 
Instance details

Defined in GI.Adw.Objects.ComboRow

Methods

glibType :: IO GType

HasParentTypes ComboRow Source # 
Instance details

Defined in GI.Adw.Objects.ComboRow

IsGValue (Maybe ComboRow) Source #

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

Instance details

Defined in GI.Adw.Objects.ComboRow

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes ComboRow Source # 
Instance details

Defined in GI.Adw.Objects.ComboRow

type ParentTypes ComboRow = '[ActionRow, PreferencesRow, ListBoxRow, Widget, Object, Accessible, Actionable, Buildable, ConstraintTarget]

class (GObject o, IsDescendantOf ComboRow o) => IsComboRow o Source #

Type class for types which can be safely cast to ComboRow, for instance with toComboRow.

Instances

Instances details
(GObject o, IsDescendantOf ComboRow o) => IsComboRow o Source # 
Instance details

Defined in GI.Adw.Objects.ComboRow

toComboRow :: (MonadIO m, IsComboRow o) => o -> m ComboRow Source #

Cast to ComboRow, 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, addPrefix, addSuffix, addTickCallback, allocate, bindProperty, bindPropertyFull, changed, 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, isSelected, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, remove, 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, getActionName, getActionTargetValue, getActivatable, getActivatableWidget, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBuildableId, getCanFocus, getCanTarget, getChild, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getExpression, getFactory, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeader, getHeight, getHexpand, getHexpandSet, getIconName, getIndex, getLastChild, getLayoutManager, getListFactory, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getModel, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSelectable, getSelected, getSelectedItem, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getSubtitle, getSubtitleLines, getTemplateChild, getTitle, getTitleLines, getTitleSelectable, getTooltipMarkup, getTooltipText, getUseMarkup, getUseSubtitle, getUseUnderline, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

Setters

setActionName, setActionTargetValue, setActivatable, setActivatableWidget, setCanFocus, setCanTarget, setChild, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDetailedActionName, setDirection, setExpression, setFactory, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHeader, setHexpand, setHexpandSet, setIconName, setLayoutManager, setListFactory, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setModel, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSelectable, setSelected, setSensitive, setSizeRequest, setStateFlags, setSubtitle, setSubtitleLines, setTitle, setTitleLines, setTitleSelectable, setTooltipMarkup, setTooltipText, setUseMarkup, setUseSubtitle, setUseUnderline, setValign, setVexpand, setVexpandSet, setVisible.

getExpression

comboRowGetExpression Source #

Arguments

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

self: a combo row

-> m (Maybe Expression)

Returns: the expression used to obtain strings from items

Gets the expression used to obtain strings from items.

Since: 1.0

getFactory

comboRowGetFactory Source #

Arguments

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

self: a combo row

-> m (Maybe ListItemFactory)

Returns: the factory in use

Gets the factory for populating list items.

Since: 1.0

getListFactory

comboRowGetListFactory Source #

Arguments

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

self: a combo row

-> m (Maybe ListItemFactory)

Returns: the factory in use

Gets the factory for populating list items in the popup.

Since: 1.0

getModel

comboRowGetModel Source #

Arguments

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

self: a combo row

-> m (Maybe ListModel)

Returns: The model in use

Gets the model that provides the displayed items.

Since: 1.0

getSelected

comboRowGetSelected Source #

Arguments

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

self: a combo row

-> m Word32

Returns: the position of the selected item, or [constgtk.INVALID_LIST_POSITION] if no item is selected

Gets the position of the selected item.

Since: 1.0

getSelectedItem

comboRowGetSelectedItem Source #

Arguments

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

self: a combo row

-> m (Maybe Object)

Returns: the selected item

Gets the selected item.

Since: 1.0

getUseSubtitle

comboRowGetUseSubtitle Source #

Arguments

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

self: a combo row

-> m Bool

Returns: whether to use the current value as the subtitle

Gets whether to use the current value as the subtitle.

Since: 1.0

new

comboRowNew Source #

Arguments

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

Returns: the newly created AdwComboRow

Creates a new AdwComboRow.

Since: 1.0

setExpression

comboRowSetExpression Source #

Arguments

:: (HasCallStack, MonadIO m, IsComboRow a, IsExpression b) 
=> a

self: a combo row

-> Maybe b

expression: an expression

-> m () 

Sets the expression used to obtain strings from items.

The expression must have a value type of G_TYPE_STRING.

It's used to bind strings to labels produced by the default factory if [propertycomboRow:factory] is not set, or when [propertycomboRow:use-subtitle] is set to TRUE.

Since: 1.0

setFactory

comboRowSetFactory Source #

Arguments

:: (HasCallStack, MonadIO m, IsComboRow a, IsListItemFactory b) 
=> a

self: a combo row

-> Maybe b

factory: the factory to use

-> m () 

Sets the factory for populating list items.

This factory is always used for the item in the row. It is also used for items in the popup unless [propertycomboRow:list-factory] is set.

Since: 1.0

setListFactory

comboRowSetListFactory Source #

Arguments

:: (HasCallStack, MonadIO m, IsComboRow a, IsListItemFactory b) 
=> a

self: a combo row

-> Maybe b

factory: the factory to use

-> m () 

Sets the factory for populating list items in the popup.

If this is not set, [propertycomboRow:factory] is used.

Since: 1.0

setModel

comboRowSetModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsComboRow a, IsListModel b) 
=> a

self: a combo row

-> Maybe b

model: the model to use

-> m () 

Sets the model that provides the displayed items.

Since: 1.0

setSelected

comboRowSetSelected Source #

Arguments

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

self: a combo row

-> Word32

position: the position of the item to select, or [constgtk.INVALID_LIST_POSITION]

-> m () 

Selects the item at the given position.

Since: 1.0

setUseSubtitle

comboRowSetUseSubtitle Source #

Arguments

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

self: a combo row

-> Bool

useSubtitle: whether to use the current value as the subtitle

-> m () 

Sets whether to use the current value as the subtitle.

If you use a custom list item factory, you will need to give the row a name conversion expression with [propertycomboRow:expression].

If set to TRUE, you should not access [propertyactionRow:subtitle].

The subtitle is interpreted as Pango markup if [propertypreferencesRow:use-markup] is set to TRUE.

Since: 1.0

Properties

expression

An expression used to obtain strings from items.

The expression must have a value type of G_TYPE_STRING.

It's used to bind strings to labels produced by the default factory if [propertycomboRow:factory] is not set, or when [propertycomboRow:use-subtitle] is set to TRUE.

Since: 1.0

clearComboRowExpression :: (MonadIO m, IsComboRow o) => o -> m () Source #

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

clear #expression

constructComboRowExpression :: (IsComboRow o, MonadIO m, IsExpression a) => a -> m (GValueConstruct o) Source #

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

getComboRowExpression :: (MonadIO m, IsComboRow o) => o -> m (Maybe Expression) Source #

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

get comboRow #expression

setComboRowExpression :: (MonadIO m, IsComboRow o, IsExpression a) => o -> a -> m () Source #

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

set comboRow [ #expression := value ]

factory

Factory for populating list items.

This factory is always used for the item in the row. It is also used for items in the popup unless [propertycomboRow:list-factory] is set.

Since: 1.0

clearComboRowFactory :: (MonadIO m, IsComboRow o) => o -> m () Source #

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

clear #factory

constructComboRowFactory :: (IsComboRow o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o) Source #

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

getComboRowFactory :: (MonadIO m, IsComboRow o) => o -> m (Maybe ListItemFactory) Source #

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

get comboRow #factory

setComboRowFactory :: (MonadIO m, IsComboRow o, IsListItemFactory a) => o -> a -> m () Source #

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

set comboRow [ #factory := value ]

listFactory

The factory for populating list items in the popup.

If this is not set, [propertycomboRow:factory] is used.

Since: 1.0

clearComboRowListFactory :: (MonadIO m, IsComboRow o) => o -> m () Source #

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

clear #listFactory

constructComboRowListFactory :: (IsComboRow o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o) Source #

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

getComboRowListFactory :: (MonadIO m, IsComboRow o) => o -> m (Maybe ListItemFactory) Source #

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

get comboRow #listFactory

setComboRowListFactory :: (MonadIO m, IsComboRow o, IsListItemFactory a) => o -> a -> m () Source #

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

set comboRow [ #listFactory := value ]

model

The model that provides the displayed items.

Since: 1.0

clearComboRowModel :: (MonadIO m, IsComboRow o) => o -> m () Source #

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

clear #model

constructComboRowModel :: (IsComboRow o, MonadIO m, IsListModel a) => a -> m (GValueConstruct o) Source #

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

getComboRowModel :: (MonadIO m, IsComboRow o) => o -> m (Maybe ListModel) Source #

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

get comboRow #model

setComboRowModel :: (MonadIO m, IsComboRow o, IsListModel a) => o -> a -> m () Source #

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

set comboRow [ #model := value ]

selected

The position of the selected item.

If no item is selected, the property has the value [constgtk.INVALID_LIST_POSITION]

Since: 1.0

constructComboRowSelected :: (IsComboRow o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

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

getComboRowSelected :: (MonadIO m, IsComboRow o) => o -> m Word32 Source #

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

get comboRow #selected

setComboRowSelected :: (MonadIO m, IsComboRow o) => o -> Word32 -> m () Source #

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

set comboRow [ #selected := value ]

selectedItem

The selected item.

Since: 1.0

getComboRowSelectedItem :: (MonadIO m, IsComboRow o) => o -> m (Maybe Object) Source #

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

get comboRow #selectedItem

useSubtitle

Whether to use the current value as the subtitle.

If you use a custom list item factory, you will need to give the row a name conversion expression with [propertycomboRow:expression].

If set to TRUE, you should not access [propertyactionRow:subtitle].

The subtitle is interpreted as Pango markup if [propertypreferencesRow:use-markup] is set to TRUE.

Since: 1.0

constructComboRowUseSubtitle :: (IsComboRow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getComboRowUseSubtitle :: (MonadIO m, IsComboRow o) => o -> m Bool Source #

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

get comboRow #useSubtitle

setComboRowUseSubtitle :: (MonadIO m, IsComboRow o) => o -> Bool -> m () Source #

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

set comboRow [ #useSubtitle := value ]