Todo list to implement new tool

Registered by hilaire on 2012-07-25

Here what need to be done to implement a new tool and math item. In the most simple case you need:

1. a DrGMathItem descendant,
Depending on your new math item nature you may have to subclass from different math item class

BEWARE: class name must follow the name convention:

'DrG', basicType, nodeType, 'Item'

basicType and nodeType symbols are capitalized, there are the value returned by the instance methods #basicType and #nodeType

2. a Costume and a Morph to represent graphically your item
If your mathitem kind (point, line, ...) already exists, you don't need to implement it, just reuse the existing ones.

3. a Builder
DrGMathItemBuilder subclass: #DrGMyToolBuilder

4. to extend the Dr. Geo Smalltalk programming API (DSL)
In the class DrGeoSketch, you need to add the necessary method to let user instantiate your new item by code. Choose carefully the name.
Describe in the documentation the extended API.

5. to add the UI information
in DrGUIControlsManager, method category 'controls data' define a method answering an array with the necessary data:
    - The title of the tool
    - icon, it is the name of a method class in DrGIcons returning a graphic
    - activator, a method of DrGeoPresenter
    - A long description, used a tool tip
The name of the method should myToolButtonData

6. to list the tools in menu and tool bar
in DrGUIControlsManager, method category 'controls enumerate' add your defined method above in one of the tools list, you just add #myTool, not its full name #myToolButtonData

7. to add an activator
in DrGeoPresenter, method category 'callback create' define the method. Its name must be the same as the third argument of the array returned by method in point 5.

CAUTION: the selectedTool symbol must be the second value of the array returned by the method in point 5. (ie xxxxData)

8. to add a loader for the item
In DrGeoXml, method category 'parse item', define methods #parseXXBasicTypeXXNodeTypeXXItem:
One method for each #nodeType of your new item.

9. to add loader for the style of the item
In DrGeoXml, method category 'parse style' implement a method #parseStyleOfXXBasicTypeXX:with:
Only necessary if you defined a new #basicType for your item.

10. to write unit test to stress the core logic of your new item
the package DrGeoII-Test need to be installed.

Blueprint information

Status:
Not started
Approver:
hilaire
Priority:
Not
Drafter:
hilaire
Direction:
Approved
Assignee:
None
Definition:
Discussion
Series goal:
None
Implementation:
Informational Informational
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.