Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
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
- 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, MonadIO m) => Bool -> m (GValueConstruct o)
- getToggleActionActive :: (MonadIO m, IsToggleAction o) => o -> m Bool
- setToggleActionActive :: (MonadIO m, IsToggleAction o) => o -> Bool -> m ()
- constructToggleActionDrawAsRadio :: (IsToggleAction o, MonadIO m) => Bool -> m (GValueConstruct o)
- getToggleActionDrawAsRadio :: (MonadIO m, IsToggleAction o) => o -> m Bool
- setToggleActionDrawAsRadio :: (MonadIO m, IsToggleAction o) => o -> Bool -> m ()
- type ToggleActionToggledCallback = IO ()
- afterToggleActionToggled :: (IsToggleAction a, MonadIO m) => a -> ((?self :: a) => ToggleActionToggledCallback) -> m SignalHandlerId
- onToggleActionToggled :: (IsToggleAction a, MonadIO m) => a -> ((?self :: a) => ToggleActionToggledCallback) -> m SignalHandlerId
Exported types
newtype ToggleAction Source #
Memory-managed wrapper type.
ToggleAction (ManagedPtr ToggleAction) |
Instances
Eq ToggleAction Source # | |
Defined in GI.Gtk.Objects.ToggleAction (==) :: ToggleAction -> ToggleAction -> Bool # (/=) :: ToggleAction -> ToggleAction -> Bool # | |
GObject ToggleAction Source # | |
Defined in GI.Gtk.Objects.ToggleAction | |
ManagedPtrNewtype ToggleAction Source # | |
Defined in GI.Gtk.Objects.ToggleAction toManagedPtr :: ToggleAction -> ManagedPtr ToggleAction | |
TypedObject ToggleAction Source # | |
Defined in GI.Gtk.Objects.ToggleAction | |
HasParentTypes ToggleAction Source # | |
Defined in GI.Gtk.Objects.ToggleAction | |
IsGValue (Maybe ToggleAction) Source # | Convert |
Defined in GI.Gtk.Objects.ToggleAction gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe ToggleAction -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe 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
.
Methods
Click to display all available methods, including inherited ones
Methods
activate, addChild, bindProperty, bindPropertyFull, blockActivate, connectAccelerator, constructChild, createIcon, createMenu, createMenuItem, createToolItem, customFinished, customTagEnd, customTagStart, disconnectAccelerator, forceFloating, freezeNotify, getv, isFloating, isSensitive, isVisible, notify, notifyByPspec, parserFinished, ref, refSink, runDispose, stealData, stealQdata, thawNotify, toggled, unblockActivate, unref, watchClosure.
Getters
getAccelClosure, getAccelPath, getActive, getAlwaysShowImage, getData, getDrawAsRadio, getGicon, getIconName, getInternalChild, getIsImportant, getLabel, getName, getProperty, getProxies, getQdata, getSensitive, getShortLabel, getStockId, getTooltip, getVisible, getVisibleHorizontal, getVisibleVertical.
Setters
setAccelGroup, setAccelPath, setActive, setAlwaysShowImage, setBuildableProperty, setData, setDataFull, setDrawAsRadio, setGicon, setIconName, setIsImportant, setLabel, setName, setProperty, setSensitive, setShortLabel, setStockId, setTooltip, setVisible, setVisibleHorizontal, setVisibleVertical.
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, 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
.
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, MonadIO m) => Bool -> m (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 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 -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onToggleActionToggled :: (IsToggleAction a, MonadIO m) => a -> ((?self :: 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