PERGOLA LOGO

pergola.ToolButton

System events: YES.

User events and functions: YES.

System component. Subclass of pergola.Button; inherits prototype of pergola.Button.

The pergola.Window class implements full management of tools.

Listed: class properties/methods; prototype properties and methods; instance properties. Prototype properties and methods inherited by the Class superclass are not listed.

class

None

prototype

PROPERTIES

parent

pergola.user.

fill

Defined in pergola.presentationAttributes – string.

stroke

Defined in pergola.presentationAttributes – string.

maskFill

Defined in pergola.presentationAttributes – string.

rx

Defined in pergola.presentationAttributes – number (user space units).

selected

false – boolean; can be true for more than one tool, while it can be true for only one tool in a collection of exclusive tools.

suspended

false – boolean; this property is dynamically set, and allows the reactivation of an inactive window by click on its canvas while the tool is neutralized.

exclusive

false – boolean; "exclusive" tools added to a window are elements of the exclusiveTools array. A buttons in this collection has radio button behavior with their siblings.

prevent

true – boolean; for window tools this property determines if the event.preventDefault() method should be invoked by the event handlers. For user tools that you may define for any other context, you may need to set a condition based on this property in the tool handler to prevent the browser's default actions. In those cases where the default actions are sought, you must override this property (to false) in the tool's initialization object.

type

"regular" – string; this property can be overridden with any arbitrary string and it's designed for use in vector editing applications. The value is processed by the handlers. It is never processes by any of the pergola, or pergola.Class, or any classes' methods. The default value "regular" implies a base behavior.

cursor

"default" – string; tools often define a CSS cursor value. The specified cursor is applied to the tool's activity region.

This class is a subclass of pergola.Button. See other pergola.Button prototype properties.

METHODS

handleEvent(evt)

Overrides pergola.Button's handleEvent.

This class is a subclass of pergola.Button. See pergola.Button prototype methods for inherited methods.

instance

owner

If specified, designates the owner object.

location

Boolean; determines whether this uses the pergola.Window maps location services.

actOnCanvas

Boolean; determines whether this (as member of the collection of tools of a pergola.Window object) fn should serve as callback for events registered on the window's doc container.

This class is a subclass of pergola.Button. See other pergola.Button instance properties.