| 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 |
GI.Adw.Objects.ComboRow
Description
A ListBoxRow used to choose from a list of items.
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.
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 .combo 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
- newtype ComboRow = ComboRow (ManagedPtr ComboRow)
- class (GObject o, IsDescendantOf ComboRow o) => IsComboRow o
- toComboRow :: (MonadIO m, IsComboRow o) => o -> m ComboRow
- comboRowGetExpression :: (HasCallStack, MonadIO m, IsComboRow a) => a -> m (Maybe Expression)
- comboRowGetFactory :: (HasCallStack, MonadIO m, IsComboRow a) => a -> m (Maybe ListItemFactory)
- comboRowGetListFactory :: (HasCallStack, MonadIO m, IsComboRow a) => a -> m (Maybe ListItemFactory)
- comboRowGetModel :: (HasCallStack, MonadIO m, IsComboRow a) => a -> m (Maybe ListModel)
- comboRowGetSelected :: (HasCallStack, MonadIO m, IsComboRow a) => a -> m Word32
- comboRowGetSelectedItem :: (HasCallStack, MonadIO m, IsComboRow a) => a -> m (Maybe Object)
- comboRowGetUseSubtitle :: (HasCallStack, MonadIO m, IsComboRow a) => a -> m Bool
- comboRowNew :: (HasCallStack, MonadIO m) => m ComboRow
- comboRowSetExpression :: (HasCallStack, MonadIO m, IsComboRow a, IsExpression b) => a -> Maybe b -> m ()
- comboRowSetFactory :: (HasCallStack, MonadIO m, IsComboRow a, IsListItemFactory b) => a -> Maybe b -> m ()
- comboRowSetListFactory :: (HasCallStack, MonadIO m, IsComboRow a, IsListItemFactory b) => a -> Maybe b -> m ()
- comboRowSetModel :: (HasCallStack, MonadIO m, IsComboRow a, IsListModel b) => a -> Maybe b -> m ()
- comboRowSetSelected :: (HasCallStack, MonadIO m, IsComboRow a) => a -> Word32 -> m ()
- comboRowSetUseSubtitle :: (HasCallStack, MonadIO m, IsComboRow a) => a -> Bool -> m ()
- clearComboRowExpression :: (MonadIO m, IsComboRow o) => o -> m ()
- constructComboRowExpression :: (IsComboRow o, MonadIO m, IsExpression a) => a -> m (GValueConstruct o)
- getComboRowExpression :: (MonadIO m, IsComboRow o) => o -> m (Maybe Expression)
- setComboRowExpression :: (MonadIO m, IsComboRow o, IsExpression a) => o -> a -> m ()
- clearComboRowFactory :: (MonadIO m, IsComboRow o) => o -> m ()
- constructComboRowFactory :: (IsComboRow o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o)
- getComboRowFactory :: (MonadIO m, IsComboRow o) => o -> m (Maybe ListItemFactory)
- setComboRowFactory :: (MonadIO m, IsComboRow o, IsListItemFactory a) => o -> a -> m ()
- clearComboRowListFactory :: (MonadIO m, IsComboRow o) => o -> m ()
- constructComboRowListFactory :: (IsComboRow o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o)
- getComboRowListFactory :: (MonadIO m, IsComboRow o) => o -> m (Maybe ListItemFactory)
- setComboRowListFactory :: (MonadIO m, IsComboRow o, IsListItemFactory a) => o -> a -> m ()
- clearComboRowModel :: (MonadIO m, IsComboRow o) => o -> m ()
- constructComboRowModel :: (IsComboRow o, MonadIO m, IsListModel a) => a -> m (GValueConstruct o)
- getComboRowModel :: (MonadIO m, IsComboRow o) => o -> m (Maybe ListModel)
- setComboRowModel :: (MonadIO m, IsComboRow o, IsListModel a) => o -> a -> m ()
- constructComboRowSelected :: (IsComboRow o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getComboRowSelected :: (MonadIO m, IsComboRow o) => o -> m Word32
- setComboRowSelected :: (MonadIO m, IsComboRow o) => o -> Word32 -> m ()
- getComboRowSelectedItem :: (MonadIO m, IsComboRow o) => o -> m (Maybe Object)
- constructComboRowUseSubtitle :: (IsComboRow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getComboRowUseSubtitle :: (MonadIO m, IsComboRow o) => o -> m Bool
- setComboRowUseSubtitle :: (MonadIO m, IsComboRow o) => o -> Bool -> m ()
Exported types
Memory-managed wrapper type.
Constructors
| ComboRow (ManagedPtr ComboRow) |
Instances
| Eq ComboRow Source # | |
| GObject ComboRow Source # | |
Defined in GI.Adw.Objects.ComboRow | |
| ManagedPtrNewtype ComboRow Source # | |
Defined in GI.Adw.Objects.ComboRow Methods toManagedPtr :: ComboRow -> ManagedPtr ComboRow # | |
| TypedObject ComboRow Source # | |
Defined in GI.Adw.Objects.ComboRow | |
| HasParentTypes ComboRow Source # | |
Defined in GI.Adw.Objects.ComboRow | |
| IsGValue (Maybe ComboRow) Source # | Convert |
Defined in GI.Adw.Objects.ComboRow | |
| type ParentTypes ComboRow Source # | |
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
| (GObject o, IsDescendantOf ComboRow o) => IsComboRow o Source # | |
Defined in GI.Adw.Objects.ComboRow | |
toComboRow :: (MonadIO m, IsComboRow o) => o -> m ComboRow Source #
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addPrefix, addSuffix, addTickCallback, allocate, bindProperty, bindPropertyFull, changed, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, 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, getTooltipMarkup, getTooltipText, 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, setTooltipMarkup, setTooltipText, setUseSubtitle, setUseUnderline, setValign, setVexpand, setVexpandSet, setVisible.
getExpression
comboRowGetExpression Source #
Arguments
| :: (HasCallStack, MonadIO m, IsComboRow a) | |
| => a |
|
| -> 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
Arguments
| :: (HasCallStack, MonadIO m, IsComboRow a) | |
| => a |
|
| -> m (Maybe ListItemFactory) | Returns: the factory in use |
Gets the factory that's currently used to populate list items.
Since: 1.0
getListFactory
comboRowGetListFactory Source #
Arguments
| :: (HasCallStack, MonadIO m, IsComboRow a) | |
| => a |
|
| -> m (Maybe ListItemFactory) | Returns: the factory in use |
Gets the factory that's currently used to populate list items in the popup.
Since: 1.0
getModel
Arguments
| :: (HasCallStack, MonadIO m, IsComboRow a) | |
| => a |
|
| -> m (Maybe ListModel) | Returns: The model in use |
Gets the model that provides the displayed items.
Since: 1.0
getSelected
Arguments
| :: (HasCallStack, MonadIO m, IsComboRow a) | |
| => a |
|
| -> m Word32 | Returns: the position of the selected item, or |
Gets the position of the selected item.
Since: 1.0
getSelectedItem
comboRowGetSelectedItem Source #
Arguments
| :: (HasCallStack, MonadIO m, IsComboRow a) | |
| => a |
|
| -> m (Maybe Object) | Returns: the selected item |
Gets the selected item.
Since: 1.0
getUseSubtitle
comboRowGetUseSubtitle Source #
Arguments
| :: (HasCallStack, MonadIO m, IsComboRow a) | |
| => a |
|
| -> 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
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m ComboRow | Returns: the newly created |
Creates a new AdwComboRow.
Since: 1.0
setExpression
comboRowSetExpression Source #
Arguments
| :: (HasCallStack, MonadIO m, IsComboRow a, IsExpression b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Sets the expression used to obtain strings from items.
The expression must have a value type of G_TYPE_STRING.
Since: 1.0
setFactory
Arguments
| :: (HasCallStack, MonadIO m, IsComboRow a, IsListItemFactory b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Sets the GtkListItemFactory to use for populating list items.
Since: 1.0
setListFactory
comboRowSetListFactory Source #
Arguments
| :: (HasCallStack, MonadIO m, IsComboRow a, IsListItemFactory b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Sets the GtkListItemFactory to use for populating list items in the popup.
Since: 1.0
setModel
Arguments
| :: (HasCallStack, MonadIO m, IsComboRow a, IsListModel b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Sets the ListModel to use.
Since: 1.0
setSelected
Arguments
| :: (HasCallStack, MonadIO m, IsComboRow a) | |
| => a |
|
| -> Word32 |
|
| -> m () |
Selects the item at the given position.
Since: 1.0
setUseSubtitle
comboRowSetUseSubtitle Source #
Arguments
| :: (HasCallStack, MonadIO m, IsComboRow a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether to use the current value as the subtitle.
Since: 1.0
Properties
expression
An expression used to obtain strings from items.
It's used to bind strings to labels produced by the default factory.
If ComboRow:factory is not set, the expression is also used to bind strings to labels produced by a default factory.
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
setcomboRow [ #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 ComboRow:listFactory 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
setcomboRow [ #factory:=value ]
listFactory
The factory for populating list items in the popup.
If this is not set, ComboRow: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
setcomboRow [ #listFactory:=value ]
model
Model for 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
setcomboRow [ #model:=value ]
selected
The position of the selected item.
If no item is selected, the property has the value
GTK_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
setcomboRow [ #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 ComboRow:expression.
If TRUE, you should not access ActionRow:subtitle.
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
setcomboRow [ #useSubtitle:=value ]