Antares Simulator
Power System Simulator
|
Public Types | |
enum | Direction { dirNone , dirDirect , dirIndirect } |
![]() | |
enum | Type { tyUnknown , tyNode , tyConnection , tyBindingConstraint } |
using | Vector = std::vector<Item*> |
using | Set = std::set<Item*, SetCompare> |
using | Links = std::map<Item*, bool> |
Public Member Functions | |
Constructor & Destructor | |
Connection (Manager &manager, Item *a, Item *b) | |
Default constructor. | |
virtual | ~Connection () |
Destructor. | |
layerVisibility | |
bool | isVisibleOnLayer (const size_t &layerID) const |
Get the visivility for a layerId. | |
virtual Type | type () const |
Type of the node. | |
Item * | leftSide () |
const Item * | leftSide () const |
Item * | rightSide () |
const Item * | rightSide () const |
Direction | arrowDirection () const |
void | arrowDirection (const Direction &d) |
Direction | direction () const |
void | direction (const Direction &d) |
virtual void | refreshCache (wxDC &dc) |
Refresh the cache (even if not invalidated) | |
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. | |
Selection | |
virtual bool | selected () const |
Get if the item is selected. | |
virtual void | selected (bool v) |
Select or unselect the item. | |
![]() | |
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) |
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 | move (const int x, const int y) |
virtual void | mouseDblClick () |
Mouse double click. | |
Link | |
Data::AreaLink * | attachedAreaLink () const |
Get the attached link. | |
void | attachedAreaLink (Data::AreaLink *a) |
Set the attached link. | |
void | createANewConnectionIfNeeded () |
Create a link if the internal pointers are nil. | |
Additional Inherited Members | |
![]() | |
void | internalClearAllLinks () |
virtual void | captionHasChanged () |
virtual void | positionHasChanged () |
virtual void | colorHasChanged () |
![]() | |
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 |
|
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 |
Refresh the cache (even if not invalidated)
Implements Antares::Map::Item.
|
inlinevirtual |
Get if the item is selected.
Reimplemented from Antares::Map::Item.
|
virtual |
Select or unselect the item.
Reimplemented from Antares::Map::Item.
|
inlinevirtual |
Type of the node.
Reimplemented from Antares::Map::Item.