gi-gtk-3.0.37: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.CellRendererCombo

Description

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

Exported types

newtype CellRendererCombo Source #

Memory-managed wrapper type.

Constructors

CellRendererCombo (ManagedPtr CellRendererCombo) 

Instances

Instances details
Eq CellRendererCombo Source # 
Instance details

Defined in GI.Gtk.Objects.CellRendererCombo

GObject CellRendererCombo Source # 
Instance details

Defined in GI.Gtk.Objects.CellRendererCombo

ManagedPtrNewtype CellRendererCombo Source # 
Instance details

Defined in GI.Gtk.Objects.CellRendererCombo

TypedObject CellRendererCombo Source # 
Instance details

Defined in GI.Gtk.Objects.CellRendererCombo

Methods

glibType :: IO GType

HasParentTypes CellRendererCombo Source # 
Instance details

Defined in GI.Gtk.Objects.CellRendererCombo

IsGValue (Maybe CellRendererCombo) Source #

Convert CellRendererCombo to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.CellRendererCombo

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe CellRendererCombo -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe CellRendererCombo)

type ParentTypes CellRendererCombo Source # 
Instance details

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

Instances details
(GObject o, IsDescendantOf CellRendererCombo o) => IsCellRendererCombo o Source # 
Instance details

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

new

cellRendererComboNew Source #

Arguments

:: (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 #

Arguments

 = Text

pathString: a string of the path identifying the edited cell (relative to the tree view model)

-> TreeIter

newIter: the new iter selected in the combo box (relative to the combo box model)

-> 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

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