23#include <wx/dcscreen.h>
36class Gain :
public ControlElement
43 virtual void DrawDC(
GUIColour* guiColour, wxPoint2DDouble translation,
double scale, wxGraphicsContext* gc)
const;
44 virtual bool Contains(wxPoint2DDouble position)
const {
return m_rect.Contains(position); }
45 virtual bool Intersects(wxRect2DDouble rect)
const {
return m_rect.Intersects(rect); }
46 virtual bool ShowForm(wxWindow* parent,
Element* element, wxWindow* workspace =
nullptr);
47 virtual void Rotate(
bool clockwise =
true);
48 virtual void Move(wxPoint2DDouble position);
49 virtual void SetFont(wxFont& font);
51 virtual void SetValue(
double value);
52 virtual double GetValue()
const {
return m_value; }
53 virtual void UpdatePoints();
62 virtual bool Solve(
double* input,
double timeStep);
64 virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode);
65 virtual bool OpenElement(rapidxml::xml_node<>* elementNode);
73 GCText* m_gcText =
nullptr;
75 std::vector<wxPoint2DDouble> m_triPts;
Base class of a control element. Provide general methods to other control classes.
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
virtual bool ShowForm(wxWindow *parent, Element *element, wxWindow *workspace=nullptr)
Show element data form.
virtual Element * GetCopy()
Get a the element copy.
virtual bool UpdateText()
Update the OpenGL text in the element (if present).
virtual bool Solve(double *input, double timeStep)
Multiply the input by a constant.
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element's rect intersects other rect.
virtual void DrawDC(GUIColour *guiColour, wxPoint2DDouble translation, double scale, wxGraphicsContext *gc) const
Draw the element using GDI+.
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
virtual void Move(wxPoint2DDouble position)
Move the element other position.
virtual void Rotate(bool clockwise=true)
Rotate the element.