If you add Data to a Node you should follow Rules to make more clear what kind of Data you added and to avoid
NodesMessage should follow following Rules
So the new Struckture of a BMessage Node will look like this:
|
BMessage Field |
Type |
Description |
|
Node::Data |
BMessage |
Contains all displayed data for this node |
|
Node::Font |
BMessage |
Contains the font formatting for this node |
|
Node::Pattern |
BMessage |
Contains the hole draw formatting for this node |
| Node::parentNode | Pointer to a BMessage | Pointer to the ParentNode if this Node is a Member of a Group |
|
Node::frame |
BRect |
Stores the Size and Position of this Node |
|
Node::selected |
boolean |
Stores if this node ist currently selected or not |
|
Node::xRadius |
float |
Stores the xRadius of the RoundRect (added and used by GraphEditor) |
|
Node::yRadius |
float |
Stores the yRadius of the RoundRect (added and used by GraphEditor) |
|
Node::outgoing |
Pointer to a BList |
The BList contains all outgoing Connections (added and used by GraphEditor) |
|
Node::incoming |
Pointer to a BList |
The BList contains all Incoming Connections (added and used by GraphEditor) |
| Node::allNodes | Pointer to a BList | If this Node is a Group, this List contains pointer to all Subnodes |
| GraphEditor1::Renderer | Pointer to Render |
Example for a variable added by a Editor. |
|
this |
Pointer to itself |
added during the indexprocess (saveprocess) used to restore pointer to this node (eg. to restore connections) |
|
ProjectConceptor::doc |
Pointer to a PDocument |
points to the document wich this node belong to |
It is still not perfekt for Example i am not shure if the List of the outgoing Nodes -> Node::outgoing should start with low Case...
An Example of a Node-Message
If you have any sugestion pleas feel free to contact me.