uni-htk-2.2.0.0: Graphical User Interface for Haskell Programs

HTk.Widgets.ScrollBar

Description

HTk's scrollbar widget.

A scroll bar is a widget which controls scrolling.

Synopsis

Documentation

class Widget w => HasScroller w whereSource

Scrollable widgets instantiate class HasScroller.

Instances

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.

data ScrollBar Source

The ScrollBar datatype.

Instances

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 Horizontal or Vertical.

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.

newScrollBarSource

Arguments

:: Container par 
=> par

the parent widget, which has to be a container widget (an instance of class Container).

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

Constructors

Units 
Pages 

Instances

Read ScrollUnit

Internal.

Show ScrollUnit

Internal.

GUIValue ScrollUnit

Internal.

newtype Slider w Source

The Slider datatype.

Constructors

Slider w 

Instances

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 whereSource

Widgets with sliders (scale widget, scrollbar) instantiate the class HasSlider.

Instances

HasSlider ScrollBar

The scrollbar has a configureable slider component.

HasSlider (Scale a)

A scale widget has a configureable slider.

data ScrollBarElem Source

The ScrollBarElem datatype - representing the elements of the scrollbar.

activateScrollBarElemSource

Arguments

:: ScrollBar

the concerned scrollbar.

-> ScrollBarElem

the element to activate.

-> IO ()

None.

Sets the active element (which can be arrow1, arrow2 or slider).

getActivatedElemSource

Arguments

:: ScrollBar

the concerned scrollbar.

-> IO (Maybe ScrollBarElem)

Just [elem] if an element is active, otherwise Nothing.

Gets the active element (arrow1, arrow2 or slider).

type Fraction = DoubleSource

Fractions are floating point values between 0 and 1 representing relative positions within the scrolled range.

fractionSource

Arguments

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

identifySource

Arguments

:: ScrollBar

the concerned scrollbar.

-> Position

the concerned position.

-> IO (Maybe ScrollBarElem)

Just [elem] if [elem] is under the given position, otherwise Nothing.

Returns the ScrollBarElem to indicate what is under the given position.

setViewSource

Arguments

:: ScrollBar

the concerned scrollbar.

-> Fraction

fraction between 0 and 1 representing the relative position of the top left of the display.

-> Fraction

fraction between 0 and 1 representing the relative position of the bottom right of the display.

-> IO ()

None.

Sets the scrollbar parameters.