Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
CellRendererCombo
renders text in a cell like CellRendererText
from
which it is derived. But while CellRendererText
offers a simple entry to
edit the text, CellRendererCombo
offers a ComboBox
widget to edit the text. The values to display in the combo box are taken from
the tree model specified in the CellRendererCombo
:model
property.
The combo cell renderer takes care of adding a text cell renderer to the combo
box and sets it to display the column specified by its
CellRendererCombo
:text-column
property. Further properties of the combo box
can be set in a handler for the editingStarted signal.
The CellRendererCombo
cell renderer was added in GTK+ 2.6.
Synopsis
- newtype CellRendererCombo = CellRendererCombo (ManagedPtr CellRendererCombo)
- class (GObject o, IsDescendantOf CellRendererCombo o) => IsCellRendererCombo o
- toCellRendererCombo :: (MonadIO m, IsCellRendererCombo o) => o -> m CellRendererCombo
- cellRendererComboNew :: (HasCallStack, MonadIO m) => m CellRendererCombo
- constructCellRendererComboHasEntry :: (IsCellRendererCombo o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererComboHasEntry :: (MonadIO m, IsCellRendererCombo o) => o -> m Bool
- setCellRendererComboHasEntry :: (MonadIO m, IsCellRendererCombo o) => o -> Bool -> m ()
- clearCellRendererComboModel :: (MonadIO m, IsCellRendererCombo o) => o -> m ()
- constructCellRendererComboModel :: (IsCellRendererCombo o, MonadIO m, IsTreeModel a) => a -> m (GValueConstruct o)
- getCellRendererComboModel :: (MonadIO m, IsCellRendererCombo o) => o -> m (Maybe TreeModel)
- setCellRendererComboModel :: (MonadIO m, IsCellRendererCombo o, IsTreeModel a) => o -> a -> m ()
- constructCellRendererComboTextColumn :: (IsCellRendererCombo o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getCellRendererComboTextColumn :: (MonadIO m, IsCellRendererCombo o) => o -> m Int32
- setCellRendererComboTextColumn :: (MonadIO m, IsCellRendererCombo o) => o -> Int32 -> m ()
- type C_CellRendererComboChangedCallback = Ptr () -> CString -> Ptr TreeIter -> Ptr () -> IO ()
- type CellRendererComboChangedCallback = Text -> TreeIter -> IO ()
- afterCellRendererComboChanged :: (IsCellRendererCombo a, MonadIO m) => a -> CellRendererComboChangedCallback -> m SignalHandlerId
- genClosure_CellRendererComboChanged :: MonadIO m => CellRendererComboChangedCallback -> m (GClosure C_CellRendererComboChangedCallback)
- mk_CellRendererComboChangedCallback :: C_CellRendererComboChangedCallback -> IO (FunPtr C_CellRendererComboChangedCallback)
- noCellRendererComboChangedCallback :: Maybe CellRendererComboChangedCallback
- onCellRendererComboChanged :: (IsCellRendererCombo a, MonadIO m) => a -> CellRendererComboChangedCallback -> m SignalHandlerId
- wrap_CellRendererComboChangedCallback :: CellRendererComboChangedCallback -> C_CellRendererComboChangedCallback
Exported types
newtype CellRendererCombo Source #
Memory-managed wrapper type.
CellRendererCombo (ManagedPtr CellRendererCombo) |
Instances
Eq CellRendererCombo Source # | |
Defined in GI.Gtk.Objects.CellRendererCombo (==) :: CellRendererCombo -> CellRendererCombo -> Bool # (/=) :: CellRendererCombo -> CellRendererCombo -> Bool # | |
GObject CellRendererCombo Source # | |
Defined in GI.Gtk.Objects.CellRendererCombo | |
ManagedPtrNewtype CellRendererCombo Source # | |
Defined in GI.Gtk.Objects.CellRendererCombo toManagedPtr :: CellRendererCombo -> ManagedPtr CellRendererCombo | |
TypedObject CellRendererCombo Source # | |
Defined in GI.Gtk.Objects.CellRendererCombo | |
HasParentTypes CellRendererCombo Source # | |
Defined in GI.Gtk.Objects.CellRendererCombo | |
IsGValue (Maybe CellRendererCombo) Source # | Convert |
Defined in GI.Gtk.Objects.CellRendererCombo gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe CellRendererCombo -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe CellRendererCombo) | |
type ParentTypes CellRendererCombo Source # | |
Defined in GI.Gtk.Objects.CellRendererCombo |
class (GObject o, IsDescendantOf CellRendererCombo o) => IsCellRendererCombo o Source #
Type class for types which can be safely cast to CellRendererCombo
, for instance with toCellRendererCombo
.
Instances
(GObject o, IsDescendantOf CellRendererCombo o) => IsCellRendererCombo o Source # | |
Defined in GI.Gtk.Objects.CellRendererCombo |
toCellRendererCombo :: (MonadIO m, IsCellRendererCombo o) => o -> m CellRendererCombo Source #
Cast to CellRendererCombo
, 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
Methods
activate, bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isActivatable, isFloating, notify, notifyByPspec, ref, refSink, render, runDispose, startEditing, stealData, stealQdata, stopEditing, thawNotify, unref, watchClosure.
Getters
getAlignedArea, getAlignment, getData, getFixedSize, getPadding, getPreferredHeight, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRequestMode, getSensitive, getSize, getState, getVisible.
Setters
setAlignment, setData, setDataFull, setFixedHeightFromFont, setFixedSize, setPadding, setProperty, setSensitive, setVisible.
new
:: (HasCallStack, MonadIO m) | |
=> m CellRendererCombo | Returns: the new cell renderer |
Creates a new CellRendererCombo
.
Adjust how text is drawn using object properties.
Object properties can be set globally (with g_object_set()
).
Also, with TreeViewColumn
, you can bind a property to a value
in a TreeModel
. For example, you can bind the “text” property
on the cell renderer to a string value in the model, thus rendering
a different string in each row of the TreeView
.
Since: 2.6
Properties
hasEntry
If True
, the cell renderer will include an entry and allow to enter
values other than the ones in the popup list.
Since: 2.6
constructCellRendererComboHasEntry :: (IsCellRendererCombo o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “has-entry
” property. This is rarely needed directly, but it is used by new
.
getCellRendererComboHasEntry :: (MonadIO m, IsCellRendererCombo o) => o -> m Bool Source #
Get the value of the “has-entry
” property.
When overloading is enabled, this is equivalent to
get
cellRendererCombo #hasEntry
setCellRendererComboHasEntry :: (MonadIO m, IsCellRendererCombo o) => o -> Bool -> m () Source #
Set the value of the “has-entry
” property.
When overloading is enabled, this is equivalent to
set
cellRendererCombo [ #hasEntry:=
value ]
model
Holds a tree model containing the possible values for the combo box. Use the text_column property to specify the column holding the values.
Since: 2.6
clearCellRendererComboModel :: (MonadIO m, IsCellRendererCombo o) => o -> m () Source #
Set the value of the “model
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#model
constructCellRendererComboModel :: (IsCellRendererCombo o, MonadIO m, IsTreeModel 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
.
getCellRendererComboModel :: (MonadIO m, IsCellRendererCombo o) => o -> m (Maybe TreeModel) Source #
Get the value of the “model
” property.
When overloading is enabled, this is equivalent to
get
cellRendererCombo #model
setCellRendererComboModel :: (MonadIO m, IsCellRendererCombo o, IsTreeModel a) => o -> a -> m () Source #
Set the value of the “model
” property.
When overloading is enabled, this is equivalent to
set
cellRendererCombo [ #model:=
value ]
textColumn
Specifies the model column which holds the possible values for the combo box.
Note that this refers to the model specified in the model property, not the model backing the tree view to which this cell renderer is attached.
CellRendererCombo
automatically adds a text cell renderer for
this column to its combo box.
Since: 2.6
constructCellRendererComboTextColumn :: (IsCellRendererCombo o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “text-column
” property. This is rarely needed directly, but it is used by new
.
getCellRendererComboTextColumn :: (MonadIO m, IsCellRendererCombo o) => o -> m Int32 Source #
Get the value of the “text-column
” property.
When overloading is enabled, this is equivalent to
get
cellRendererCombo #textColumn
setCellRendererComboTextColumn :: (MonadIO m, IsCellRendererCombo o) => o -> Int32 -> m () Source #
Set the value of the “text-column
” property.
When overloading is enabled, this is equivalent to
set
cellRendererCombo [ #textColumn:=
value ]
Signals
changed
type C_CellRendererComboChangedCallback = Ptr () -> CString -> Ptr TreeIter -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type CellRendererComboChangedCallback Source #
= Text |
|
-> TreeIter |
|
-> IO () |
This signal is emitted each time after the user selected an item in
the combo box, either by using the mouse or the arrow keys. Contrary
to GtkComboBox, GtkCellRendererCombo[changed](#g:signal:changed) is not emitted for
changes made to a selected item in the entry. The argument newIter
corresponds to the newly selected item in the combo box and it is relative
to the GtkTreeModel set via the model property on GtkCellRendererCombo.
Note that as soon as you change the model displayed in the tree view, the tree view will immediately cease the editing operating. This means that you most probably want to refrain from changing the model until the combo cell renderer emits the edited or editing_canceled signal.
Since: 2.14
afterCellRendererComboChanged :: (IsCellRendererCombo a, MonadIO m) => a -> CellRendererComboChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
cellRendererCombo #changed callback
genClosure_CellRendererComboChanged :: MonadIO m => CellRendererComboChangedCallback -> m (GClosure C_CellRendererComboChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_CellRendererComboChangedCallback :: C_CellRendererComboChangedCallback -> IO (FunPtr C_CellRendererComboChangedCallback) Source #
Generate a function pointer callable from C code, from a C_CellRendererComboChangedCallback
.
noCellRendererComboChangedCallback :: Maybe CellRendererComboChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
CellRendererComboChangedCallback
onCellRendererComboChanged :: (IsCellRendererCombo a, MonadIO m) => a -> CellRendererComboChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
cellRendererCombo #changed callback