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

Safe HaskellNone
LanguageHaskell98

HTk.Widgets.Canvas

Description

HTk's strongcanvas widget/strong.br A canvas is a drawing pad, that can also contain widgets in embedded windows.br A canvas widget contains strongcanvas items/strong.

Synopsis

Documentation

data Canvas Source #

The Canvas datatype.

Instances

Eq Canvas Source # 

Methods

(==) :: Canvas -> Canvas -> Bool #

(/=) :: Canvas -> Canvas -> Bool #

Destroyable Canvas Source #

A canvas widget can be destroyed.

Methods

destroy :: Canvas -> IO () #

Synchronized Canvas Source #

You can synchronize on a canvas object (in JAVA style).

Methods

synchronize :: Canvas -> IO b -> IO b #

GUIObject Canvas Source #

Internal.

HasEnable Canvas Source #

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

HasBorder Canvas Source #

A canvas widget has a configureable border.

HasSize Canvas Source #

You can specify the size of a canvas.

HasColour Canvas Source #

A canvas widget has a foreground and background colour.

HasTooltip Canvas Source #

A canvas can have a tooltip (only displayed if you are using tixwish).

Widget Canvas Source #

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

Container Canvas Source #

A canvas is also a container for widgets, because it can contain widgets in embedded windows.

HasPostscript Canvas Source #

The contents of a canvas is printable.

HasScroller Canvas Source #

A canvas is a scrollable widget.

GUIObject c => HasBBox Canvas c Source #

You can request the bounding box size of a canvas item (use a canvas tag for the bounding box of a set of items).

newCanvas Source #

Arguments

:: Container par 
=> par

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

-> [Config Canvas]

the list of configuration options for this canvas.

-> IO Canvas

A canvas widget.

Constructs a new canvas widget and returns a handler.

closeEnough Source #

Arguments

:: Double

the distance to be set.

-> Canvas

the canvas to apply this configuration.

-> IO Canvas

The concerned canvas.

Sets the maximum distance from the mouse to an overlapped object.

getCloseEnough Source #

Arguments

:: Canvas

the canvas to get this configuration from.

-> IO Double

The requested distance.

Selector for the maximum distance from the mouse to an overlapped object.

confine Source #

Arguments

:: Bool

Bool, see above.

-> Canvas

the canvas to apply this configuration.

-> IO Canvas

The concerned canvas.

True constraints view to the scroll region.

getConfine Source #

Arguments

:: Canvas

the canvas to get this configuration from.

-> IO Bool

The confine configuration as a Bool value (see confine).

Selector for the confine configuration, constraints view to the scroll region if True.

screenToCanvasCoord Source #

Arguments

:: Canvas

the concerned canvas widget.

-> Orientation

the orientation (Vertical or Horizontal).

-> Distance

the input coordinate.

-> Maybe Distance

an optional grid (the output can be rounded to multiples of this grid if specified).

-> IO Distance

The requested distance in the specified orientation.

Maps from screen X or Y coordinates (orientation parameter) to the corresponding coordinates in canvas space.

type ScrollRegion = (Position, Position) Source #

The ScrollRegion datatype (scrollable region of the canvas widget).

scrollRegion Source #

Arguments

:: ScrollRegion

the scroll region to set.

-> Canvas

the canvas widget to apply this scrollregion.

-> IO Canvas

The concerned canvas.

Sets the scrollable region for a canvas widget.

getScrollRegion Source #

Arguments

:: Canvas

the canvas widget to get the applied scroll region from.

-> IO ScrollRegion

The requested scroll region.

Gets the applied scroll region from a canvas widget.

scrollIncrement Source #

Arguments

:: Orientation

the orientation (Vertical or Horizontal).

-> Distance

the distance to set.

-> Canvas

the canvas widget to apply this scrolling distance.

-> IO Canvas

The concerned canvas.

Sets the distance for one scrolling unit.