Differences between revisions 3 and 4
Revision 3 as of 2008-08-16 17:54:44
Size: 1207
Comment:
Revision 4 as of 2008-08-16 17:57:54
Size: 1242
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
|mouse event |key state | object hit |object selected|
|LeftDown |Ctrl Down | true | 1 |
|LeftDown + drag |Ctrl Down | true | 1 |
|LeftDown + drag |Shift Down | true | 1 |
|LeftDown + drag |Alt Down | true | 1 |
|RightDown + drag |Ctrl Down | true | 1 |
|LeftDown + LeftUp at xy |Alt Down | true | 1 |
||mouse event ||key state || object hit ||object selected||
||LeftDown ||Ctrl Down || true || 1 ||
||LeftDown + drag ||Ctrl Down || true || 1 ||
||LeftDown + drag ||Shift Down || true || 1 ||
||LeftDown + drag ||Alt Down || true || 1 ||
||RightDown + drag ||Ctrl Down || true || 1 ||
||LeftDown + LeftUp at xy ||Alt Down || true || 1 ||

How to make new tools

The best is to derive from existing tools, and redefine only what you don't like. The tools often function within a group of tools. They share a common way of using mouse buttons, and it is oke to push a tool unto the stack, and returning to the parent tool after stopping itself. Like tools based on a2dStTool use all as controller a2dStToolContr.

Changing State

A tool is used to manipulate what is in a drawing. User input combined with selected objects and mouse hit objects, brings a tool from one state into another.

mouse event

key state

object hit

object selected

LeftDown

Ctrl Down

true

1

LeftDown + drag

Ctrl Down

true

1

LeftDown + drag

Shift Down

true

1

LeftDown + drag

Alt Down

true

1

RightDown + drag

Ctrl Down

true

1

LeftDown + LeftUp at xy

Alt Down

true

1

Tool state

Zoom Tool

Diagram1.png

wxArt2D: ToolDevelopment (last edited 2008-08-16 18:20:10 by KlaasHolwerda)