CanvasWidget

A canvas widget item.

More...

Constructors

this
this(double[] coords, Widget widget, string anchor)

Create a widget item.

Members

Functions

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

Mixins

__anonymous
mixin Anchor

Mixin common commands.

__anonymous
mixin WidgetSpecific
Undocumented in source.

Mixed In Members

From mixin Anchor

getAnchor
string getAnchor()

Get the anchor.

setAnchor
auto setAnchor(string anchor)

Set the anchor position.

From mixin WidgetSpecific

getWidget
Widget getWidget()

Get the widget.

setWidget
auto setWidget(Widget widget)

Specifies the widget to associate with this item. The widget specified must either be a child of the canvas widget or a child of some ancestor of the canvas widget.

getWidth
int getWidth()

Get the widget width.

setWidth
auto setWidth(W width)

Specifies the width to assign to the item's widget. If this option is not specified, or if it is specified as zero, then the widget is given whatever width it requests internally.

getHeight
int getHeight()

Get the widget height.

setHeight
auto setHeight(H height)

Specifies the height to assign to the item's widget. If this option is not specified, or if it is specified as zero, then the widget is given whatever height it requests internally.

Inherited Members

From CanvasItem

type
string type [@property getter]

Get the type of canvas item.

init
void init(Canvas parent)
Undocumented in source. Be warned that the author may not have intended to support it.
getCoords
double[] getCoords()

Get the coords of this item.

setCoords
auto setCoords(double[] coords)

Set the coordinates used to draw this item.

getTags
string[] getTags()

Get the tags associated with this item.

setTags
auto setTags(string[] tags)

Set tags associated with this item.

addTag
auto addTag(string tag)

Add a specific tag to this item.

deleteTag
auto deleteTag(string tag)

Delete a specific tag associated to this item.

clearTags
auto clearTags()

Delete all tags 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.

lower
auto lower()

Lower an item in the drawing order.

raise
auto raise()

Raise 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.

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.

__anonymous
mixin Bind

Mixin common commands.

__anonymous
mixin State
Undocumented in source.

Detailed Description

Common Commands

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

Anchor
WidgetSpecific

See Also

Meta