summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-04-04 18:10:12 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-04-04 18:10:12 -0300
commit38b3e2decff95f5e29ffb6025ee899d108d22f04 (patch)
tree2655e3ac2dd13a9bb9ee0d38541239c53e668da7
parentafb0e6e08d3911b7387799f5c465fd59ca26a484 (diff)
downloadPSP.git-38b3e2decff95f5e29ffb6025ee899d108d22f04.tar.gz
PSP.git-38b3e2decff95f5e29ffb6025ee899d108d22f04.tar.xz
PSP.git-38b3e2decff95f5e29ffb6025ee899d108d22f04.zip
Gain implemented
Implement io: https://ideone.com/0HDBVd
-rw-r--r--Project/ConstantForm.cpp2
-rw-r--r--Project/ControlEditor.cpp7
-rw-r--r--Project/ControlEditor.h1
-rw-r--r--Project/ElementForm.cpp91
-rw-r--r--Project/ElementForm.h26
-rw-r--r--Project/ElementForm.wxcp721
-rw-r--r--Project/Exponential.cpp2
-rw-r--r--Project/Exponential.h2
-rw-r--r--Project/Gain.cpp169
-rw-r--r--Project/Gain.h37
-rw-r--r--Project/GainForm.cpp27
-rw-r--r--Project/GainForm.h22
-rw-r--r--Project/Project.mk24
-rw-r--r--Project/Project.project4
-rw-r--r--Project/Project.txt2
15 files changed, 1124 insertions, 13 deletions
diff --git a/Project/ConstantForm.cpp b/Project/ConstantForm.cpp
index c769919..4406d63 100644
--- a/Project/ConstantForm.cpp
+++ b/Project/ConstantForm.cpp
@@ -19,7 +19,7 @@ bool ConstantForm::ValidateData()
{
double value;
if(!m_constant->DoubleFromString(this, m_textCtrlValue->GetValue(), value,
- _("Value entered incorrectly in the field \"Value\".")))
+ _("Value entered incorrectly in the field \"Constant value\".")))
return false;
m_constant->SetValue(value);
diff --git a/Project/ControlEditor.cpp b/Project/ControlEditor.cpp
index 7a49694..36edb52 100644
--- a/Project/ControlEditor.cpp
+++ b/Project/ControlEditor.cpp
@@ -10,6 +10,7 @@
#include "RateLimiter.h"
#include "Exponential.h"
#include "Constant.h"
+#include "Gain.h"
ControlElementButton::ControlElementButton(wxWindow* parent, wxString label, wxImage image, wxWindowID id)
: wxWindow(parent, id)
@@ -107,7 +108,7 @@ ControlEditor::ControlEditor(wxWindow* parent) : ControlEditorBase(parent)
m_glContext = new wxGLContext(m_glCanvas);
m_camera = new Camera();
m_selectionRect = wxRect2DDouble(0, 0, 0, 0);
- m_camera->SetScale(1.2);
+ //m_camera->SetScale(1.2);
}
ControlEditor::~ControlEditor()
{
@@ -224,7 +225,9 @@ void ControlEditor::AddElement(ControlElementButtonID id)
m_elementList.push_back(limiter);
} break;
case ID_GAIN: {
- wxLogMessage("gain");
+ m_mode = MODE_INSERT;
+ Gain* gain = new Gain();
+ m_elementList.push_back(gain);
} break;
case ID_MULT: {
m_mode = MODE_INSERT;
diff --git a/Project/ControlEditor.h b/Project/ControlEditor.h
index 4a7397c..998fb2d 100644
--- a/Project/ControlEditor.h
+++ b/Project/ControlEditor.h
@@ -20,6 +20,7 @@ class Limiter;
class RateLimiter;
class Exponential;
class Constant;
+class Gain;
enum ControlElementButtonID { ID_IO = 0, ID_TF, ID_SUM, ID_CONST, ID_LIMITER, ID_GAIN, ID_MULT, ID_EXP, ID_RATELIM };
diff --git a/Project/ElementForm.cpp b/Project/ElementForm.cpp
index b474e1c..cbdfbb5 100644
--- a/Project/ElementForm.cpp
+++ b/Project/ElementForm.cpp
@@ -3307,7 +3307,7 @@ ConstantFormBase::ConstantFormBase(wxWindow* parent, wxWindowID id, const wxStri
wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
m_panelGeneral->SetSizer(boxSizerLvl2_1);
- m_staticTextValue = new wxStaticText(m_panelGeneral, wxID_ANY, _("A value"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ m_staticTextValue = new wxStaticText(m_panelGeneral, wxID_ANY, _("Constant value"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
boxSizerLvl2_1->Add(m_staticTextValue, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
@@ -3371,3 +3371,92 @@ ConstantFormBase::~ConstantFormBase()
m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ConstantFormBase::OnCancelButtonClick), NULL, this);
}
+
+GainFormBase::GainFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
+ : wxDialog(parent, id, title, pos, size, style)
+{
+ if ( !bBitmapLoaded ) {
+ // We need to initialise the default bitmap handler
+ wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
+ wxC9EE9InitBitmapResources();
+ bBitmapLoaded = true;
+ }
+
+ wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
+ this->SetSizer(boxSizerLvl1_1);
+
+ m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
+ m_notebook->SetName(wxT("m_notebook"));
+
+ boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
+
+ m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
+ m_notebook->AddPage(m_panelGeneral, _("General"), false);
+
+ wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
+ m_panelGeneral->SetSizer(boxSizerLvl2_1);
+
+ m_staticTextValue = new wxStaticText(m_panelGeneral, wxID_ANY, _("Gain value"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+
+ boxSizerLvl2_1->Add(m_staticTextValue, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_textCtrlValue = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlValue->SetHint(wxT(""));
+ #endif
+
+ boxSizerLvl2_1->Add(m_textCtrlValue, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+ m_textCtrlValue->SetMinSize(wxSize(100,-1));
+
+ wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
+
+ boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
+
+ boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
+
+ m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+
+ boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+
+ m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
+
+ boxSizerBottomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
+
+
+ #if wxVERSION_NUMBER >= 2900
+ if(!wxPersistenceManager::Get().Find(m_notebook)){
+ wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
+ } else {
+ wxPersistenceManager::Get().Restore(m_notebook);
+ }
+ #endif
+
+ SetName(wxT("GainFormBase"));
+ SetSize(-1,-1);
+ if (GetSizer()) {
+ GetSizer()->Fit(this);
+ }
+ if(GetParent()) {
+ CentreOnParent(wxBOTH);
+ } else {
+ CentreOnScreen(wxBOTH);
+ }
+#if wxVERSION_NUMBER >= 2900
+ if(!wxPersistenceManager::Get().Find(this)) {
+ wxPersistenceManager::Get().RegisterAndRestore(this);
+ } else {
+ wxPersistenceManager::Get().Restore(this);
+ }
+#endif
+ // Connect events
+ m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GainFormBase::OnOKButtonClick), NULL, this);
+ m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GainFormBase::OnCancelButtonClick), NULL, this);
+
+}
+
+GainFormBase::~GainFormBase()
+{
+ m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GainFormBase::OnOKButtonClick), NULL, this);
+ m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GainFormBase::OnCancelButtonClick), NULL, this);
+
+}
diff --git a/Project/ElementForm.h b/Project/ElementForm.h
index 17aacd4..a47dfb7 100644
--- a/Project/ElementForm.h
+++ b/Project/ElementForm.h
@@ -945,4 +945,30 @@ public:
virtual ~ConstantFormBase();
};
+
+class GainFormBase : public wxDialog
+{
+protected:
+ wxNotebook* m_notebook;
+ wxPanel* m_panelGeneral;
+ wxStaticText* m_staticTextValue;
+ wxTextCtrl* m_textCtrlValue;
+ wxButton* m_buttonOK;
+ wxButton* m_buttonCancel;
+
+protected:
+ virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
+ virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
+
+public:
+ wxStaticText* GetStaticTextValue() { return m_staticTextValue; }
+ wxTextCtrl* GetTextCtrlValue() { return m_textCtrlValue; }
+ wxPanel* GetPanelGeneral() { return m_panelGeneral; }
+ wxNotebook* GetNotebook() { return m_notebook; }
+ wxButton* GetButtonOK() { return m_buttonOK; }
+ wxButton* GetButtonCancel() { return m_buttonCancel; }
+ GainFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Gain"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
+ virtual ~GainFormBase();
+};
+
#endif
diff --git a/Project/ElementForm.wxcp b/Project/ElementForm.wxcp
index f0c8d61..9ee35ab 100644
--- a/Project/ElementForm.wxcp
+++ b/Project/ElementForm.wxcp
@@ -1,7 +1,7 @@
{
"metadata": {
"m_generatedFilesDir": ".",
- "m_objCounter": 1775,
+ "m_objCounter": 1797,
"m_includeFiles": [],
"m_bitmapFunction": "wxC9EE9InitBitmapResources",
"m_bitmapsFile": "ElementFormBitmaps.cpp",
@@ -34022,7 +34022,724 @@
}, {
"type": "multi-string",
"m_label": "Label:",
- "m_value": "A value"
+ "m_value": "Constant value"
+ }, {
+ "type": "string",
+ "m_label": "Wrap:",
+ "m_value": "-1"
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4406,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND", "wxALIGN_CENTER_VERTICAL"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "100,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_textCtrlValue"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Value:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Text Hint",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Max Length:",
+ "m_value": "0"
+ }, {
+ "type": "bool",
+ "m_label": "Auto Complete Directories:",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Auto Complete Files:",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }]
+ }]
+ }]
+ }, {
+ "m_type": 4401,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizerBottomButtons"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 1,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4454,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "Spacer_1"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "0,0"
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4400,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_buttonOK"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "OK"
+ }, {
+ "type": "bool",
+ "m_label": "Default Button",
+ "m_value": false
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Direction",
+ "m_selection": 0,
+ "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"]
+ }, {
+ "type": "string",
+ "m_label": "Margins:",
+ "m_value": "2,2"
+ }],
+ "m_events": [{
+ "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED",
+ "m_eventClass": "wxCommandEvent",
+ "m_eventHandler": "wxCommandEventHandler",
+ "m_functionNameAndSignature": "OnOKButtonClick(wxCommandEvent& event)",
+ "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.",
+ "m_noBody": false
+ }],
+ "m_children": []
+ }, {
+ "m_type": 4400,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_buttonCancel"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Cancel"
+ }, {
+ "type": "bool",
+ "m_label": "Default Button",
+ "m_value": false
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Direction",
+ "m_selection": 0,
+ "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"]
+ }, {
+ "type": "string",
+ "m_label": "Margins:",
+ "m_value": "2,2"
+ }],
+ "m_events": [{
+ "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED",
+ "m_eventClass": "wxCommandEvent",
+ "m_eventHandler": "wxCommandEventHandler",
+ "m_functionNameAndSignature": "OnCancelButtonClick(wxCommandEvent& event)",
+ "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.",
+ "m_noBody": false
+ }],
+ "m_children": []
+ }]
+ }]
+ }]
+ }, {
+ "m_type": 4421,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxDEFAULT_DIALOG_STYLE"],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "GainFormBase"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Enable Window Persistency:",
+ "m_value": true
+ }, {
+ "type": "string",
+ "m_label": "Title:",
+ "m_value": "Gain"
+ }, {
+ "type": "virtualFolderPicker",
+ "m_label": "Virtual Folder:",
+ "m_path": "Project:wxcrafter:base"
+ }, {
+ "type": "choice",
+ "m_label": "Centre:",
+ "m_selection": 1,
+ "m_options": ["", "wxBOTH", "wxVERTICAL", "wxHORIZONTAL"]
+ }, {
+ "type": "string",
+ "m_label": "Inherited Class",
+ "m_value": "GainForm"
+ }, {
+ "type": "string",
+ "m_label": "File:",
+ "m_value": "GainForm"
+ }, {
+ "type": "string",
+ "m_label": "Class Decorator",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (16x16) :",
+ "m_path": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (32x32) :",
+ "m_path": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (64x64) :",
+ "m_path": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (128x128):",
+ "m_path": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (256x256):",
+ "m_path": ""
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4401,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizerLvl1_1"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 0,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4442,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxBK_DEFAULT"],
+ "m_sizerFlags": ["wxEXPAND"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_notebook"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4441,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxTAB_TRAVERSAL"],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_panelGeneral"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "General"
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "bool",
+ "m_label": "Selected",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Null Page",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4401,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizerLvl2_1"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 0,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4405,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_staticTextValue"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Label:",
+ "m_value": "Gain value"
}, {
"type": "string",
"m_label": "Wrap:",
diff --git a/Project/Exponential.cpp b/Project/Exponential.cpp
index 18fef19..cb9dfd8 100644
--- a/Project/Exponential.cpp
+++ b/Project/Exponential.cpp
@@ -100,7 +100,7 @@ void Exponential::UpdatePoints()
}
}
-double Exponential::GetValues(double& aValue, double& bValue)
+void Exponential::GetValues(double& aValue, double& bValue)
{
aValue = m_aValue;
bValue = m_bValue;
diff --git a/Project/Exponential.h b/Project/Exponential.h
index d1744f5..ab86ebb 100644
--- a/Project/Exponential.h
+++ b/Project/Exponential.h
@@ -19,7 +19,7 @@ public:
virtual void UpdatePoints();
- virtual double GetValues(double& aValue, double &bValue);
+ virtual void GetValues(double& aValue, double &bValue);
virtual void SetValues(double aValue, double bValue);
protected:
diff --git a/Project/Gain.cpp b/Project/Gain.cpp
new file mode 100644
index 0000000..0e47c2c
--- /dev/null
+++ b/Project/Gain.cpp
@@ -0,0 +1,169 @@
+#include "Gain.h"
+#include "GainForm.h"
+
+Gain::Gain() : ControlElement()
+{
+ m_triPts.resize(3);
+ SetValue(m_value);
+ Node* nodeIn = new Node(m_position + wxPoint2DDouble(-m_width / 2, 0), Node::NODE_IN, m_borderSize);
+ nodeIn->StartMove(m_position);
+ Node* nodeOut = new Node(m_position + wxPoint2DDouble(m_width / 2, 0), Node::NODE_OUT, m_borderSize);
+ nodeOut->SetAngle(180.0);
+ nodeOut->StartMove(m_position);
+ m_nodeList.push_back(nodeIn);
+ m_nodeList.push_back(nodeOut);
+}
+
+Gain::~Gain() {}
+void Gain::Draw(wxPoint2DDouble translation, double scale) const
+{
+ if(m_selected) {
+ glColor4dv(m_selectionColour.GetRGBA());
+ double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
+ std::vector<wxPoint2DDouble> m_triSelectedPts;
+ if(m_angle == 0.0) {
+ m_triSelectedPts.push_back(m_triPts[0] - wxPoint2DDouble(borderSize / 2, borderSize / 1.5));
+ m_triSelectedPts.push_back(m_triPts[1] - wxPoint2DDouble(borderSize / 2, -borderSize / 1.5));
+ m_triSelectedPts.push_back(m_triPts[2] - wxPoint2DDouble(-borderSize, 0));
+ } else if(m_angle == 90.0) {
+ m_triSelectedPts.push_back(m_triPts[0] - wxPoint2DDouble(borderSize / 1.5, borderSize / 2));
+ m_triSelectedPts.push_back(m_triPts[1] - wxPoint2DDouble(-borderSize / 1.5, borderSize / 2));
+ m_triSelectedPts.push_back(m_triPts[2] - wxPoint2DDouble(0, -borderSize));
+ } else if(m_angle == 180.0) {
+ m_triSelectedPts.push_back(m_triPts[0] - wxPoint2DDouble(borderSize, 0));
+ m_triSelectedPts.push_back(m_triPts[1] - wxPoint2DDouble(-borderSize / 2, borderSize / 1.5));
+ m_triSelectedPts.push_back(m_triPts[2] - wxPoint2DDouble(-borderSize / 2, -borderSize / 1.5));
+ } else if(m_angle == 270.0) {
+ m_triSelectedPts.push_back(m_triPts[0] - wxPoint2DDouble(0, borderSize));
+ m_triSelectedPts.push_back(m_triPts[1] - wxPoint2DDouble(-borderSize / 1.5, -borderSize / 2));
+ m_triSelectedPts.push_back(m_triPts[2] - wxPoint2DDouble(borderSize / 1.5, -borderSize / 2));
+ }
+ DrawTriangle(m_triSelectedPts);
+ }
+ glLineWidth(1.0);
+ glColor4d(1.0, 1.0, 1.0, 1.0);
+ DrawTriangle(m_triPts);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawTriangle(m_triPts, GL_LINE_LOOP);
+
+ // Plot number.
+ glEnable(GL_TEXTURE_2D);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ m_glStringValue->bind();
+ if(m_angle == 0.0)
+ m_glStringValue->render(m_position.m_x - m_width / 2 + m_glStringValue->getWidth() / 2 + 2 + m_borderSize,
+ m_position.m_y);
+ else if(m_angle == 90.0)
+ m_glStringValue->render(m_position.m_x,
+ m_position.m_y - m_height / 2 + m_glStringValue->getheight() / 2 + 2 + m_borderSize);
+ else if(m_angle == 180.0)
+ m_glStringValue->render(m_position.m_x + m_width / 2 - m_glStringValue->getWidth() / 2 - 2 - m_borderSize,
+ m_position.m_y);
+ else if(m_angle == 270.0)
+ m_glStringValue->render(m_position.m_x,
+ m_position.m_y + m_height / 2 - m_glStringValue->getheight() / 2 - 2 - m_borderSize);
+ glDisable(GL_TEXTURE_2D);
+
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawNodes();
+}
+
+bool Gain::ShowForm(wxWindow* parent, Element* element)
+{
+ GainForm* form = new GainForm(parent, this);
+ if(form->ShowModal() == wxID_OK) {
+ form->Destroy();
+ return true;
+ }
+ form->Destroy();
+ return false;
+}
+
+void Gain::Rotate(bool clockwise)
+{
+ if(clockwise)
+ m_angle += 90.0;
+ else
+ m_angle -= 90.0;
+ if(m_angle >= 360.0)
+ m_angle = 0.0;
+ else if(m_angle < 0)
+ m_angle = 270.0;
+
+ UpdatePoints();
+
+ for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
+ Node* node = *it;
+ node->Rotate(clockwise);
+ }
+}
+
+void Gain::SetValue(double value)
+{
+ m_value = value;
+ wxString text = "";
+ if(std::abs(m_value) > 1e3 || std::abs(m_value) < 1e-3)
+ text = wxString::Format("%g", m_value);
+ else
+ text = StringFromDouble(m_value);
+
+ wxFont font(m_fontSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
+ wxScreenDC dc;
+
+ if(m_glStringValue) {
+ delete m_glStringValue;
+ m_glStringValue = NULL;
+ }
+ m_glStringValue = new wxGLString(text);
+ m_glStringValue->setFont(font);
+ m_glStringValue->consolidate(&dc);
+
+ m_width = m_glStringValue->getWidth() + 18 + 2 * m_borderSize;
+ m_height = m_glStringValue->getheight() + 18 + 2 * m_borderSize;
+
+ if(m_width > m_height)
+ m_height = m_width;
+ else
+ m_width = m_height;
+
+ SetPosition(m_position); // Update rectangle.
+
+ UpdatePoints();
+}
+
+void Gain::UpdatePoints()
+{
+ if(m_nodeList.size() != 0) {
+ if(m_angle == 0.0) {
+ m_triPts[0] = m_rect.GetLeftTop() + wxPoint2DDouble(m_borderSize, m_borderSize);
+ m_triPts[1] = m_rect.GetLeftBottom() + wxPoint2DDouble(m_borderSize, -m_borderSize);
+ m_triPts[2] = m_position + wxPoint2DDouble(m_width / 2 - m_borderSize, 0);
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(m_width / 2 - 2, 0));
+ } else if(m_angle == 90.0) {
+ m_triPts[0] = m_rect.GetLeftTop() + wxPoint2DDouble(m_borderSize, m_borderSize);
+ m_triPts[1] = m_rect.GetRightTop() + wxPoint2DDouble(-m_borderSize, m_borderSize);
+ m_triPts[2] = m_position + wxPoint2DDouble(0, m_height / 2 - m_borderSize);
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2 - 2));
+ } else if(m_angle == 180.0) {
+ m_triPts[0] = m_position + wxPoint2DDouble(-m_width / 2 + m_borderSize, 0);
+ m_triPts[1] = m_rect.GetRightTop() + wxPoint2DDouble(-m_borderSize, m_borderSize);
+ m_triPts[2] = m_rect.GetRightBottom() + wxPoint2DDouble(-m_borderSize, -m_borderSize);
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2 + 2, 0));
+ } else if(m_angle == 270.0) {
+ m_triPts[0] = m_position + wxPoint2DDouble(0, -m_height / 2 + m_borderSize);
+ m_triPts[1] = m_rect.GetRightBottom() + wxPoint2DDouble(-m_borderSize, -m_borderSize);
+ m_triPts[2] = m_rect.GetLeftBottom() + wxPoint2DDouble(m_borderSize, -m_borderSize);
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2 + 2));
+ }
+ }
+}
+
+void Gain::Move(wxPoint2DDouble position)
+{
+ SetPosition(m_movePos + position - m_moveStartPt);
+ UpdatePoints();
+}
diff --git a/Project/Gain.h b/Project/Gain.h
new file mode 100644
index 0000000..0088e0c
--- /dev/null
+++ b/Project/Gain.h
@@ -0,0 +1,37 @@
+#ifndef GAIN_H
+#define GAIN_H
+
+#include "ControlElement.h"
+
+#include <wx/dcscreen.h>
+#include "wxGLString.h"
+
+class GainForm;
+
+class Gain : public ControlElement
+{
+ public:
+ Gain();
+ ~Gain();
+
+ virtual void Draw(wxPoint2DDouble translation, double scale) const;
+ virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
+ virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
+ virtual bool ShowForm(wxWindow* parent, Element* element);
+ virtual void Rotate(bool clockwise = true);
+ virtual void Move(wxPoint2DDouble position);
+
+ virtual void SetValue(double value);
+ virtual double GetValue() const { return m_value; }
+ virtual void UpdatePoints();
+
+ protected:
+ double m_value = 1.0;
+
+ wxGLString* m_glStringValue = NULL;
+ int m_fontSize = 10;
+
+ std::vector<wxPoint2DDouble> m_triPts;
+};
+
+#endif // GAIN_H
diff --git a/Project/GainForm.cpp b/Project/GainForm.cpp
new file mode 100644
index 0000000..22f9079
--- /dev/null
+++ b/Project/GainForm.cpp
@@ -0,0 +1,27 @@
+#include "GainForm.h"
+#include "Gain.h"
+
+GainForm::GainForm(wxWindow* parent, Gain* gain) : GainFormBase(parent)
+{
+ m_parent = parent;
+ m_gain = gain;
+
+ m_textCtrlValue->SetValue(m_gain->StringFromDouble(m_gain->GetValue()));
+}
+
+GainForm::~GainForm() {}
+void GainForm::OnOKButtonClick(wxCommandEvent& event)
+{
+ if(ValidateData()) EndModal(wxID_OK);
+}
+
+bool GainForm::ValidateData()
+{
+ double value;
+ if(!m_gain->DoubleFromString(this, m_textCtrlValue->GetValue(), value,
+ _("Value entered incorrectly in the field \"Gain value\".")))
+ return false;
+
+ m_gain->SetValue(value);
+ return true;
+}
diff --git a/Project/GainForm.h b/Project/GainForm.h
new file mode 100644
index 0000000..45d6c40
--- /dev/null
+++ b/Project/GainForm.h
@@ -0,0 +1,22 @@
+#ifndef GAINFORM_H
+#define GAINFORM_H
+#include "ElementForm.h"
+
+class Gain;
+
+class GainForm : public GainFormBase
+{
+ public:
+ GainForm(wxWindow* parent, Gain* gain);
+ virtual ~GainForm();
+
+ virtual bool ValidateData();
+
+ protected:
+ virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
+ virtual void OnOKButtonClick(wxCommandEvent& event);
+
+ wxWindow* m_parent;
+ Gain* m_gain;
+};
+#endif // GAINFORM_H
diff --git a/Project/Project.mk b/Project/Project.mk
index ae6aceb..6ed7de9 100644
--- a/Project/Project.mk
+++ b/Project/Project.mk
@@ -13,7 +13,7 @@ CurrentFileName :=
CurrentFilePath :=
CurrentFileFullPath :=
User :=NDSE-69
-Date :=01/04/2017
+Date :=04/04/2017
CodeLitePath :="C:/Program Files/CodeLite"
LinkerName :=C:/TDM-GCC-64/bin/g++.exe
SharedObjectLinkerName :=C:/TDM-GCC-64/bin/g++.exe -shared -fPIC
@@ -68,9 +68,9 @@ Objects0=$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IntermediateDirector
$(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrameBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/WorkspaceBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlEditorBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrameBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/WorkspaceBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlEditorBase.cpp$(ObjectSuffix) \
$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) $(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) $(IntermediateDirectory)/Load.cpp$(ObjectSuffix) \
$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) $(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) $(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix) $(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) $(IntermediateDirectory)/Text.cpp$(ObjectSuffix) $(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) \
- $(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) $(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) $(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) $(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) $(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) \
- $(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) \
- $(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix)
+ $(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) $(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) $(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) $(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) $(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) $(IntermediateDirectory)/Gain.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) \
+ $(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) \
+ $(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix)
@@ -471,6 +471,14 @@ $(IntermediateDirectory)/Constant.cpp$(DependSuffix): Constant.cpp
$(IntermediateDirectory)/Constant.cpp$(PreprocessSuffix): Constant.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Constant.cpp$(PreprocessSuffix) Constant.cpp
+$(IntermediateDirectory)/Gain.cpp$(ObjectSuffix): Gain.cpp $(IntermediateDirectory)/Gain.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Gain.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Gain.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/Gain.cpp$(DependSuffix): Gain.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Gain.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Gain.cpp$(DependSuffix) -MM Gain.cpp
+
+$(IntermediateDirectory)/Gain.cpp$(PreprocessSuffix): Gain.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Gain.cpp$(PreprocessSuffix) Gain.cpp
+
$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix): BusForm.cpp $(IntermediateDirectory)/BusForm.cpp$(DependSuffix)
$(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/BusForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/BusForm.cpp$(DependSuffix): BusForm.cpp
@@ -599,6 +607,14 @@ $(IntermediateDirectory)/ConstantForm.cpp$(DependSuffix): ConstantForm.cpp
$(IntermediateDirectory)/ConstantForm.cpp$(PreprocessSuffix): ConstantForm.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ConstantForm.cpp$(PreprocessSuffix) ConstantForm.cpp
+$(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix): GainForm.cpp $(IntermediateDirectory)/GainForm.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GainForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/GainForm.cpp$(DependSuffix): GainForm.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GainForm.cpp$(DependSuffix) -MM GainForm.cpp
+
+$(IntermediateDirectory)/GainForm.cpp$(PreprocessSuffix): GainForm.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GainForm.cpp$(PreprocessSuffix) GainForm.cpp
+
-include $(IntermediateDirectory)/*$(DependSuffix)
##
diff --git a/Project/Project.project b/Project/Project.project
index 3c97ad7..95c7380 100644
--- a/Project/Project.project
+++ b/Project/Project.project
@@ -46,6 +46,7 @@
<File Name="RateLimiter.cpp"/>
<File Name="Exponential.cpp"/>
<File Name="Constant.cpp"/>
+ <File Name="Gain.cpp"/>
</VirtualDirectory>
</VirtualDirectory>
<VirtualDirectory Name="view">
@@ -79,6 +80,7 @@
<File Name="RateLimiterForm.cpp"/>
<File Name="ExponentialForm.cpp"/>
<File Name="ConstantForm.cpp"/>
+ <File Name="GainForm.cpp"/>
</VirtualDirectory>
</VirtualDirectory>
<File Name="main.cpp"/>
@@ -127,6 +129,7 @@
<File Name="RateLimiter.h"/>
<File Name="Exponential.h"/>
<File Name="Constant.h"/>
+ <File Name="Gain.h"/>
</VirtualDirectory>
</VirtualDirectory>
<VirtualDirectory Name="view">
@@ -160,6 +163,7 @@
<File Name="RateLimiterForm.h"/>
<File Name="ExponentialForm.h"/>
<File Name="ConstantForm.h"/>
+ <File Name="GainForm.h"/>
</VirtualDirectory>
</VirtualDirectory>
</VirtualDirectory>
diff --git a/Project/Project.txt b/Project/Project.txt
index 6706672..01bcf5f 100644
--- a/Project/Project.txt
+++ b/Project/Project.txt
@@ -1 +1 @@
-./Release/main.cpp.o ./Release/win_resources.rc.o ./Release/ElementDataObject.cpp.o ./Release/Element.cpp.o ./Release/ArtMetro.cpp.o ./Release/wxGLString.cpp.o ./Release/MainFrame.cpp.o ./Release/Workspace.cpp.o ./Release/FileHanding.cpp.o ./Release/ControlEditor.cpp.o ./Release/Camera.cpp.o ./Release/MainFrameBitmaps.cpp.o ./Release/WorkspaceBitmaps.cpp.o ./Release/BusFormBitmaps.cpp.o ./Release/ElementFormBitmaps.cpp.o ./Release/ControlEditorBitmaps.cpp.o ./Release/MainFrameBase.cpp.o ./Release/WorkspaceBase.cpp.o ./Release/ElementForm.cpp.o ./Release/ControlEditorBase.cpp.o ./Release/Bus.cpp.o ./Release/Line.cpp.o ./Release/Transformer.cpp.o ./Release/Machines.cpp.o ./Release/SyncGenerator.cpp.o ./Release/IndMotor.cpp.o ./Release/Branch.cpp.o ./Release/SyncMotor.cpp.o ./Release/Shunt.cpp.o ./Release/Load.cpp.o ./Release/Inductor.cpp.o ./Release/Capacitor.cpp.o ./Release/PowerElement.cpp.o ./Release/ElectricCalculation.cpp.o ./Release/PowerFlow.cpp.o ./Release/Fault.cpp.o ./Release/Text.cpp.o ./Release/GraphicalElement.cpp.o ./Release/ControlElement.cpp.o ./Release/TransferFunction.cpp.o ./Release/ConnectionLine.cpp.o ./Release/Sum.cpp.o ./Release/Multiplier.cpp.o ./Release/Limiter.cpp.o ./Release/RateLimiter.cpp.o ./Release/Exponential.cpp.o ./Release/Constant.cpp.o ./Release/BusForm.cpp.o ./Release/GeneratorStabForm.cpp.o ./Release/LineForm.cpp.o ./Release/SwitchingForm.cpp.o ./Release/TransformerForm.cpp.o ./Release/LoadForm.cpp.o ./Release/ReactiveShuntElementForm.cpp.o ./Release/IndMotorForm.cpp.o ./Release/SyncMachineForm.cpp.o ./Release/TextForm.cpp.o ./Release/TransferFunctionForm.cpp.o ./Release/SumForm.cpp.o ./Release/LimiterForm.cpp.o ./Release/RateLimiterForm.cpp.o ./Release/ExponentialForm.cpp.o ./Release/ConstantForm.cpp.o
+./Release/main.cpp.o ./Release/win_resources.rc.o ./Release/ElementDataObject.cpp.o ./Release/Element.cpp.o ./Release/ArtMetro.cpp.o ./Release/wxGLString.cpp.o ./Release/MainFrame.cpp.o ./Release/Workspace.cpp.o ./Release/FileHanding.cpp.o ./Release/ControlEditor.cpp.o ./Release/Camera.cpp.o ./Release/MainFrameBitmaps.cpp.o ./Release/WorkspaceBitmaps.cpp.o ./Release/BusFormBitmaps.cpp.o ./Release/ElementFormBitmaps.cpp.o ./Release/ControlEditorBitmaps.cpp.o ./Release/MainFrameBase.cpp.o ./Release/WorkspaceBase.cpp.o ./Release/ElementForm.cpp.o ./Release/ControlEditorBase.cpp.o ./Release/Bus.cpp.o ./Release/Line.cpp.o ./Release/Transformer.cpp.o ./Release/Machines.cpp.o ./Release/SyncGenerator.cpp.o ./Release/IndMotor.cpp.o ./Release/Branch.cpp.o ./Release/SyncMotor.cpp.o ./Release/Shunt.cpp.o ./Release/Load.cpp.o ./Release/Inductor.cpp.o ./Release/Capacitor.cpp.o ./Release/PowerElement.cpp.o ./Release/ElectricCalculation.cpp.o ./Release/PowerFlow.cpp.o ./Release/Fault.cpp.o ./Release/Text.cpp.o ./Release/GraphicalElement.cpp.o ./Release/ControlElement.cpp.o ./Release/TransferFunction.cpp.o ./Release/ConnectionLine.cpp.o ./Release/Sum.cpp.o ./Release/Multiplier.cpp.o ./Release/Limiter.cpp.o ./Release/RateLimiter.cpp.o ./Release/Exponential.cpp.o ./Release/Constant.cpp.o ./Release/Gain.cpp.o ./Release/BusForm.cpp.o ./Release/GeneratorStabForm.cpp.o ./Release/LineForm.cpp.o ./Release/SwitchingForm.cpp.o ./Release/TransformerForm.cpp.o ./Release/LoadForm.cpp.o ./Release/ReactiveShuntElementForm.cpp.o ./Release/IndMotorForm.cpp.o ./Release/SyncMachineForm.cpp.o ./Release/TextForm.cpp.o ./Release/TransferFunctionForm.cpp.o ./Release/SumForm.cpp.o ./Release/LimiterForm.cpp.o ./Release/RateLimiterForm.cpp.o ./Release/ExponentialForm.cpp.o ./Release/ConstantForm.cpp.o ./Release/GainForm.cpp.o