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 |
- 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
- Signals
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) => 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 C_CellRendererEditingCanceledCallback = Ptr () -> Ptr () -> IO ()
- type CellRendererEditingCanceledCallback = IO ()
- afterCellRendererEditingCanceled :: (IsCellRenderer a, MonadIO m) => a -> CellRendererEditingCanceledCallback -> m SignalHandlerId
- genClosure_CellRendererEditingCanceled :: MonadIO m => CellRendererEditingCanceledCallback -> m (GClosure C_CellRendererEditingCanceledCallback)
- mk_CellRendererEditingCanceledCallback :: C_CellRendererEditingCanceledCallback -> IO (FunPtr C_CellRendererEditingCanceledCallback)
- noCellRendererEditingCanceledCallback :: Maybe CellRendererEditingCanceledCallback
- onCellRendererEditingCanceled :: (IsCellRenderer a, MonadIO m) => a -> CellRendererEditingCanceledCallback -> m SignalHandlerId
- wrap_CellRendererEditingCanceledCallback :: CellRendererEditingCanceledCallback -> C_CellRendererEditingCanceledCallback
- type C_CellRendererEditingStartedCallback = Ptr () -> Ptr CellEditable -> CString -> Ptr () -> IO ()
- type CellRendererEditingStartedCallback = CellEditable -> Text -> IO ()
- afterCellRendererEditingStarted :: (IsCellRenderer a, MonadIO m) => a -> CellRendererEditingStartedCallback -> m SignalHandlerId
- genClosure_CellRendererEditingStarted :: MonadIO m => CellRendererEditingStartedCallback -> m (GClosure C_CellRendererEditingStartedCallback)
- mk_CellRendererEditingStartedCallback :: C_CellRendererEditingStartedCallback -> IO (FunPtr C_CellRendererEditingStartedCallback)
- noCellRendererEditingStartedCallback :: Maybe CellRendererEditingStartedCallback
- onCellRendererEditingStarted :: (IsCellRenderer a, MonadIO m) => a -> CellRendererEditingStartedCallback -> m SignalHandlerId
- wrap_CellRendererEditingStartedCallback :: CellRendererEditingStartedCallback -> C_CellRendererEditingStartedCallback
Exported types
newtype CellRenderer Source #
Memory-managed wrapper type.
CellRenderer (ManagedPtr CellRenderer) |
Instances
Eq CellRenderer Source # | |
Defined in GI.Gtk.Objects.CellRenderer (==) :: CellRenderer -> CellRenderer -> Bool # (/=) :: CellRenderer -> CellRenderer -> Bool # | |
GObject CellRenderer Source # | |
Defined in GI.Gtk.Objects.CellRenderer | |
ManagedPtrNewtype CellRenderer Source # | |
Defined in GI.Gtk.Objects.CellRenderer toManagedPtr :: CellRenderer -> ManagedPtr CellRenderer | |
TypedObject CellRenderer Source # | |
Defined in GI.Gtk.Objects.CellRenderer | |
HasParentTypes CellRenderer Source # | |
Defined in GI.Gtk.Objects.CellRenderer | |
IsGValue (Maybe CellRenderer) Source # | Convert |
Defined in GI.Gtk.Objects.CellRenderer gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe CellRenderer -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe CellRenderer) | |
type ParentTypes CellRenderer Source # | |
Defined in GI.Gtk.Objects.CellRenderer |
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
(GObject o, IsDescendantOf CellRenderer o) => IsCellRenderer o Source # | |
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
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
:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) | |
=> a |
|
-> Event |
|
-> b |
|
-> Text |
|
-> Rectangle |
|
-> Rectangle |
|
-> [CellRendererState] |
|
-> m Bool | Returns: |
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 #
:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) | |
=> a |
|
-> b |
|
-> [CellRendererState] |
|
-> Rectangle |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsCellRenderer a) | |
=> a |
|
-> m (Float, Float) |
Fills in xalign
and yalign
with the appropriate values of cell
.
Since: 2.18
getFixedSize
cellRendererGetFixedSize Source #
:: (HasCallStack, MonadIO m, IsCellRenderer a) | |
=> a |
|
-> m (Int32, Int32) |
Fills in width
and height
with the appropriate size of cell
.
getPadding
cellRendererGetPadding Source #
:: (HasCallStack, MonadIO m, IsCellRenderer a) | |
=> a |
|
-> m (Int32, Int32) |
Fills in xpad
and ypad
with the appropriate values of cell
.
Since: 2.18
getPreferredHeight
cellRendererGetPreferredHeight Source #
:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) | |
=> a |
|
-> b |
|
-> m (Int32, Int32) |
Retreives a renderer’s natural size when rendered to widget
.
Since: 3.0
getPreferredHeightForWidth
cellRendererGetPreferredHeightForWidth Source #
:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) | |
=> a |
|
-> b |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) | |
=> a |
|
-> b |
|
-> m (Int32, Int32) |
Retreives a renderer’s natural size when rendered to widget
.
Since: 3.0
getPreferredWidthForHeight
cellRendererGetPreferredWidthForHeight Source #
:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsCellRenderer a) | |
=> a |
|
-> m SizeRequestMode | Returns: The |
Gets whether the cell renderer prefers a height-for-width layout or a width-for-height layout.
Since: 3.0
getSensitive
cellRendererGetSensitive Source #
:: (HasCallStack, MonadIO m, IsCellRenderer a) | |
=> a |
|
-> m Bool | Returns: |
Returns the cell renderer’s sensitivity.
Since: 2.18
getSize
:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) | |
=> a |
|
-> b |
|
-> Maybe Rectangle |
|
-> 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
:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) | |
=> a |
|
-> Maybe b | |
-> [CellRendererState] |
|
-> m [StateFlags] | Returns: the widget state flags applying to |
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 #
:: (HasCallStack, MonadIO m, IsCellRenderer a) | |
=> a |
|
-> m Bool | Returns: |
Returns the cell renderer’s visibility.
Since: 2.18
isActivatable
cellRendererIsActivatable Source #
:: (HasCallStack, MonadIO m, IsCellRenderer a) | |
=> a |
|
-> m Bool | Returns: |
Checks whether the cell renderer can do something when activated.
Since: 3.0
render
:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) | |
=> a |
|
-> Context |
|
-> b |
|
-> Rectangle |
|
-> Rectangle |
|
-> [CellRendererState] |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsCellRenderer a) | |
=> a |
|
-> Float |
|
-> Float |
|
-> m () |
Sets the renderer’s alignment within its available space.
Since: 2.18
setFixedSize
cellRendererSetFixedSize Source #
:: (HasCallStack, MonadIO m, IsCellRenderer a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Sets the renderer size to be explicit, independent of the properties set.
setPadding
cellRendererSetPadding Source #
:: (HasCallStack, MonadIO m, IsCellRenderer a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Sets the renderer’s padding.
Since: 2.18
setSensitive
cellRendererSetSensitive Source #
:: (HasCallStack, MonadIO m, IsCellRenderer a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the cell renderer’s sensitivity.
Since: 2.18
setVisible
cellRendererSetVisible Source #
:: (HasCallStack, MonadIO m, IsCellRenderer a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the cell renderer’s visibility.
Since: 2.18
startEditing
cellRendererStartEditing Source #
:: (HasCallStack, MonadIO m, IsCellRenderer a, IsWidget b) | |
=> a |
|
-> Maybe Event |
|
-> b |
|
-> Text |
|
-> Rectangle |
|
-> Rectangle |
|
-> [CellRendererState] |
|
-> m (Maybe CellEditable) | Returns: A new |
Starts editing the contents of this cell
, through a new CellEditable
widget created by the CellRendererClass
.start_editing
virtual function.
stopEditing
cellRendererStopEditing Source #
:: (HasCallStack, MonadIO m, IsCellRenderer a) | |
=> a |
|
-> Bool |
|
-> m () |
Informs the cell renderer that the editing is stopped.
If canceled
is True
, the cell renderer will emit the
editingCanceled signal.
This function should be called by cell renderer implementations
in response to the 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 C_CellRendererEditingCanceledCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
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 -> 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
genClosure_CellRendererEditingCanceled :: MonadIO m => CellRendererEditingCanceledCallback -> m (GClosure C_CellRendererEditingCanceledCallback) Source #
Wrap the callback into a GClosure
.
mk_CellRendererEditingCanceledCallback :: C_CellRendererEditingCanceledCallback -> IO (FunPtr C_CellRendererEditingCanceledCallback) Source #
Generate a function pointer callable from C code, from a C_CellRendererEditingCanceledCallback
.
noCellRendererEditingCanceledCallback :: Maybe CellRendererEditingCanceledCallback Source #
A convenience synonym for
.Nothing
:: Maybe
CellRendererEditingCanceledCallback
onCellRendererEditingCanceled :: (IsCellRenderer a, MonadIO m) => 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
wrap_CellRendererEditingCanceledCallback :: CellRendererEditingCanceledCallback -> C_CellRendererEditingCanceledCallback Source #
editingStarted
type C_CellRendererEditingStartedCallback = Ptr () -> Ptr CellEditable -> CString -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type CellRendererEditingStartedCallback Source #
= CellEditable |
|
-> Text |
|
-> 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 -> 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
genClosure_CellRendererEditingStarted :: MonadIO m => CellRendererEditingStartedCallback -> m (GClosure C_CellRendererEditingStartedCallback) Source #
Wrap the callback into a GClosure
.
mk_CellRendererEditingStartedCallback :: C_CellRendererEditingStartedCallback -> IO (FunPtr C_CellRendererEditingStartedCallback) Source #
Generate a function pointer callable from C code, from a C_CellRendererEditingStartedCallback
.
noCellRendererEditingStartedCallback :: Maybe CellRendererEditingStartedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
CellRendererEditingStartedCallback
onCellRendererEditingStarted :: (IsCellRenderer a, MonadIO m) => 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