Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
A ToggleToolButton
is a ToolItem
that contains a toggle
button.
Use toggleToolButtonNew
to create a new GtkToggleToolButton.
CSS nodes
GtkToggleToolButton has a single CSS node with name togglebutton.
Synopsis
- newtype ToggleToolButton = ToggleToolButton (ManagedPtr ToggleToolButton)
- class GObject o => IsToggleToolButton o
- toToggleToolButton :: (MonadIO m, IsToggleToolButton o) => o -> m ToggleToolButton
- noToggleToolButton :: Maybe ToggleToolButton
- toggleToolButtonGetActive :: (HasCallStack, MonadIO m, IsToggleToolButton a) => a -> m Bool
- toggleToolButtonNew :: (HasCallStack, MonadIO m) => m ToggleToolButton
- toggleToolButtonNewFromStock :: (HasCallStack, MonadIO m) => Text -> m ToggleToolButton
- toggleToolButtonSetActive :: (HasCallStack, MonadIO m, IsToggleToolButton a) => a -> Bool -> m ()
- constructToggleToolButtonActive :: IsToggleToolButton o => Bool -> IO (GValueConstruct o)
- getToggleToolButtonActive :: (MonadIO m, IsToggleToolButton o) => o -> m Bool
- setToggleToolButtonActive :: (MonadIO m, IsToggleToolButton o) => o -> Bool -> m ()
- type C_ToggleToolButtonToggledCallback = Ptr () -> Ptr () -> IO ()
- type ToggleToolButtonToggledCallback = IO ()
- afterToggleToolButtonToggled :: (IsToggleToolButton a, MonadIO m) => a -> ToggleToolButtonToggledCallback -> m SignalHandlerId
- genClosure_ToggleToolButtonToggled :: ToggleToolButtonToggledCallback -> IO Closure
- mk_ToggleToolButtonToggledCallback :: C_ToggleToolButtonToggledCallback -> IO (FunPtr C_ToggleToolButtonToggledCallback)
- noToggleToolButtonToggledCallback :: Maybe ToggleToolButtonToggledCallback
- onToggleToolButtonToggled :: (IsToggleToolButton a, MonadIO m) => a -> ToggleToolButtonToggledCallback -> m SignalHandlerId
- wrap_ToggleToolButtonToggledCallback :: ToggleToolButtonToggledCallback -> C_ToggleToolButtonToggledCallback
Exported types
newtype ToggleToolButton Source #
Memory-managed wrapper type.
Instances
class GObject o => IsToggleToolButton o Source #
Type class for types which can be safely cast to ToggleToolButton
, for instance with toToggleToolButton
.
Instances
(GObject a, (UnknownAncestorError ToggleToolButton a :: Constraint)) => IsToggleToolButton a Source # | |
Defined in GI.Gtk.Objects.ToggleToolButton | |
IsToggleToolButton ToggleToolButton Source # | |
Defined in GI.Gtk.Objects.ToggleToolButton | |
IsToggleToolButton RadioToolButton Source # | |
Defined in GI.Gtk.Objects.RadioToolButton |
toToggleToolButton :: (MonadIO m, IsToggleToolButton o) => o -> m ToggleToolButton Source #
Cast to ToggleToolButton
, for types for which this is known to be safe. For general casts, use castTo
.
noToggleToolButton :: Maybe ToggleToolButton Source #
A convenience alias for Nothing
:: Maybe
ToggleToolButton
.
Methods
getActive
toggleToolButtonGetActive Source #
:: (HasCallStack, MonadIO m, IsToggleToolButton a) | |
=> a |
|
-> m Bool | Returns: |
Queries a ToggleToolButton
and returns its current state.
Returns True
if the toggle button is pressed in and False
if it is raised.
Since: 2.4
new
:: (HasCallStack, MonadIO m) | |
=> m ToggleToolButton | Returns: a newly created |
Returns a new ToggleToolButton
Since: 2.4
newFromStock
toggleToolButtonNewFromStock Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m ToggleToolButton | Returns: A new |
Deprecated: (Since version 3.10)Use toggleToolButtonNew
instead.
Creates a new ToggleToolButton
containing the image and text from a
stock item. Some stock ids have preprocessor macros like STOCK_OK
and STOCK_APPLY
.
It is an error if stockId
is not a name of a stock item.
Since: 2.4
setActive
toggleToolButtonSetActive Source #
:: (HasCallStack, MonadIO m, IsToggleToolButton a) | |
=> a |
|
-> Bool |
|
-> m () |
Properties
active
If the toggle tool button should be pressed in.
Since: 2.8
constructToggleToolButtonActive :: IsToggleToolButton 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
.
getToggleToolButtonActive :: (MonadIO m, IsToggleToolButton o) => o -> m Bool Source #
Get the value of the “active
” property.
When overloading is enabled, this is equivalent to
get
toggleToolButton #active
setToggleToolButtonActive :: (MonadIO m, IsToggleToolButton o) => o -> Bool -> m () Source #
Set the value of the “active
” property.
When overloading is enabled, this is equivalent to
set
toggleToolButton [ #active:=
value ]
Signals
toggled
type C_ToggleToolButtonToggledCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ToggleToolButtonToggledCallback = IO () Source #
Emitted whenever the toggle tool button changes state.
afterToggleToolButtonToggled :: (IsToggleToolButton a, MonadIO m) => a -> ToggleToolButtonToggledCallback -> 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
toggleToolButton #toggled callback
genClosure_ToggleToolButtonToggled :: ToggleToolButtonToggledCallback -> IO Closure Source #
Wrap the callback into a Closure
.
mk_ToggleToolButtonToggledCallback :: C_ToggleToolButtonToggledCallback -> IO (FunPtr C_ToggleToolButtonToggledCallback) Source #
Generate a function pointer callable from C code, from a C_ToggleToolButtonToggledCallback
.
noToggleToolButtonToggledCallback :: Maybe ToggleToolButtonToggledCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ToggleToolButtonToggledCallback
onToggleToolButtonToggled :: (IsToggleToolButton a, MonadIO m) => a -> ToggleToolButtonToggledCallback -> 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
toggleToolButton #toggled callback