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 |
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
- newtype CellEditable = CellEditable (ManagedPtr CellEditable)
- class (GObject o, IsDescendantOf CellEditable o) => IsCellEditable o
- toCellEditable :: (MonadIO m, IsCellEditable o) => o -> m CellEditable
- cellEditableEditingDone :: (HasCallStack, MonadIO m, IsCellEditable a) => a -> m ()
- cellEditableRemoveWidget :: (HasCallStack, MonadIO m, IsCellEditable a) => a -> m ()
- cellEditableStartEditing :: (HasCallStack, MonadIO m, IsCellEditable a, IsEvent b) => a -> Maybe b -> m ()
- constructCellEditableEditingCanceled :: (IsCellEditable o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellEditableEditingCanceled :: (MonadIO m, IsCellEditable o) => o -> m Bool
- setCellEditableEditingCanceled :: (MonadIO m, IsCellEditable o) => o -> Bool -> m ()
- type C_CellEditableEditingDoneCallback = Ptr () -> Ptr () -> IO ()
- type CellEditableEditingDoneCallback = IO ()
- afterCellEditableEditingDone :: (IsCellEditable a, MonadIO m) => a -> CellEditableEditingDoneCallback -> m SignalHandlerId
- genClosure_CellEditableEditingDone :: MonadIO m => CellEditableEditingDoneCallback -> m (GClosure C_CellEditableEditingDoneCallback)
- mk_CellEditableEditingDoneCallback :: C_CellEditableEditingDoneCallback -> IO (FunPtr C_CellEditableEditingDoneCallback)
- noCellEditableEditingDoneCallback :: Maybe CellEditableEditingDoneCallback
- onCellEditableEditingDone :: (IsCellEditable a, MonadIO m) => a -> CellEditableEditingDoneCallback -> m SignalHandlerId
- wrap_CellEditableEditingDoneCallback :: CellEditableEditingDoneCallback -> C_CellEditableEditingDoneCallback
- type C_CellEditableRemoveWidgetCallback = Ptr () -> Ptr () -> IO ()
- type CellEditableRemoveWidgetCallback = IO ()
- afterCellEditableRemoveWidget :: (IsCellEditable a, MonadIO m) => a -> CellEditableRemoveWidgetCallback -> m SignalHandlerId
- genClosure_CellEditableRemoveWidget :: MonadIO m => CellEditableRemoveWidgetCallback -> m (GClosure C_CellEditableRemoveWidgetCallback)
- mk_CellEditableRemoveWidgetCallback :: C_CellEditableRemoveWidgetCallback -> IO (FunPtr C_CellEditableRemoveWidgetCallback)
- noCellEditableRemoveWidgetCallback :: Maybe CellEditableRemoveWidgetCallback
- onCellEditableRemoveWidget :: (IsCellEditable a, MonadIO m) => a -> CellEditableRemoveWidgetCallback -> m SignalHandlerId
- wrap_CellEditableRemoveWidgetCallback :: CellEditableRemoveWidgetCallback -> C_CellEditableRemoveWidgetCallback
Exported types
newtype CellEditable Source #
Memory-managed wrapper type.
CellEditable (ManagedPtr CellEditable) |
Instances
Eq CellEditable Source # | |
Defined in GI.Gtk.Interfaces.CellEditable (==) :: CellEditable -> CellEditable -> Bool # (/=) :: CellEditable -> CellEditable -> Bool # | |
GObject CellEditable Source # | |
Defined in GI.Gtk.Interfaces.CellEditable | |
ManagedPtrNewtype CellEditable Source # | |
Defined in GI.Gtk.Interfaces.CellEditable toManagedPtr :: CellEditable -> ManagedPtr CellEditable | |
TypedObject CellEditable Source # | |
Defined in GI.Gtk.Interfaces.CellEditable | |
HasParentTypes CellEditable Source # | |
Defined in GI.Gtk.Interfaces.CellEditable | |
IsGValue (Maybe CellEditable) Source # | Convert |
Defined in GI.Gtk.Interfaces.CellEditable gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe CellEditable -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe CellEditable) | |
type ParentTypes CellEditable Source # | |
Defined in GI.Gtk.Interfaces.CellEditable |
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
(GObject o, IsDescendantOf CellEditable o) => IsCellEditable o Source # | |
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
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, dragCheckThreshold, editingDone, 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, removeWidget, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, startEditing, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.
editingDone
cellEditableEditingDone Source #
:: (HasCallStack, MonadIO m, IsCellEditable a) | |
=> a |
|
-> m () |
Emits the editingDone signal.
removeWidget
cellEditableRemoveWidget Source #
:: (HasCallStack, MonadIO m, IsCellEditable a) | |
=> a |
|
-> m () |
Emits the removeWidget signal.
startEditing
cellEditableStartEditing Source #
:: (HasCallStack, MonadIO m, IsCellEditable a, IsEvent b) | |
=> a |
|
-> Maybe b |
|
-> 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.
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
genClosure_CellEditableEditingDone :: MonadIO m => CellEditableEditingDoneCallback -> m (GClosure C_CellEditableEditingDoneCallback) Source #
Wrap the callback into a GClosure
.
mk_CellEditableEditingDoneCallback :: C_CellEditableEditingDoneCallback -> IO (FunPtr C_CellEditableEditingDoneCallback) Source #
Generate a function pointer callable from C code, from a C_CellEditableEditingDoneCallback
.
noCellEditableEditingDoneCallback :: Maybe CellEditableEditingDoneCallback Source #
A convenience synonym for
.Nothing
:: Maybe
CellEditableEditingDoneCallback
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
wrap_CellEditableEditingDoneCallback :: CellEditableEditingDoneCallback -> C_CellEditableEditingDoneCallback Source #
Wrap a CellEditableEditingDoneCallback
into a C_CellEditableEditingDoneCallback
.
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
genClosure_CellEditableRemoveWidget :: MonadIO m => CellEditableRemoveWidgetCallback -> m (GClosure C_CellEditableRemoveWidgetCallback) Source #
Wrap the callback into a GClosure
.
mk_CellEditableRemoveWidgetCallback :: C_CellEditableRemoveWidgetCallback -> IO (FunPtr C_CellEditableRemoveWidgetCallback) Source #
Generate a function pointer callable from C code, from a C_CellEditableRemoveWidgetCallback
.
noCellEditableRemoveWidgetCallback :: Maybe CellEditableRemoveWidgetCallback Source #
A convenience synonym for
.Nothing
:: Maybe
CellEditableRemoveWidgetCallback
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