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 |
A ListBoxRow
used to choose from a list of items.
The HdyComboRow
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.
The [classcomboRow
] uses the model-view pattern; the list of valid choices
is specified in the form of a ListModel
, and the display of the
choices can be adapted to the data in the model via widget creation
functions.
HdyComboRow
is ListBoxRow:activatable if a model is set.
CSS nodes
HdyComboRow
has a main CSS node with name row
.
Its popover has the node name popover with the .combo
style class, it
contains a ScrolledWindow
, which in turn contains a
ListBox
, both are accessible via their regular nodes.
A checkmark of node and style class image.checkmark
in the popover denotes
the current item.
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
- comboRowBindModel :: (HasCallStack, MonadIO m, IsComboRow a, IsListModel b) => a -> Maybe b -> Maybe ListBoxCreateWidgetFunc -> Maybe ListBoxCreateWidgetFunc -> m ()
- comboRowBindNameModel :: (HasCallStack, MonadIO m, IsComboRow a, IsListModel b) => a -> Maybe b -> Maybe ComboRowGetNameFunc -> m ()
- comboRowGetModel :: (HasCallStack, MonadIO m, IsComboRow a) => a -> m (Maybe ListModel)
- comboRowGetSelectedIndex :: (HasCallStack, MonadIO m, IsComboRow a) => a -> m Int32
- comboRowGetUseSubtitle :: (HasCallStack, MonadIO m, IsComboRow a) => a -> m Bool
- comboRowNew :: (HasCallStack, MonadIO m) => m ComboRow
- comboRowSetForEnum :: (HasCallStack, MonadIO m, IsComboRow a) => a -> GType -> Maybe ComboRowGetEnumValueNameFunc -> m ()
- comboRowSetGetNameFunc :: (HasCallStack, MonadIO m, IsComboRow a) => a -> Maybe ComboRowGetNameFunc -> m ()
- comboRowSetSelectedIndex :: (HasCallStack, MonadIO m, IsComboRow a) => a -> Int32 -> m ()
- comboRowSetUseSubtitle :: (HasCallStack, MonadIO m, IsComboRow a) => a -> Bool -> m ()
- constructComboRowSelectedIndex :: (IsComboRow o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getComboRowSelectedIndex :: (MonadIO m, IsComboRow o) => o -> m Int32
- setComboRowSelectedIndex :: (MonadIO m, IsComboRow o) => o -> Int32 -> m ()
- 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.
Instances
Eq ComboRow Source # | |
GObject ComboRow Source # | |
Defined in GI.Handy.Objects.ComboRow | |
ManagedPtrNewtype ComboRow Source # | |
Defined in GI.Handy.Objects.ComboRow toManagedPtr :: ComboRow -> ManagedPtr ComboRow | |
TypedObject ComboRow Source # | |
Defined in GI.Handy.Objects.ComboRow | |
HasParentTypes ComboRow Source # | |
Defined in GI.Handy.Objects.ComboRow | |
IsGValue (Maybe ComboRow) Source # | Convert |
Defined in GI.Handy.Objects.ComboRow gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe ComboRow -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe ComboRow) | |
type ParentTypes ComboRow Source # | |
Defined in GI.Handy.Objects.ComboRow type ParentTypes ComboRow = '[ActionRow, PreferencesRow, ListBoxRow, Bin, Container, Widget, Object, ImplementorIface, Actionable, Buildable] |
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.Handy.Objects.ComboRow |
toComboRow :: (MonadIO m, IsComboRow o) => o -> m ComboRow Source #
Methods
Click to display all available methods, including inherited ones
Methods
activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addPrefix, addTickCallback, bindModel, bindNameModel, bindProperty, bindPropertyFull, canActivateAccel, changed, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSelected, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getActionName, getActionTargetValue, getActivatable, getActivatableWidget, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getChild, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHeader, getHexpand, getHexpandSet, getIconName, getIndex, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModel, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getScaleFactor, getScreen, getSelectable, getSelectedIndex, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSubtitle, getSubtitleLines, getSupportMultidevice, getTemplateChild, getTitle, getTitleLines, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getUseSubtitle, getUseUnderline, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setActionName, setActionTargetValue, setActivatable, setActivatableWidget, setAllocation, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDetailedActionName, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setForEnum, setGetNameFunc, setHalign, setHasTooltip, setHasWindow, setHeader, setHexpand, setHexpandSet, setIconName, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setSelectable, setSelectedIndex, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSubtitle, setSubtitleLines, setSupportMultidevice, setTitle, setTitleLines, setTooltipMarkup, setTooltipText, setTooltipWindow, setUseSubtitle, setUseUnderline, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
bindModel
:: (HasCallStack, MonadIO m, IsComboRow a, IsListModel b) | |
=> a |
|
-> Maybe b |
|
-> Maybe ListBoxCreateWidgetFunc |
|
-> Maybe ListBoxCreateWidgetFunc |
|
-> m () |
Binds model
to self
.
If self
was already bound to a model, that previous binding is destroyed.
The contents of self
are cleared and then filled with widgets that represent
items from model
. self
is updated whenever model
changes. If model
is
NULL
, self
is left empty.
Since: 1.0
bindNameModel
comboRowBindNameModel Source #
:: (HasCallStack, MonadIO m, IsComboRow a, IsListModel b) | |
=> a |
|
-> Maybe b |
|
-> Maybe ComboRowGetNameFunc |
|
-> m () |
Binds model
to self
.
If self
was already bound to a model, that previous binding is destroyed.
The contents of self
are cleared and then filled with widgets that represent
items from model
. self
is updated whenever model
changes. If model
is
NULL
, self
is left empty.
This is more convenient to use than [methodcomboRow
.bind_model] if you want
to represent items of the model with names.
Since: 1.0
getModel
:: (HasCallStack, MonadIO m, IsComboRow a) | |
=> a |
|
-> m (Maybe ListModel) | Returns: the |
Gets the model bound to self
.
Since: 1.0
getSelectedIndex
comboRowGetSelectedIndex Source #
:: (HasCallStack, MonadIO m, IsComboRow a) | |
=> a |
|
-> m Int32 | Returns: the index of the selected item, or -1 if no item is selected |
Gets the index of the selected item in its ListModel
.
Since: 1.0
getUseSubtitle
comboRowGetUseSubtitle Source #
:: (HasCallStack, MonadIO m, IsComboRow a) | |
=> a |
|
-> m Bool | Returns: whether the current value of |
Gets whether the current value of self
should be displayed as its subtitle.
Since: 1.0
new
:: (HasCallStack, MonadIO m) | |
=> m ComboRow | Returns: the newly created |
Creates a new HdyComboRow
.
Since: 1.0
setForEnum
:: (HasCallStack, MonadIO m, IsComboRow a) | |
=> a |
|
-> GType |
|
-> Maybe ComboRowGetEnumValueNameFunc |
|
-> m () |
Creates a model for enumType
and binds it to self
.
The items of the model will be [classenumValueObject
] objects.
If self
was already bound to a model, that previous binding is destroyed.
The contents of self
are cleared and then filled with widgets that represent
items from model
. self
is updated whenever model
changes. If model
is
NULL
, self
is left empty.
This is more convenient to use than [methodcomboRow
.bind_name_model] if you
want to represent values of an enumeration with names.
See [funcenumValueRowName
].
Since: 1.0
setGetNameFunc
comboRowSetGetNameFunc Source #
:: (HasCallStack, MonadIO m, IsComboRow a) | |
=> a |
|
-> Maybe ComboRowGetNameFunc |
|
-> m () |
Sets a closure to convert items into names.
See [propertycomboRow
:use-subtitle].
Since: 1.0
setSelectedIndex
comboRowSetSelectedIndex Source #
:: (HasCallStack, MonadIO m, IsComboRow a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the index of the selected item in its ListModel
.
Since: 1.0
setUseSubtitle
comboRowSetUseSubtitle Source #
:: (HasCallStack, MonadIO m, IsComboRow a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the current value of self
should be displayed as its subtitle.
If TRUE
, you should not access [propertyactionRow
:subtitle].
Since: 1.0
Properties
selectedIndex
The index of the selected item in its ListModel
.
Since: 1.0
constructComboRowSelectedIndex :: (IsComboRow o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “selected-index
” property. This is rarely needed directly, but it is used by new
.
getComboRowSelectedIndex :: (MonadIO m, IsComboRow o) => o -> m Int32 Source #
Get the value of the “selected-index
” property.
When overloading is enabled, this is equivalent to
get
comboRow #selectedIndex
setComboRowSelectedIndex :: (MonadIO m, IsComboRow o) => o -> Int32 -> m () Source #
Set the value of the “selected-index
” property.
When overloading is enabled, this is equivalent to
set
comboRow [ #selectedIndex:=
value ]
useSubtitle
Whether to use the current value as the subtitle.
If you use a custom widget creation function, you will need to give the row
a name conversion closure with [methodcomboRow
.set_get_name_func].
If TRUE
, you should not access [propertyactionRow
: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
set
comboRow [ #useSubtitle:=
value ]