gi-gtk-3.0.31: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.ToggleAction

Contents

Description

A ToggleAction corresponds roughly to a CheckMenuItem. It has an “active” state specifying whether the action has been checked or not.

Synopsis

Exported types

newtype ToggleAction Source #

Memory-managed wrapper type.

Instances
GObject ToggleAction Source # 
Instance details

Defined in GI.Gtk.Objects.ToggleAction

Methods

gobjectType :: IO GType #

HasParentTypes ToggleAction Source # 
Instance details

Defined in GI.Gtk.Objects.ToggleAction

type ParentTypes ToggleAction Source # 
Instance details

Defined in GI.Gtk.Objects.ToggleAction

type ParentTypes ToggleAction = Action ': (Object ': (Buildable ': ([] :: [Type])))

class (GObject o, IsDescendantOf ToggleAction o) => IsToggleAction o Source #

Type class for types which can be safely cast to ToggleAction, for instance with toToggleAction.

Instances
(GObject o, IsDescendantOf ToggleAction o) => IsToggleAction o Source # 
Instance details

Defined in GI.Gtk.Objects.ToggleAction

toToggleAction :: (MonadIO m, IsToggleAction o) => o -> m ToggleAction Source #

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

Methods

getActive

toggleActionGetActive Source #

Arguments

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

action: the action object

-> m Bool

Returns: the checked state of the toggle action

Deprecated: (Since version 3.10)

Returns the checked state of the toggle action.

Since: 2.4

getDrawAsRadio

toggleActionGetDrawAsRadio Source #

Arguments

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

action: the action object

-> m Bool

Returns: whether the action should have proxies like a radio action.

Deprecated: (Since version 3.10)

Returns whether the action should have proxies like a radio action.

Since: 2.4

new

toggleActionNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: A unique name for the action

-> Maybe Text

label: The label displayed in menu items and on buttons, or Nothing

-> Maybe Text

tooltip: A tooltip for the action, or Nothing

-> Maybe Text

stockId: The stock icon to display in widgets representing the action, or Nothing

-> m ToggleAction

Returns: a new ToggleAction

Deprecated: (Since version 3.10)

Creates a new ToggleAction object. To add the action to a ActionGroup and set the accelerator for the action, call actionGroupAddActionWithAccel.

Since: 2.4

setActive

toggleActionSetActive Source #

Arguments

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

action: the action object

-> Bool

isActive: whether the action should be checked or not

-> m () 

Deprecated: (Since version 3.10)

Sets the checked state on the toggle action.

Since: 2.4

setDrawAsRadio

toggleActionSetDrawAsRadio Source #

Arguments

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

action: the action object

-> Bool

drawAsRadio: whether the action should have proxies like a radio action

-> m () 

Deprecated: (Since version 3.10)

Sets whether the action should have proxies like a radio action.

Since: 2.4

toggled

toggleActionToggled Source #

Arguments

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

action: the action object

-> m () 

Deprecated: (Since version 3.10)

Emits the “toggled” signal on the toggle action.

Since: 2.4

Properties

active

Whether the toggle action should be active.

Since: 2.10

constructToggleActionActive :: IsToggleAction 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.

getToggleActionActive :: (MonadIO m, IsToggleAction o) => o -> m Bool Source #

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

get toggleAction #active

setToggleActionActive :: (MonadIO m, IsToggleAction o) => o -> Bool -> m () Source #

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

set toggleAction [ #active := value ]

drawAsRadio

Whether the proxies for this action look like radio action proxies.

This is an appearance property and thus only applies if Activatable:use-action-appearance is True.

constructToggleActionDrawAsRadio :: IsToggleAction o => Bool -> IO (GValueConstruct o) Source #

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

getToggleActionDrawAsRadio :: (MonadIO m, IsToggleAction o) => o -> m Bool Source #

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

get toggleAction #drawAsRadio

setToggleActionDrawAsRadio :: (MonadIO m, IsToggleAction o) => o -> Bool -> m () Source #

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

set toggleAction [ #drawAsRadio := value ]

Signals

toggled

type C_ToggleActionToggledCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type ToggleActionToggledCallback = IO () Source #

Deprecated: (Since version 3.10)

Should be connected if you wish to perform an action whenever the ToggleAction state is changed.

afterToggleActionToggled :: (IsToggleAction a, MonadIO m) => a -> ToggleActionToggledCallback -> 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 toggleAction #toggled callback

onToggleActionToggled :: (IsToggleAction a, MonadIO m) => a -> ToggleActionToggledCallback -> 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 toggleAction #toggled callback