CanvasItem

Abstract base class of all canvas items.

More...

Members

Functions

addTag
auto addTag(string tag)

Add a specific tag to this item.

clearTags
auto clearTags()

Delete all tags associated to this item.

deleteTag
auto deleteTag(string tag)

Delete a specific tag associated to this item.

destroy
void destroy()

Destroy this item and remove it from the canvas.

focus
auto focus()

Set the keyboard focus to this item in the canvas.

getCoords
double[] getCoords()

Get the coords of this item.

getTags
string[] getTags()

Get the tags associated with this item.

init
void init(Canvas parent)
Undocumented in source. Be warned that the author may not have intended to support it.
lower
auto lower()

Lower an item in the drawing order.

moveBy
auto moveBy(int xAmount, int yAmount)

Move an item on the canvas by an amount.

moveTo
auto moveTo(int xPos, int yPos)

Move an item on the canvas to a position.

raise
auto raise()

Raise an item in the drawing order.

scale
auto scale(double xOrigin, double yOrigin, double xPercent, double yPercent)

Scale an item on the canvas. Note that some items have only a single pair of coordinates (e.g., text, images and widgets) and so scaling of them by this command can only move them around.

setCoords
auto setCoords(double[] coords)

Set the coordinates used to draw this item.

setTags
auto setTags(string[] tags)

Set tags associated with this item.

Mixins

__anonymous
mixin Bind

Mixin common commands.

__anonymous
mixin State
Undocumented in source.

Properties

type
string type [@property getter]

Get the type of canvas item.

Mixed In Members

From mixin Bind

bind
auto bind(string binding, CommandCallback callback)

Bind a callback to a particular event triggered by this item. This command is identical to UiElement's bind method.

unbind
auto unbind(string binding)

Unbind a previous event binding.

From mixin State

getState
string getState()

Get the state of this item.

setState
auto setState(string state)

Set the item state. The only valid states are normal, disabled or hidden.

Inherited Members

From Element

_tk
Tk _tk;
Undocumented in source.
_parent
Element _parent;
Undocumented in source.
_manualIdentifier
string _manualIdentifier;
Undocumented in source.
_elementId
string _elementId;
Undocumented in source.
_hash
string _hash;
Undocumented in source.
id
string id [@property getter]

The unique id of this element.

parent
Element parent [@property getter]

The parent element if any.

overrideGeneratedId
void overrideGeneratedId(string identifier)
Undocumented in source. Be warned that the author may not have intended to support it.
generateHash
string generateHash()
Undocumented in source. Be warned that the author may not have intended to support it.
generateHash
string generateHash(string text, A args)
Undocumented in source. Be warned that the author may not have intended to support it.
getCommandName
string getCommandName(string uniqueData)
Undocumented in source. Be warned that the author may not have intended to support it.
createCommand
string createCommand(CommandCallback callback, string uniqueData)
Undocumented in source. Be warned that the author may not have intended to support it.

Detailed Description

Common Commands

These are injected common commands that can also be used with this widget.

Bind
State

See Also

Meta