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

GI.Gtk.Objects.CellRenderer

Description

An object for rendering a single cell

The GtkCellRenderer is a base class of a set of objects used for rendering a cell to a cairo_t. These objects are used primarily by the GtkTreeView widget, though they aren’t tied to them in any specific way. It is worth noting that GtkCellRenderer is not a GtkWidget and cannot be treated as such.

The primary use of a GtkCellRenderer is for drawing a certain graphical elements on a cairo_t. Typically, one cell renderer is used to draw many cells on the screen. To this extent, it isn’t expected that a CellRenderer keep any permanent state around. Instead, any state is set just prior to use using GObjects property system. Then, the cell is measured using cellRendererGetPreferredSize. Finally, the cell is rendered in the correct location using cellRendererSnapshot.

There are a number of rules that must be followed when writing a new GtkCellRenderer. First and foremost, it’s important that a certain set of properties will always yield a cell renderer of the same size, barring a style change. The GtkCellRenderer also has a number of generic properties that are expected to be honored by all children.

Beyond merely rendering a cell, cell renderers can optionally provide active user interface elements. A cell renderer can be “activatable” like GtkCellRendererToggle, which toggles when it gets activated by a mouse click, or it can be “editable” like GtkCellRendererText, which allows the user to edit the text using a widget implementing the GtkCellEditable interface, e.g. GtkEntry. To make a cell renderer activatable or editable, you have to implement the GtkCellRendererClass.activate or GtkCellRendererClass.start_editing virtual functions, respectively.

Many properties of GtkCellRenderer and its subclasses have a corresponding “set” property, e.g. “cell-background-set” corresponds to “cell-background”. These “set” properties reflect whether a property has been set or not. You should not set them independently.

Synopsis

Exported types

newtype CellRenderer Source #

Memory-managed wrapper type.

Constructors

CellRenderer (ManagedPtr CellRenderer) 

Instances

Instances details
Eq CellRenderer Source # 
Instance details

Defined in GI.Gtk.Objects.CellRenderer

GObject CellRenderer Source # 
Instance details

Defined in GI.Gtk.Objects.CellRenderer

ManagedPtrNewtype CellRenderer Source # 
Instance details

Defined in GI.Gtk.Objects.CellRenderer

Methods

toManagedPtr :: CellRenderer -> ManagedPtr CellRenderer

TypedObject CellRenderer Source # 
Instance details

Defined in GI.Gtk.Objects.CellRenderer

Methods

glibType :: IO GType

HasParentTypes CellRenderer Source # 
Instance details

Defined in GI.Gtk.Objects.CellRenderer

IsGValue (Maybe CellRenderer) Source #

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

Instance details

Defined in GI.Gtk.Objects.CellRenderer

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes CellRenderer Source # 
Instance details

Defined in GI.Gtk.Objects.CellRenderer

type ParentTypes CellRenderer = '[Object]

class (GObject o, IsDescendantOf CellRenderer o) => IsCellRenderer o Source #

Type class for types which can be safely cast to CellRenderer, for instance with toCellRenderer.

Instances

Instances details
(GObject o, IsDescendantOf CellRenderer o) => IsCellRenderer o Source # 
Instance details

Defined in GI.Gtk.Objects.CellRenderer

toCellRenderer :: (MonadIO m, IsCellRenderer o) => o -> m CellRenderer Source #

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

Methods

activate

cellRendererActivate Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsEvent b, IsWidget c) 
=> a

cell: a GtkCellRenderer

-> b

event: a GdkEvent

-> c

widget: widget that received the event

-> Text

path: widget-dependent string representation of the event location; e.g. for GtkTreeView, a string representation of GtkTreePath

-> Rectangle

backgroundArea: background area as passed to gtk_cell_renderer_render()

-> Rectangle

cellArea: cell area as passed to gtk_cell_renderer_render()

-> [CellRendererState]

flags: render flags

-> m Bool

Returns: True if the event was consumed/handled

Passes an activate event to the cell renderer for possible processing. Some cell renderers may use events; for example, GtkCellRendererToggle toggles when it gets a mouse click.

getAlignedArea

cellRendererGetAlignedArea Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) 
=> a

cell: a GtkCellRenderer instance

-> b

widget: the GtkWidget this cell will be rendering to

-> [CellRendererState]

flags: render flags

-> Rectangle

cellArea: cell area which would be passed to gtk_cell_renderer_render()

-> m Rectangle 

Gets the aligned area used by cell inside cellArea. Used for finding the appropriate edit and focus rectangle.

getAlignment

cellRendererGetAlignment Source #

Arguments

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

cell: A GtkCellRenderer

-> m (Float, Float) 

Fills in xalign and yalign with the appropriate values of cell.

getFixedSize

cellRendererGetFixedSize Source #

Arguments

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

cell: A GtkCellRenderer

-> m (Int32, Int32) 

Fills in width and height with the appropriate size of cell.

getIsExpanded

cellRendererGetIsExpanded Source #

Arguments

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

cell: a GtkCellRenderer

-> m Bool

Returns: True if the cell renderer is expanded

Checks whether the given GtkCellRenderer is expanded.

getIsExpander

cellRendererGetIsExpander Source #

Arguments

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

cell: a GtkCellRenderer

-> m Bool

Returns: True if cell is an expander, and False otherwise

Checks whether the given GtkCellRenderer is an expander.

getPadding

cellRendererGetPadding Source #

Arguments

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

cell: A GtkCellRenderer

-> m (Int32, Int32) 

Fills in xpad and ypad with the appropriate values of cell.

getPreferredHeight

cellRendererGetPreferredHeight Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) 
=> a

cell: a GtkCellRenderer instance

-> b

widget: the GtkWidget this cell will be rendering to

-> m (Int32, Int32) 

Retrieves a renderer’s natural size when rendered to widget.

getPreferredHeightForWidth

cellRendererGetPreferredHeightForWidth Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) 
=> a

cell: a GtkCellRenderer instance

-> b

widget: the GtkWidget this cell will be rendering to

-> Int32

width: the size which is available for allocation

-> m (Int32, Int32) 

Retrieves a cell renderers’s minimum and natural height if it were rendered to widget with the specified width.

getPreferredSize

cellRendererGetPreferredSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) 
=> a

cell: a GtkCellRenderer instance

-> b

widget: the GtkWidget this cell will be rendering to

-> m (Requisition, Requisition) 

Retrieves the minimum and natural size of a cell taking into account the widget’s preference for height-for-width management.

getPreferredWidth

cellRendererGetPreferredWidth Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) 
=> a

cell: a GtkCellRenderer instance

-> b

widget: the GtkWidget this cell will be rendering to

-> m (Int32, Int32) 

Retrieves a renderer’s natural size when rendered to widget.

getPreferredWidthForHeight

cellRendererGetPreferredWidthForHeight Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) 
=> a

cell: a GtkCellRenderer instance

-> b

widget: the GtkWidget this cell will be rendering to

-> Int32

height: the size which is available for allocation

-> m (Int32, Int32) 

Retrieves a cell renderers’s minimum and natural width if it were rendered to widget with the specified height.

getRequestMode

cellRendererGetRequestMode Source #

Arguments

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

cell: a GtkCellRenderer instance

-> m SizeRequestMode

Returns: The GtkSizeRequestMode preferred by this renderer.

Gets whether the cell renderer prefers a height-for-width layout or a width-for-height layout.

getSensitive

cellRendererGetSensitive Source #

Arguments

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

cell: A GtkCellRenderer

-> m Bool

Returns: True if the cell renderer is sensitive

Returns the cell renderer’s sensitivity.

getState

cellRendererGetState Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) 
=> a

cell: a GtkCellRenderer

-> Maybe b

widget: a GtkWidget

-> [CellRendererState]

cellState: cell renderer state

-> m [StateFlags]

Returns: the widget state flags applying to cell

Translates the cell renderer state to GtkStateFlags, based on the cell renderer and widget sensitivity, and the given GtkCellRendererState.

getVisible

cellRendererGetVisible Source #

Arguments

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

cell: A GtkCellRenderer

-> m Bool

Returns: True if the cell renderer is visible

Returns the cell renderer’s visibility.

isActivatable

cellRendererIsActivatable Source #

Arguments

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

cell: A GtkCellRenderer

-> m Bool

Returns: True if the cell renderer can do anything when activated

Checks whether the cell renderer can do something when activated.

setAlignment

cellRendererSetAlignment Source #

Arguments

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

cell: A GtkCellRenderer

-> Float

xalign: the x alignment of the cell renderer

-> Float

yalign: the y alignment of the cell renderer

-> m () 

Sets the renderer’s alignment within its available space.

setFixedSize

cellRendererSetFixedSize Source #

Arguments

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

cell: A GtkCellRenderer

-> Int32

width: the width of the cell renderer, or -1

-> Int32

height: the height of the cell renderer, or -1

-> m () 

Sets the renderer size to be explicit, independent of the properties set.

setIsExpanded

cellRendererSetIsExpanded Source #

Arguments

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

cell: a GtkCellRenderer

-> Bool

isExpanded: whether cell should be expanded

-> m () 

Sets whether the given GtkCellRenderer is expanded.

setIsExpander

cellRendererSetIsExpander Source #

Arguments

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

cell: a GtkCellRenderer

-> Bool

isExpander: whether cell is an expander

-> m () 

Sets whether the given GtkCellRenderer is an expander.

setPadding

cellRendererSetPadding Source #

Arguments

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

cell: A GtkCellRenderer

-> Int32

xpad: the x padding of the cell renderer

-> Int32

ypad: the y padding of the cell renderer

-> m () 

Sets the renderer’s padding.

setSensitive

cellRendererSetSensitive Source #

Arguments

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

cell: A GtkCellRenderer

-> Bool

sensitive: the sensitivity of the cell

-> m () 

Sets the cell renderer’s sensitivity.

setVisible

cellRendererSetVisible Source #

Arguments

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

cell: A GtkCellRenderer

-> Bool

visible: the visibility of the cell

-> m () 

Sets the cell renderer’s visibility.

snapshot

cellRendererSnapshot Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsSnapshot b, IsWidget c) 
=> a

cell: a GtkCellRenderer

-> b

snapshot: a GtkSnapshot to draw to

-> c

widget: the widget owning window

-> Rectangle

backgroundArea: entire cell area (including tree expanders and maybe padding on the sides)

-> Rectangle

cellArea: area normally rendered by a cell renderer

-> [CellRendererState]

flags: flags that affect rendering

-> m () 

Invokes the virtual render function of the GtkCellRenderer. The three passed-in rectangles are areas in cr. Most renderers will draw within cellArea; the xalign, yalign, xpad, and ypad fields of the GtkCellRenderer should be honored with respect to cellArea. backgroundArea includes the blank space around the cell, and also the area containing the tree expander; so the backgroundArea rectangles for all cells tile to cover the entire window.

startEditing

cellRendererStartEditing Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsEvent b, IsWidget c) 
=> a

cell: a GtkCellRenderer

-> Maybe b

event: a GdkEvent

-> c

widget: widget that received the event

-> Text

path: widget-dependent string representation of the event location; e.g. for GtkTreeView, a string representation of GtkTreePath

-> Rectangle

backgroundArea: background area as passed to gtk_cell_renderer_render()

-> Rectangle

cellArea: cell area as passed to gtk_cell_renderer_render()

-> [CellRendererState]

flags: render flags

-> m (Maybe CellEditable)

Returns: A new GtkCellEditable for editing this cell, or Nothing if editing is not possible

Starts editing the contents of this cell, through a new GtkCellEditable widget created by the GtkCellRendererClass.start_editing virtual function.

stopEditing

cellRendererStopEditing Source #

Arguments

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

cell: A GtkCellRenderer

-> Bool

canceled: True if the editing has been canceled

-> m () 

Informs the cell renderer that the editing is stopped. If canceled is True, the cell renderer will emit the GtkCellRenderereditingCanceled signal.

This function should be called by cell renderer implementations in response to the GtkCellEditable::editing-done signal of GtkCellEditable.

Properties

cellBackground

No description available in the introspection data.

clearCellRendererCellBackground :: (MonadIO m, IsCellRenderer o) => o -> m () Source #

Set the value of the “cell-background” property to Nothing. When overloading is enabled, this is equivalent to

clear #cellBackground

constructCellRendererCellBackground :: (IsCellRenderer o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

setCellRendererCellBackground :: (MonadIO m, IsCellRenderer o) => o -> Text -> m () Source #

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

set cellRenderer [ #cellBackground := value ]

cellBackgroundRgba

Cell background as a GdkRGBA

clearCellRendererCellBackgroundRgba :: (MonadIO m, IsCellRenderer o) => o -> m () Source #

Set the value of the “cell-background-rgba” property to Nothing. When overloading is enabled, this is equivalent to

clear #cellBackgroundRgba

constructCellRendererCellBackgroundRgba :: (IsCellRenderer o, MonadIO m) => RGBA -> m (GValueConstruct o) Source #

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

getCellRendererCellBackgroundRgba :: (MonadIO m, IsCellRenderer o) => o -> m (Maybe RGBA) Source #

Get the value of the “cell-background-rgba” property. When overloading is enabled, this is equivalent to

get cellRenderer #cellBackgroundRgba

setCellRendererCellBackgroundRgba :: (MonadIO m, IsCellRenderer o) => o -> RGBA -> m () Source #

Set the value of the “cell-background-rgba” property. When overloading is enabled, this is equivalent to

set cellRenderer [ #cellBackgroundRgba := value ]

cellBackgroundSet

No description available in the introspection data.

constructCellRendererCellBackgroundSet :: (IsCellRenderer o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getCellRendererCellBackgroundSet :: (MonadIO m, IsCellRenderer o) => o -> m Bool Source #

Get the value of the “cell-background-set” property. When overloading is enabled, this is equivalent to

get cellRenderer #cellBackgroundSet

setCellRendererCellBackgroundSet :: (MonadIO m, IsCellRenderer o) => o -> Bool -> m () Source #

Set the value of the “cell-background-set” property. When overloading is enabled, this is equivalent to

set cellRenderer [ #cellBackgroundSet := value ]

editing

No description available in the introspection data.

getCellRendererEditing :: (MonadIO m, IsCellRenderer o) => o -> m Bool Source #

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

get cellRenderer #editing

height

No description available in the introspection data.

constructCellRendererHeight :: (IsCellRenderer o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getCellRendererHeight :: (MonadIO m, IsCellRenderer o) => o -> m Int32 Source #

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

get cellRenderer #height

setCellRendererHeight :: (MonadIO m, IsCellRenderer o) => o -> Int32 -> m () Source #

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

set cellRenderer [ #height := value ]

isExpanded

No description available in the introspection data.

constructCellRendererIsExpanded :: (IsCellRenderer o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getCellRendererIsExpanded :: (MonadIO m, IsCellRenderer o) => o -> m Bool Source #

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

get cellRenderer #isExpanded

setCellRendererIsExpanded :: (MonadIO m, IsCellRenderer o) => o -> Bool -> m () Source #

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

set cellRenderer [ #isExpanded := value ]

isExpander

No description available in the introspection data.

constructCellRendererIsExpander :: (IsCellRenderer o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getCellRendererIsExpander :: (MonadIO m, IsCellRenderer o) => o -> m Bool Source #

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

get cellRenderer #isExpander

setCellRendererIsExpander :: (MonadIO m, IsCellRenderer o) => o -> Bool -> m () Source #

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

set cellRenderer [ #isExpander := value ]

mode

No description available in the introspection data.

constructCellRendererMode :: (IsCellRenderer o, MonadIO m) => CellRendererMode -> m (GValueConstruct o) Source #

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

getCellRendererMode :: (MonadIO m, IsCellRenderer o) => o -> m CellRendererMode Source #

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

get cellRenderer #mode

setCellRendererMode :: (MonadIO m, IsCellRenderer o) => o -> CellRendererMode -> m () Source #

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

set cellRenderer [ #mode := value ]

sensitive

No description available in the introspection data.

constructCellRendererSensitive :: (IsCellRenderer o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getCellRendererSensitive :: (MonadIO m, IsCellRenderer o) => o -> m Bool Source #

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

get cellRenderer #sensitive

setCellRendererSensitive :: (MonadIO m, IsCellRenderer o) => o -> Bool -> m () Source #

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

set cellRenderer [ #sensitive := value ]

visible

No description available in the introspection data.

constructCellRendererVisible :: (IsCellRenderer o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getCellRendererVisible :: (MonadIO m, IsCellRenderer o) => o -> m Bool Source #

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

get cellRenderer #visible

setCellRendererVisible :: (MonadIO m, IsCellRenderer o) => o -> Bool -> m () Source #

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

set cellRenderer [ #visible := value ]

width

No description available in the introspection data.

constructCellRendererWidth :: (IsCellRenderer o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getCellRendererWidth :: (MonadIO m, IsCellRenderer o) => o -> m Int32 Source #

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

get cellRenderer #width

setCellRendererWidth :: (MonadIO m, IsCellRenderer o) => o -> Int32 -> m () Source #

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

set cellRenderer [ #width := value ]

xalign

No description available in the introspection data.

constructCellRendererXalign :: (IsCellRenderer o, MonadIO m) => Float -> m (GValueConstruct o) Source #

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

getCellRendererXalign :: (MonadIO m, IsCellRenderer o) => o -> m Float Source #

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

get cellRenderer #xalign

setCellRendererXalign :: (MonadIO m, IsCellRenderer o) => o -> Float -> m () Source #

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

set cellRenderer [ #xalign := value ]

xpad

No description available in the introspection data.

constructCellRendererXpad :: (IsCellRenderer o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

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

getCellRendererXpad :: (MonadIO m, IsCellRenderer o) => o -> m Word32 Source #

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

get cellRenderer #xpad

setCellRendererXpad :: (MonadIO m, IsCellRenderer o) => o -> Word32 -> m () Source #

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

set cellRenderer [ #xpad := value ]

yalign

No description available in the introspection data.

constructCellRendererYalign :: (IsCellRenderer o, MonadIO m) => Float -> m (GValueConstruct o) Source #

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

getCellRendererYalign :: (MonadIO m, IsCellRenderer o) => o -> m Float Source #

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

get cellRenderer #yalign

setCellRendererYalign :: (MonadIO m, IsCellRenderer o) => o -> Float -> m () Source #

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

set cellRenderer [ #yalign := value ]

ypad

No description available in the introspection data.

constructCellRendererYpad :: (IsCellRenderer o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

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

getCellRendererYpad :: (MonadIO m, IsCellRenderer o) => o -> m Word32 Source #

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

get cellRenderer #ypad

setCellRendererYpad :: (MonadIO m, IsCellRenderer o) => o -> Word32 -> m () Source #

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

set cellRenderer [ #ypad := value ]

Signals

editingCanceled

type CellRendererEditingCanceledCallback = IO () Source #

This signal gets emitted when the user cancels the process of editing a cell. For example, an editable cell renderer could be written to cancel editing when the user presses Escape.

See also: cellRendererStopEditing.

afterCellRendererEditingCanceled :: (IsCellRenderer a, MonadIO m) => a -> ((?self :: a) => CellRendererEditingCanceledCallback) -> m SignalHandlerId Source #

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

after cellRenderer #editingCanceled 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.

onCellRendererEditingCanceled :: (IsCellRenderer a, MonadIO m) => a -> ((?self :: a) => CellRendererEditingCanceledCallback) -> m SignalHandlerId Source #

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

on cellRenderer #editingCanceled callback

editingStarted

type CellRendererEditingStartedCallback Source #

Arguments

 = CellEditable

editable: the GtkCellEditable

-> Text

path: the path identifying the edited cell

-> IO () 

This signal gets emitted when a cell starts to be edited. The intended use of this signal is to do special setup on editable, e.g. adding a GtkEntryCompletion or setting up additional columns in a GtkComboBox.

See cellEditableStartEditing for information on the lifecycle of the editable and a way to do setup that doesn’t depend on the renderer.

Note that GTK doesn't guarantee that cell renderers will continue to use the same kind of widget for editing in future releases, therefore you should check the type of editable before doing any specific setup, as in the following example:

C code

static void
text_editing_started (GtkCellRenderer *cell,
                      GtkCellEditable *editable,
                      const char      *path,
                      gpointer         data)
{
  if (GTK_IS_ENTRY (editable))
    {
      GtkEntry *entry = GTK_ENTRY (editable);
      
      // ... create a GtkEntryCompletion
      
      gtk_entry_set_completion (entry, completion);
    }
}

afterCellRendererEditingStarted :: (IsCellRenderer a, MonadIO m) => a -> ((?self :: a) => CellRendererEditingStartedCallback) -> m SignalHandlerId Source #

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

after cellRenderer #editingStarted 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.

onCellRendererEditingStarted :: (IsCellRenderer a, MonadIO m) => a -> ((?self :: a) => CellRendererEditingStartedCallback) -> m SignalHandlerId Source #

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

on cellRenderer #editingStarted callback