Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gtk.Objects.ComboBox
Contents
- Exported types
- Methods
- getActive
- getActiveId
- getActiveIter
- getAddTearoffs
- getButtonSensitivity
- getColumnSpanColumn
- getEntryTextColumn
- getFocusOnClick
- getHasEntry
- getIdColumn
- getModel
- getPopupAccessible
- getPopupFixedWidth
- getRowSpanColumn
- getTitle
- getWrapWidth
- new
- newWithArea
- newWithAreaAndEntry
- newWithEntry
- newWithModel
- newWithModelAndEntry
- popdown
- popup
- popupForDevice
- setActive
- setActiveId
- setActiveIter
- setAddTearoffs
- setButtonSensitivity
- setColumnSpanColumn
- setEntryTextColumn
- setFocusOnClick
- setIdColumn
- setModel
- setPopupFixedWidth
- setRowSeparatorFunc
- setRowSpanColumn
- setTitle
- setWrapWidth
- Properties
- Signals
Description
A GtkComboBox is a widget that allows the user to choose from a list of valid choices. The GtkComboBox displays the selected choice. When activated, the GtkComboBox displays a popup which allows the user to make a new choice. The style in which the selected value is displayed, and the style of the popup is determined by the current theme. It may be similar to a Windows-style combo box.
The GtkComboBox uses the model-view pattern; the list of valid choices
is specified in the form of a tree model, and the display of the choices
can be adapted to the data in the model by using cell renderers, as you
would in a tree view. This is possible since GtkComboBox implements the
CellLayout
interface. The tree model holding the valid choices is
not restricted to a flat list, it can be a real tree, and the popup will
reflect the tree structure.
To allow the user to enter values not in the model, the “has-entry”
property allows the GtkComboBox to contain a Entry
. This entry
can be accessed by calling binGetChild
on the combo box.
For a simple list of textual choices, the model-view API of GtkComboBox
can be a bit overwhelming. In this case, ComboBoxText
offers a
simple alternative. Both GtkComboBox and ComboBoxText
can contain
an entry.
CSS nodes
plain code
combobox ├── box.linked │ ╰── button.combo │ ╰── box │ ├── cellview │ ╰── arrow ╰── window.popup
A normal combobox contains a box with the .linked class, a button with the .combo class and inside those buttons, there are a cellview and an arrow.
plain code
combobox ├── box.linked │ ├── entry.combo │ ╰── button.combo │ ╰── box │ ╰── arrow ╰── window.popup
A GtkComboBox with an entry has a single CSS node with name combobox. It contains a box with the .linked class. That box contains an entry and a button, both with the .combo class added. The button also contains another node with name arrow.
- newtype ComboBox = ComboBox (ManagedPtr ComboBox)
- class GObject o => IsComboBox o
- toComboBox :: (MonadIO m, IsComboBox o) => o -> m ComboBox
- noComboBox :: Maybe ComboBox
- comboBoxGetActive :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m Int32
- comboBoxGetActiveId :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m (Maybe Text)
- comboBoxGetActiveIter :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m (Bool, TreeIter)
- comboBoxGetAddTearoffs :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m Bool
- comboBoxGetButtonSensitivity :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m SensitivityType
- comboBoxGetColumnSpanColumn :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m Int32
- comboBoxGetEntryTextColumn :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m Int32
- comboBoxGetFocusOnClick :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m Bool
- comboBoxGetHasEntry :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m Bool
- comboBoxGetIdColumn :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m Int32
- comboBoxGetModel :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m TreeModel
- comboBoxGetPopupAccessible :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m Object
- comboBoxGetPopupFixedWidth :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m Bool
- comboBoxGetRowSpanColumn :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m Int32
- comboBoxGetTitle :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m Text
- comboBoxGetWrapWidth :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m Int32
- comboBoxNew :: (HasCallStack, MonadIO m) => m ComboBox
- comboBoxNewWithArea :: (HasCallStack, MonadIO m, IsCellArea a) => a -> m ComboBox
- comboBoxNewWithAreaAndEntry :: (HasCallStack, MonadIO m, IsCellArea a) => a -> m ComboBox
- comboBoxNewWithEntry :: (HasCallStack, MonadIO m) => m ComboBox
- comboBoxNewWithModel :: (HasCallStack, MonadIO m, IsTreeModel a) => a -> m ComboBox
- comboBoxNewWithModelAndEntry :: (HasCallStack, MonadIO m, IsTreeModel a) => a -> m ComboBox
- comboBoxPopdown :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m ()
- comboBoxPopup :: (HasCallStack, MonadIO m, IsComboBox a) => a -> m ()
- comboBoxPopupForDevice :: (HasCallStack, MonadIO m, IsComboBox a, IsDevice b) => a -> b -> m ()
- comboBoxSetActive :: (HasCallStack, MonadIO m, IsComboBox a) => a -> Int32 -> m ()
- comboBoxSetActiveId :: (HasCallStack, MonadIO m, IsComboBox a) => a -> Maybe Text -> m Bool
- comboBoxSetActiveIter :: (HasCallStack, MonadIO m, IsComboBox a) => a -> Maybe TreeIter -> m ()
- comboBoxSetAddTearoffs :: (HasCallStack, MonadIO m, IsComboBox a) => a -> Bool -> m ()
- comboBoxSetButtonSensitivity :: (HasCallStack, MonadIO m, IsComboBox a) => a -> SensitivityType -> m ()
- comboBoxSetColumnSpanColumn :: (HasCallStack, MonadIO m, IsComboBox a) => a -> Int32 -> m ()
- comboBoxSetEntryTextColumn :: (HasCallStack, MonadIO m, IsComboBox a) => a -> Int32 -> m ()
- comboBoxSetFocusOnClick :: (HasCallStack, MonadIO m, IsComboBox a) => a -> Bool -> m ()
- comboBoxSetIdColumn :: (HasCallStack, MonadIO m, IsComboBox a) => a -> Int32 -> m ()
- comboBoxSetModel :: (HasCallStack, MonadIO m, IsComboBox a, IsTreeModel b) => a -> Maybe b -> m ()
- comboBoxSetPopupFixedWidth :: (HasCallStack, MonadIO m, IsComboBox a) => a -> Bool -> m ()
- comboBoxSetRowSeparatorFunc :: (HasCallStack, MonadIO m, IsComboBox a) => a -> TreeViewRowSeparatorFunc -> m ()
- comboBoxSetRowSpanColumn :: (HasCallStack, MonadIO m, IsComboBox a) => a -> Int32 -> m ()
- comboBoxSetTitle :: (HasCallStack, MonadIO m, IsComboBox a) => a -> Text -> m ()
- comboBoxSetWrapWidth :: (HasCallStack, MonadIO m, IsComboBox a) => a -> Int32 -> m ()
- constructComboBoxActive :: IsComboBox o => Int32 -> IO (GValueConstruct o)
- getComboBoxActive :: (MonadIO m, IsComboBox o) => o -> m Int32
- setComboBoxActive :: (MonadIO m, IsComboBox o) => o -> Int32 -> m ()
- clearComboBoxActiveId :: (MonadIO m, IsComboBox o) => o -> m ()
- constructComboBoxActiveId :: IsComboBox o => Text -> IO (GValueConstruct o)
- getComboBoxActiveId :: (MonadIO m, IsComboBox o) => o -> m (Maybe Text)
- setComboBoxActiveId :: (MonadIO m, IsComboBox o) => o -> Text -> m ()
- constructComboBoxAddTearoffs :: IsComboBox o => Bool -> IO (GValueConstruct o)
- getComboBoxAddTearoffs :: (MonadIO m, IsComboBox o) => o -> m Bool
- setComboBoxAddTearoffs :: (MonadIO m, IsComboBox o) => o -> Bool -> m ()
- constructComboBoxButtonSensitivity :: IsComboBox o => SensitivityType -> IO (GValueConstruct o)
- getComboBoxButtonSensitivity :: (MonadIO m, IsComboBox o) => o -> m SensitivityType
- setComboBoxButtonSensitivity :: (MonadIO m, IsComboBox o) => o -> SensitivityType -> m ()
- constructComboBoxCellArea :: (IsComboBox o, IsCellArea a) => a -> IO (GValueConstruct o)
- getComboBoxCellArea :: (MonadIO m, IsComboBox o) => o -> m (Maybe CellArea)
- constructComboBoxColumnSpanColumn :: IsComboBox o => Int32 -> IO (GValueConstruct o)
- getComboBoxColumnSpanColumn :: (MonadIO m, IsComboBox o) => o -> m Int32
- setComboBoxColumnSpanColumn :: (MonadIO m, IsComboBox o) => o -> Int32 -> m ()
- constructComboBoxEntryTextColumn :: IsComboBox o => Int32 -> IO (GValueConstruct o)
- getComboBoxEntryTextColumn :: (MonadIO m, IsComboBox o) => o -> m Int32
- setComboBoxEntryTextColumn :: (MonadIO m, IsComboBox o) => o -> Int32 -> m ()
- constructComboBoxHasEntry :: IsComboBox o => Bool -> IO (GValueConstruct o)
- getComboBoxHasEntry :: (MonadIO m, IsComboBox o) => o -> m Bool
- constructComboBoxHasFrame :: IsComboBox o => Bool -> IO (GValueConstruct o)
- getComboBoxHasFrame :: (MonadIO m, IsComboBox o) => o -> m Bool
- setComboBoxHasFrame :: (MonadIO m, IsComboBox o) => o -> Bool -> m ()
- constructComboBoxIdColumn :: IsComboBox o => Int32 -> IO (GValueConstruct o)
- getComboBoxIdColumn :: (MonadIO m, IsComboBox o) => o -> m Int32
- setComboBoxIdColumn :: (MonadIO m, IsComboBox o) => o -> Int32 -> m ()
- clearComboBoxModel :: (MonadIO m, IsComboBox o) => o -> m ()
- constructComboBoxModel :: (IsComboBox o, IsTreeModel a) => a -> IO (GValueConstruct o)
- getComboBoxModel :: (MonadIO m, IsComboBox o) => o -> m TreeModel
- setComboBoxModel :: (MonadIO m, IsComboBox o, IsTreeModel a) => o -> a -> m ()
- constructComboBoxPopupFixedWidth :: IsComboBox o => Bool -> IO (GValueConstruct o)
- getComboBoxPopupFixedWidth :: (MonadIO m, IsComboBox o) => o -> m Bool
- setComboBoxPopupFixedWidth :: (MonadIO m, IsComboBox o) => o -> Bool -> m ()
- getComboBoxPopupShown :: (MonadIO m, IsComboBox o) => o -> m Bool
- constructComboBoxRowSpanColumn :: IsComboBox o => Int32 -> IO (GValueConstruct o)
- getComboBoxRowSpanColumn :: (MonadIO m, IsComboBox o) => o -> m Int32
- setComboBoxRowSpanColumn :: (MonadIO m, IsComboBox o) => o -> Int32 -> m ()
- clearComboBoxTearoffTitle :: (MonadIO m, IsComboBox o) => o -> m ()
- constructComboBoxTearoffTitle :: IsComboBox o => Text -> IO (GValueConstruct o)
- getComboBoxTearoffTitle :: (MonadIO m, IsComboBox o) => o -> m (Maybe Text)
- setComboBoxTearoffTitle :: (MonadIO m, IsComboBox o) => o -> Text -> m ()
- constructComboBoxWrapWidth :: IsComboBox o => Int32 -> IO (GValueConstruct o)
- getComboBoxWrapWidth :: (MonadIO m, IsComboBox o) => o -> m Int32
- setComboBoxWrapWidth :: (MonadIO m, IsComboBox o) => o -> Int32 -> m ()
- type C_ComboBoxChangedCallback = Ptr () -> Ptr () -> IO ()
- type ComboBoxChangedCallback = IO ()
- afterComboBoxChanged :: (IsComboBox a, MonadIO m) => a -> ComboBoxChangedCallback -> m SignalHandlerId
- genClosure_ComboBoxChanged :: ComboBoxChangedCallback -> IO Closure
- mk_ComboBoxChangedCallback :: C_ComboBoxChangedCallback -> IO (FunPtr C_ComboBoxChangedCallback)
- noComboBoxChangedCallback :: Maybe ComboBoxChangedCallback
- onComboBoxChanged :: (IsComboBox a, MonadIO m) => a -> ComboBoxChangedCallback -> m SignalHandlerId
- wrap_ComboBoxChangedCallback :: ComboBoxChangedCallback -> Ptr () -> Ptr () -> IO ()
- type C_ComboBoxFormatEntryTextCallback = Ptr () -> CString -> Ptr () -> IO CString
- type ComboBoxFormatEntryTextCallback = Text -> IO Text
- afterComboBoxFormatEntryText :: (IsComboBox a, MonadIO m) => a -> ComboBoxFormatEntryTextCallback -> m SignalHandlerId
- genClosure_ComboBoxFormatEntryText :: ComboBoxFormatEntryTextCallback -> IO Closure
- mk_ComboBoxFormatEntryTextCallback :: C_ComboBoxFormatEntryTextCallback -> IO (FunPtr C_ComboBoxFormatEntryTextCallback)
- noComboBoxFormatEntryTextCallback :: Maybe ComboBoxFormatEntryTextCallback
- onComboBoxFormatEntryText :: (IsComboBox a, MonadIO m) => a -> ComboBoxFormatEntryTextCallback -> m SignalHandlerId
- wrap_ComboBoxFormatEntryTextCallback :: ComboBoxFormatEntryTextCallback -> Ptr () -> CString -> Ptr () -> IO CString
- type C_ComboBoxMoveActiveCallback = Ptr () -> CUInt -> Ptr () -> IO ()
- type ComboBoxMoveActiveCallback = ScrollType -> IO ()
- afterComboBoxMoveActive :: (IsComboBox a, MonadIO m) => a -> ComboBoxMoveActiveCallback -> m SignalHandlerId
- genClosure_ComboBoxMoveActive :: ComboBoxMoveActiveCallback -> IO Closure
- mk_ComboBoxMoveActiveCallback :: C_ComboBoxMoveActiveCallback -> IO (FunPtr C_ComboBoxMoveActiveCallback)
- noComboBoxMoveActiveCallback :: Maybe ComboBoxMoveActiveCallback
- onComboBoxMoveActive :: (IsComboBox a, MonadIO m) => a -> ComboBoxMoveActiveCallback -> m SignalHandlerId
- wrap_ComboBoxMoveActiveCallback :: ComboBoxMoveActiveCallback -> Ptr () -> CUInt -> Ptr () -> IO ()
- type C_ComboBoxPopdownCallback = Ptr () -> Ptr () -> IO CInt
- type ComboBoxPopdownCallback = IO Bool
- afterComboBoxPopdown :: (IsComboBox a, MonadIO m) => a -> ComboBoxPopdownCallback -> m SignalHandlerId
- genClosure_ComboBoxPopdown :: ComboBoxPopdownCallback -> IO Closure
- mk_ComboBoxPopdownCallback :: C_ComboBoxPopdownCallback -> IO (FunPtr C_ComboBoxPopdownCallback)
- noComboBoxPopdownCallback :: Maybe ComboBoxPopdownCallback
- onComboBoxPopdown :: (IsComboBox a, MonadIO m) => a -> ComboBoxPopdownCallback -> m SignalHandlerId
- wrap_ComboBoxPopdownCallback :: ComboBoxPopdownCallback -> Ptr () -> Ptr () -> IO CInt
- type C_ComboBoxPopupCallback = Ptr () -> Ptr () -> IO ()
- type ComboBoxPopupCallback = IO ()
- afterComboBoxPopup :: (IsComboBox a, MonadIO m) => a -> ComboBoxPopupCallback -> m SignalHandlerId
- genClosure_ComboBoxPopup :: ComboBoxPopupCallback -> IO Closure
- mk_ComboBoxPopupCallback :: C_ComboBoxPopupCallback -> IO (FunPtr C_ComboBoxPopupCallback)
- noComboBoxPopupCallback :: Maybe ComboBoxPopupCallback
- onComboBoxPopup :: (IsComboBox a, MonadIO m) => a -> ComboBoxPopupCallback -> m SignalHandlerId
- wrap_ComboBoxPopupCallback :: ComboBoxPopupCallback -> Ptr () -> Ptr () -> IO ()
Exported types
Constructors
ComboBox (ManagedPtr ComboBox) |
Instances
class GObject o => IsComboBox o Source #
Instances
toComboBox :: (MonadIO m, IsComboBox o) => o -> m ComboBox Source #
Methods
getActive
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m Int32 | Returns: An integer which is the index of the currently active item, or -1 if there’s no active item. |
Returns the index of the currently active item, or -1 if there’s no
active item. If the model is a non-flat treemodel, and the active item
is not an immediate child of the root of the tree, this function returns
gtk_tree_path_get_indices (path)[0]
, where
path
is the TreePath
of the active item.
Since: 2.4
getActiveId
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m (Maybe Text) | Returns: the ID of the active row, or |
Returns the ID of the active row of comboBox
. This value is taken
from the active row and the column specified by the ComboBox
:id-column
property of comboBox
(see comboBoxSetIdColumn
).
The returned value is an interned string which means that you can compare the pointer by value to other interned strings and that you must not free it.
If the ComboBox
:id-column
property of comboBox
is not set, or if
no row is active, or if the active row has a Nothing
ID value, then Nothing
is returned.
Since: 3.0
getActiveIter
comboBoxGetActiveIter Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m (Bool, TreeIter) | Returns: |
Sets iter
to point to the current active item, if it exists.
Since: 2.4
getAddTearoffs
comboBoxGetAddTearoffs Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m Bool | Returns: the current value of the :add-tearoffs property. |
Deprecated: (Since version 3.10)
Gets the current value of the :add-tearoffs property.
getButtonSensitivity
comboBoxGetButtonSensitivity Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m SensitivityType | Returns: |
Returns whether the combo box sets the dropdown button sensitive or not when there are no items in the model.
Since: 2.14
getColumnSpanColumn
comboBoxGetColumnSpanColumn Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m Int32 | Returns: the column span column. |
Returns the column with column span information for comboBox
.
Since: 2.6
getEntryTextColumn
comboBoxGetEntryTextColumn Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m Int32 | Returns: A column in the data source model of |
Returns the column which comboBox
is using to get the strings
from to display in the internal entry.
Since: 2.24
getFocusOnClick
comboBoxGetFocusOnClick Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.20)Use widgetGetFocusOnClick
instead
Returns whether the combo box grabs focus when it is clicked
with the mouse. See comboBoxSetFocusOnClick
.
Since: 2.6
getHasEntry
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m Bool | Returns: whether there is an entry in |
Returns whether the combo box has an entry.
Since: 2.24
getIdColumn
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m Int32 | Returns: A column in the data source model of |
Returns the column which comboBox
is using to get string IDs
for values from.
Since: 3.0
getModel
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m TreeModel | Returns: A |
Returns the TreeModel
which is acting as data source for comboBox
.
Since: 2.4
getPopupAccessible
comboBoxGetPopupAccessible Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m Object | Returns: the accessible object corresponding to the combo box’s popup. |
Gets the accessible object corresponding to the combo box’s popup.
This function is mostly intended for use by accessibility technologies; applications should have little use for it.
Since: 2.6
getPopupFixedWidth
comboBoxGetPopupFixedWidth Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether the popup uses a fixed width matching the allocated width of the combo box.
Since: 3.0
getRowSpanColumn
comboBoxGetRowSpanColumn Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m Int32 | Returns: the row span column. |
Returns the column with row span information for comboBox
.
Since: 2.6
getTitle
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m Text | Returns: the menu’s title in tearoff mode. This is an internal copy of the string which must not be freed. |
Deprecated: (Since version 3.10)
Gets the current title of the menu in tearoff mode. See
comboBoxSetAddTearoffs
.
Since: 2.10
getWrapWidth
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m Int32 | Returns: the wrap width. |
Returns the wrap width which is used to determine the number of columns for the popup menu. If the wrap width is larger than 1, the combo box is in table mode.
Since: 2.6
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> m ComboBox | Returns: A new |
Creates a new empty ComboBox
.
Since: 2.4
newWithArea
Arguments
:: (HasCallStack, MonadIO m, IsCellArea a) | |
=> a |
|
-> m ComboBox | Returns: A new |
Creates a new empty ComboBox
using area
to layout cells.
newWithAreaAndEntry
comboBoxNewWithAreaAndEntry Source #
Arguments
:: (HasCallStack, MonadIO m, IsCellArea a) | |
=> a |
|
-> m ComboBox | Returns: A new |
Creates a new empty ComboBox
with an entry.
The new combo box will use area
to layout cells.
newWithEntry
Arguments
:: (HasCallStack, MonadIO m) | |
=> m ComboBox | Returns: A new |
Creates a new empty ComboBox
with an entry.
Since: 2.24
newWithModel
Arguments
:: (HasCallStack, MonadIO m, IsTreeModel a) | |
=> a |
|
-> m ComboBox | Returns: A new |
Creates a new ComboBox
with the model initialized to model
.
Since: 2.4
newWithModelAndEntry
comboBoxNewWithModelAndEntry Source #
Arguments
:: (HasCallStack, MonadIO m, IsTreeModel a) | |
=> a |
|
-> m ComboBox | Returns: A new |
Creates a new empty ComboBox
with an entry
and with the model initialized to model
.
Since: 2.24
popdown
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m () |
Hides the menu or dropdown list of comboBox
.
This function is mostly intended for use by accessibility technologies; applications should have little use for it.
Since: 2.4
popup
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> m () |
Pops up the menu or dropdown list of comboBox
.
This function is mostly intended for use by accessibility technologies; applications should have little use for it.
Before calling this, comboBox
must be mapped, or nothing will happen.
Since: 2.4
popupForDevice
comboBoxPopupForDevice Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a, IsDevice b) | |
=> a |
|
-> b |
|
-> m () |
Pops up the menu or dropdown list of comboBox
, the popup window
will be grabbed so only device
and its associated pointer/keyboard
are the only GdkDevices
able to send events to it.
Since: 3.0
setActive
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the active item of comboBox
to be the item at index
.
Since: 2.4
setActiveId
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> Maybe Text |
|
-> m Bool | Returns: |
Changes the active row of comboBox
to the one that has an ID equal to
activeId
, or unsets the active row if activeId
is Nothing
. Rows having
a Nothing
ID string cannot be made active by this function.
If the ComboBox
:id-column
property of comboBox
is unset or if no
row has the given ID then the function does nothing and returns False
.
Since: 3.0
setActiveIter
comboBoxSetActiveIter Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> Maybe TreeIter | |
-> m () |
Sets the current active item to be the one referenced by iter
, or
unsets the active item if iter
is Nothing
.
Since: 2.4
setAddTearoffs
comboBoxSetAddTearoffs Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> Bool |
|
-> m () |
Deprecated: (Since version 3.10)
Sets whether the popup menu should have a tearoff menu item.
Since: 2.6
setButtonSensitivity
comboBoxSetButtonSensitivity Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> SensitivityType |
|
-> m () |
Sets whether the dropdown button of the combo box should be
always sensitive (SensitivityTypeOn
), never sensitive (SensitivityTypeOff
)
or only if there is at least one item to display (SensitivityTypeAuto
).
Since: 2.14
setColumnSpanColumn
comboBoxSetColumnSpanColumn Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the column with column span information for comboBox
to be
columnSpan
. The column span column contains integers which indicate
how many columns an item should span.
Since: 2.4
setEntryTextColumn
comboBoxSetEntryTextColumn Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> Int32 |
|
-> m () |
setFocusOnClick
comboBoxSetFocusOnClick Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> Bool |
|
-> m () |
Deprecated: (Since version 3.20)Use widgetSetFocusOnClick
instead
Sets whether the combo box will grab focus when it is clicked with the mouse. Making mouse clicks not grab focus is useful in places like toolbars where you don’t want the keyboard focus removed from the main area of the application.
Since: 2.6
setIdColumn
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the model column which comboBox
should use to get string IDs
for values from. The column idColumn
in the model of comboBox
must be of type G_TYPE_STRING
.
Since: 3.0
setModel
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a, IsTreeModel b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the model used by comboBox
to be model
. Will unset a previously set
model (if applicable). If model is Nothing
, then it will unset the model.
Note that this function does not clear the cell renderers, you have to
call cellLayoutClear
yourself if you need to set up different
cell renderers for the new model.
Since: 2.4
setPopupFixedWidth
comboBoxSetPopupFixedWidth Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> Bool |
|
-> m () |
Specifies whether the popup’s width should be a fixed width matching the allocated width of the combo box.
Since: 3.0
setRowSeparatorFunc
comboBoxSetRowSeparatorFunc Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> TreeViewRowSeparatorFunc |
|
-> m () |
Sets the row separator function, which is used to determine
whether a row should be drawn as a separator. If the row separator
function is Nothing
, no separators are drawn. This is the default value.
Since: 2.6
setRowSpanColumn
comboBoxSetRowSpanColumn Source #
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the column with row span information for comboBox
to be rowSpan
.
The row span column contains integers which indicate how many rows
an item should span.
Since: 2.4
setTitle
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> Text |
|
-> m () |
Deprecated: (Since version 3.10)
Sets the menu’s title in tearoff mode.
Since: 2.10
setWrapWidth
Arguments
:: (HasCallStack, MonadIO m, IsComboBox a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the wrap width of comboBox
to be width
. The wrap width is basically
the preferred number of columns when you want the popup to be layed out
in a table.
Since: 2.4
Properties
active
constructComboBoxActive :: IsComboBox o => Int32 -> IO (GValueConstruct o) Source #
getComboBoxActive :: (MonadIO m, IsComboBox o) => o -> m Int32 Source #
setComboBoxActive :: (MonadIO m, IsComboBox o) => o -> Int32 -> m () Source #
activeId
clearComboBoxActiveId :: (MonadIO m, IsComboBox o) => o -> m () Source #
constructComboBoxActiveId :: IsComboBox o => Text -> IO (GValueConstruct o) Source #
getComboBoxActiveId :: (MonadIO m, IsComboBox o) => o -> m (Maybe Text) Source #
setComboBoxActiveId :: (MonadIO m, IsComboBox o) => o -> Text -> m () Source #
addTearoffs
constructComboBoxAddTearoffs :: IsComboBox o => Bool -> IO (GValueConstruct o) Source #
getComboBoxAddTearoffs :: (MonadIO m, IsComboBox o) => o -> m Bool Source #
setComboBoxAddTearoffs :: (MonadIO m, IsComboBox o) => o -> Bool -> m () Source #
buttonSensitivity
constructComboBoxButtonSensitivity :: IsComboBox o => SensitivityType -> IO (GValueConstruct o) Source #
getComboBoxButtonSensitivity :: (MonadIO m, IsComboBox o) => o -> m SensitivityType Source #
setComboBoxButtonSensitivity :: (MonadIO m, IsComboBox o) => o -> SensitivityType -> m () Source #
cellArea
constructComboBoxCellArea :: (IsComboBox o, IsCellArea a) => a -> IO (GValueConstruct o) Source #
getComboBoxCellArea :: (MonadIO m, IsComboBox o) => o -> m (Maybe CellArea) Source #
columnSpanColumn
constructComboBoxColumnSpanColumn :: IsComboBox o => Int32 -> IO (GValueConstruct o) Source #
getComboBoxColumnSpanColumn :: (MonadIO m, IsComboBox o) => o -> m Int32 Source #
setComboBoxColumnSpanColumn :: (MonadIO m, IsComboBox o) => o -> Int32 -> m () Source #
entryTextColumn
constructComboBoxEntryTextColumn :: IsComboBox o => Int32 -> IO (GValueConstruct o) Source #
getComboBoxEntryTextColumn :: (MonadIO m, IsComboBox o) => o -> m Int32 Source #
setComboBoxEntryTextColumn :: (MonadIO m, IsComboBox o) => o -> Int32 -> m () Source #
hasEntry
constructComboBoxHasEntry :: IsComboBox o => Bool -> IO (GValueConstruct o) Source #
getComboBoxHasEntry :: (MonadIO m, IsComboBox o) => o -> m Bool Source #
hasFrame
constructComboBoxHasFrame :: IsComboBox o => Bool -> IO (GValueConstruct o) Source #
getComboBoxHasFrame :: (MonadIO m, IsComboBox o) => o -> m Bool Source #
setComboBoxHasFrame :: (MonadIO m, IsComboBox o) => o -> Bool -> m () Source #
idColumn
constructComboBoxIdColumn :: IsComboBox o => Int32 -> IO (GValueConstruct o) Source #
getComboBoxIdColumn :: (MonadIO m, IsComboBox o) => o -> m Int32 Source #
setComboBoxIdColumn :: (MonadIO m, IsComboBox o) => o -> Int32 -> m () Source #
model
clearComboBoxModel :: (MonadIO m, IsComboBox o) => o -> m () Source #
constructComboBoxModel :: (IsComboBox o, IsTreeModel a) => a -> IO (GValueConstruct o) Source #
getComboBoxModel :: (MonadIO m, IsComboBox o) => o -> m TreeModel Source #
setComboBoxModel :: (MonadIO m, IsComboBox o, IsTreeModel a) => o -> a -> m () Source #
popupFixedWidth
constructComboBoxPopupFixedWidth :: IsComboBox o => Bool -> IO (GValueConstruct o) Source #
getComboBoxPopupFixedWidth :: (MonadIO m, IsComboBox o) => o -> m Bool Source #
setComboBoxPopupFixedWidth :: (MonadIO m, IsComboBox o) => o -> Bool -> m () Source #
popupShown
getComboBoxPopupShown :: (MonadIO m, IsComboBox o) => o -> m Bool Source #
rowSpanColumn
constructComboBoxRowSpanColumn :: IsComboBox o => Int32 -> IO (GValueConstruct o) Source #
getComboBoxRowSpanColumn :: (MonadIO m, IsComboBox o) => o -> m Int32 Source #
setComboBoxRowSpanColumn :: (MonadIO m, IsComboBox o) => o -> Int32 -> m () Source #
tearoffTitle
clearComboBoxTearoffTitle :: (MonadIO m, IsComboBox o) => o -> m () Source #
constructComboBoxTearoffTitle :: IsComboBox o => Text -> IO (GValueConstruct o) Source #
getComboBoxTearoffTitle :: (MonadIO m, IsComboBox o) => o -> m (Maybe Text) Source #
setComboBoxTearoffTitle :: (MonadIO m, IsComboBox o) => o -> Text -> m () Source #
wrapWidth
constructComboBoxWrapWidth :: IsComboBox o => Int32 -> IO (GValueConstruct o) Source #
getComboBoxWrapWidth :: (MonadIO m, IsComboBox o) => o -> m Int32 Source #
setComboBoxWrapWidth :: (MonadIO m, IsComboBox o) => o -> Int32 -> m () Source #
Signals
changed
type ComboBoxChangedCallback = IO () Source #
afterComboBoxChanged :: (IsComboBox a, MonadIO m) => a -> ComboBoxChangedCallback -> m SignalHandlerId Source #
mk_ComboBoxChangedCallback :: C_ComboBoxChangedCallback -> IO (FunPtr C_ComboBoxChangedCallback) Source #
onComboBoxChanged :: (IsComboBox a, MonadIO m) => a -> ComboBoxChangedCallback -> m SignalHandlerId Source #
wrap_ComboBoxChangedCallback :: ComboBoxChangedCallback -> Ptr () -> Ptr () -> IO () Source #
formatEntryText
afterComboBoxFormatEntryText :: (IsComboBox a, MonadIO m) => a -> ComboBoxFormatEntryTextCallback -> m SignalHandlerId Source #
mk_ComboBoxFormatEntryTextCallback :: C_ComboBoxFormatEntryTextCallback -> IO (FunPtr C_ComboBoxFormatEntryTextCallback) Source #
onComboBoxFormatEntryText :: (IsComboBox a, MonadIO m) => a -> ComboBoxFormatEntryTextCallback -> m SignalHandlerId Source #
wrap_ComboBoxFormatEntryTextCallback :: ComboBoxFormatEntryTextCallback -> Ptr () -> CString -> Ptr () -> IO CString Source #
moveActive
type ComboBoxMoveActiveCallback = ScrollType -> IO () Source #
afterComboBoxMoveActive :: (IsComboBox a, MonadIO m) => a -> ComboBoxMoveActiveCallback -> m SignalHandlerId Source #
mk_ComboBoxMoveActiveCallback :: C_ComboBoxMoveActiveCallback -> IO (FunPtr C_ComboBoxMoveActiveCallback) Source #
onComboBoxMoveActive :: (IsComboBox a, MonadIO m) => a -> ComboBoxMoveActiveCallback -> m SignalHandlerId Source #
wrap_ComboBoxMoveActiveCallback :: ComboBoxMoveActiveCallback -> Ptr () -> CUInt -> Ptr () -> IO () Source #
popdown
type ComboBoxPopdownCallback = IO Bool Source #
afterComboBoxPopdown :: (IsComboBox a, MonadIO m) => a -> ComboBoxPopdownCallback -> m SignalHandlerId Source #
mk_ComboBoxPopdownCallback :: C_ComboBoxPopdownCallback -> IO (FunPtr C_ComboBoxPopdownCallback) Source #
onComboBoxPopdown :: (IsComboBox a, MonadIO m) => a -> ComboBoxPopdownCallback -> m SignalHandlerId Source #
wrap_ComboBoxPopdownCallback :: ComboBoxPopdownCallback -> Ptr () -> Ptr () -> IO CInt Source #
popup
type ComboBoxPopupCallback = IO () Source #
afterComboBoxPopup :: (IsComboBox a, MonadIO m) => a -> ComboBoxPopupCallback -> m SignalHandlerId Source #
onComboBoxPopup :: (IsComboBox a, MonadIO m) => a -> ComboBoxPopupCallback -> m SignalHandlerId Source #
wrap_ComboBoxPopupCallback :: ComboBoxPopupCallback -> Ptr () -> Ptr () -> IO () Source #