OMNeT++ Simulation Library  6.0.3
cGroupFigure Class Reference

#include <ccanvas.h>

Description

A figure with the sole purpose of grouping its children, and no visual representation.

The usefulness of a group figure comes from the fact that transformations are inherited from parent to child, thus, children of a group can be moved, scaled, rotated, etc. together by updating the group's transformation matrix.

Inheritance diagram for cGroupFigure:
cFigure cOwnedObject cNamedObject cObject

Public Member Functions

Constructors, destructor, assignment.
 cGroupFigure (const char *name=nullptr)
 
 cGroupFigure (const cGroupFigure &other)
 
cGroupFigureoperator= (const cGroupFigure &other)
 
Redefined cObject and cFigure member functions.
virtual cGroupFiguredup () const override
 
virtual std::string str () const override
 
virtual const char * getRendererClassName () const override
 
virtual void moveLocal (double dx, double dy) override
 
- Public Member Functions inherited from cFigure
 cFigure (const char *name=nullptr)
 
 cFigure (const cFigure &other)
 
virtual ~cFigure ()
 
cFigureoperator= (const cFigure &other)
 
virtual void forEachChild (cVisitor *v) override
 
int getId () const
 
virtual bool isVisible () const
 
virtual void setVisible (bool visible)
 
virtual const TransformgetTransform () const
 
virtual void setTransform (const Transform &transform)
 
virtual void resetTransform ()
 
virtual double getZIndex () const
 
virtual void setZIndex (double zIndex)
 
virtual double getEffectiveZIndex () const
 
virtual const char * getTooltip () const
 
virtual void setTooltip (const char *tooltip)
 
virtual cObjectgetAssociatedObject () const
 
virtual void setAssociatedObject (cObject *obj)
 
virtual const char * getTags () const
 
virtual void setTags (const char *tags)
 
virtual cFiguregetParentFigure () const
 
virtual cCanvasgetCanvas () const
 
virtual int getNumFigures () const
 
virtual cFiguregetFigure (int pos) const
 
virtual cFiguregetFigure (const char *name) const
 
virtual int findFigure (const char *name) const
 
virtual int findFigure (const cFigure *figure) const
 
virtual bool containsFigures () const
 
virtual cFigurefindFigureRecursively (const char *name) const
 
virtual cFiguregetFigureByPath (const char *path) const
 
virtual void addFigure (cFigure *figure)
 
virtual void addFigure (cFigure *figure, int pos)
 
virtual cFigureremoveFigure (cFigure *figure)
 
virtual cFigureremoveFigure (int pos)
 
virtual cFigureremoveFromParent ()
 
virtual bool isAbove (const cFigure *figure) const
 
virtual bool isBelow (const cFigure *figure) const
 
virtual void insertAbove (cFigure *referenceFigure)
 
virtual void insertBelow (cFigure *referenceFigure)
 
virtual void insertAfter (const cFigure *referenceFigure)
 
virtual void insertBefore (const cFigure *referenceFigure)
 
virtual void raiseAbove (cFigure *figure)
 
virtual void lowerBelow (cFigure *figure)
 
virtual void raiseToTop ()
 
virtual void lowerToBottom ()
 
virtual cFiguredupTree () const
 
virtual void translate (double dx, double dy)
 
virtual void scale (double s)
 
virtual void scale (double sx, double sy)
 
virtual void scale (double sx, double sy, double cx, double cy)
 
virtual void scale (double sx, double sy, const Point &c)
 
virtual void rotate (double phi)
 
virtual void rotate (double phi, double cx, double cy)
 
virtual void rotate (double phi, const Point &c)
 
virtual void skewx (double coeff)
 
virtual void skewy (double coeff)
 
virtual void skewx (double coeff, double cy)
 
virtual void skewy (double coeff, double cx)
 
virtual void parse (cProperty *property)
 
virtual const char ** getAllowedPropertyKeys () const
 
virtual void move (double dx, double dy)
 
virtual void refreshDisplay ()
 
virtual void updateParentTransform (Transform &transform)
 
virtual void callRefreshDisplay ()
 
uint8_t getLocalChangeFlags () const
 
uint8_t getSubtreeChangeFlags () const
 
void clearChangeFlags ()
 
void refreshTagBitsRec (cCanvas *ownerCanvas)
 
int64_t getTagBits () const
 
void setTagBits (uint64_t tagBits)
 
uint32_t getHash () const
 
void clearCachedHash ()
 
- Public Member Functions inherited from cOwnedObject
 cOwnedObject ()
 
 cOwnedObject (const char *name, bool namepooling=true)
 
 cOwnedObject (const cOwnedObject &obj)
 
virtual ~cOwnedObject ()
 
cOwnedObjectoperator= (const cOwnedObject &o)
 
virtual void parsimPack (cCommBuffer *buffer) const override
 
virtual void parsimUnpack (cCommBuffer *buffer) override
 
virtual cObjectgetOwner () const override
 
virtual bool isOwnedObject () const override
 
- Public Member Functions inherited from cNamedObject
 cNamedObject ()
 
 cNamedObject (const char *name, bool namepooling=true)
 
 cNamedObject (const cNamedObject &obj)
 
virtual ~cNamedObject ()
 
cNamedObjectoperator= (const cNamedObject &o)
 
virtual void setName (const char *s)
 
virtual const char * getName () const override
 
virtual void setNamePooling (bool b)
 
virtual bool getNamePooling ()
 
- Public Member Functions inherited from cObject
 cObject ()
 
 cObject (const cObject &other)=default
 
virtual ~cObject ()
 
virtual const char * getClassName () const
 
bool isName (const char *s) const
 
virtual const char * getFullName () const
 
virtual std::string getFullPath () const
 
virtual std::string getClassAndFullName () const
 
virtual std::string getClassAndFullPath () const
 
const cObjectgetThisPtr () const
 
virtual std::ostream & printOn (std::ostream &os) const
 
virtual bool isSoftOwner () const
 
cObjectfindObject (const char *name, bool deep=true)
 
virtual cClassDescriptorgetDescriptor () const
 
void copyNotSupported () const
 

Additional Inherited Members

- Public Types inherited from cFigure
enum  FontStyle
 Font style constants: FONT_NONE, FONT_BOLD, etc. More...
 
enum  LineStyle
 Line style constants: LINE_SOLID, LINE_DOTTED, etc. More...
 
enum  CapStyle
 Line cap style constants: CAP_BUTT, CAP_SQUARE, etc. More...
 
enum  JoinStyle
 Line join style constants: JOIN_BEVEL, JOIN_MITER, etc. More...
 
enum  FillRule
 Fill rule constants: FILL_EVENODD, FILL_NONZERO. More...
 
enum  Arrowhead
 Arrowhead style constants: ARROW_NONE, ARROW_SIMPLE, etc. More...
 
enum  Interpolation
 Image interpolation mode constants: INTERPOLATION_NONE, INTERPOLATION_FAST, etc. More...
 
enum  Anchor
 Anchoring mode constants: ANCHOR_CENTER, ANCHOR_N, etc. More...
 
enum  Alignment
 Text alignment mode constants: ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER. More...
 
enum  
 
- Static Public Member Functions inherited from cFigure
static Point parsePoint (const char *s)
 
static Rectangle parseRectangle (const char *s)
 
static Transform parseTransform (const char *s)
 
static Font parseFont (const char *s)
 
static Color parseColor (const char *s)
 
static bool parseBool (const char *s)
 
static LineStyle parseLineStyle (const char *s)
 
static CapStyle parseCapStyle (const char *s)
 
static JoinStyle parseJoinStyle (const char *s)
 
static FillRule parseFillRule (const char *s)
 
static Arrowhead parseArrowhead (const char *s)
 
static Interpolation parseInterpolation (const char *s)
 
static Anchor parseAnchor (const char *s)
 
static Alignment parseAlignment (const char *s)
 
- Static Public Member Functions inherited from cOwnedObject
static long getTotalObjectCount ()
 
static long getLiveObjectCount ()
 
static void resetObjectCounters ()
 
static cSoftOwnergetOwningContext ()
 
- Static Public Attributes inherited from cFigure
static const Color BLACK
 
static const Color WHITE
 
static const Color GREY
 
static const Color RED
 
static const Color GREEN
 
static const Color BLUE
 
static const Color YELLOW
 
static const Color CYAN
 
static const Color MAGENTA
 
static const int NUM_GOOD_DARK_COLORS
 
static const int NUM_GOOD_LIGHT_COLORS
 
static const Color GOOD_DARK_COLORS [14]
 
static const Color GOOD_LIGHT_COLORS [10]
 
- Protected Member Functions inherited from cFigure
virtual void validatePropertyKeys (cProperty *property) const
 
virtual bool isAllowedPropertyKey (const char *key) const
 
virtual cFiguregetRootFigure () const
 
void fireStructuralChange ()
 
void fireTransformChange ()
 
void fireGeometryChange ()
 
void fireVisualChange ()
 
void fireInputDataChange ()
 
virtual void fire (uint8_t flags)
 
virtual void hashTo (cHasher &hasher) const
 
- Protected Member Functions inherited from cObject
virtual void take (cOwnedObject *obj)
 
virtual void drop (cOwnedObject *obj)
 
void dropAndDelete (cOwnedObject *obj)
 
- Static Protected Member Functions inherited from cFigure
static Point parsePoint (cProperty *property, const char *key, int index)
 
static std::vector< PointparsePoints (cProperty *property, const char *key)
 
static Rectangle parseBounds (cProperty *property, const Rectangle &defaults)
 
static Transform parseTransform (cProperty *property, const char *key)
 
static Font parseFont (cProperty *property, const char *key)
 
static Rectangle computeBoundingBox (const Point &position, const Point &size, double ascent, Anchor anchor)
 
static void concatArrays (const char **dest, const char **first, const char **second)
 

Member Function Documentation

◆ dup()

virtual cGroupFigure* dup ( ) const
inlineoverridevirtual

Clones the figure, ignoring its child figures. (The copy will have no children.) To clone a figure together with its figure subtree, use dupTree().

Reimplemented from cFigure.

◆ str()

virtual std::string str ( ) const
overridevirtual

Returns a one-line string with the most characteristic data of the figure.

Reimplemented from cFigure.

◆ getRendererClassName()

virtual const char* getRendererClassName ( ) const
inlineoverridevirtual

Returns the name of the class responsible for rendering this figure. Renderer classes are specific to, and are usually implemented as part of, the graphical user interface library e.g. Qtenv.

Implements cFigure.

◆ moveLocal()

virtual void moveLocal ( double  dx,
double  dy 
)
inlineoverridevirtual

Change the figure's position by the given x and y deltas. Child figures will not be affected.

Implements cFigure.


The documentation for this class was generated from the following file: