|
|
|
|
|
| Description |
| HTk's canvas widget.
A canvas is a drawing pad, that can also contain widgets in embedded
windows.
A canvas widget contains canvas items. |
|
| Synopsis |
|
|
|
| Documentation |
|
| class (GUIObject w) => HasPostscript w where |
| Widgets that support postscript export instantiate the
class HasPostscript. | | | Methods | | | | Instances | |
|
|
| data ScrollBar |
| The ScrollBar datatype. |
|
| class (Widget w) => HasScroller w where |
| | Methods | | isWfOrientation :: w -> Orientation -> Bool | | True for widgets that are scrollable in the given
orientation. | | | scrollbar :: Orientation -> ScrollBar -> Config w | | Associates a scrollbar with a scrollable widget. | | | moveto :: Orientation -> w -> Fraction -> IO () | | Positions the scrolled widget so the give Fraction is
off-screen to the left. | | | scroll :: Orientation -> w -> Int -> ScrollUnit -> IO () | | Scrolls the associated widget by n pages or units (depending on the
given ScrollUnit). | | | view :: Orientation -> w -> IO (Fraction, Fraction) | | Returns two fractions between 0 and 1 that describe the amount of
the widget off-screen to the left and the amount of the widget visible. |
| | | Instances | |
|
|
| data ScrollUnit |
|
| data Canvas |
| The Canvas datatype. |
|
| newCanvas |
| :: (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 :: Double -> Canvas -> IO Canvas |
|
| getCloseEnough |
| :: 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 |
| :: Bool | Bool, see above. | | -> Canvas | the canvas to apply this configuration. | | -> IO Canvas | The concerned canvas. | | True constraints view to the scroll region. |
|
|
| getConfine |
| :: 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 |
| :: 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) |
| The ScrollRegion datatype (scrollable region of the canvas
widget). |
|
| scrollRegion |
| :: 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 |
| :: 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 |
|
|
| Produced by Haddock version 0.3 |