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.ToggleToolButton

Contents

Description

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

Exported types

class (GObject o, IsDescendantOf ToggleToolButton o) => IsToggleToolButton o Source #

Type class for types which can be safely cast to ToggleToolButton, for instance with toToggleToolButton.

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.

Methods

getActive

toggleToolButtonGetActive Source #

Arguments

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

button: a ToggleToolButton

-> m Bool

Returns: True if the toggle tool button is pressed in, False if not

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

toggleToolButtonNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m ToggleToolButton

Returns: a newly created ToggleToolButton

Returns a new ToggleToolButton

Since: 2.4

newFromStock

toggleToolButtonNewFromStock Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

stockId: the name of the stock item

-> m ToggleToolButton

Returns: A new ToggleToolButton

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 #

Arguments

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

button: a ToggleToolButton

-> Bool

isActive: whether button should be active

-> m () 

Sets the status of the toggle tool button. Set to True if you want the GtkToggleButton to be “pressed in”, and False to raise it. This action causes the toggled signal to be emitted.

Since: 2.4

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

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