Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Map::Connection Class Reference
Inheritance diagram for Antares::Map::Connection:
Antares::Map::Item

Public Types

enum  Direction { dirNone , dirDirect , dirIndirect }
 
- Public Types inherited from Antares::Map::Item
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.
 
ItemleftSide ()
 
const ItemleftSide () const
 
ItemrightSide ()
 
const ItemrightSide () 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.
 
- Public Member Functions inherited from Antares::Map::Item
 Item (Manager &manager, const int zPos=0)
 Constructor.
 
virtual ~Item ()
 Destructor.
 
Managermanager ()
 Get the manager.
 
const Managermanager () 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::AreaLinkattachedAreaLink () 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

- Protected Member Functions inherited from Antares::Map::Item
void internalClearAllLinks ()
 
virtual void captionHasChanged ()
 
virtual void positionHasChanged ()
 
virtual void colorHasChanged ()
 
- Protected Attributes inherited from Antares::Map::Item
ManagerpManager
 
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
 

Member Function Documentation

◆ contains()

bool Antares::Map::Connection::contains ( const int x,
const int y,
double & distance )
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.

◆ draw()

void Antares::Map::Connection::draw ( DrawingContext & dc)
virtual

Draw the node.

Implements Antares::Map::Item.

◆ extendBoundingBox()

void Antares::Map::Connection::extendBoundingBox ( wxPoint & topLeft,
wxPoint & bottomRight )
virtual

Extends the bounding box.

Implements Antares::Map::Item.

◆ isContained()

bool Antares::Map::Connection::isContained ( const int x1,
const int y1,
const int x2,
const int y2 ) const
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.

◆ isVisibleOnLayer()

bool Antares::Map::Connection::isVisibleOnLayer ( const size_t & layerID) const
virtual

Get the visivility for a layerId.

Reimplemented from Antares::Map::Item.

◆ refreshCache()

void Antares::Map::Connection::refreshCache ( wxDC & dc)
virtual

Refresh the cache (even if not invalidated)

Implements Antares::Map::Item.

◆ selected() [1/2]

bool Antares::Map::Connection::selected ( ) const
inlinevirtual

Get if the item is selected.

Reimplemented from Antares::Map::Item.

◆ selected() [2/2]

void Antares::Map::Connection::selected ( bool v)
virtual

Select or unselect the item.

Reimplemented from Antares::Map::Item.

◆ type()

Item::Type Antares::Map::Connection::type ( ) const
inlinevirtual

Type of the node.

Reimplemented from Antares::Map::Item.


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