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 |
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.
CSS nodes
GtkScaleButton has a single CSS node with name button. To differentiate
it from a plain Button
, it gets the .scale style class.
- newtype ScaleButton = ScaleButton (ManagedPtr ScaleButton)
- class GObject o => IsScaleButton o
- toScaleButton :: IsScaleButton o => o -> IO ScaleButton
- noScaleButton :: Maybe ScaleButton
- data ScaleButtonGetAdjustmentMethodInfo
- scaleButtonGetAdjustment :: (HasCallStack, MonadIO m, IsScaleButton a) => a -> m Adjustment
- data ScaleButtonGetMinusButtonMethodInfo
- scaleButtonGetMinusButton :: (HasCallStack, MonadIO m, IsScaleButton a) => a -> m Button
- data ScaleButtonGetPlusButtonMethodInfo
- scaleButtonGetPlusButton :: (HasCallStack, MonadIO m, IsScaleButton a) => a -> m Button
- data ScaleButtonGetPopupMethodInfo
- scaleButtonGetPopup :: (HasCallStack, MonadIO m, IsScaleButton a) => a -> m Widget
- data ScaleButtonGetValueMethodInfo
- scaleButtonGetValue :: (HasCallStack, MonadIO m, IsScaleButton a) => a -> m Double
- scaleButtonNew :: (HasCallStack, MonadIO m) => Int32 -> Double -> Double -> Double -> Maybe [Text] -> m ScaleButton
- data ScaleButtonSetAdjustmentMethodInfo
- scaleButtonSetAdjustment :: (HasCallStack, MonadIO m, IsScaleButton a, IsAdjustment b) => a -> b -> m ()
- data ScaleButtonSetIconsMethodInfo
- scaleButtonSetIcons :: (HasCallStack, MonadIO m, IsScaleButton a) => a -> [Text] -> m ()
- data ScaleButtonSetValueMethodInfo
- scaleButtonSetValue :: (HasCallStack, MonadIO m, IsScaleButton a) => a -> Double -> m ()
- data ScaleButtonAdjustmentPropertyInfo
- constructScaleButtonAdjustment :: (IsScaleButton o, IsAdjustment a) => a -> IO (GValueConstruct o)
- getScaleButtonAdjustment :: (MonadIO m, IsScaleButton o) => o -> m Adjustment
- scaleButtonAdjustment :: AttrLabelProxy "adjustment"
- setScaleButtonAdjustment :: (MonadIO m, IsScaleButton o, IsAdjustment a) => o -> a -> m ()
- data ScaleButtonIconsPropertyInfo
- constructScaleButtonIcons :: IsScaleButton o => [Text] -> IO (GValueConstruct o)
- getScaleButtonIcons :: (MonadIO m, IsScaleButton o) => o -> m (Maybe [Text])
- scaleButtonIcons :: AttrLabelProxy "icons"
- setScaleButtonIcons :: (MonadIO m, IsScaleButton o) => o -> [Text] -> m ()
- data ScaleButtonSizePropertyInfo
- constructScaleButtonSize :: IsScaleButton o => IconSize -> IO (GValueConstruct o)
- getScaleButtonSize :: (MonadIO m, IsScaleButton o) => o -> m IconSize
- scaleButtonSize :: AttrLabelProxy "size"
- setScaleButtonSize :: (MonadIO m, IsScaleButton o) => o -> IconSize -> m ()
- data ScaleButtonValuePropertyInfo
- constructScaleButtonValue :: IsScaleButton o => Double -> IO (GValueConstruct o)
- getScaleButtonValue :: (MonadIO m, IsScaleButton o) => o -> m Double
- scaleButtonValue :: AttrLabelProxy "value"
- setScaleButtonValue :: (MonadIO m, IsScaleButton o) => o -> Double -> m ()
- type C_ScaleButtonPopdownCallback = Ptr () -> Ptr () -> IO ()
- type ScaleButtonPopdownCallback = IO ()
- data ScaleButtonPopdownSignalInfo
- afterScaleButtonPopdown :: (GObject a, MonadIO m) => a -> ScaleButtonPopdownCallback -> m SignalHandlerId
- genClosure_ScaleButtonPopdown :: ScaleButtonPopdownCallback -> IO Closure
- mk_ScaleButtonPopdownCallback :: C_ScaleButtonPopdownCallback -> IO (FunPtr C_ScaleButtonPopdownCallback)
- noScaleButtonPopdownCallback :: Maybe ScaleButtonPopdownCallback
- onScaleButtonPopdown :: (GObject a, MonadIO m) => a -> ScaleButtonPopdownCallback -> m SignalHandlerId
- wrap_ScaleButtonPopdownCallback :: ScaleButtonPopdownCallback -> Ptr () -> Ptr () -> IO ()
- type C_ScaleButtonPopupCallback = Ptr () -> Ptr () -> IO ()
- type ScaleButtonPopupCallback = IO ()
- data ScaleButtonPopupSignalInfo
- afterScaleButtonPopup :: (GObject a, MonadIO m) => a -> ScaleButtonPopupCallback -> m SignalHandlerId
- genClosure_ScaleButtonPopup :: ScaleButtonPopupCallback -> IO Closure
- mk_ScaleButtonPopupCallback :: C_ScaleButtonPopupCallback -> IO (FunPtr C_ScaleButtonPopupCallback)
- noScaleButtonPopupCallback :: Maybe ScaleButtonPopupCallback
- onScaleButtonPopup :: (GObject a, MonadIO m) => a -> ScaleButtonPopupCallback -> m SignalHandlerId
- wrap_ScaleButtonPopupCallback :: ScaleButtonPopupCallback -> Ptr () -> Ptr () -> IO ()
- type C_ScaleButtonValueChangedCallback = Ptr () -> CDouble -> Ptr () -> IO ()
- type ScaleButtonValueChangedCallback = Double -> IO ()
- data ScaleButtonValueChangedSignalInfo
- afterScaleButtonValueChanged :: (GObject a, MonadIO m) => a -> ScaleButtonValueChangedCallback -> m SignalHandlerId
- genClosure_ScaleButtonValueChanged :: ScaleButtonValueChangedCallback -> IO Closure
- mk_ScaleButtonValueChangedCallback :: C_ScaleButtonValueChangedCallback -> IO (FunPtr C_ScaleButtonValueChangedCallback)
- noScaleButtonValueChangedCallback :: Maybe ScaleButtonValueChangedCallback
- onScaleButtonValueChanged :: (GObject a, MonadIO m) => a -> ScaleButtonValueChangedCallback -> m SignalHandlerId
- wrap_ScaleButtonValueChangedCallback :: ScaleButtonValueChangedCallback -> Ptr () -> CDouble -> Ptr () -> IO ()
Exported types
newtype ScaleButton Source #
GObject ScaleButton Source # | |
IsImplementorIface ScaleButton Source # | |
IsObject ScaleButton Source # | |
IsWidget ScaleButton Source # | |
IsScaleButton ScaleButton Source # | |
IsContainer ScaleButton Source # | |
IsButton ScaleButton Source # | |
IsBin ScaleButton Source # | |
IsOrientable ScaleButton Source # | |
IsBuildable ScaleButton Source # | |
IsActivatable ScaleButton Source # | |
IsActionable ScaleButton Source # | |
((~) * info (ResolveScaleButtonMethod t ScaleButton), MethodInfo * info ScaleButton p) => IsLabel t (ScaleButton -> p) Source # | |
((~) * info (ResolveScaleButtonMethod t ScaleButton), MethodInfo * info ScaleButton p) => IsLabelProxy t (ScaleButton -> p) Source # | |
HasAttributeList * ScaleButton Source # | |
type AttributeList ScaleButton Source # | |
type SignalList ScaleButton Source # | |
class GObject o => IsScaleButton o Source #
toScaleButton :: IsScaleButton o => o -> IO ScaleButton Source #
Methods
getAdjustment
data ScaleButtonGetAdjustmentMethodInfo Source #
((~) * signature (m Adjustment), MonadIO m, IsScaleButton a) => MethodInfo * ScaleButtonGetAdjustmentMethodInfo a signature Source # | |
scaleButtonGetAdjustment Source #
:: (HasCallStack, MonadIO m, IsScaleButton a) | |
=> a |
|
-> m Adjustment | Returns: the adjustment associated with the scale |
Gets the Adjustment
associated with the ScaleButton
’s scale.
See rangeGetAdjustment
for details.
Since: 2.12
getMinusButton
data ScaleButtonGetMinusButtonMethodInfo Source #
((~) * signature (m Button), MonadIO m, IsScaleButton a) => MethodInfo * ScaleButtonGetMinusButtonMethodInfo a signature Source # | |
scaleButtonGetMinusButton Source #
:: (HasCallStack, MonadIO m, IsScaleButton a) | |
=> a |
|
-> m Button | Returns: the minus button of the |
Retrieves the minus button of the ScaleButton
.
Since: 2.14
getPlusButton
data ScaleButtonGetPlusButtonMethodInfo Source #
((~) * signature (m Button), MonadIO m, IsScaleButton a) => MethodInfo * ScaleButtonGetPlusButtonMethodInfo a signature Source # | |
scaleButtonGetPlusButton Source #
:: (HasCallStack, MonadIO m, IsScaleButton a) | |
=> a |
|
-> m Button | Returns: the plus button of the |
Retrieves the plus button of the ScaleButton
.
Since: 2.14
getPopup
data ScaleButtonGetPopupMethodInfo Source #
((~) * signature (m Widget), MonadIO m, IsScaleButton a) => MethodInfo * ScaleButtonGetPopupMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsScaleButton a) | |
=> a |
|
-> m Widget | Returns: the popup of the |
Retrieves the popup of the ScaleButton
.
Since: 2.14
getValue
data ScaleButtonGetValueMethodInfo Source #
((~) * signature (m Double), MonadIO m, IsScaleButton a) => MethodInfo * ScaleButtonGetValueMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsScaleButton a) | |
=> a |
|
-> m Double | Returns: current value of the scale button |
Gets the current value of the scale button.
Since: 2.12
new
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> Double |
|
-> Double |
|
-> Double |
|
-> Maybe [Text] |
|
-> m ScaleButton | Returns: a new |
Creates a ScaleButton
, with a range between min
and max
, with
a stepping of step
.
Since: 2.12
setAdjustment
data ScaleButtonSetAdjustmentMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsScaleButton a, IsAdjustment b) => MethodInfo * ScaleButtonSetAdjustmentMethodInfo a signature Source # | |
scaleButtonSetAdjustment Source #
:: (HasCallStack, MonadIO m, IsScaleButton a, IsAdjustment b) | |
=> a |
|
-> b |
|
-> m () |
Sets the Adjustment
to be used as a model
for the ScaleButton
’s scale.
See rangeSetAdjustment
for details.
Since: 2.12
setIcons
data ScaleButtonSetIconsMethodInfo Source #
((~) * signature ([Text] -> m ()), MonadIO m, IsScaleButton a) => MethodInfo * ScaleButtonSetIconsMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsScaleButton a) | |
=> a |
|
-> [Text] |
|
-> m () |
Sets the icons to be used by the scale button.
For details, see the ScaleButton
:icons
property.
Since: 2.12
setValue
data ScaleButtonSetValueMethodInfo Source #
((~) * signature (Double -> m ()), MonadIO m, IsScaleButton a) => MethodInfo * ScaleButtonSetValueMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsScaleButton a) | |
=> a |
|
-> Double |
|
-> m () |
Sets the current value of the scale; if the value is outside
the minimum or maximum range values, it will be clamped to fit
inside them. The scale button emits the ScaleButton
::value-changed
signal if the value changes.
Since: 2.12
Properties
adjustment
data ScaleButtonAdjustmentPropertyInfo Source #
constructScaleButtonAdjustment :: (IsScaleButton o, IsAdjustment a) => a -> IO (GValueConstruct o) Source #
getScaleButtonAdjustment :: (MonadIO m, IsScaleButton o) => o -> m Adjustment Source #
scaleButtonAdjustment :: AttrLabelProxy "adjustment" Source #
setScaleButtonAdjustment :: (MonadIO m, IsScaleButton o, IsAdjustment a) => o -> a -> m () Source #
icons
data ScaleButtonIconsPropertyInfo Source #
constructScaleButtonIcons :: IsScaleButton o => [Text] -> IO (GValueConstruct o) Source #
getScaleButtonIcons :: (MonadIO m, IsScaleButton o) => o -> m (Maybe [Text]) Source #
scaleButtonIcons :: AttrLabelProxy "icons" Source #
setScaleButtonIcons :: (MonadIO m, IsScaleButton o) => o -> [Text] -> m () Source #
size
data ScaleButtonSizePropertyInfo Source #
constructScaleButtonSize :: IsScaleButton o => IconSize -> IO (GValueConstruct o) Source #
getScaleButtonSize :: (MonadIO m, IsScaleButton o) => o -> m IconSize Source #
scaleButtonSize :: AttrLabelProxy "size" Source #
setScaleButtonSize :: (MonadIO m, IsScaleButton o) => o -> IconSize -> m () Source #
value
data ScaleButtonValuePropertyInfo Source #
constructScaleButtonValue :: IsScaleButton o => Double -> IO (GValueConstruct o) Source #
getScaleButtonValue :: (MonadIO m, IsScaleButton o) => o -> m Double Source #
scaleButtonValue :: AttrLabelProxy "value" Source #
setScaleButtonValue :: (MonadIO m, IsScaleButton o) => o -> Double -> m () Source #
Signals
popdown
type ScaleButtonPopdownCallback = IO () Source #
afterScaleButtonPopdown :: (GObject a, MonadIO m) => a -> ScaleButtonPopdownCallback -> m SignalHandlerId Source #
mk_ScaleButtonPopdownCallback :: C_ScaleButtonPopdownCallback -> IO (FunPtr C_ScaleButtonPopdownCallback) Source #
onScaleButtonPopdown :: (GObject a, MonadIO m) => a -> ScaleButtonPopdownCallback -> m SignalHandlerId Source #
wrap_ScaleButtonPopdownCallback :: ScaleButtonPopdownCallback -> Ptr () -> Ptr () -> IO () Source #
popup
type ScaleButtonPopupCallback = IO () Source #
afterScaleButtonPopup :: (GObject a, MonadIO m) => a -> ScaleButtonPopupCallback -> m SignalHandlerId Source #
mk_ScaleButtonPopupCallback :: C_ScaleButtonPopupCallback -> IO (FunPtr C_ScaleButtonPopupCallback) Source #
onScaleButtonPopup :: (GObject a, MonadIO m) => a -> ScaleButtonPopupCallback -> m SignalHandlerId Source #
wrap_ScaleButtonPopupCallback :: ScaleButtonPopupCallback -> Ptr () -> Ptr () -> IO () Source #
valueChanged
type ScaleButtonValueChangedCallback = Double -> IO () Source #
afterScaleButtonValueChanged :: (GObject a, MonadIO m) => a -> ScaleButtonValueChangedCallback -> m SignalHandlerId Source #
mk_ScaleButtonValueChangedCallback :: C_ScaleButtonValueChangedCallback -> IO (FunPtr C_ScaleButtonValueChangedCallback) Source #
onScaleButtonValueChanged :: (GObject a, MonadIO m) => a -> ScaleButtonValueChangedCallback -> m SignalHandlerId Source #
wrap_ScaleButtonValueChangedCallback :: ScaleButtonValueChangedCallback -> Ptr () -> CDouble -> Ptr () -> IO () Source #