Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
A ToggleAction
corresponds roughly to a CheckMenuItem
. It has an
“active” state specifying whether the action has been checked or not.
Synopsis
- newtype ToggleAction = ToggleAction (ManagedPtr ToggleAction)
- class (GObject o, IsDescendantOf ToggleAction o) => IsToggleAction o
- toToggleAction :: (MonadIO m, IsToggleAction o) => o -> m ToggleAction
- noToggleAction :: Maybe ToggleAction
- toggleActionGetActive :: (HasCallStack, MonadIO m, IsToggleAction a) => a -> m Bool
- toggleActionGetDrawAsRadio :: (HasCallStack, MonadIO m, IsToggleAction a) => a -> m Bool
- toggleActionNew :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> Maybe Text -> Maybe Text -> m ToggleAction
- toggleActionSetActive :: (HasCallStack, MonadIO m, IsToggleAction a) => a -> Bool -> m ()
- toggleActionSetDrawAsRadio :: (HasCallStack, MonadIO m, IsToggleAction a) => a -> Bool -> m ()
- toggleActionToggled :: (HasCallStack, MonadIO m, IsToggleAction a) => a -> m ()
- constructToggleActionActive :: IsToggleAction o => Bool -> IO (GValueConstruct o)
- getToggleActionActive :: (MonadIO m, IsToggleAction o) => o -> m Bool
- setToggleActionActive :: (MonadIO m, IsToggleAction o) => o -> Bool -> m ()
- constructToggleActionDrawAsRadio :: IsToggleAction o => Bool -> IO (GValueConstruct o)
- getToggleActionDrawAsRadio :: (MonadIO m, IsToggleAction o) => o -> m Bool
- setToggleActionDrawAsRadio :: (MonadIO m, IsToggleAction o) => o -> Bool -> m ()
- type C_ToggleActionToggledCallback = Ptr () -> Ptr () -> IO ()
- type ToggleActionToggledCallback = IO ()
- afterToggleActionToggled :: (IsToggleAction a, MonadIO m) => a -> ToggleActionToggledCallback -> m SignalHandlerId
- genClosure_ToggleActionToggled :: MonadIO m => ToggleActionToggledCallback -> m (GClosure C_ToggleActionToggledCallback)
- mk_ToggleActionToggledCallback :: C_ToggleActionToggledCallback -> IO (FunPtr C_ToggleActionToggledCallback)
- noToggleActionToggledCallback :: Maybe ToggleActionToggledCallback
- onToggleActionToggled :: (IsToggleAction a, MonadIO m) => a -> ToggleActionToggledCallback -> m SignalHandlerId
- wrap_ToggleActionToggledCallback :: ToggleActionToggledCallback -> C_ToggleActionToggledCallback
Exported types
newtype ToggleAction Source #
Memory-managed wrapper type.
Instances
Eq ToggleAction Source # | |
Defined in GI.Gtk.Objects.ToggleAction (==) :: ToggleAction -> ToggleAction -> Bool # (/=) :: ToggleAction -> ToggleAction -> Bool # | |
IsGValue ToggleAction Source # | Convert |
Defined in GI.Gtk.Objects.ToggleAction toGValue :: ToggleAction -> IO GValue # fromGValue :: GValue -> IO ToggleAction # | |
GObject ToggleAction Source # | |
Defined in GI.Gtk.Objects.ToggleAction gobjectType :: IO GType # | |
HasParentTypes ToggleAction Source # | |
Defined in GI.Gtk.Objects.ToggleAction | |
type ParentTypes ToggleAction Source # | |
Defined in GI.Gtk.Objects.ToggleAction |
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 # | |
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
.
noToggleAction :: Maybe ToggleAction Source #
A convenience alias for Nothing
:: Maybe
ToggleAction
.
Methods
Overloaded methods
getActive
toggleActionGetActive Source #
:: (HasCallStack, MonadIO m, IsToggleAction a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsToggleAction a) | |
=> a |
|
-> 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
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> m ToggleAction | Returns: a new |
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 #
:: (HasCallStack, MonadIO m, IsToggleAction a) | |
=> a |
|
-> Bool |
|
-> m () |
Deprecated: (Since version 3.10)
Sets the checked state on the toggle action.
Since: 2.4
setDrawAsRadio
toggleActionSetDrawAsRadio Source #
:: (HasCallStack, MonadIO m, IsToggleAction a) | |
=> a |
|
-> Bool |
|
-> m () |
Deprecated: (Since version 3.10)
Sets whether the action should have proxies like a radio action.
Since: 2.4
toggled
:: (HasCallStack, MonadIO m, IsToggleAction a) | |
=> a |
|
-> 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
genClosure_ToggleActionToggled :: MonadIO m => ToggleActionToggledCallback -> m (GClosure C_ToggleActionToggledCallback) Source #
Wrap the callback into a GClosure
.
mk_ToggleActionToggledCallback :: C_ToggleActionToggledCallback -> IO (FunPtr C_ToggleActionToggledCallback) Source #
Generate a function pointer callable from C code, from a C_ToggleActionToggledCallback
.
noToggleActionToggledCallback :: Maybe ToggleActionToggledCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ToggleActionToggledCallback
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