cCanvas Class Reference
EXPERIMENTAL CLASS, NOT PART OF THE OFFICIAL OMNeT++ API! ALL DETAILS ARE SUBJECT TO CHANGE.
More...
#include <ccanvas.h>
List of all members.
Detailed Description
EXPERIMENTAL CLASS, NOT PART OF THE OFFICIAL OMNeT++ API! ALL DETAILS ARE SUBJECT TO CHANGE.
Provides a scene graph based 2D drawing API for modules.
Notes:
- all figures are under a root figure (which we try not to expose too much)
- Z-order is defined by child order (bottom-to-top) and preorder traversal
- layer-like functionality is provided via figure tags: the Tkenv UI will allow figures to be shown or hidden according to tags they contain
- cModule has one dedicated canvas, additional canvas objects can be created (and Tkenv *will* allow the user to inspect them)
- initial module canvas contents comes from properties inside the compound module NED file, see test/anim/canvas for examples!
- extensibility: type=foo in a property will cause the canvas to look for a registered FooFigure or cFooFigure class to instantiate
- dup() makes deep copy (duplicates the figure tree too)
- the submodules layer (see getSubmodulesLayer()) is currently an empty placeholder figure where Tkenv will draw modules and connections (by means outside cCanvas/cFigure) -- it can be used for Z-order positioning of other figures relative to the submodules and connections
Member Function Documentation
virtual cCanvas* cCanvas::dup |
( |
|
) |
const [inline, virtual] |
Should be redefined in subclasses to create an exact copy of this object.
The default implementation just throws an error, to indicate that the method was not redefined.
Reimplemented from cObject.
virtual void cCanvas::forEachChild |
( |
cVisitor * |
v |
) |
[virtual] |
Enables traversing the object tree, performing some operation on each object.
The operation is encapsulated in the particular subclass of cVisitor.
This method should be redefined in every subclass to call v->visit(obj) for every obj object contained.
Reimplemented from cObject.
virtual std::string cCanvas::info |
( |
|
) |
const [virtual] |
Can be redefined to produce a one-line description of object.
The string appears in the graphical user interface (Tkenv) e.g. when the object is displayed in a listbox. The returned string should possibly be at most 80-100 characters long, and must not contain newline.
- See also:
- detailedInfo()
Reimplemented from cObject.
The documentation for this class was generated from the following file: