Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
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) => a -> Maybe Event -> 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 CellEditableEditingDoneCallback = IO ()
- afterCellEditableEditingDone :: (IsCellEditable a, MonadIO m) => a -> ((?self :: a) => CellEditableEditingDoneCallback) -> m SignalHandlerId
- onCellEditableEditingDone :: (IsCellEditable a, MonadIO m) => a -> ((?self :: a) => CellEditableEditingDoneCallback) -> m SignalHandlerId
- type CellEditableRemoveWidgetCallback = IO ()
- afterCellEditableRemoveWidget :: (IsCellEditable a, MonadIO m) => a -> ((?self :: a) => CellEditableRemoveWidgetCallback) -> m SignalHandlerId
- onCellEditableRemoveWidget :: (IsCellEditable a, MonadIO m) => a -> ((?self :: a) => CellEditableRemoveWidgetCallback) -> m SignalHandlerId
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
activate, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, childFocus, childNotify, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, editingDone, ensureStyle, errorBell, event, forceFloating, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, removeAccelerator, removeMnemonicLabel, removeTickCallback, removeWidget, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, startEditing, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getCanDefault, getCanFocus, getChildRequisition, getChildVisible, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusOnClick, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setAllocation, setAppPaintable, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusOnClick, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setProperty, setRealized, setReceivesDefault, setRedrawOnAllocate, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
editingDone
cellEditableEditingDone Source #
:: (HasCallStack, MonadIO m, IsCellEditable a) | |
=> a |
|
-> m () |
Emits the CellEditable::editingDone signal.
removeWidget
cellEditableRemoveWidget Source #
:: (HasCallStack, MonadIO m, IsCellEditable a) | |
=> a |
|
-> m () |
Emits the CellEditable::removeWidget signal.
startEditing
cellEditableStartEditing Source #
:: (HasCallStack, MonadIO m, IsCellEditable a) | |
=> a |
|
-> Maybe Event |
|
-> 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 CellEditable::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 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 CellEditable::editingDone.
afterCellEditableEditingDone :: (IsCellEditable a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onCellEditableEditingDone :: (IsCellEditable a, MonadIO m) => a -> ((?self :: 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 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 CellEditable::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 CellEditable::removeWidget.
afterCellEditableRemoveWidget :: (IsCellEditable a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onCellEditableRemoveWidget :: (IsCellEditable a, MonadIO m) => a -> ((?self :: 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