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 |
CellRendererToggle
renders a toggle button in a cell. The
button is drawn as a radio or a checkbutton, depending on the
CellRendererToggle
:radio
property.
When activated, it emits the toggled signal.
Synopsis
- newtype CellRendererToggle = CellRendererToggle (ManagedPtr CellRendererToggle)
- class (GObject o, IsDescendantOf CellRendererToggle o) => IsCellRendererToggle o
- toCellRendererToggle :: (MonadIO m, IsCellRendererToggle o) => o -> m CellRendererToggle
- cellRendererToggleGetActivatable :: (HasCallStack, MonadIO m, IsCellRendererToggle a) => a -> m Bool
- cellRendererToggleGetActive :: (HasCallStack, MonadIO m, IsCellRendererToggle a) => a -> m Bool
- cellRendererToggleGetRadio :: (HasCallStack, MonadIO m, IsCellRendererToggle a) => a -> m Bool
- cellRendererToggleNew :: (HasCallStack, MonadIO m) => m CellRendererToggle
- cellRendererToggleSetActivatable :: (HasCallStack, MonadIO m, IsCellRendererToggle a) => a -> Bool -> m ()
- cellRendererToggleSetActive :: (HasCallStack, MonadIO m, IsCellRendererToggle a) => a -> Bool -> m ()
- cellRendererToggleSetRadio :: (HasCallStack, MonadIO m, IsCellRendererToggle a) => a -> Bool -> m ()
- constructCellRendererToggleActivatable :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererToggleActivatable :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool
- setCellRendererToggleActivatable :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m ()
- constructCellRendererToggleActive :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererToggleActive :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool
- setCellRendererToggleActive :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m ()
- constructCellRendererToggleInconsistent :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererToggleInconsistent :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool
- setCellRendererToggleInconsistent :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m ()
- constructCellRendererToggleIndicatorSize :: (IsCellRendererToggle o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getCellRendererToggleIndicatorSize :: (MonadIO m, IsCellRendererToggle o) => o -> m Int32
- setCellRendererToggleIndicatorSize :: (MonadIO m, IsCellRendererToggle o) => o -> Int32 -> m ()
- constructCellRendererToggleRadio :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellRendererToggleRadio :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool
- setCellRendererToggleRadio :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m ()
- type C_CellRendererToggleToggledCallback = Ptr () -> CString -> Ptr () -> IO ()
- type CellRendererToggleToggledCallback = Text -> IO ()
- afterCellRendererToggleToggled :: (IsCellRendererToggle a, MonadIO m) => a -> CellRendererToggleToggledCallback -> m SignalHandlerId
- genClosure_CellRendererToggleToggled :: MonadIO m => CellRendererToggleToggledCallback -> m (GClosure C_CellRendererToggleToggledCallback)
- mk_CellRendererToggleToggledCallback :: C_CellRendererToggleToggledCallback -> IO (FunPtr C_CellRendererToggleToggledCallback)
- noCellRendererToggleToggledCallback :: Maybe CellRendererToggleToggledCallback
- onCellRendererToggleToggled :: (IsCellRendererToggle a, MonadIO m) => a -> CellRendererToggleToggledCallback -> m SignalHandlerId
- wrap_CellRendererToggleToggledCallback :: CellRendererToggleToggledCallback -> C_CellRendererToggleToggledCallback
Exported types
newtype CellRendererToggle Source #
Memory-managed wrapper type.
CellRendererToggle (ManagedPtr CellRendererToggle) |
Instances
class (GObject o, IsDescendantOf CellRendererToggle o) => IsCellRendererToggle o Source #
Type class for types which can be safely cast to CellRendererToggle
, for instance with toCellRendererToggle
.
Instances
(GObject o, IsDescendantOf CellRendererToggle o) => IsCellRendererToggle o Source # | |
Defined in GI.Gtk.Objects.CellRendererToggle |
toCellRendererToggle :: (MonadIO m, IsCellRendererToggle o) => o -> m CellRendererToggle Source #
Cast to CellRendererToggle
, 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
getActivatable, getActive, getAlignedArea, getAlignment, getData, getFixedSize, getPadding, getPreferredHeight, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRadio, getRequestMode, getSensitive, getSize, getState, getVisible.
Setters
setActivatable, setActive, setAlignment, setData, setDataFull, setFixedSize, setPadding, setProperty, setRadio, setSensitive, setVisible.
getActivatable
cellRendererToggleGetActivatable Source #
:: (HasCallStack, MonadIO m, IsCellRendererToggle a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the cell renderer is activatable. See
cellRendererToggleSetActivatable
.
Since: 2.18
getActive
cellRendererToggleGetActive Source #
:: (HasCallStack, MonadIO m, IsCellRendererToggle a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the cell renderer is active. See
cellRendererToggleSetActive
.
getRadio
cellRendererToggleGetRadio Source #
:: (HasCallStack, MonadIO m, IsCellRendererToggle a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether we’re rendering radio toggles rather than checkboxes.
new
cellRendererToggleNew Source #
:: (HasCallStack, MonadIO m) | |
=> m CellRendererToggle | Returns: the new cell renderer |
Creates a new CellRendererToggle
. Adjust rendering
parameters using object properties. Object properties can be set
globally (with g_object_set()
). Also, with TreeViewColumn
, you
can bind a property to a value in a TreeModel
. For example, you
can bind the “active” property on the cell renderer to a boolean value
in the model, thus causing the check button to reflect the state of
the model.
setActivatable
cellRendererToggleSetActivatable Source #
:: (HasCallStack, MonadIO m, IsCellRendererToggle a) | |
=> a |
|
-> Bool |
|
-> m () |
Makes the cell renderer activatable.
Since: 2.18
setActive
cellRendererToggleSetActive Source #
:: (HasCallStack, MonadIO m, IsCellRendererToggle a) | |
=> a |
|
-> Bool |
|
-> m () |
Activates or deactivates a cell renderer.
setRadio
cellRendererToggleSetRadio Source #
:: (HasCallStack, MonadIO m, IsCellRendererToggle a) | |
=> a |
|
-> Bool |
|
-> m () |
If radio
is True
, the cell renderer renders a radio toggle
(i.e. a toggle in a group of mutually-exclusive toggles).
If False
, it renders a check toggle (a standalone boolean option).
This can be set globally for the cell renderer, or changed just
before rendering each cell in the model (for TreeView
, you set
up a per-row setting using TreeViewColumn
to associate model
columns with cell renderer properties).
Properties
activatable
No description available in the introspection data.
constructCellRendererToggleActivatable :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “activatable
” property. This is rarely needed directly, but it is used by new
.
getCellRendererToggleActivatable :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool Source #
Get the value of the “activatable
” property.
When overloading is enabled, this is equivalent to
get
cellRendererToggle #activatable
setCellRendererToggleActivatable :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m () Source #
Set the value of the “activatable
” property.
When overloading is enabled, this is equivalent to
set
cellRendererToggle [ #activatable:=
value ]
active
No description available in the introspection data.
constructCellRendererToggleActive :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “active
” property. This is rarely needed directly, but it is used by new
.
getCellRendererToggleActive :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool Source #
Get the value of the “active
” property.
When overloading is enabled, this is equivalent to
get
cellRendererToggle #active
setCellRendererToggleActive :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m () Source #
Set the value of the “active
” property.
When overloading is enabled, this is equivalent to
set
cellRendererToggle [ #active:=
value ]
inconsistent
No description available in the introspection data.
constructCellRendererToggleInconsistent :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “inconsistent
” property. This is rarely needed directly, but it is used by new
.
getCellRendererToggleInconsistent :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool Source #
Get the value of the “inconsistent
” property.
When overloading is enabled, this is equivalent to
get
cellRendererToggle #inconsistent
setCellRendererToggleInconsistent :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m () Source #
Set the value of the “inconsistent
” property.
When overloading is enabled, this is equivalent to
set
cellRendererToggle [ #inconsistent:=
value ]
indicatorSize
No description available in the introspection data.
constructCellRendererToggleIndicatorSize :: (IsCellRendererToggle o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “indicator-size
” property. This is rarely needed directly, but it is used by new
.
getCellRendererToggleIndicatorSize :: (MonadIO m, IsCellRendererToggle o) => o -> m Int32 Source #
Get the value of the “indicator-size
” property.
When overloading is enabled, this is equivalent to
get
cellRendererToggle #indicatorSize
setCellRendererToggleIndicatorSize :: (MonadIO m, IsCellRendererToggle o) => o -> Int32 -> m () Source #
Set the value of the “indicator-size
” property.
When overloading is enabled, this is equivalent to
set
cellRendererToggle [ #indicatorSize:=
value ]
radio
No description available in the introspection data.
constructCellRendererToggleRadio :: (IsCellRendererToggle o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “radio
” property. This is rarely needed directly, but it is used by new
.
getCellRendererToggleRadio :: (MonadIO m, IsCellRendererToggle o) => o -> m Bool Source #
Get the value of the “radio
” property.
When overloading is enabled, this is equivalent to
get
cellRendererToggle #radio
setCellRendererToggleRadio :: (MonadIO m, IsCellRendererToggle o) => o -> Bool -> m () Source #
Set the value of the “radio
” property.
When overloading is enabled, this is equivalent to
set
cellRendererToggle [ #radio:=
value ]
Signals
toggled
type C_CellRendererToggleToggledCallback = Ptr () -> CString -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type CellRendererToggleToggledCallback Source #
The toggled signal is emitted when the cell is toggled.
It is the responsibility of the application to update the model
with the correct value to store at path
. Often this is simply the
opposite of the value currently stored at path
.
afterCellRendererToggleToggled :: (IsCellRendererToggle a, MonadIO m) => a -> CellRendererToggleToggledCallback -> m SignalHandlerId Source #
Connect a signal handler for the toggled signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
cellRendererToggle #toggled callback
genClosure_CellRendererToggleToggled :: MonadIO m => CellRendererToggleToggledCallback -> m (GClosure C_CellRendererToggleToggledCallback) Source #
Wrap the callback into a GClosure
.
mk_CellRendererToggleToggledCallback :: C_CellRendererToggleToggledCallback -> IO (FunPtr C_CellRendererToggleToggledCallback) Source #
Generate a function pointer callable from C code, from a C_CellRendererToggleToggledCallback
.
noCellRendererToggleToggledCallback :: Maybe CellRendererToggleToggledCallback Source #
A convenience synonym for
.Nothing
:: Maybe
CellRendererToggleToggledCallback
onCellRendererToggleToggled :: (IsCellRendererToggle a, MonadIO m) => a -> CellRendererToggleToggledCallback -> m SignalHandlerId Source #
Connect a signal handler for the toggled signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
cellRendererToggle #toggled callback