gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Buttons.ScaleButton

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes
- Signals

Description

A button which pops up a scale

- Module available since Gtk+ version 2.12

Synopsis

- data ScaleButton
- class ButtonClass o => ScaleButtonClass o
- castToScaleButton :: GObjectClass obj => obj -> ScaleButton
- toScaleButton :: ScaleButtonClass o => o -> ScaleButton
- scaleButtonNew :: GlibString string => IconSize -> Double -> Double -> Double -> [string] -> IO ScaleButton
- scaleButtonSetIcons :: (ScaleButtonClass self, GlibString string) => self -> [string] -> IO ()
- scaleButtonGetPopup :: ScaleButtonClass self => self -> IO Widget
- scaleButtonGetPlusButton :: ScaleButtonClass self => self -> IO Widget
- scaleButtonGetMinusButton :: ScaleButtonClass self => self -> IO Widget
- scaleButtonValue :: ScaleButtonClass self => Attr self Double
- scaleButtonSize :: ScaleButtonClass self => Attr self IconSize
- scaleButtonAdjustment :: ScaleButtonClass self => Attr self Adjustment
- scaleButtonIcons :: (ScaleButtonClass self, GlibString string) => ReadWriteAttr self [string] (Maybe [string])
- scaleButtonPopdown :: ScaleButtonClass self => Signal self (IO ())
- scaleButtonPopup :: ScaleButtonClass self => Signal self (IO ())
- scaleButtonValueChanged :: ScaleButtonClass self => Signal self (Double -> IO ())

# Detail

`ScaleButton` provides a button which pops up a scale widget. This kind of widget is commonly used for volume controls in multimedia applications, and Gtk+ provides a `VolumeButton` subclass that is tailored for this use case.

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Container
    | +----Bin
    | +----Button
    | +----ScaleButton
    | +----VolumeButton

# Types

data ScaleButton Source #

#### Instances

Instances details

Eq ScaleButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: ScaleButton -> ScaleButton -> Bool Source # (/=) :: ScaleButton -> ScaleButton -> Bool Source #
Ord ScaleButton Source # |

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: ScaleButton -> ScaleButton -> Ordering Source #

(<) :: ScaleButton -> ScaleButton -> Bool Source #

(<=) :: ScaleButton -> ScaleButton -> Bool Source #

(>) :: ScaleButton -> ScaleButton -> Bool Source #

(>=) :: ScaleButton -> ScaleButton -> Bool Source #

max :: ScaleButton -> ScaleButton -> ScaleButton Source #

min :: ScaleButton -> ScaleButton -> ScaleButton Source #

GObjectClass ScaleButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: ScaleButton -> GObject Source # unsafeCastGObject :: GObject -> ScaleButton Source #
BinClass ScaleButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ButtonClass ScaleButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ContainerClass ScaleButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ScaleButtonClass ScaleButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WidgetClass ScaleButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class ButtonClass o => ScaleButtonClass o Source #

#### Instances

Instances details

ScaleButtonClass ScaleButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ScaleButtonClass VolumeButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToScaleButton :: GObjectClass obj => obj -> ScaleButton Source #

toScaleButton :: ScaleButtonClass o => o -> ScaleButton Source #

# Constructors

scaleButtonNew Source #

Arguments

:: GlibString string |
=> IconSize | `size` - a stock icon size
-> Double | `min` - the minimum value of the scale (usually 0)
-> Double | `max` - the maximum value of the scale (usually 100)
-> Double | `step` - the stepping of value when a scroll-wheel event, or up/down arrow event occurs (usually 2)

-> [string]

    icons

-> IO ScaleButton |

Creates a `ScaleButton`, with a range between `min` and `max`, with a stepping of `step`.

# Methods

scaleButtonSetIcons Source #

Arguments

:: (ScaleButtonClass self, GlibString string) |
=> self |

-> [string]

    icons

-> IO () |

Sets the icons to be used by the scale button. For details, see the "icons" property.

scaleButtonGetPopup Source #

Arguments

:: ScaleButtonClass self |
=> self |
-> IO Widget | returns the popup of the `ScaleButton`

Retrieves the popup of the `ScaleButton`.

- Available since Gtk+ version 2.14

scaleButtonGetPlusButton Source #

Arguments

:: ScaleButtonClass self |
=> self |
-> IO Widget | returns the plus button of the `ScaleButton`.

Retrieves the plus button of the `ScaleButton`.

- Available since Gtk+ version 2.14

scaleButtonGetMinusButton Source #

Arguments

:: ScaleButtonClass self |
=> self |
-> IO Widget | returns the minus button of the `ScaleButton`.

Retrieves the minus button of the `ScaleButton`.

- Available since Gtk+ version 2.14

# Attributes

scaleButtonValue :: ScaleButtonClass self => Attr self Double Source #

The value of the scale.

Default value: 0

scaleButtonSize :: ScaleButtonClass self => Attr self IconSize Source #

The icon size.

Default value: '`IconSizeSmallToolbar'`

scaleButtonAdjustment :: ScaleButtonClass self => Attr self Adjustment Source #

The `Adjustment` that contains the current value of this scale button object.

scaleButtonIcons :: (ScaleButtonClass self, GlibString string) => ReadWriteAttr self [string] (Maybe [string]) Source #

The names of the icons to be used by the scale button. The first item in the array will be used in the button when the current value is the lowest value, the second item for the highest value. All the subsequent icons will be used for all the other values, spread evenly over the range of values.

If there's only one icon name in the icons array, it will be used for all the values. If only two icon names are in the icons array, the first one will be used for the bottom 50% of the scale, and the second one for the top 50%.

It is recommended to use at least 3 icons so that the `ScaleButton` reflects the current value of the scale better for the users.

Since 2.12

# Signals

scaleButtonPopdown :: ScaleButtonClass self => Signal self (IO ()) Source #

The `popdown` signal is a keybinding signal which gets emitted to popdown the scale widget.

The default binding for this signal is Escape.

scaleButtonPopup :: ScaleButtonClass self => Signal self (IO ()) Source #

The `popup` signal is a keybinding signal which gets emitted to popup the scale widget.

The default bindings for this signal are Space, Enter and Return.

scaleButtonValueChanged :: ScaleButtonClass self => Signal self (Double -> IO ()) Source #

The `scaleButtonValueChanged` signal is emitted when the value field has changed.