HTk.Canvasitems.CanvasTag
- data CanvasTag
- class CanvasItem w => TaggedCanvasItem w where
- 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 ()
- (&#&) :: CanvasTag -> CanvasTag -> IO CanvasTag
- (|#|) :: CanvasTag -> CanvasTag -> IO CanvasTag
- (^#) :: CanvasTag -> CanvasTag -> IO CanvasTag
- tagNot :: CanvasTag -> IO CanvasTag
Documentation
The CanvasTag datatype.
Instances
| Eq CanvasTag | |
| Destroyable CanvasTag | A canvas tag can be destroyed. |
| Synchronized CanvasTag | You can synchronize on a canvas tag. |
| GUIObject CanvasTag | Internal. |
| CanvasItem CanvasTag | A canvas tag is a canvas item (any canvas item is an instance of the
abstract |
class CanvasItem w => TaggedCanvasItem w whereSource
A canvas item can have several tags (handlers for a set of canvas items).
Instances
| TaggedCanvasItem Arc | An arc item can have several tags (handlers for a set of canvas items). |
| TaggedCanvasItem BitMapItem | A bitmap item can have several tags (handlers for a set of canvas items). |
| TaggedCanvasItem ImageItem | A image item can have several tags (handlers for a set of canvas items). |
| TaggedCanvasItem Line | A line item can have several tags (handlers for a set of canvas items). |
| TaggedCanvasItem Oval | An oval item can have several tags (handlers for a set of canvas items). |
| TaggedCanvasItem Polygon | A polygon item can have several tags (handlers for a set of canvas items). |
| TaggedCanvasItem Rectangle | A rectangle item can have several tags (handlers for a set of canvas items). |
| TaggedCanvasItem TextItem | A text item can have several tags (handlers for a set of canvas items). |
| TaggedCanvasItem EmbeddedCanvasWin | An embedded canvas window can have several tags (handlers for a set of canvas items). |
data SearchSpec Source
The SearchSpec datatype
(see CanvasTag.addCanvasTag).
Arguments
| :: CanvasItem item | |
| => item | the item below the item to add. |
| -> SearchSpec | A |
Adds the item just above the given item in the display list.
Arguments
| :: CanvasItem item | |
| => item | the item above the item to add. |
| -> SearchSpec | A |
Adds the item just below in the given item in the display list.
Arguments
| :: CanvasItem item | |
| => item | the canvas item handler. |
| -> SearchSpec | A |
Adds the item(s) identified by the given handler (which can also be another canvas tag).
Arguments
| :: Position | the concerned position. |
| -> SearchSpec | A |
Adds the item closest to the given position.
Arguments
| :: Position | the upper left position of the region. |
| -> Position | the lower right position of the region. |
| -> SearchSpec | A |
Adds the items enclosed in the specified region.
Arguments
| :: Position | the upper left position of the region. |
| -> Position | the lower right position of the region. |
| -> SearchSpec | A |
Adds the items overpalling the specified region.
Arguments
| :: 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.
Arguments
| :: SearchSpec | the search specification. |
| -> CanvasTag | the tag to add items to. |
| -> IO () | None. |
Adds the canvas items identified by the SearchSpec to
the tag.
Arguments
| :: 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.
Forms the conjunction of two canvas tags
Forms the disjunction of two canvas tags
Arguments
| :: CanvasTag | |
| -> CanvasTag | |
| -> IO CanvasTag | new canvas tag corresponding to (t1^t2) equals (!t1&&t2)||(t1&&!t2) |
Forms either - or of two canvas tags