Source codeContentsIndex
CanvasTag
Synopsis
module CanvasItem
data CanvasTag
class (CanvasItem w) => TaggedCanvasItem w where
tags :: [CanvasTag] -> Config w
data SearchSpec
allItems :: SearchSpec
aboveItem :: (CanvasItem item) => item -> SearchSpec
belowItem :: (CanvasItem item) => item -> SearchSpec
withTag :: (CanvasItem item) => item -> SearchSpec
closest :: Position -> SearchSpec
enclosed :: Position -> Position -> SearchSpec
overlapping :: Position -> Position -> SearchSpec
createCanvasTag :: Canvas -> [Config CanvasTag] -> IO CanvasTag
addCanvasTag :: SearchSpec -> CanvasTag -> IO ()
removeCanvasTag :: (CanvasItem i) => i -> CanvasTag -> IO ()
Documentation
module CanvasItem
data CanvasTag
The CanvasTag datatype.
class (CanvasItem w) => TaggedCanvasItem w where
A canvas item can have several tags (handlers for a set of canvas items).
Methods
tags :: [CanvasTag] -> Config w
Sets the tags for the specified canvas item.
Instances
TaggedCanvasItem Arc
TaggedCanvasItem BitMapItem
TaggedCanvasItem EmbeddedCanvasWin
TaggedCanvasItem ImageItem
TaggedCanvasItem Line
TaggedCanvasItem Oval
TaggedCanvasItem Polygon
TaggedCanvasItem Rectangle
TaggedCanvasItem TextItem
data SearchSpec
The SearchSpec datatype (see CanvasTag.addCanvasTag).
allItems
:: SearchSpec A SearchSpec object.
Adds all objects in the canvas.
aboveItem
:: (CanvasItem item)
=> item the item below the item to add.
-> SearchSpec A SearchSpec object.
Adds the item just above the given item in the display list.
belowItem
:: (CanvasItem item)
=> item the item above the item to add.
-> SearchSpec A SearchSpec object.
Adds the item just below in the given item in the display list.
withTag
:: (CanvasItem item)
=> item the canvas item handler.
-> SearchSpec A SearchSpec object.
Adds the item(s) identified by the given handler (which can also be another canvas tag).
closest
:: Position the concerned position.
-> SearchSpec A SearchSpec object.
Adds the item closest to the given position.
enclosed
:: Position the upper left position of the region.
-> Position the lower right position of the region.
-> SearchSpec A SearchSpec object.
Adds the items enclosed in the specified region.
overlapping
:: Position the upper left position of the region.
-> Position the lower right position of the region.
-> SearchSpec A SearchSpec object.
Adds the items overpalling the specified region.
createCanvasTag
:: Canvas the parent canvas.
-> [Config CanvasTag] the list of configuration options for this canvas tag.
-> IO CanvasTag A canvas tag.
Constructs a new canvas tag.
addCanvasTag :: SearchSpec -> CanvasTag -> IO ()
removeCanvasTag
:: (CanvasItem i)
=> i the item to remove from the tag.
-> CanvasTag the tag to remove the item from.
-> IO () None.
Removes a canvas item from a canvas tag.
Produced by Haddock version 0.3