Antares Simulator
Power System Simulator
|
A node in a map. More...
#include <node.h>
Public Member Functions | |
Constructors & Destructor | |
Node (Manager &manager) | |
Default constructor. | |
Node (Manager &manager, const wxString &id) | |
Constructor with a given id. | |
virtual | ~Node () |
Destructor. | |
layerVisibility | |
bool | isVisibleOnLayer (const size_t &layerID) const |
Get the visivility for a layerId. | |
virtual Type | type () const |
Type. | |
ID | |
const wxString & | id () const |
void | position (const int x, const int y) |
virtual void | move (const int x, const int y) |
Move the node. | |
Cache | |
virtual void | refreshCache (wxDC &dc) |
Refresh the cache (even if not invalidated) | |
const wxPoint & | cachedPosition () const |
Get the cached position. | |
const wxPoint & | cachedSize () const |
Get the cached size. | |
![]() | |
Item (Manager &manager, const int zPos=0) | |
Constructor. | |
virtual | ~Item () |
Destructor. | |
Manager & | manager () |
Get the manager. | |
const Manager & | manager () const |
const wxString & | caption () const |
void | caption (const wxString &v) |
int | x () const |
void | x (const int v) |
int | y () const |
void | y (const int v) |
virtual wxPoint | absolutePosition (DrawingContext &dc) const |
const wxColour & | color () const |
void | color (const wxColour &c) |
void | color (const wxString &s) |
void | color (const int r, const int g, const int b) |
void | color (const int r, const int g, const int b, const int alpha) |
virtual bool | selected () const |
virtual void | selected (bool v) |
int | zPosition () const |
void | forceReload () |
Mark the node as invalidated (to force its refresh for the next canvas update) | |
bool | isInvalidated () const |
Get the node is invalidated. | |
virtual void | drawExternalDrawer (DrawingContext &) |
virtual void | mouseDblClick () |
Mouse double click. | |
Misc | |
virtual bool | contains (const int x, const int y, double &distance) |
Get if the drawing representation of the node contains the point (x,y) | |
virtual bool | isContained (const int x1, const int y1, const int x2, const int y2) const |
Get if the drawing representation of the node is contained inside a bounding box. | |
virtual void | draw (DrawingContext &dc) |
Draw the node. | |
virtual void | extendBoundingBox (wxPoint &topLeft, wxPoint &bottomRight) |
Extends the bounding box. | |
Data::Area * | attachedArea () const |
void | attachedArea (Data::Area *a) |
void | addLayerVisibility (size_t id=0) |
make this node visible/invisible in a layer | |
void | removeLayerVisibility (size_t id) |
virtual void | captionHasChanged () |
virtual void | positionHasChanged () |
virtual void | colorHasChanged () |
void | createANewAreaIfNotAlreadyAttached () |
Additional Inherited Members | |
![]() | |
enum | Type { tyUnknown , tyNode , tyConnection , tyBindingConstraint } |
using | Vector = std::vector<Item*> |
using | Set = std::set<Item*, SetCompare> |
using | Links = std::map<Item*, bool> |
![]() | |
void | internalClearAllLinks () |
![]() | |
Manager & | pManager |
wxColour | pColor |
Color. | |
bool | pSelected |
Selected. | |
bool | pInvalidated |
invalidated | |
int | pX |
Y-Coordinate. | |
int | pY |
X-Coordinate. | |
wxString | pCaption |
Caption. | |
Links * | pLinks |
Linked with other items. | |
int | pZPosition |
A node in a map.
|
protectedvirtual |
Reimplemented from Antares::Map::Item.
|
protectedvirtual |
Reimplemented from Antares::Map::Item.
|
virtual |
Get if the drawing representation of the node contains the point (x,y)
This method is used to know if the mouse if over a node or not
Implements Antares::Map::Item.
|
virtual |
Draw the node.
Implements Antares::Map::Item.
|
virtual |
Extends the bounding box.
Implements Antares::Map::Item.
|
virtual |
Get if the drawing representation of the node is contained inside a bounding box.
This method is used to know if the mouse if over a node or not
Implements Antares::Map::Item.
|
virtual |
Get the visivility for a layerId.
Reimplemented from Antares::Map::Item.
|
virtual |
Move the node.
x | A relative X-coordinate |
y | A relative Y-coordinate |
Reimplemented from Antares::Map::Item.
|
protectedvirtual |
Reimplemented from Antares::Map::Item.
|
virtual |
Refresh the cache (even if not invalidated)
Implements Antares::Map::Item.
|
inlinevirtual |
Type.
Reimplemented from Antares::Map::Item.