gi-gtk3-3.0.44: Gtk 3.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.CellRenderer

Contents

- Exported types
- Methods
  - activate
  - getAlignedArea
  - getAlignment
  - getFixedSize
  - getPadding
  - getPreferredHeight
  - getPreferredHeightForWidth
  - getPreferredSize
  - getPreferredWidth
  - getPreferredWidthForHeight
  - getRequestMode
  - getSensitive
  - getSize
  - getState
  - getVisible
  - isActivatable
  - render
  - setAlignment
  - setFixedSize
  - setPadding
  - setSensitive
  - setVisible
  - startEditing
  - stopEditing
- Properties
  - cellBackground
  - cellBackgroundGdk
  - cellBackgroundRgba
  - cellBackgroundSet
  - editing
  - height
  - isExpanded
  - isExpander
  - mode
  - sensitive
  - visible
  - width
  - xalign
  - xpad
  - yalign
  - ypad
- Signals
  - editingCanceled
  - editingStarted

Description

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

The primary use of a `CellRenderer` is for drawing a certain graphical elements on a `Context`. 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 `cellRendererGetSize`. Finally, the cell is rendered in the correct location using `cellRendererRender`.

There are a number of rules that must be followed when writing a new `CellRenderer`. 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 `CellRenderer` 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 `CellRendererToggle`, which toggles when it gets activated by a mouse click, or it can be “editable” like `CellRendererText`, which allows the user to edit the text using a widget implementing the `CellEditable` interface, e.g. `Entry`. To make a cell renderer activatable or editable, you have to implement the `CellRendererClass`.`activate` or `CellRendererClass`.`start_editing` virtual functions, respectively.

Many properties of `CellRenderer` 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

- newtype CellRenderer = CellRenderer (ManagedPtr CellRenderer)
- class (GObject o, IsDescendantOf CellRenderer o) => IsCellRenderer o
- toCellRenderer :: (MonadIO m, IsCellRenderer o) => o -> m CellRenderer
- cellRendererActivate :: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) => a -> Event -> b -> Text -> Rectangle -> Rectangle -> [CellRendererState] -> m Bool
- cellRendererGetAlignedArea :: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) => a -> b -> [CellRendererState] -> Rectangle -> m Rectangle
- cellRendererGetAlignment :: (HasCallStack, MonadIO m, IsCellRenderer a) => a -> m (Float, Float)
- cellRendererGetFixedSize :: (HasCallStack, MonadIO m, IsCellRenderer a) => a -> m (Int32, Int32)
- cellRendererGetPadding :: (HasCallStack, MonadIO m, IsCellRenderer a) => a -> m (Int32, Int32)
- cellRendererGetPreferredHeight :: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) => a -> b -> m (Int32, Int32)
- cellRendererGetPreferredHeightForWidth :: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) => a -> b -> Int32 -> m (Int32, Int32)
- cellRendererGetPreferredSize :: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) => a -> b -> m (Requisition, Requisition)
- cellRendererGetPreferredWidth :: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) => a -> b -> m (Int32, Int32)
- cellRendererGetPreferredWidthForHeight :: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) => a -> b -> Int32 -> m (Int32, Int32)
- cellRendererGetRequestMode :: (HasCallStack, MonadIO m, IsCellRenderer a) => a -> m SizeRequestMode
- cellRendererGetSensitive :: (HasCallStack, MonadIO m, IsCellRenderer a) => a -> m Bool
- cellRendererGetSize :: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) => a -> b -> Maybe Rectangle -> m (Int32, Int32, Int32, Int32)
- cellRendererGetState :: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) => Maybe a -> Maybe b -> [CellRendererState] -> m [StateFlags]
- cellRendererGetVisible :: (HasCallStack, MonadIO m, IsCellRenderer a) => a -> m Bool
- cellRendererIsActivatable :: (HasCallStack, MonadIO m, IsCellRenderer a) => a -> m Bool
- cellRendererRender :: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) => a -> Context -> b -> Rectangle -> Rectangle -> [CellRendererState] -> m ()
- cellRendererSetAlignment :: (HasCallStack, MonadIO m, IsCellRenderer a) => a -> Float -> Float -> m ()
- cellRendererSetFixedSize :: (HasCallStack, MonadIO m, IsCellRenderer a) => a -> Int32 -> Int32 -> m ()
- cellRendererSetPadding :: (HasCallStack, MonadIO m, IsCellRenderer a) => a -> Int32 -> Int32 -> m ()
- cellRendererSetSensitive :: (HasCallStack, MonadIO m, IsCellRenderer a) => a -> Bool -> m ()
- cellRendererSetVisible :: (HasCallStack, MonadIO m, IsCellRenderer a) => a -> Bool -> m ()
- cellRendererStartEditing :: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) => a -> Maybe Event -> b -> Text -> Rectangle -> Rectangle -> [CellRendererState] -> m (Maybe CellEditable)
- cellRendererStopEditing :: (HasCallStack, MonadIO m, IsCellRenderer a) => a -> Bool -> m ()
- clearCellRendererCellBackground :: (MonadIO m, IsCellRenderer o) => o -> m ()
- constructCellRendererCellBackground :: (IsCellRenderer o, MonadIO m) => Text -> m (GValueConstruct o)
- setCellRendererCellBackground :: (MonadIO m, IsCellRenderer o) => o -> Text -> m ()
- clearCellRendererCellBackgroundGdk :: (MonadIO m, IsCellRenderer o) => o -> m ()
- constructCellRendererCellBackgroundGdk :: (IsCellRenderer o, MonadIO m) => Color -> m (GValueConstruct o)
- getCellRendererCellBackgroundGdk :: (MonadIO m, IsCellRenderer o) => o -> m (Maybe Color)
- setCellRendererCellBackgroundGdk :: (MonadIO m, IsCellRenderer o) => o -> Color -> m ()
- clearCellRendererCellBackgroundRgba :: (MonadIO m, IsCellRenderer o) => o -> m ()
- constructCellRendererCellBackgroundRgba :: (IsCellRenderer o, MonadIO m) => RGBA -> m (GValueConstruct o)
- getCellRendererCellBackgroundRgba :: (MonadIO m, IsCellRenderer o) => o -> m (Maybe RGBA)
- setCellRendererCellBackgroundRgba :: (MonadIO m, IsCellRenderer o) => o -> RGBA -> m ()
- constructCellRendererCellBackgroundSet :: (IsCellRenderer o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererCellBackgroundSet :: (MonadIO m, IsCellRenderer o) => o -> m Bool
- setCellRendererCellBackgroundSet :: (MonadIO m, IsCellRenderer o) => o -> Bool -> m ()
- getCellRendererEditing :: (MonadIO m, IsCellRenderer o) => o -> m Bool
- constructCellRendererHeight :: (IsCellRenderer o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getCellRendererHeight :: (MonadIO m, IsCellRenderer o) => o -> m Int32
- setCellRendererHeight :: (MonadIO m, IsCellRenderer o) => o -> Int32 -> m ()
- constructCellRendererIsExpanded :: (IsCellRenderer o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererIsExpanded :: (MonadIO m, IsCellRenderer o) => o -> m Bool
- setCellRendererIsExpanded :: (MonadIO m, IsCellRenderer o) => o -> Bool -> m ()
- constructCellRendererIsExpander :: (IsCellRenderer o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererIsExpander :: (MonadIO m, IsCellRenderer o) => o -> m Bool
- setCellRendererIsExpander :: (MonadIO m, IsCellRenderer o) => o -> Bool -> m ()
- constructCellRendererMode :: (IsCellRenderer o, MonadIO m) => CellRendererMode -> m (GValueConstruct o)
- getCellRendererMode :: (MonadIO m, IsCellRenderer o) => o -> m CellRendererMode
- setCellRendererMode :: (MonadIO m, IsCellRenderer o) => o -> CellRendererMode -> m ()
- constructCellRendererSensitive :: (IsCellRenderer o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererSensitive :: (MonadIO m, IsCellRenderer o) => o -> m Bool
- setCellRendererSensitive :: (MonadIO m, IsCellRenderer o) => o -> Bool -> m ()
- constructCellRendererVisible :: (IsCellRenderer o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererVisible :: (MonadIO m, IsCellRenderer o) => o -> m Bool
- setCellRendererVisible :: (MonadIO m, IsCellRenderer o) => o -> Bool -> m ()
- constructCellRendererWidth :: (IsCellRenderer o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getCellRendererWidth :: (MonadIO m, IsCellRenderer o) => o -> m Int32
- setCellRendererWidth :: (MonadIO m, IsCellRenderer o) => o -> Int32 -> m ()
- constructCellRendererXalign :: (IsCellRenderer o, MonadIO m) => Float -> m (GValueConstruct o)
- getCellRendererXalign :: (MonadIO m, IsCellRenderer o) => o -> m Float
- setCellRendererXalign :: (MonadIO m, IsCellRenderer o) => o -> Float -> m ()
- constructCellRendererXpad :: (IsCellRenderer o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getCellRendererXpad :: (MonadIO m, IsCellRenderer o) => o -> m Word32
- setCellRendererXpad :: (MonadIO m, IsCellRenderer o) => o -> Word32 -> m ()
- constructCellRendererYalign :: (IsCellRenderer o, MonadIO m) => Float -> m (GValueConstruct o)
- getCellRendererYalign :: (MonadIO m, IsCellRenderer o) => o -> m Float
- setCellRendererYalign :: (MonadIO m, IsCellRenderer o) => o -> Float -> m ()
- constructCellRendererYpad :: (IsCellRenderer o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getCellRendererYpad :: (MonadIO m, IsCellRenderer o) => o -> m Word32
- setCellRendererYpad :: (MonadIO m, IsCellRenderer o) => o -> Word32 -> m ()
- type CellRendererEditingCanceledCallback = IO ()
- afterCellRendererEditingCanceled :: (IsCellRenderer a, MonadIO m) => a -> ((?self :: a) => CellRendererEditingCanceledCallback) -> m SignalHandlerId
- onCellRendererEditingCanceled :: (IsCellRenderer a, MonadIO m) => a -> ((?self :: a) => CellRendererEditingCanceledCallback) -> m SignalHandlerId
- type CellRendererEditingStartedCallback = CellEditable -> Text -> IO ()
- afterCellRendererEditingStarted :: (IsCellRenderer a, MonadIO m) => a -> ((?self :: a) => CellRendererEditingStartedCallback) -> m SignalHandlerId
- onCellRendererEditingStarted :: (IsCellRenderer a, MonadIO m) => a -> ((?self :: a) => CellRendererEditingStartedCallback) -> m SignalHandlerId

# 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 Methods (==) :: CellRenderer -> CellRenderer -> Bool Source # (/=) :: CellRenderer -> CellRenderer -> Bool Source #
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 Source #
TypedObject CellRenderer Source # |
Instance details Defined in GI.Gtk.Objects.CellRenderer Methods glibType :: IO GType Source #
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 Source # gvalueSet_ :: Ptr GValue -> Maybe CellRenderer -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe CellRenderer) Source #
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

### Click to display all available methods, including inherited ones

Expand

#### Methods

activate, bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isActivatable, isFloating, notify, notifyByPspec, ref, refSink, render, runDispose, startEditing, stealData, stealQdata, stopEditing, thawNotify, unref, watchClosure.

#### Getters

getAlignedArea, getAlignment, getData, getFixedSize, getPadding, getPreferredHeight, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRequestMode, getSensitive, getSize, getState, getVisible.

#### Setters

setAlignment, setData, setDataFull, setFixedSize, setPadding, setProperty, setSensitive, setVisible.

## activate

cellRendererActivate Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) |
=> a | `cell`: a `CellRenderer`
-> Event | `event`: a `Event`
-> b | `widget`: widget that received the event
-> Text | `path`: widget-dependent string representation of the event location; e.g. for `TreeView`, a string representation of `TreePath`
-> Rectangle | `backgroundArea`: background area as passed to `cellRendererRender`
-> Rectangle | `cellArea`: cell area as passed to `cellRendererRender`
-> [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, `CellRendererToggle` toggles when it gets a mouse click.

## getAlignedArea

cellRendererGetAlignedArea Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) |
=> a | `cell`: a `CellRenderer` instance
-> b | `widget`: the `Widget` this cell will be rendering to
-> [CellRendererState] | `flags`: render flags
-> Rectangle | `cellArea`: cell area which would be passed to `cellRendererRender`
-> m Rectangle |

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

Since: 3.0

## getAlignment

cellRendererGetAlignment Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a) |
=> a | `cell`: A `CellRenderer`
-> m (Float, Float) |

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

Since: 2.18

## getFixedSize

cellRendererGetFixedSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a) |
=> a | `cell`: A `CellRenderer`
-> m (Int32, Int32) |

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

## getPadding

cellRendererGetPadding Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a) |
=> a | `cell`: A `CellRenderer`
-> m (Int32, Int32) |

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

Since: 2.18

## getPreferredHeight

cellRendererGetPreferredHeight Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) |
=> a | `cell`: a `CellRenderer` instance
-> b | `widget`: the `Widget` this cell will be rendering to
-> m (Int32, Int32) |

Retreives a renderer’s natural size when rendered to `widget`.

Since: 3.0

## getPreferredHeightForWidth

cellRendererGetPreferredHeightForWidth Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) |
=> a | `cell`: a `CellRenderer` instance
-> b | `widget`: the `Widget` this cell will be rendering to
-> Int32 | `width`: the size which is available for allocation
-> m (Int32, Int32) |

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

Since: 3.0

## getPreferredSize

cellRendererGetPreferredSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) |
=> a | `cell`: a `CellRenderer` instance
-> b | `widget`: the `Widget` 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.

Since: 3.0

## getPreferredWidth

cellRendererGetPreferredWidth Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) |
=> a | `cell`: a `CellRenderer` instance
-> b | `widget`: the `Widget` this cell will be rendering to
-> m (Int32, Int32) |

Retreives a renderer’s natural size when rendered to `widget`.

Since: 3.0

## getPreferredWidthForHeight

cellRendererGetPreferredWidthForHeight Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) |
=> a | `cell`: a `CellRenderer` instance
-> b | `widget`: the `Widget` this cell will be rendering to
-> Int32 | `height`: the size which is available for allocation
-> m (Int32, Int32) |

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

Since: 3.0

## getRequestMode

cellRendererGetRequestMode Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a) |
=> a | `cell`: a `CellRenderer` instance
-> m SizeRequestMode | Returns: The `SizeRequestMode` preferred by this renderer.

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

Since: 3.0

## getSensitive

cellRendererGetSensitive Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a) |
=> a | `cell`: A `CellRenderer`
-> m Bool | Returns: `True` if the cell renderer is sensitive

Returns the cell renderer’s sensitivity.

Since: 2.18

## getSize

cellRendererGetSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) |
=> a | `cell`: a `CellRenderer`
-> b | `widget`: the widget the renderer is rendering to
-> Maybe Rectangle | `cellArea`: The area a cell will be allocated, or `Nothing`
-> m (Int32, Int32, Int32, Int32) |

Deprecated: (Since version 3.0)Use `cellRendererGetPreferredSize` instead.

Obtains the width and height needed to render the cell. Used by view widgets to determine the appropriate size for the cell_area passed to `cellRendererRender`. If `cellArea` is not `Nothing`, fills in the x and y offsets (if set) of the cell relative to this location.

Please note that the values set in `width` and `height`, as well as those in `xOffset` and `yOffset` are inclusive of the xpad and ypad properties.

## getState

cellRendererGetState Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) |
=> Maybe a | `cell`: a `CellRenderer`, or `Nothing`
-> Maybe b | `widget`: a `Widget`, or `Nothing`
-> [CellRendererState] | `cellState`: cell renderer state
-> m [StateFlags] | Returns: the widget state flags applying to `cell`

Translates the cell renderer state to `StateFlags`, based on the cell renderer and widget sensitivity, and the given `CellRendererState`.

Since: 3.0

## getVisible

cellRendererGetVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a) |
=> a | `cell`: A `CellRenderer`
-> m Bool | Returns: `True` if the cell renderer is visible

Returns the cell renderer’s visibility.

Since: 2.18

## isActivatable

cellRendererIsActivatable Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a) |
=> a | `cell`: A `CellRenderer`
-> m Bool | Returns: `True` if the cell renderer can do anything when activated

Checks whether the cell renderer can do something when activated.

Since: 3.0

## render

cellRendererRender Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) |
=> a | `cell`: a `CellRenderer`
-> Context | `cr`: a cairo context to draw to
-> b | `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 `CellRenderer`. The three passed-in rectangles are areas in `cr`. Most renderers will draw within `cellArea`; the xalign, yalign, xpad, and ypad fields of the `CellRenderer` 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`.

## setAlignment

cellRendererSetAlignment Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a) |
=> a | `cell`: A `CellRenderer`
-> 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.

Since: 2.18

## setFixedSize

cellRendererSetFixedSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a) |
=> a | `cell`: A `CellRenderer`
-> 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.

## setPadding

cellRendererSetPadding Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a) |
=> a | `cell`: A `CellRenderer`
-> Int32 | `xpad`: the x padding of the cell renderer
-> Int32 | `ypad`: the y padding of the cell renderer
-> m () |

Sets the renderer’s padding.

Since: 2.18

## setSensitive

cellRendererSetSensitive Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a) |
=> a | `cell`: A `CellRenderer`
-> Bool | `sensitive`: the sensitivity of the cell
-> m () |

Sets the cell renderer’s sensitivity.

Since: 2.18

## setVisible

cellRendererSetVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a) |
=> a | `cell`: A `CellRenderer`
-> Bool | `visible`: the visibility of the cell
-> m () |

Sets the cell renderer’s visibility.

Since: 2.18

## startEditing

cellRendererStartEditing Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) |
=> a | `cell`: a `CellRenderer`
-> Maybe Event | `event`: a `Event`
-> b | `widget`: widget that received the event
-> Text | `path`: widget-dependent string representation of the event location; e.g. for `TreeView`, a string representation of `TreePath`
-> Rectangle | `backgroundArea`: background area as passed to `cellRendererRender`
-> Rectangle | `cellArea`: cell area as passed to `cellRendererRender`
-> [CellRendererState] | `flags`: render flags
-> m (Maybe CellEditable) | Returns: A new `CellEditable` for editing this `cell`, or `Nothing` if editing is not possible

Starts editing the contents of this `cell`, through a new `CellEditable` widget created by the `CellRendererClass`.`start_editing` virtual function.

## stopEditing

cellRendererStopEditing Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellRenderer a) |
=> a | `cell`: A `CellRenderer`
-> 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 CellRenderer::editingCanceled signal.

This function should be called by cell renderer implementations in response to the CellEditable::editingDone signal of `CellEditable`.

Since: 2.6

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

## cellBackgroundGdk

Cell background as a `Color`

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

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

    clear #cellBackgroundGdk

constructCellRendererCellBackgroundGdk :: (IsCellRenderer o, MonadIO m) => Color -> m (GValueConstruct o) Source #

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

getCellRendererCellBackgroundGdk :: (MonadIO m, IsCellRenderer o) => o -> m (Maybe Color) Source #

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

    get cellRenderer #cellBackgroundGdk

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

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

    set cellRenderer [ #cellBackgroundGdk := value ]

## cellBackgroundRgba

Cell background as a `RGBA`

Since: 3.0

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

Since: 2.4

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 `CellEditable`
-> 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 `EntryCompletion` or setting up additional columns in a `ComboBox`.

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 gchar     *path,
                          gpointer         data)
    {
      if (GTK_IS_ENTRY (editable))
        {
          GtkEntry *entry = GTK_ENTRY (editable);

          // ... create a GtkEntryCompletion

          gtk_entry_set_completion (entry, completion);
        }
    }

Since: 2.6

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