37 virtual bool Contains(wxPoint2DDouble position)
const {
return false; }
38 virtual void Draw(wxPoint2DDouble translation,
double scale)
const {}
39 virtual void Move(wxPoint2DDouble position) {}
47 virtual bool Intersects(wxRect2DDouble rect)
const {
return false; }
51 virtual void AddPoint(wxPoint2DDouble point){};
53 virtual void UpdateSwitchesPosition();
Abstract class for branch power elements.
virtual void UpdateSwitches()
Update the switch position.
virtual void RotateNode(Element *parent, bool clockwise=true)
Rotate a node.
virtual void UpdateNodes()
Update the nodes according to the parents. If a parent is removed, use this method.
virtual bool NodeContains(wxPoint2DDouble position)
Check if a node contains a point. If contains, set the attributes related to node movement.
virtual wxCursor GetBestPickboxCursor() const
Get the best cursor to shown to the user when the mouse is above a pickbox.
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
virtual void Move(wxPoint2DDouble position)
Move the element other position.
virtual bool PickboxContains(wxPoint2DDouble position)
Check if a pickbox contains a point. If contains the attributes related to pickbox movement will be c...
virtual void AddPoint(wxPoint2DDouble point)
Add point to the list of points that connect the element to the bus.
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
virtual void RemoveParent(Element *parent)
Remove a parent.
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element's rect intersects other rect.
virtual bool SetNodeParent(Element *parent)
Set a perent to the node. If all conditions are met, a new parent are added to the element and the po...
virtual void MoveNode(Element *parent, wxPoint2DDouble position)
Move a node. StartMove(wxPoint2DDouble position) before start moving.
virtual void MovePickbox(wxPoint2DDouble position)
Move the pickbox.
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Abstract class of power elements.