Todo list to implement new tool
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 to implement it, just reuse the existing ones.
3. a Builder
DrGMathItemBuilder subclass: #DrGMyToolBuilder
4. to extend the Dr. Geo API
In the class DrGeoCanvas, you need to add the necessary method to let user instantiate your new item programmatically. Choose carefully the name.
Describe in the documentation the extended API.
5. to add the UI information
in DrGeoPresenter, method category 'UI definition' define a method answering an array with the necessary data
6. 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)
7. to add the menu entry for your tool
in DrGeoWindows, method categories 'menus', select of the xxxMenu method and add the definition to activate your tool
8. to add the tool in a tabular group
in DrGeoWindows, method categories 'tabular groups', select of the xxxTab method and add the definition to activate your tool
9. to add a loader for the item
In DrGeoXml, method category 'parse item', define methods #parseXXBasicTy
One method for each #nodeType of your new item.
10. to add loader for the style of the item
In DrGeoXml, method category 'parse style' implement a method #parseStyleOfXX
Only necessary if you defined a new #basicType for your item.
11. to write unit test to stress the core logic of your new item
the package DrGeoII-Test need to be installed.