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 CheckButton
places a discrete ToggleButton
next to a widget,
(usually a Label
). See the section on ToggleButton
widgets for
more information about toggle/check buttons.
The important signal ( toggled ) is also inherited from
ToggleButton
.
CSS nodes
plain code
checkbutton ├── check ╰── <child>
A GtkCheckButton with indicator (see checkButtonSetDrawIndicator
) has a
main CSS node with name checkbutton and a subnode with name check.
plain code
button.check ├── check ╰── <child>
A GtkCheckButton without indicator changes the name of its main node to button and adds a .check style class to it. The subnode is invisible in this case.
Synopsis
- newtype CheckButton = CheckButton (ManagedPtr CheckButton)
- class (GObject o, IsDescendantOf CheckButton o) => IsCheckButton o
- toCheckButton :: (MonadIO m, IsCheckButton o) => o -> m CheckButton
- checkButtonGetDrawIndicator :: (HasCallStack, MonadIO m, IsCheckButton a) => a -> m Bool
- checkButtonGetInconsistent :: (HasCallStack, MonadIO m, IsCheckButton a) => a -> m Bool
- checkButtonNew :: (HasCallStack, MonadIO m) => m CheckButton
- checkButtonNewWithLabel :: (HasCallStack, MonadIO m) => Text -> m CheckButton
- checkButtonNewWithMnemonic :: (HasCallStack, MonadIO m) => Text -> m CheckButton
- checkButtonSetDrawIndicator :: (HasCallStack, MonadIO m, IsCheckButton a) => a -> Bool -> m ()
- checkButtonSetInconsistent :: (HasCallStack, MonadIO m, IsCheckButton a) => a -> Bool -> m ()
- constructCheckButtonDrawIndicator :: (IsCheckButton o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCheckButtonDrawIndicator :: (MonadIO m, IsCheckButton o) => o -> m Bool
- setCheckButtonDrawIndicator :: (MonadIO m, IsCheckButton o) => o -> Bool -> m ()
- constructCheckButtonInconsistent :: (IsCheckButton o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCheckButtonInconsistent :: (MonadIO m, IsCheckButton o) => o -> m Bool
- setCheckButtonInconsistent :: (MonadIO m, IsCheckButton o) => o -> Bool -> m ()
Exported types
newtype CheckButton Source #
Memory-managed wrapper type.
Instances
Eq CheckButton Source # | |
Defined in GI.Gtk.Objects.CheckButton (==) :: CheckButton -> CheckButton -> Bool # (/=) :: CheckButton -> CheckButton -> Bool # | |
IsGValue CheckButton Source # | Convert |
Defined in GI.Gtk.Objects.CheckButton toGValue :: CheckButton -> IO GValue # fromGValue :: GValue -> IO CheckButton # | |
ManagedPtrNewtype CheckButton Source # | |
Defined in GI.Gtk.Objects.CheckButton | |
TypedObject CheckButton Source # | |
Defined in GI.Gtk.Objects.CheckButton | |
GObject CheckButton Source # | |
Defined in GI.Gtk.Objects.CheckButton | |
HasParentTypes CheckButton Source # | |
Defined in GI.Gtk.Objects.CheckButton | |
type ParentTypes CheckButton Source # | |
Defined in GI.Gtk.Objects.CheckButton type ParentTypes CheckButton = '[ToggleButton, Button, Widget, Object, ImplementorIface, Actionable, Buildable, ConstraintTarget] |
class (GObject o, IsDescendantOf CheckButton o) => IsCheckButton o Source #
Type class for types which can be safely cast to CheckButton
, for instance with toCheckButton
.
Instances
(GObject o, IsDescendantOf CheckButton o) => IsCheckButton o Source # | |
Defined in GI.Gtk.Objects.CheckButton |
toCheckButton :: (MonadIO m, IsCheckButton o) => o -> m CheckButton Source #
Cast to CheckButton
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Overloaded methods
getDrawIndicator
checkButtonGetDrawIndicator Source #
:: (HasCallStack, MonadIO m, IsCheckButton a) | |
=> a |
|
-> m Bool | Returns: The value of the GtkCheckButton:draw-indicator property. |
Returns Whether or not the indicator part of the button gets drawn.
getInconsistent
checkButtonGetInconsistent Source #
:: (HasCallStack, MonadIO m, IsCheckButton a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the check button is in an inconsistent state.
new
:: (HasCallStack, MonadIO m) | |
=> m CheckButton | Returns: a |
Creates a new CheckButton
.
newWithLabel
checkButtonNewWithLabel Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m CheckButton | Returns: a |
Creates a new CheckButton
with a Label
to the right of it.
newWithMnemonic
checkButtonNewWithMnemonic Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m CheckButton | Returns: a new |
Creates a new CheckButton
containing a label. The label
will be created using labelNewWithMnemonic
, so underscores
in label
indicate the mnemonic for the check button.
setDrawIndicator
checkButtonSetDrawIndicator Source #
:: (HasCallStack, MonadIO m, IsCheckButton a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the indicator part of the button is drawn. This is important for
cases where the check button should have the functinality of a check button,
but the visuals of a regular button, like in a StackSwitcher
.
setInconsistent
checkButtonSetInconsistent Source #
:: (HasCallStack, MonadIO m, IsCheckButton a) | |
=> a |
|
-> Bool |
|
-> m () |
If the user has selected a range of elements (such as some text or spreadsheet cells) that are affected by a check button, and the current values in that range are inconsistent, you may want to display the toggle in an "in between" state. Normally you would turn off the inconsistent state again if the user checks the check button. This has to be done manually, gtk_check_button_set_inconsistent only affects visual appearance, not the semantics of the button.
Properties
drawIndicator
No description available in the introspection data.
constructCheckButtonDrawIndicator :: (IsCheckButton o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “draw-indicator
” property. This is rarely needed directly, but it is used by new
.
getCheckButtonDrawIndicator :: (MonadIO m, IsCheckButton o) => o -> m Bool Source #
Get the value of the “draw-indicator
” property.
When overloading is enabled, this is equivalent to
get
checkButton #drawIndicator
setCheckButtonDrawIndicator :: (MonadIO m, IsCheckButton o) => o -> Bool -> m () Source #
Set the value of the “draw-indicator
” property.
When overloading is enabled, this is equivalent to
set
checkButton [ #drawIndicator:=
value ]
inconsistent
No description available in the introspection data.
constructCheckButtonInconsistent :: (IsCheckButton o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “inconsistent
” property. This is rarely needed directly, but it is used by new
.
getCheckButtonInconsistent :: (MonadIO m, IsCheckButton o) => o -> m Bool Source #
Get the value of the “inconsistent
” property.
When overloading is enabled, this is equivalent to
get
checkButton #inconsistent
setCheckButtonInconsistent :: (MonadIO m, IsCheckButton o) => o -> Bool -> m () Source #
Set the value of the “inconsistent
” property.
When overloading is enabled, this is equivalent to
set
checkButton [ #inconsistent:=
value ]