CanvasTagConfig

Class representing a tag configuration. Tags can be applied to numerous items on the canvas but keep in mind the tag options set in the configuration must be compatible for all items the tag is assigned to or an error will occur. Tags must be applied to items before they can be configured.

More...

Constructors

this
this(string tagName)

Constructor.

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 ArcSpecific
Undocumented in source.
__anonymous
mixin Bind
Undocumented in source.
__anonymous
mixin FillColor
Undocumented in source.
__anonymous
mixin ImageSpecific
Undocumented in source.
__anonymous
mixin LineSpecific
Undocumented in source.
__anonymous
mixin OutlineColor
Undocumented in source.
__anonymous
mixin OutlineDash
Undocumented in source.
__anonymous
mixin OutlineWidth
Undocumented in source.
__anonymous
mixin State
Undocumented in source.
__anonymous
mixin TextSpecific
Undocumented in source.
__anonymous
mixin Vertex
Undocumented in source.
__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 ArcSpecific

getStyle
string getStyle()

Get the style of the arc.

setStyle
auto setStyle(string style)

Specifies how to draw the arc. If type is pie (the default) then the arc's region is defined by a section of the oval's perimeter plus two line segments, one between the center of the oval and each end of the perimeter section. If type is chord then the arc's region is defined by a section of the oval's perimeter plus a single line segment connecting the two end points of the perimeter section. If type is arc then the arc's region consists of a section of the perimeter alone. In this last case the fill color is ignored.

getExtent
int getExtent()

Get the extent of the arc.

setExtent
auto setExtent(int extent)

Specifies the size of the angular range occupied by the arc. The arc's range extends for degrees counter-clockwise from the starting angle. Degrees may be negative. If it is greater than 360 or less than -360, then degrees modulo 360 is used as the extent.

getStartAngle
double getStartAngle()

Get the start angle of the arc.

setStartAngle
auto setStartAngle(A startAngle)

Specifies the beginning of the angular range occupied by the arc. Degrees is given in units of degrees measured counter-clockwise from the 3-o'clock position; it may be either positive or negative.

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 FillColor

getFillColor
string getFillColor()

Get the fill color.

setFillColor
auto setFillColor(string color)

Set the fill color. Use colors from the preset color list or a web style hex color.

getActiveFillColor
string getActiveFillColor()

Get the active fill color. An item's active state is triggered when the mouse rolls over the item.

setActiveFillColor
auto setActiveFillColor(string color)

Set the active fill color. An item's active state is triggered when the mouse rolls over the item. Use colors from the preset color list or a web style hex color.

getDisabledFillColor
string getDisabledFillColor()

Get the disabled fill color.

setDisabledFillColor
auto setDisabledFillColor(string color)

Set the disabled fill color. Use colors from the preset color list or a web style hex color.

From mixin ImageSpecific

getImage
Image getImage()

Get the image.

setImage
auto setImage(Image image)

Set the image.

getActiveImage
Image getActiveImage()

Get the active image.

setActiveImage
auto setActiveImage(Image image)

Set the active image.

getDisabledImage
Image getDisabledImage()

Get the disabled image.

setDisabledImage
auto setDisabledImage(Image image)

Set the disabled image.

From mixin LineSpecific

getArrowPosition
string getArrowPosition()

Get the arrow position.

setArrowPosition
auto setArrowPosition(string arrowPosition)

Indicates whether or not arrowheads are to be drawn at one or both ends of the line.

getArrowShape
uint[3] getArrowShape()

Get the arrow shape.

setArrowShape
auto setArrowShape(uint[3] arrowshape)

This option indicates how to draw arrowheads. The shape argument must be a list with three elements, each specifying a distance. The first element of the list gives the distance along the line from the neck of the arrowhead to its tip. The second element gives the distance along the line from the trailing points of the arrowhead to the tip, and the third element gives the distance from the outside edge of the line to the trailing points.

getCapStyle
string getCapStyle()

Get the cap style.

setCapStyle
auto setCapStyle(string capStyle)

Specifies the ways in which caps are to be drawn at the endpoints of the line. When arrowheads are drawn the cap style is ignored.

From mixin OutlineColor

getOutlineColor
string getOutlineColor()

Get the outline color.

setOutlineColor
auto setOutlineColor(string color)

Set the outline color. Use colors from the preset color list or a web style hex color.

getActiveOutlineColor
string getActiveOutlineColor()

Get the active outline color. An item's active state is triggered when the mouse rolls over the item.

setActiveOutlineColor
auto setActiveOutlineColor(string color)

Set the active outline color. An item's active state is triggered when the mouse rolls over the item. Use colors from the preset color list or a web style hex color.

getDisabledOutlineColor
string getDisabledOutlineColor()

Get the disabled outline color.

setDisabledOutlineColor
auto setDisabledOutlineColor(string color)

Set the disabled outline color. Use colors from the preset color list or a web style hex color.

From mixin OutlineDash

getOutlineDash
int[] getOutlineDash()

Get the dash pattern.

setOutlineDash
auto setOutlineDash(int[] dash)

Set the dash pattern of the outline. Each element represents the number of pixels of a line segment. Only the odd segments are drawn using the outline color. The other segments are drawn transparent.

getActiveOutlineDash
int[] getActiveOutlineDash()

Get the active dash pattern. An item's active state is triggered when the mouse rolls over the item.

setActiveOutlineDash
auto setActiveOutlineDash(int[] dash)

Set the active dash pattern of the outline. Each element represents the number of pixels of a line segment. Only the odd segments are drawn using the outline color. The other segments are drawn transparent. An item's active state is triggered when the mouse rolls over the item.

getDisabledOutlineDash
int[] getDisabledOutlineDash()

Get the disabled dash pattern.

setDisabledOutlineDash
auto setDisabledOutlineDash(int[] dash)

Set the disabled dash pattern of the outline. Each element represents the number of pixels of a line segment. Only the odd segments are drawn using the outline color. The other segments are drawn transparent.

getOutlineDashOffset
int getOutlineDashOffset()

Get the dash offset.

setOutlineDashOffset
auto setOutlineDashOffset(int offset)

Set the dash offset.

From mixin OutlineWidth

getOutlineWidth
int getOutlineWidth()

Get the width of the outline.

setOutlineWidth
auto setOutlineWidth(W width)

Set the width of the outline.

getActiveOutlineWidth
int getActiveOutlineWidth()

Get the width of the active outline. An item's active state is triggered when the mouse rolls over the item.

setActiveOutlineWidth
auto setActiveOutlineWidth(W width)

Set the width of the active outline. An item's active state is triggered when the mouse rolls over the item.

getDisabledOutlineWidth
int getDisabledOutlineWidth()

Get the width of the disabled outline.

setDisabledOutlineWidth
auto setDisabledOutlineWidth(W width)

Set the width of the disabled outline.

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.

From mixin TextSpecific

getAngle
double getAngle()

Get the text angle.

setAngle
auto setAngle(A angle)

Specifies how many degrees to rotate the text anticlockwise about the positioning point for the text; it may have any floating-point value from 0.0 to 360.0. For example, if rotationDegrees is 90, then the text will be drawn vertically from bottom to top. This option defaults to 0.0. Degrees is given in units of degrees measured counter-clockwise from the 3-o'clock position; it may be either positive or negative.

getFont
string getFont()

Get the font.

setFont
auto setFont(string font)

Specifies the font to use for the text item. The format of the string to pass when specifing a font is as follows.

getAlignment
string getAlignment()

Get the alignment

setAlignment
auto setAlignment(string alignment)

Specifies how to justify the text within its bounding region.

getText
string getText()

Get the text.

setText
auto setText(string text)

Specifies the characters to be displayed in the text item. Newline characters cause line breaks.

getMaxLineLength
int getMaxLineLength()

Get max line length.

setMaxLineLength
auto setMaxLineLength(L maxLineLength)

Specifies a maximum line length for the text. If this option is zero (the default) the text is broken into lines only at newline characters. However, if this option is non-zero then any line that would be longer than line length is broken just before a space character to make the line shorter than lineLength; the space character is treated as if it were a newline character.

From mixin Vertex

getJoinStyle
string getJoinStyle()

Get the join style.

setJoinStyle
auto setJoinStyle(string joinStyle)

Specifies the ways in which joints are to be drawn at the vertices of the line. If this option is not specified then it defaults to round. If the line only contains two points then this option is irrelevant.

getSmoothMethod
string getSmoothMethod()

Get the smooth method.

setSmoothMethod
auto setSmoothMethod(string smoothMethod)

If the smoothing method is bezier, this indicates that the line should be drawn as a curve, rendered as a set of quadratic splines: one spline is drawn for the first and second line segments, one for the second and third, and so on. Straight-line segments can be generated within a curve by duplicating the end-points of the desired line segment. If the smoothing method is raw, this indicates that the line should also be drawn as a curve but where the list of coordinates is such that the first coordinate pair (and every third coordinate pair thereafter) is a knot point on a cubic bezier curve, and the other coordinates are control points on the cubic bezier curve. Straight line segments can be generated within a curve by making control points equal to their neighbouring knot points. If the last point is a control point and not a knot point, the point is repeated (one or two times) so that it also becomes a knot point.

getSmoothSplineSteps
int getSmoothSplineSteps()

Get smooth method spline steps.

setSmoothSplineSteps
auto setSmoothSplineSteps(int splineSteps)

Specifies the degree of smoothness desired for curves: each spline will be approximated with number line segments.

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

Anchor
ArcSpecific
Bind
FillColor
ImageSpecific
LineSpecific
OutlineColor
OutlineDash
OutlineWidth
State
TextSpecific
Vertex
WidgetSpecific

See Also

Meta