| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
HTk.Widgets.Canvas
Description
- data Canvas
- newCanvas :: Container par => par -> [Config Canvas] -> IO Canvas
- closeEnough :: Double -> Canvas -> IO Canvas
- getCloseEnough :: Canvas -> IO Double
- confine :: Bool -> Canvas -> IO Canvas
- getConfine :: Canvas -> IO Bool
- screenToCanvasCoord :: Canvas -> Orientation -> Distance -> Maybe Distance -> IO Distance
- type ScrollRegion = (Position, Position)
- scrollRegion :: ScrollRegion -> Canvas -> IO Canvas
- getScrollRegion :: Canvas -> IO ScrollRegion
- scrollIncrement :: Orientation -> Distance -> Canvas -> IO Canvas
Documentation
The Canvas datatype.
Instances
| Eq Canvas Source # | |
| Destroyable Canvas Source # | A canvas widget can be destroyed. |
| Synchronized Canvas Source # | You can synchronize on a canvas object (in JAVA style). |
| 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). |
Arguments
| :: Container par | |
| => par | the parent widget, which has to be a container widget
(an instance of |
| -> [Config Canvas] | the list of configuration options for this canvas. |
| -> IO Canvas | A canvas widget. |
Constructs a new canvas widget and returns a handler.
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.
Selector for the maximum distance from the mouse to an overlapped object.
Arguments
| :: Bool |
|
| -> Canvas | the canvas to apply this configuration. |
| -> IO Canvas | The concerned canvas. |
True constraints view to the scroll region.
Arguments
| :: Canvas | the canvas to get this configuration from. |
| -> IO Bool | The confine configuration as a |
Selector for the confine configuration, constraints view
to the scroll region if True.
Arguments
| :: Canvas | the concerned canvas widget. |
| -> Orientation | the orientation
( |
| -> 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).
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.
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.
Arguments
| :: Orientation | the orientation
( |
| -> 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.