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

GI.Gtk.Interfaces.CellEditable

Description

The CellEditable interface must be implemented for widgets to be usable to edit the contents of a TreeView cell. It provides a way to specify how temporary widgets should be configured for editing, get the new value, etc.

Synopsis

Exported types

newtype CellEditable Source #

Memory-managed wrapper type.

Constructors

CellEditable (ManagedPtr CellEditable) 

Instances

Instances details
Eq CellEditable Source # 
Instance details

Defined in GI.Gtk.Interfaces.CellEditable

Methods

(==) :: CellEditable -> CellEditable -> Bool

(/=) :: CellEditable -> CellEditable -> Bool

GObject CellEditable Source # 
Instance details

Defined in GI.Gtk.Interfaces.CellEditable

ManagedPtrNewtype CellEditable Source # 
Instance details

Defined in GI.Gtk.Interfaces.CellEditable

Methods

toManagedPtr :: CellEditable -> ManagedPtr CellEditable

TypedObject CellEditable Source # 
Instance details

Defined in GI.Gtk.Interfaces.CellEditable

Methods

glibType :: IO GType

IsGValue CellEditable Source #

Convert CellEditable to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Interfaces.CellEditable

Methods

toGValue :: CellEditable -> IO GValue

fromGValue :: GValue -> IO CellEditable

HasParentTypes CellEditable Source # 
Instance details

Defined in GI.Gtk.Interfaces.CellEditable

type ParentTypes CellEditable Source # 
Instance details

Defined in GI.Gtk.Interfaces.CellEditable

type ParentTypes CellEditable = '[Object, Widget]

class (GObject o, IsDescendantOf CellEditable o) => IsCellEditable o Source #

Type class for types which can be safely cast to CellEditable, for instance with toCellEditable.

Instances

Instances details
(GObject o, IsDescendantOf CellEditable o) => IsCellEditable o Source # 
Instance details

Defined in GI.Gtk.Interfaces.CellEditable

toCellEditable :: (MonadIO m, IsCellEditable o) => o -> m CellEditable Source #

Cast to CellEditable, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

editingDone

cellEditableEditingDone Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellEditable a) 
=> a

cellEditable: A CellEditable

-> m () 

Emits the editingDone signal.

removeWidget

cellEditableRemoveWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellEditable a) 
=> a

cellEditable: A CellEditable

-> m () 

Emits the removeWidget signal.

startEditing

cellEditableStartEditing Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellEditable a) 
=> a

cellEditable: A CellEditable

-> Maybe Event

event: The Event that began the editing process, or Nothing if editing was initiated programmatically

-> m () 

Begins editing on a cellEditable.

The CellRenderer for the cell creates and returns a CellEditable from cellRendererStartEditing, configured for the CellRenderer type.

cellEditableStartEditing can then set up cellEditable suitably for editing a cell, e.g. making the Esc key emit editingDone.

Note that the cellEditable is created on-demand for the current edit; its lifetime is temporary and does not persist across other edits and/or cells.

Properties

editingCanceled

Indicates whether editing on the cell has been canceled.

Since: 2.20

constructCellEditableEditingCanceled :: (IsCellEditable o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “editing-canceled” property. This is rarely needed directly, but it is used by new.

getCellEditableEditingCanceled :: (MonadIO m, IsCellEditable o) => o -> m Bool Source #

Get the value of the “editing-canceled” property. When overloading is enabled, this is equivalent to

get cellEditable #editingCanceled

setCellEditableEditingCanceled :: (MonadIO m, IsCellEditable o) => o -> Bool -> m () Source #

Set the value of the “editing-canceled” property. When overloading is enabled, this is equivalent to

set cellEditable [ #editingCanceled := value ]

Signals

editingDone

type C_CellEditableEditingDoneCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type CellEditableEditingDoneCallback = IO () Source #

This signal is a sign for the cell renderer to update its value from the cellEditable.

Implementations of CellEditable are responsible for emitting this signal when they are done editing, e.g. Entry emits this signal when the user presses Enter. Typical things to do in a handler for editingDone are to capture the edited value, disconnect the cellEditable from signals on the CellRenderer, etc.

cellEditableEditingDone is a convenience method for emitting editingDone.

afterCellEditableEditingDone :: (IsCellEditable a, MonadIO m) => a -> CellEditableEditingDoneCallback -> m SignalHandlerId Source #

Connect a signal handler for the editingDone signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after cellEditable #editingDone callback

onCellEditableEditingDone :: (IsCellEditable a, MonadIO m) => a -> CellEditableEditingDoneCallback -> m SignalHandlerId Source #

Connect a signal handler for the editingDone signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on cellEditable #editingDone callback

removeWidget

type C_CellEditableRemoveWidgetCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type CellEditableRemoveWidgetCallback = IO () Source #

This signal is meant to indicate that the cell is finished editing, and the cellEditable widget is being removed and may subsequently be destroyed.

Implementations of CellEditable are responsible for emitting this signal when they are done editing. It must be emitted after the editingDone signal, to give the cell renderer a chance to update the cell's value before the widget is removed.

cellEditableRemoveWidget is a convenience method for emitting removeWidget.

afterCellEditableRemoveWidget :: (IsCellEditable a, MonadIO m) => a -> CellEditableRemoveWidgetCallback -> m SignalHandlerId Source #

Connect a signal handler for the removeWidget signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after cellEditable #removeWidget callback

onCellEditableRemoveWidget :: (IsCellEditable a, MonadIO m) => a -> CellEditableRemoveWidgetCallback -> m SignalHandlerId Source #

Connect a signal handler for the removeWidget signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on cellEditable #removeWidget callback