Safe Haskell | None |
---|---|
Language | Haskell98 |
HTk's scrollbar widget.
A scroll bar is a widget which controls scrolling.
- class Widget w => HasScroller w where
- isWfOrientation :: w -> Orientation -> Bool
- scrollbar :: Orientation -> ScrollBar -> Config w
- moveto :: Orientation -> w -> Fraction -> IO ()
- scroll :: Orientation -> w -> Int -> ScrollUnit -> IO ()
- view :: Orientation -> w -> IO (Fraction, Fraction)
- data ScrollBar
- newScrollBar :: Container par => par -> [Config ScrollBar] -> IO ScrollBar
- data ScrollUnit
- newtype Slider w = Slider w
- class Widget w => HasSlider w where
- repeatInterval :: Int -> Config (Slider w)
- getRepeatInterval :: Slider w -> IO Int
- repeatDelay :: Int -> Config (Slider w)
- getRepeatDelay :: Slider w -> IO Int
- data ScrollBarElem
- activateScrollBarElem :: ScrollBar -> ScrollBarElem -> IO ()
- getActivatedElem :: ScrollBar -> IO (Maybe ScrollBarElem)
- type Fraction = Double
- fraction :: ScrollBar -> Position -> IO Fraction
- identify :: ScrollBar -> Position -> IO (Maybe ScrollBarElem)
- setView :: ScrollBar -> Fraction -> Fraction -> IO ()
Documentation
class Widget w => HasScroller w where Source
Scrollable widgets instantiate class HasScroller
.
Nothing
isWfOrientation :: w -> Orientation -> Bool Source
scrollbar :: Orientation -> ScrollBar -> Config w Source
moveto :: Orientation -> w -> Fraction -> IO () Source
scroll :: Orientation -> w -> Int -> ScrollUnit -> IO () Source
HasScroller Canvas | A canvas is a scrollable widget. |
HasScroller Editor | An editor is a scrollable widget. |
HasScroller (Entry a) | An entry field is scrollable in horizontal direction. |
HasScroller (ListBox a) | A listbox is a scrollable widget. |
HasScroller a => HasScroller (ScrollBox a) | A scrollbox has scrollbars. |
The ScrollBar
datatype.
Eq ScrollBar | |
Destroyable ScrollBar | A scrollbar widget can be destroyed. |
GUIObject ScrollBar | Internal. |
HasEnable ScrollBar | A scrollbar widget is a stateful widget, it can be enabled or disabled. |
HasOrientation ScrollBar | The scrollbars orientation can be |
HasBorder ScrollBar | A scrollbar widget has a configureable border. |
HasSize ScrollBar | You can specify the width of a scrollbar. |
HasColour ScrollBar | A scrollbar widget has a background and activebackground (regarding slider) colour. |
HasTooltip ScrollBar | A scrollbar can have a tooltip. |
Widget ScrollBar | A scrollbar widget has standard widget properties (concerning focus, cursor). |
HasSlider ScrollBar | The scrollbar has a configureable slider component. |
:: Container par | |
=> par | the parent widget, which has to be a container widget
(an instance of |
-> [Config ScrollBar] | the list of configuration options for this scrollbar. |
-> IO ScrollBar | A scrollbar widget. |
Constructs a new scrollbar widget and returns a handler.
data ScrollUnit Source
The ScrollUnit
datatype - units for scrolling operations.
Read ScrollUnit | Internal. |
Show ScrollUnit | Internal. |
GUIValue ScrollUnit | Internal. |
The Slider
datatype.
Slider w |
GUIObject w => GUIObject (Slider w) | Internal. |
HasSize (Slider (Scale a)) | A scale's slider has a configureable size. |
(HasSlider w, GUIObject w) => HasColour (Slider w) | The slider component has a configureable foreground and background colour. |
ScaleValue a => HasIncrement (Slider (Scale a)) a | A scale's slider has a configureable resulution. |
class Widget w => HasSlider w where Source
Widgets with sliders (scale widget, scrollbar) instantiate the
class HasSlider
.
Nothing
repeatInterval :: Int -> Config (Slider w) Source
getRepeatInterval :: Slider w -> IO Int Source
repeatDelay :: Int -> Config (Slider w) Source
getRepeatDelay :: Slider w -> IO Int Source
data ScrollBarElem Source
The ScrollBarElem
datatype - representing the elements
of the scrollbar.
Enum ScrollBarElem | |
Eq ScrollBarElem | |
Ord ScrollBarElem | |
Read ScrollBarElem | Internal. |
Show ScrollBarElem | Internal. |
GUIValue ScrollBarElem | Internal. |
:: ScrollBar | the concerned scrollbar. |
-> ScrollBarElem | the element to activate. |
-> IO () | None. |
Sets the active element (which can be arrow1, arrow2 or slider).
:: ScrollBar | the concerned scrollbar. |
-> IO (Maybe ScrollBarElem) |
|
Gets the active element (arrow1, arrow2 or slider).
Fractions are floating point values between 0 and 1 representing relative positions within the scrolled range.
:: ScrollBar | the concerned scrollbar. |
-> Position | the conderned position. |
-> IO Fraction | The fraction indicating the relative location in the through. |
Returns a fraction between 0 and 1 indicating the relative location of the given position in the through.
:: ScrollBar | the concerned scrollbar. |
-> Position | the concerned position. |
-> IO (Maybe ScrollBarElem) |
|
Returns the ScrollBarElem
to indicate what is under
the given position.