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

Safe HaskellNone
LanguageHaskell98

HTk.Widgets.ScrollBar

Description

HTk's scrollbar widget.

A scroll bar is a widget which controls scrolling.

Synopsis

Documentation

class Widget w => HasScroller w where Source #

Scrollable widgets instantiate class HasScroller.

Instances

HasScroller Canvas Source #

A canvas is a scrollable widget.

HasScroller Editor Source #

An editor is a scrollable widget.

HasScroller (ListBox a) Source #

A listbox is a scrollable widget.

HasScroller (Entry a) Source #

An entry field is scrollable in horizontal direction.

HasScroller a => HasScroller (ScrollBox a) Source #

A scrollbox has scrollbars.

data ScrollBar Source #

The ScrollBar datatype.

Instances

Eq ScrollBar Source # 
Destroyable ScrollBar Source #

A scrollbar widget can be destroyed.

Methods

destroy :: ScrollBar -> IO () #

GUIObject ScrollBar Source #

Internal.

HasEnable ScrollBar Source #

A scrollbar widget is a stateful widget, it can be enabled or disabled.

HasOrientation ScrollBar Source #

The scrollbars orientation can be Horizontal or Vertical.

HasBorder ScrollBar Source #

A scrollbar widget has a configureable border.

HasSize ScrollBar Source #

You can specify the width of a scrollbar.

HasColour ScrollBar Source #

A scrollbar widget has a background and activebackground (regarding slider) colour.

HasTooltip ScrollBar Source #

A scrollbar can have a tooltip.

Widget ScrollBar Source #

A scrollbar widget has standard widget properties (concerning focus, cursor).

HasSlider ScrollBar Source #

The scrollbar has a configureable slider component.

newScrollBar Source #

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.

newtype Slider w Source #

The Slider datatype.

Constructors

Slider w 

Instances

GUIObject w => GUIObject (Slider w) Source #

Internal.

HasSize (Slider (Scale a)) Source #

A scale's slider has a configureable size.

(HasSlider w, GUIObject w) => HasColour (Slider w) Source #

The slider component has a configureable foreground and background colour.

ScaleValue a => HasIncrement (Slider (Scale a)) a Source #

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.

data ScrollBarElem Source #

The ScrollBarElem datatype - representing the elements of the scrollbar.

Instances

Enum ScrollBarElem Source # 
Eq ScrollBarElem Source # 
Ord ScrollBarElem Source # 
Read ScrollBarElem Source #

Internal.

Show ScrollBarElem Source #

Internal.

GUIValue ScrollBarElem Source #

Internal.

activateScrollBarElem Source #

Arguments

:: ScrollBar

the concerned scrollbar.

-> ScrollBarElem

the element to activate.

-> IO ()

None.

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

getActivatedElem Source #

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 = Double Source #

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

fraction Source #

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.

identify Source #

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.

setView Source #

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.