gi-gtk-3.0.24: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.CellRendererToggle

Contents

Description

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 CellRendererToggle::toggled signal.

Synopsis

Exported types

class GObject o => IsCellRendererToggle o Source #

Type class for types which can be safely cast to CellRendererToggle, for instance with toCellRendererToggle.

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

getActivatable

cellRendererToggleGetActivatable Source #

Arguments

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

toggle: a CellRendererToggle

-> m Bool

Returns: True if the cell renderer is activatable.

Returns whether the cell renderer is activatable. See cellRendererToggleSetActivatable.

Since: 2.18

getActive

cellRendererToggleGetActive Source #

Arguments

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

toggle: a CellRendererToggle

-> m Bool

Returns: True if the cell renderer is active.

Returns whether the cell renderer is active. See cellRendererToggleSetActive.

getRadio

cellRendererToggleGetRadio Source #

Arguments

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

toggle: a CellRendererToggle

-> m Bool

Returns: True if we’re rendering radio toggles rather than checkboxes

Returns whether we’re rendering radio toggles rather than checkboxes.

new

cellRendererToggleNew Source #

Arguments

:: (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 #

Arguments

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

toggle: a CellRendererToggle.

-> Bool

setting: the value to set.

-> m () 

Makes the cell renderer activatable.

Since: 2.18

setActive

cellRendererToggleSetActive Source #

Arguments

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

toggle: a CellRendererToggle.

-> Bool

setting: the value to set.

-> m () 

Activates or deactivates a cell renderer.

setRadio

cellRendererToggleSetRadio Source #

Arguments

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

toggle: a CellRendererToggle

-> Bool

radio: True to make the toggle look like a radio button

-> 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 => Bool -> IO (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 => Bool -> IO (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 => Bool -> IO (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 => Int32 -> IO (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 => Bool -> IO (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 #

Arguments

 = Text

path: string representation of TreePath describing the event location

-> IO () 

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

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