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.Gtk.Objects.DropDown
Description
GtkDropDown
is a widget that allows the user to choose an item
from a list of options.
The GtkDropDown
displays the [selected]DropDown:selected
choice.
The options are given to GtkDropDown
in the form of GListModel
and how the individual options are represented is determined by
a ListItemFactory
. The default factory displays simple strings,
and adds a checkmark to the selected item in the popup.
To set your own factory, use dropDownSetFactory
. It is
possible to use a separate factory for the items in the popup, with
dropDownSetListFactory
.
GtkDropDown
knows how to obtain strings from the items in a
StringList
; for other models, you have to provide an expression
to find the strings via dropDownSetExpression
.
GtkDropDown
can optionally allow search in the popup, which is
useful if the list of options is long. To enable the search entry,
use dropDownSetEnableSearch
.
Here is a UI definition example for GtkDropDown
with a simple model:
xml code
<object class="GtkDropDown"> <property name="model"> <object class="GtkStringList"> <items> <item translatable="yes">Factory</item> <item translatable="yes">Home</item> <item translatable="yes">Subway</item> </items> </object> </property> </object>
If a GtkDropDown
is created in this manner, or with
dropDownNewFromStrings
, for instance, the object returned from
dropDownGetSelectedItem
will be a StringObject
.
To learn more about the list widget framework, see the overview.
CSS nodes
GtkDropDown
has a single CSS node with name dropdown,
with the button and popover nodes as children.
Accessibility
GtkDropDown
uses the AccessibleRoleComboBox
role.
Synopsis
- newtype DropDown = DropDown (ManagedPtr DropDown)
- class (GObject o, IsDescendantOf DropDown o) => IsDropDown o
- toDropDown :: (MonadIO m, IsDropDown o) => o -> m DropDown
- dropDownGetEnableSearch :: (HasCallStack, MonadIO m, IsDropDown a) => a -> m Bool
- dropDownGetExpression :: (HasCallStack, MonadIO m, IsDropDown a) => a -> m (Maybe Expression)
- dropDownGetFactory :: (HasCallStack, MonadIO m, IsDropDown a) => a -> m (Maybe ListItemFactory)
- dropDownGetHeaderFactory :: (HasCallStack, MonadIO m, IsDropDown a) => a -> m (Maybe ListItemFactory)
- dropDownGetListFactory :: (HasCallStack, MonadIO m, IsDropDown a) => a -> m (Maybe ListItemFactory)
- dropDownGetModel :: (HasCallStack, MonadIO m, IsDropDown a) => a -> m (Maybe ListModel)
- dropDownGetSearchMatchMode :: (HasCallStack, MonadIO m, IsDropDown a) => a -> m StringFilterMatchMode
- dropDownGetSelected :: (HasCallStack, MonadIO m, IsDropDown a) => a -> m Word32
- dropDownGetSelectedItem :: (HasCallStack, MonadIO m, IsDropDown a) => a -> m (Maybe Object)
- dropDownGetShowArrow :: (HasCallStack, MonadIO m, IsDropDown a) => a -> m Bool
- dropDownNew :: (HasCallStack, MonadIO m, IsListModel a, IsExpression b) => Maybe a -> Maybe b -> m DropDown
- dropDownNewFromStrings :: (HasCallStack, MonadIO m) => [Text] -> m DropDown
- dropDownSetEnableSearch :: (HasCallStack, MonadIO m, IsDropDown a) => a -> Bool -> m ()
- dropDownSetExpression :: (HasCallStack, MonadIO m, IsDropDown a, IsExpression b) => a -> Maybe b -> m ()
- dropDownSetFactory :: (HasCallStack, MonadIO m, IsDropDown a, IsListItemFactory b) => a -> Maybe b -> m ()
- dropDownSetHeaderFactory :: (HasCallStack, MonadIO m, IsDropDown a, IsListItemFactory b) => a -> Maybe b -> m ()
- dropDownSetListFactory :: (HasCallStack, MonadIO m, IsDropDown a, IsListItemFactory b) => a -> Maybe b -> m ()
- dropDownSetModel :: (HasCallStack, MonadIO m, IsDropDown a, IsListModel b) => a -> Maybe b -> m ()
- dropDownSetSearchMatchMode :: (HasCallStack, MonadIO m, IsDropDown a) => a -> StringFilterMatchMode -> m ()
- dropDownSetSelected :: (HasCallStack, MonadIO m, IsDropDown a) => a -> Word32 -> m ()
- dropDownSetShowArrow :: (HasCallStack, MonadIO m, IsDropDown a) => a -> Bool -> m ()
- constructDropDownEnableSearch :: (IsDropDown o, MonadIO m) => Bool -> m (GValueConstruct o)
- getDropDownEnableSearch :: (MonadIO m, IsDropDown o) => o -> m Bool
- setDropDownEnableSearch :: (MonadIO m, IsDropDown o) => o -> Bool -> m ()
- clearDropDownExpression :: (MonadIO m, IsDropDown o) => o -> m ()
- constructDropDownExpression :: (IsDropDown o, MonadIO m, IsExpression a) => a -> m (GValueConstruct o)
- getDropDownExpression :: (MonadIO m, IsDropDown o) => o -> m (Maybe Expression)
- setDropDownExpression :: (MonadIO m, IsDropDown o, IsExpression a) => o -> a -> m ()
- clearDropDownFactory :: (MonadIO m, IsDropDown o) => o -> m ()
- constructDropDownFactory :: (IsDropDown o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o)
- getDropDownFactory :: (MonadIO m, IsDropDown o) => o -> m (Maybe ListItemFactory)
- setDropDownFactory :: (MonadIO m, IsDropDown o, IsListItemFactory a) => o -> a -> m ()
- clearDropDownHeaderFactory :: (MonadIO m, IsDropDown o) => o -> m ()
- constructDropDownHeaderFactory :: (IsDropDown o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o)
- getDropDownHeaderFactory :: (MonadIO m, IsDropDown o) => o -> m (Maybe ListItemFactory)
- setDropDownHeaderFactory :: (MonadIO m, IsDropDown o, IsListItemFactory a) => o -> a -> m ()
- clearDropDownListFactory :: (MonadIO m, IsDropDown o) => o -> m ()
- constructDropDownListFactory :: (IsDropDown o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o)
- getDropDownListFactory :: (MonadIO m, IsDropDown o) => o -> m (Maybe ListItemFactory)
- setDropDownListFactory :: (MonadIO m, IsDropDown o, IsListItemFactory a) => o -> a -> m ()
- clearDropDownModel :: (MonadIO m, IsDropDown o) => o -> m ()
- constructDropDownModel :: (IsDropDown o, MonadIO m, IsListModel a) => a -> m (GValueConstruct o)
- getDropDownModel :: (MonadIO m, IsDropDown o) => o -> m (Maybe ListModel)
- setDropDownModel :: (MonadIO m, IsDropDown o, IsListModel a) => o -> a -> m ()
- constructDropDownSearchMatchMode :: (IsDropDown o, MonadIO m) => StringFilterMatchMode -> m (GValueConstruct o)
- getDropDownSearchMatchMode :: (MonadIO m, IsDropDown o) => o -> m StringFilterMatchMode
- setDropDownSearchMatchMode :: (MonadIO m, IsDropDown o) => o -> StringFilterMatchMode -> m ()
- constructDropDownSelected :: (IsDropDown o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getDropDownSelected :: (MonadIO m, IsDropDown o) => o -> m Word32
- setDropDownSelected :: (MonadIO m, IsDropDown o) => o -> Word32 -> m ()
- getDropDownSelectedItem :: (MonadIO m, IsDropDown o) => o -> m (Maybe Object)
- constructDropDownShowArrow :: (IsDropDown o, MonadIO m) => Bool -> m (GValueConstruct o)
- getDropDownShowArrow :: (MonadIO m, IsDropDown o) => o -> m Bool
- setDropDownShowArrow :: (MonadIO m, IsDropDown o) => o -> Bool -> m ()
- type DropDownActivateCallback = IO ()
- afterDropDownActivate :: (IsDropDown a, MonadIO m) => a -> ((?self :: a) => DropDownActivateCallback) -> m SignalHandlerId
- onDropDownActivate :: (IsDropDown a, MonadIO m) => a -> ((?self :: a) => DropDownActivateCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq DropDown Source # | |
GObject DropDown Source # | |
Defined in GI.Gtk.Objects.DropDown | |
ManagedPtrNewtype DropDown Source # | |
Defined in GI.Gtk.Objects.DropDown Methods toManagedPtr :: DropDown -> ManagedPtr DropDown | |
TypedObject DropDown Source # | |
Defined in GI.Gtk.Objects.DropDown | |
HasParentTypes DropDown Source # | |
Defined in GI.Gtk.Objects.DropDown | |
IsGValue (Maybe DropDown) Source # | Convert |
Defined in GI.Gtk.Objects.DropDown Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe DropDown -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe DropDown) | |
type ParentTypes DropDown Source # | |
Defined in GI.Gtk.Objects.DropDown |
class (GObject o, IsDescendantOf DropDown o) => IsDropDown o Source #
Type class for types which can be safely cast to DropDown
, for instance with toDropDown
.
Instances
(GObject o, IsDescendantOf DropDown o) => IsDropDown o Source # | |
Defined in GI.Gtk.Objects.DropDown |
toDropDown :: (MonadIO m, IsDropDown o) => o -> m DropDown Source #
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, 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, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getEnableSearch, getExpression, getFactory, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeaderFactory, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getListFactory, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getModel, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSearchMatchMode, getSelected, getSelectedItem, getSensitive, getSettings, getShowArrow, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setAccessibleParent, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setEnableSearch, setExpression, setFactory, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHeaderFactory, setHexpand, setHexpandSet, setLayoutManager, setListFactory, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setModel, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSearchMatchMode, setSelected, setSensitive, setShowArrow, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.
getEnableSearch
dropDownGetEnableSearch Source #
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether search is enabled.
getExpression
dropDownGetExpression Source #
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> m (Maybe Expression) | Returns: a |
Gets the expression set that is used to obtain strings from items.
getFactory
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> m (Maybe ListItemFactory) | Returns: The factory in use |
Gets the factory that's currently used to populate list items.
The factory returned by this function is always used for the item in the button. It is also used for items in the popup if DropDown:listFactory is not set.
getHeaderFactory
dropDownGetHeaderFactory Source #
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> m (Maybe ListItemFactory) | Returns: The factory in use |
Gets the factory that's currently used to create header widgets for the popup.
Since: 4.12
getListFactory
dropDownGetListFactory Source #
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> m (Maybe ListItemFactory) | Returns: The factory in use |
Gets the factory that's currently used to populate list items in the popup.
getModel
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> m (Maybe ListModel) | Returns: The model in use |
Gets the model that provides the displayed items.
getSearchMatchMode
dropDownGetSearchMatchMode Source #
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> m StringFilterMatchMode | Returns: the match mode of the search filter |
Returns the match mode that the search filter is using.
Since: 4.12
getSelected
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> m Word32 | Returns: the position of the selected item, or |
Gets the position of the selected item.
getSelectedItem
dropDownGetSelectedItem Source #
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> m (Maybe Object) | Returns: The selected item |
Gets the selected item. If no item is selected, Nothing
is returned.
getShowArrow
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether to show an arrow within the widget.
Since: 4.6
new
Arguments
:: (HasCallStack, MonadIO m, IsListModel a, IsExpression b) | |
=> Maybe a |
|
-> Maybe b |
|
-> m DropDown | Returns: a new |
Creates a new GtkDropDown
.
You may want to call dropDownSetFactory
to set up a way to map its items to widgets.
newFromStrings
dropDownNewFromStrings Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> [Text] |
|
-> m DropDown | Returns: a new |
Creates a new GtkDropDown
that is populated with
the strings.
setEnableSearch
dropDownSetEnableSearch Source #
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether a search entry will be shown in the popup that allows to search for items in the list.
Note that DropDown:expression must be set for search to work.
setExpression
dropDownSetExpression Source #
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a, IsExpression b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the expression that gets evaluated to obtain strings from items.
This is used for search in the popup. The expression must have
a value type of G_TYPE_STRING
.
setFactory
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a, IsListItemFactory b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the GtkListItemFactory
to use for populating list items.
setHeaderFactory
dropDownSetHeaderFactory Source #
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a, IsListItemFactory b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the GtkListItemFactory
to use for creating header widgets for the popup.
Since: 4.12
setListFactory
dropDownSetListFactory Source #
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a, IsListItemFactory b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the GtkListItemFactory
to use for populating list items in the popup.
setModel
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a, IsListModel b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the GListModel
to use.
setSearchMatchMode
dropDownSetSearchMatchMode Source #
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> StringFilterMatchMode |
|
-> m () |
Sets the match mode for the search filter.
Since: 4.12
setSelected
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> Word32 |
|
-> m () |
Selects the item at the given position.
setShowArrow
Arguments
:: (HasCallStack, MonadIO m, IsDropDown a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether an arrow will be displayed within the widget.
Since: 4.6
Properties
enableSearch
Whether to show a search entry in the popup.
Note that search requires DropDown:expression to be set.
constructDropDownEnableSearch :: (IsDropDown o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “enable-search
” property. This is rarely needed directly, but it is used by new
.
getDropDownEnableSearch :: (MonadIO m, IsDropDown o) => o -> m Bool Source #
Get the value of the “enable-search
” property.
When overloading is enabled, this is equivalent to
get
dropDown #enableSearch
setDropDownEnableSearch :: (MonadIO m, IsDropDown o) => o -> Bool -> m () Source #
Set the value of the “enable-search
” property.
When overloading is enabled, this is equivalent to
set
dropDown [ #enableSearch:=
value ]
expression
An expression to evaluate to obtain strings to match against the search term.
See DropDown:enableSearch for how to enable search. If DropDown:factory is not set, the expression is also used to bind strings to labels produced by a default factory.
clearDropDownExpression :: (MonadIO m, IsDropDown o) => o -> m () Source #
Set the value of the “expression
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#expression
constructDropDownExpression :: (IsDropDown 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
.
getDropDownExpression :: (MonadIO m, IsDropDown o) => o -> m (Maybe Expression) Source #
Get the value of the “expression
” property.
When overloading is enabled, this is equivalent to
get
dropDown #expression
setDropDownExpression :: (MonadIO m, IsDropDown o, IsExpression a) => o -> a -> m () Source #
Set the value of the “expression
” property.
When overloading is enabled, this is equivalent to
set
dropDown [ #expression:=
value ]
factory
Factory for populating list items.
clearDropDownFactory :: (MonadIO m, IsDropDown o) => o -> m () Source #
Set the value of the “factory
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#factory
constructDropDownFactory :: (IsDropDown 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
.
getDropDownFactory :: (MonadIO m, IsDropDown o) => o -> m (Maybe ListItemFactory) Source #
Get the value of the “factory
” property.
When overloading is enabled, this is equivalent to
get
dropDown #factory
setDropDownFactory :: (MonadIO m, IsDropDown o, IsListItemFactory a) => o -> a -> m () Source #
Set the value of the “factory
” property.
When overloading is enabled, this is equivalent to
set
dropDown [ #factory:=
value ]
headerFactory
The factory for creating header widgets for the popup.
Since: 4.12
clearDropDownHeaderFactory :: (MonadIO m, IsDropDown o) => o -> m () Source #
Set the value of the “header-factory
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#headerFactory
constructDropDownHeaderFactory :: (IsDropDown o, MonadIO m, IsListItemFactory a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “header-factory
” property. This is rarely needed directly, but it is used by new
.
getDropDownHeaderFactory :: (MonadIO m, IsDropDown o) => o -> m (Maybe ListItemFactory) Source #
Get the value of the “header-factory
” property.
When overloading is enabled, this is equivalent to
get
dropDown #headerFactory
setDropDownHeaderFactory :: (MonadIO m, IsDropDown o, IsListItemFactory a) => o -> a -> m () Source #
Set the value of the “header-factory
” property.
When overloading is enabled, this is equivalent to
set
dropDown [ #headerFactory:=
value ]
listFactory
The factory for populating list items in the popup.
If this is not set, DropDown:factory is used.
clearDropDownListFactory :: (MonadIO m, IsDropDown o) => o -> m () Source #
Set the value of the “list-factory
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#listFactory
constructDropDownListFactory :: (IsDropDown 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
.
getDropDownListFactory :: (MonadIO m, IsDropDown o) => o -> m (Maybe ListItemFactory) Source #
Get the value of the “list-factory
” property.
When overloading is enabled, this is equivalent to
get
dropDown #listFactory
setDropDownListFactory :: (MonadIO m, IsDropDown o, IsListItemFactory a) => o -> a -> m () Source #
Set the value of the “list-factory
” property.
When overloading is enabled, this is equivalent to
set
dropDown [ #listFactory:=
value ]
model
Model for the displayed items.
clearDropDownModel :: (MonadIO m, IsDropDown o) => o -> m () Source #
Set the value of the “model
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#model
constructDropDownModel :: (IsDropDown 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
.
getDropDownModel :: (MonadIO m, IsDropDown o) => o -> m (Maybe ListModel) Source #
Get the value of the “model
” property.
When overloading is enabled, this is equivalent to
get
dropDown #model
setDropDownModel :: (MonadIO m, IsDropDown o, IsListModel a) => o -> a -> m () Source #
Set the value of the “model
” property.
When overloading is enabled, this is equivalent to
set
dropDown [ #model:=
value ]
searchMatchMode
The match mode for the search filter.
Since: 4.12
constructDropDownSearchMatchMode :: (IsDropDown o, MonadIO m) => StringFilterMatchMode -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “search-match-mode
” property. This is rarely needed directly, but it is used by new
.
getDropDownSearchMatchMode :: (MonadIO m, IsDropDown o) => o -> m StringFilterMatchMode Source #
Get the value of the “search-match-mode
” property.
When overloading is enabled, this is equivalent to
get
dropDown #searchMatchMode
setDropDownSearchMatchMode :: (MonadIO m, IsDropDown o) => o -> StringFilterMatchMode -> m () Source #
Set the value of the “search-match-mode
” property.
When overloading is enabled, this is equivalent to
set
dropDown [ #searchMatchMode:=
value ]
selected
The position of the selected item.
If no item is selected, the property has the value
INVALID_LIST_POSITION
.
constructDropDownSelected :: (IsDropDown 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
.
getDropDownSelected :: (MonadIO m, IsDropDown o) => o -> m Word32 Source #
Get the value of the “selected
” property.
When overloading is enabled, this is equivalent to
get
dropDown #selected
setDropDownSelected :: (MonadIO m, IsDropDown o) => o -> Word32 -> m () Source #
Set the value of the “selected
” property.
When overloading is enabled, this is equivalent to
set
dropDown [ #selected:=
value ]
selectedItem
The selected item.
getDropDownSelectedItem :: (MonadIO m, IsDropDown o) => o -> m (Maybe Object) Source #
Get the value of the “selected-item
” property.
When overloading is enabled, this is equivalent to
get
dropDown #selectedItem
showArrow
Whether to show an arrow within the GtkDropDown widget.
Since: 4.6
constructDropDownShowArrow :: (IsDropDown o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “show-arrow
” property. This is rarely needed directly, but it is used by new
.
getDropDownShowArrow :: (MonadIO m, IsDropDown o) => o -> m Bool Source #
Get the value of the “show-arrow
” property.
When overloading is enabled, this is equivalent to
get
dropDown #showArrow
setDropDownShowArrow :: (MonadIO m, IsDropDown o) => o -> Bool -> m () Source #
Set the value of the “show-arrow
” property.
When overloading is enabled, this is equivalent to
set
dropDown [ #showArrow:=
value ]
Signals
activate
type DropDownActivateCallback = IO () Source #
Emitted to when the drop down is activated.
The ::activate
signal on GtkDropDown
is an action signal and
emitting it causes the drop down to pop up its dropdown.
Since: 4.6
afterDropDownActivate :: (IsDropDown a, MonadIO m) => a -> ((?self :: a) => DropDownActivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the activate signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
dropDown #activate callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onDropDownActivate :: (IsDropDown a, MonadIO m) => a -> ((?self :: a) => DropDownActivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the activate signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
dropDown #activate callback