summaryrefslogtreecommitdiffstats
path: root/Project
diff options
context:
space:
mode:
Diffstat (limited to 'Project')
-rw-r--r--Project/Branch.h1
-rw-r--r--Project/Camera.cpp38
-rw-r--r--Project/Camera.h35
-rw-r--r--Project/ChartView.wxcp1269
-rw-r--r--Project/ConnectionLine.cpp186
-rw-r--r--Project/ConnectionLine.h43
-rw-r--r--Project/Constant.cpp104
-rw-r--r--Project/Constant.h34
-rw-r--r--Project/ConstantForm.cpp27
-rw-r--r--Project/ConstantForm.h21
-rw-r--r--Project/ControlEditor.cpp763
-rw-r--r--Project/ControlEditor.h125
-rw-r--r--Project/ControlEditor.wxcp1249
-rw-r--r--Project/ControlEditorBase.cpp172
-rw-r--r--Project/ControlEditorBase.h80
-rw-r--r--Project/ControlEditorBitmaps.cpp1186
-rw-r--r--Project/ControlElement.cpp114
-rw-r--r--Project/ControlElement.h65
-rw-r--r--Project/ControlElementContainer.cpp54
-rw-r--r--Project/ControlElementContainer.h56
-rw-r--r--Project/Element.cpp37
-rw-r--r--Project/Element.h69
-rw-r--r--Project/ElementForm.cpp776
-rw-r--r--Project/ElementForm.h232
-rw-r--r--Project/ElementForm.wxcp6613
-rw-r--r--Project/ElementFormBitmaps.cpp4
-rw-r--r--Project/Exponential.cpp113
-rw-r--r--Project/Exponential.h31
-rw-r--r--Project/ExponentialForm.cpp44
-rw-r--r--Project/ExponentialForm.h21
-rw-r--r--Project/FileHanding.cpp975
-rw-r--r--Project/FileHanding.h16
-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/IOControl.cpp224
-rw-r--r--Project/IOControl.h49
-rw-r--r--Project/IOControlForm.cpp89
-rw-r--r--Project/IOControlForm.h27
-rw-r--r--Project/Limiter.cpp89
-rw-r--r--Project/Limiter.h33
-rw-r--r--Project/LimiterForm.cpp34
-rw-r--r--Project/LimiterForm.h21
-rw-r--r--Project/Line.cpp35
-rw-r--r--Project/Line.h1
-rw-r--r--Project/MainFrame.cpp9
-rw-r--r--Project/Multiplier.cpp86
-rw-r--r--Project/Multiplier.h21
-rw-r--r--Project/PowerElement.cpp1
-rw-r--r--Project/PowerElement.h1
-rw-r--r--Project/Project.mk302
-rw-r--r--Project/Project.project57
-rw-r--r--Project/Project.txt2
-rw-r--r--Project/RateLimiter.cpp97
-rw-r--r--Project/RateLimiter.h32
-rw-r--r--Project/RateLimiterForm.cpp35
-rw-r--r--Project/RateLimiterForm.h21
-rw-r--r--Project/Sum.cpp183
-rw-r--r--Project/Sum.h32
-rw-r--r--Project/SumForm.cpp78
-rw-r--r--Project/SumForm.h22
-rw-r--r--Project/Text.cpp2
-rw-r--r--Project/TransferFunction.cpp250
-rw-r--r--Project/TransferFunction.h43
-rw-r--r--Project/TransferFunctionForm.cpp76
-rw-r--r--Project/TransferFunctionForm.h23
-rw-r--r--Project/Transformer.h16
-rw-r--r--Project/Workspace.cpp69
-rw-r--r--Project/Workspace.h77
-rw-r--r--Project/data/images/control/gain.pngbin0 -> 599 bytes
-rw-r--r--Project/data/images/control/io.pngbin0 -> 787 bytes
-rw-r--r--Project/data/images/control/limiter.pngbin0 -> 637 bytes
-rw-r--r--Project/data/images/control/mult.pngbin0 -> 1080 bytes
-rw-r--r--Project/data/images/control/rateLimiter.pngbin0 -> 641 bytes
-rw-r--r--Project/data/images/control/sat.pngbin0 -> 779 bytes
-rw-r--r--Project/data/images/control/sum.pngbin0 -> 1173 bytes
-rw-r--r--Project/data/images/control/transferFunc.pngbin0 -> 808 bytes
-rw-r--r--Project/data/images/control/value.pngbin0 -> 610 bytes
-rw-r--r--Project/data/images/ctrlEditor128.pngbin0 -> 2807 bytes
-rw-r--r--Project/data/images/ctrlEditor16.pngbin0 -> 499 bytes
-rw-r--r--Project/data/images/ctrlEditor256.pngbin0 -> 6687 bytes
-rw-r--r--Project/data/images/ctrlEditor32.pngbin0 -> 648 bytes
-rw-r--r--Project/data/images/ctrlEditor64.pngbin0 -> 1454 bytes
-rw-r--r--Project/data/images/ribbon/exp32.pngbin0 -> 724 bytes
-rw-r--r--Project/data/images/ribbon/imp32.pngbin0 -> 760 bytes
-rw-r--r--Project/data/lang/pt_BR/pt_BR.mobin6415 -> 6405 bytes
-rw-r--r--Project/data/lang/pt_BR/pt_BR.po1171
-rw-r--r--Project/wxMathPlot/mathplot.cpp3074
-rw-r--r--Project/wxMathPlot/mathplot.h1701
90 files changed, 22362 insertions, 529 deletions
diff --git a/Project/Branch.h b/Project/Branch.h
index 461738f..a782a1e 100644
--- a/Project/Branch.h
+++ b/Project/Branch.h
@@ -20,7 +20,6 @@ public:
virtual void RemoveParent(Element* parent);
virtual void UpdateNodes();
virtual wxCursor GetBestPickboxCursor() const { return wxCURSOR_ARROW; }
- virtual bool AddParent(Element* parent, wxPoint2DDouble position) { return false; }
virtual bool Intersects(wxRect2DDouble rect) const { return false; }
virtual void MovePickbox(wxPoint2DDouble position) {}
virtual bool PickboxContains(wxPoint2DDouble position) { return false; }
diff --git a/Project/Camera.cpp b/Project/Camera.cpp
new file mode 100644
index 0000000..248a835
--- /dev/null
+++ b/Project/Camera.cpp
@@ -0,0 +1,38 @@
+#include "Camera.h"
+
+Camera::Camera()
+{
+ m_translation = wxPoint2DDouble(0, 0);
+ m_scale = 1.0;
+}
+
+Camera::~Camera() {}
+wxPoint2DDouble Camera::ScreenToWorld(wxPoint2DDouble screenCoords) const
+{
+ return wxPoint2DDouble(
+ screenCoords.m_x / m_scale - m_translation.m_x, screenCoords.m_y / m_scale - m_translation.m_y);
+}
+
+void Camera::SetTranslation(wxPoint2DDouble screenPoint)
+{
+ m_translation = screenPoint / m_scale - m_translationStartPt;
+}
+
+void Camera::SetScale(wxPoint2DDouble screenPoint, double delta)
+{
+ m_translation -= screenPoint * (1.0 - m_scale) / m_scale;
+
+ m_scale += delta;
+
+ // Limits: 5% - 300%
+ if(m_scale < m_zoomMin) m_scale = m_zoomMin;
+ if(m_scale > m_zoomMax) m_scale = m_zoomMax;
+
+ m_translation += screenPoint * (1.0 - m_scale) / m_scale;
+}
+
+wxPoint2DDouble Camera::GetMousePosition(bool worldCoords) const
+{
+ if(worldCoords) return ScreenToWorld(m_mousePosition);
+ return m_mousePosition;
+} \ No newline at end of file
diff --git a/Project/Camera.h b/Project/Camera.h
new file mode 100644
index 0000000..141047f
--- /dev/null
+++ b/Project/Camera.h
@@ -0,0 +1,35 @@
+#ifndef CAMERA_H
+#define CAMERA_H
+
+#include <wx/geometry.h>
+
+class Camera
+{
+public:
+ Camera();
+ ~Camera();
+
+ void SetScale(wxPoint2DDouble screenPoint, double delta);
+ void SetScale(double scale) { m_scale = scale; }
+ void SetTranslation(wxPoint2DDouble screenPoint);
+ void StartTranslation(wxPoint2DDouble startPoint) { this->m_translationStartPt = startPoint; }
+ void UpdateMousePosition(wxPoint2DDouble mousePosition) { this->m_mousePosition = mousePosition; }
+ double GetScale() const { return m_scale; }
+ wxPoint2DDouble GetTranslation() const { return m_translation; }
+ wxPoint2DDouble GetMousePosition(bool worldCoords = true) const;
+ wxPoint2DDouble ScreenToWorld(wxPoint2DDouble screenCoords) const;
+ double GetZoomMin() const { return m_zoomMin; }
+ double GetZoomMax() const { return m_zoomMax; }
+
+protected:
+ wxPoint2DDouble m_translation;
+ wxPoint2DDouble m_translationStartPt;
+ double m_scale;
+
+ wxPoint2DDouble m_mousePosition;
+
+ double m_zoomMin = 0.01;
+ double m_zoomMax = 3.0;
+};
+
+#endif // CAMERA_H
diff --git a/Project/ChartView.wxcp b/Project/ChartView.wxcp
new file mode 100644
index 0000000..03dde90
--- /dev/null
+++ b/Project/ChartView.wxcp
@@ -0,0 +1,1269 @@
+{
+ "metadata": {
+ "m_generatedFilesDir": ".",
+ "m_objCounter": 51,
+ "m_includeFiles": [],
+ "m_bitmapFunction": "wxCE3EBInitBitmapResources",
+ "m_bitmapsFile": "ChartView_project_bitmaps.cpp",
+ "m_GenerateCodeTypes": 1,
+ "m_outputFileName": "",
+ "m_firstWindowId": 10000,
+ "m_useEnum": true,
+ "m_useUnderscoreMacro": true,
+ "m_addHandlers": true,
+ "m_templateClasses": []
+ },
+ "windows": [{
+ "m_type": 4402,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxDEFAULT_FRAME_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": "ChartViewBase"
+ }, {
+ "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": "Chart view"
+ }, {
+ "type": "virtualFolderPicker",
+ "m_label": "Virtual Folder:",
+ "m_path": "Project:wxcrafter"
+ }, {
+ "type": "choice",
+ "m_label": "Centre:",
+ "m_selection": 1,
+ "m_options": ["", "wxBOTH", "wxVERTICAL", "wxHORIZONTAL"]
+ }, {
+ "type": "string",
+ "m_label": "Inherited Class",
+ "m_value": "ChartView"
+ }, {
+ "type": "string",
+ "m_label": "File:",
+ "m_value": "ChartView"
+ }, {
+ "type": "string",
+ "m_label": "Class Decorator",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "wxFrame Type",
+ "m_selection": 0,
+ "m_options": ["wxFrame", "wxDocMDIParentFrame", "wxDocMDIChildFrame", "wxDocParentFrame", "wxDocChildFrame"]
+ }, {
+ "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": 4457,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "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_menuBar"
+ }, {
+ "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": 4458,
+ "proportion": 0,
+ "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": "m_menuFile"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "File"
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4459,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_menuItemSaveImage"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Save chart as image"
+ }, {
+ "type": "string",
+ "m_label": "Shortcut:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator"]
+ }, {
+ "type": "bool",
+ "m_label": "Checked",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4459,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_menuItemSandToClipboard"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Send to clipboard"
+ }, {
+ "type": "string",
+ "m_label": "Shortcut:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator"]
+ }, {
+ "type": "bool",
+ "m_label": "Checked",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4459,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_menuItemSeparator_1"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Shortcut:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 3,
+ "m_options": ["normal", "checkable", "radio", "separator"]
+ }, {
+ "type": "bool",
+ "m_label": "Checked",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4459,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_menuItemExit"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Exit"
+ }, {
+ "type": "string",
+ "m_label": "Shortcut:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator"]
+ }, {
+ "type": "bool",
+ "m_label": "Checked",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }]
+ }, {
+ "m_type": 4458,
+ "proportion": 0,
+ "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": "m_menuView"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "View"
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4459,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_menuItemFit"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Fit"
+ }, {
+ "type": "string",
+ "m_label": "Shortcut:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator"]
+ }, {
+ "type": "bool",
+ "m_label": "Checked",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4459,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_menuItemSeparator_2"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Shortcut:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 3,
+ "m_options": ["normal", "checkable", "radio", "separator"]
+ }, {
+ "type": "bool",
+ "m_label": "Checked",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4459,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_menuItemShowGrid"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Show grid"
+ }, {
+ "type": "string",
+ "m_label": "Shortcut:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 1,
+ "m_options": ["normal", "checkable", "radio", "separator"]
+ }, {
+ "type": "bool",
+ "m_label": "Checked",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4459,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_menuItemShowLabel"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Show label"
+ }, {
+ "type": "string",
+ "m_label": "Shortcut:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 1,
+ "m_options": ["normal", "checkable", "radio", "separator"]
+ }, {
+ "type": "bool",
+ "m_label": "Checked",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4459,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_menuItemShowCoordinates"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Show coordinates"
+ }, {
+ "type": "string",
+ "m_label": "Shortcut:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 1,
+ "m_options": ["normal", "checkable", "radio", "separator"]
+ }, {
+ "type": "bool",
+ "m_label": "Checked",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4459,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_menuItemDarkTheme"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Dark theme"
+ }, {
+ "type": "string",
+ "m_label": "Shortcut:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 1,
+ "m_options": ["normal", "checkable", "radio", "separator"]
+ }, {
+ "type": "bool",
+ "m_label": "Checked",
+ "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": "boxSizer_lvl1_1"
+ }, {
+ "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": 4401,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizer_lvl2_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": 4422,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxTR_DEFAULT_STYLE"],
+ "m_sizerFlags": [],
+ "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": "250,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_treeCtrl"
+ }, {
+ "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": 4485,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxPG_SPLITTER_AUTO_CENTER", "wxPG_BOLD_MODIFIED"],
+ "m_sizerFlags": [],
+ "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": "250,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_pgMgr"
+ }, {
+ "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": "integer",
+ "m_label": "Sash Position:",
+ "m_value": -1
+ }, {
+ "type": "bool",
+ "m_label": "Set Splitter Left:",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4486,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_pgPropCurveProp"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Curve properties"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "choice",
+ "m_label": "Property Editor Control",
+ "m_selection": 0,
+ "m_options": ["", "TextCtrl", "Choice", "ComboBox", "CheckBox", "TextCtrlAndButton", "ChoiceAndButton", "SpinCtrl", "DatePickerCtrl"]
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["wxPropertyCategory", "wxIntProperty", "wxFloatProperty", "wxBoolProperty", "wxStringProperty", "wxLongStringProperty", "wxDirProperty", "wxArrayStringProperty", "wxFileProperty", "wxEnumProperty", "wxEditEnumProperty", "wxFlagsProperty", "wxDateProperty", "wxImageFileProperty", "wxFontProperty", "wxSystemColourProperty"]
+ }, {
+ "type": "string",
+ "m_label": "String Value",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Choices:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Array Integer Values",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Bool Value",
+ "m_value": true
+ }, {
+ "type": "string",
+ "m_label": "Wildcard",
+ "m_value": ""
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Initial Colour",
+ "colour": "<Default>"
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4486,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_pgPropDraw"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Draw"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "choice",
+ "m_label": "Property Editor Control",
+ "m_selection": 4,
+ "m_options": ["", "TextCtrl", "Choice", "ComboBox", "CheckBox", "TextCtrlAndButton", "ChoiceAndButton", "SpinCtrl", "DatePickerCtrl"]
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 3,
+ "m_options": ["wxPropertyCategory", "wxIntProperty", "wxFloatProperty", "wxBoolProperty", "wxStringProperty", "wxLongStringProperty", "wxDirProperty", "wxArrayStringProperty", "wxFileProperty", "wxEnumProperty", "wxEditEnumProperty", "wxFlagsProperty", "wxDateProperty", "wxImageFileProperty", "wxFontProperty", "wxSystemColourProperty"]
+ }, {
+ "type": "string",
+ "m_label": "String Value",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Choices:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Array Integer Values",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Bool Value",
+ "m_value": true
+ }, {
+ "type": "string",
+ "m_label": "Wildcard",
+ "m_value": ""
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Initial Colour",
+ "colour": "<Default>"
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4486,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_pgPropColor"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Color"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "choice",
+ "m_label": "Property Editor Control",
+ "m_selection": 6,
+ "m_options": ["", "TextCtrl", "Choice", "ComboBox", "CheckBox", "TextCtrlAndButton", "ChoiceAndButton", "SpinCtrl", "DatePickerCtrl"]
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 15,
+ "m_options": ["wxPropertyCategory", "wxIntProperty", "wxFloatProperty", "wxBoolProperty", "wxStringProperty", "wxLongStringProperty", "wxDirProperty", "wxArrayStringProperty", "wxFileProperty", "wxEnumProperty", "wxEditEnumProperty", "wxFlagsProperty", "wxDateProperty", "wxImageFileProperty", "wxFontProperty", "wxSystemColourProperty"]
+ }, {
+ "type": "string",
+ "m_label": "String Value",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Choices:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Array Integer Values",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Bool Value",
+ "m_value": true
+ }, {
+ "type": "string",
+ "m_label": "Wildcard",
+ "m_value": ""
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Initial Colour",
+ "colour": "<Default>"
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4486,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_pgProplineThick"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Line thickness"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "choice",
+ "m_label": "Property Editor Control",
+ "m_selection": 1,
+ "m_options": ["", "TextCtrl", "Choice", "ComboBox", "CheckBox", "TextCtrlAndButton", "ChoiceAndButton", "SpinCtrl", "DatePickerCtrl"]
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 1,
+ "m_options": ["wxPropertyCategory", "wxIntProperty", "wxFloatProperty", "wxBoolProperty", "wxStringProperty", "wxLongStringProperty", "wxDirProperty", "wxArrayStringProperty", "wxFileProperty", "wxEnumProperty", "wxEditEnumProperty", "wxFlagsProperty", "wxDateProperty", "wxImageFileProperty", "wxFontProperty", "wxSystemColourProperty"]
+ }, {
+ "type": "string",
+ "m_label": "String Value",
+ "m_value": "1"
+ }, {
+ "type": "multi-string",
+ "m_label": "Choices:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Array Integer Values",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Bool Value",
+ "m_value": true
+ }, {
+ "type": "string",
+ "m_label": "Wildcard",
+ "m_value": ""
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Initial Colour",
+ "colour": "<Default>"
+ }],
+ "m_events": [],
+ "m_children": []
+ }]
+ }, {
+ "m_type": 4486,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_pgPropChartProp"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Chart properties"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "choice",
+ "m_label": "Property Editor Control",
+ "m_selection": 0,
+ "m_options": ["", "TextCtrl", "Choice", "ComboBox", "CheckBox", "TextCtrlAndButton", "ChoiceAndButton", "SpinCtrl", "DatePickerCtrl"]
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["wxPropertyCategory", "wxIntProperty", "wxFloatProperty", "wxBoolProperty", "wxStringProperty", "wxLongStringProperty", "wxDirProperty", "wxArrayStringProperty", "wxFileProperty", "wxEnumProperty", "wxEditEnumProperty", "wxFlagsProperty", "wxDateProperty", "wxImageFileProperty", "wxFontProperty", "wxSystemColourProperty"]
+ }, {
+ "type": "string",
+ "m_label": "String Value",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Choices:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Array Integer Values",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Bool Value",
+ "m_value": true
+ }, {
+ "type": "string",
+ "m_label": "Wildcard",
+ "m_value": ""
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Initial Colour",
+ "colour": "<Default>"
+ }],
+ "m_events": [],
+ "m_children": []
+ }]
+ }]
+ }, {
+ "m_type": 4408,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxTAB_TRAVERSAL"],
+ "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": "100,300"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_panelChart"
+ }, {
+ "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": []
+ }]
+ }]
+ }]
+} \ No newline at end of file
diff --git a/Project/ConnectionLine.cpp b/Project/ConnectionLine.cpp
new file mode 100644
index 0000000..ea04e5e
--- /dev/null
+++ b/Project/ConnectionLine.cpp
@@ -0,0 +1,186 @@
+#include "ConnectionLine.h"
+
+ConnectionLine::ConnectionLine() : ControlElement(-1)
+{
+}
+
+ConnectionLine::ConnectionLine(Node* firstNode, int id)
+ : ControlElement(id)
+{
+ wxPoint2DDouble pt = firstNode->GetPosition();
+ m_tmpSndPt = pt;
+ for(int i = 0; i < 6; i++) {
+ m_pointList.push_back(pt);
+ }
+ m_nodeList.push_back(firstNode);
+ firstNode->SetConnected();
+}
+
+ConnectionLine::~ConnectionLine() {}
+
+void ConnectionLine::Draw(wxPoint2DDouble translation, double scale) const
+{
+ // Line selected (Layer 1).
+ if(m_selected) {
+ glLineWidth(1.5 + m_borderSize * 2.0);
+ glColor4dv(m_selectionColour.GetRGBA());
+ DrawLine(m_pointList);
+ }
+
+ // Draw line (Layer 2)
+ glLineWidth(1.5);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawLine(m_pointList);
+
+ if(m_type == ELEMENT_LINE) {
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawCircle(m_pointList[5], 3, 10, GL_POLYGON);
+ }
+}
+
+bool ConnectionLine::Contains(wxPoint2DDouble position) const
+{
+ if(PointToLineDistance(position) < 5.0) {
+ return true;
+ }
+ return false;
+}
+
+bool ConnectionLine::Intersects(wxRect2DDouble rect) const
+{
+ for(auto it = m_pointList.begin(); it != m_pointList.end(); ++it) {
+ if(rect.Contains(*it)) return true;
+ }
+ return false;
+}
+
+void ConnectionLine::UpdatePoints()
+{
+ if(m_type == ELEMENT_ELEMENT) {
+ bool hasOneNode = true;
+ wxPoint2DDouble pt1 = m_nodeList[0]->GetPosition();
+ wxPoint2DDouble pt2;
+ if(m_nodeList.size() == 1)
+ pt2 = m_tmpSndPt;
+ else {
+ pt2 = m_nodeList[1]->GetPosition();
+ hasOneNode = false;
+ }
+ wxPoint2DDouble midPt = (pt1 + pt2) / 2.0 + wxPoint2DDouble(0.0, m_lineOffset);
+
+ m_pointList[0] = pt1;
+ if(m_nodeList[0]->GetAngle() == 0.0)
+ m_pointList[1] = m_pointList[0] + wxPoint2DDouble(-10, 0);
+ else if(m_nodeList[0]->GetAngle() == 90.0)
+ m_pointList[1] = m_pointList[0] + wxPoint2DDouble(0, -10);
+ else if(m_nodeList[0]->GetAngle() == 180.0)
+ m_pointList[1] = m_pointList[0] + wxPoint2DDouble(10, 0);
+ else if(m_nodeList[0]->GetAngle() == 270.0)
+ m_pointList[1] = m_pointList[0] + wxPoint2DDouble(0, 10);
+
+ m_pointList[2] = m_pointList[1] + wxPoint2DDouble(0.0, midPt.m_y - m_pointList[1].m_y);
+
+ m_pointList[5] = pt2;
+ if(hasOneNode)
+ m_pointList[4] = pt2;
+ else {
+ if(m_nodeList[1]->GetAngle() == 0.0)
+ m_pointList[4] = m_pointList[5] + wxPoint2DDouble(-10, 0);
+ else if(m_nodeList[1]->GetAngle() == 90.0)
+ m_pointList[4] = m_pointList[5] + wxPoint2DDouble(0, -10);
+ else if(m_nodeList[1]->GetAngle() == 180.0)
+ m_pointList[4] = m_pointList[5] + wxPoint2DDouble(10, 0);
+ else if(m_nodeList[1]->GetAngle() == 270.0)
+ m_pointList[4] = m_pointList[5] + wxPoint2DDouble(0, 10);
+ }
+
+ m_pointList[3] = m_pointList[4] + wxPoint2DDouble(0.0, midPt.m_y - m_pointList[4].m_y);
+ } else if(m_type == ELEMENT_LINE) {
+ wxPoint2DDouble pt1 = m_nodeList[0]->GetPosition();
+ wxPoint2DDouble pt2 = m_parentLine->GetMidPoint();
+ wxPoint2DDouble midPt = (pt1 + pt2) / 2.0 + wxPoint2DDouble(0.0, m_lineOffset);
+
+ m_pointList[0] = pt1;
+ if(m_nodeList[0]->GetAngle() == 0.0)
+ m_pointList[1] = m_pointList[0] + wxPoint2DDouble(-10, 0);
+ else if(m_nodeList[0]->GetAngle() == 90.0)
+ m_pointList[1] = m_pointList[0] + wxPoint2DDouble(0, -10);
+ else if(m_nodeList[0]->GetAngle() == 180.0)
+ m_pointList[1] = m_pointList[0] + wxPoint2DDouble(10, 0);
+ else if(m_nodeList[0]->GetAngle() == 270.0)
+ m_pointList[1] = m_pointList[0] + wxPoint2DDouble(0, 10);
+
+ m_pointList[2] = m_pointList[1] + wxPoint2DDouble(0.0, midPt.m_y - m_pointList[1].m_y);
+
+ m_pointList[5] = pt2;
+ if(m_pointList[2].m_y > pt2.m_y) {
+ m_pointList[4] = m_pointList[5] + wxPoint2DDouble(0, 10);
+ } else {
+ m_pointList[4] = m_pointList[5] + wxPoint2DDouble(0, -10);
+ }
+
+ m_pointList[3] = m_pointList[4] + wxPoint2DDouble(0.0, midPt.m_y - m_pointList[4].m_y);
+ }
+ for(auto it = m_childList.begin(), itEnd = m_childList.end(); it != itEnd; ++it) {
+ ConnectionLine* child = static_cast<ConnectionLine*>(*it);
+ child->UpdatePoints();
+ }
+}
+
+bool ConnectionLine::AppendNode(Node* node, ControlElement* parent)
+{
+ if(m_nodeList.size() != 1) return false;
+ if(m_nodeList[0] == node) return false;
+ if(m_nodeList[0]->GetNodeType() == node->GetNodeType()) return false;
+ auto nodeList = parent->GetNodeList();
+ for(auto it = nodeList.begin(), itEnd = nodeList.end(); it != itEnd; ++it) {
+ Node* parentNode = *it;
+ if(parentNode == m_nodeList[0]) return false;
+ }
+
+ m_nodeList.push_back(node);
+ node->SetConnected();
+ return true;
+}
+
+void ConnectionLine::Move(wxPoint2DDouble position)
+{
+ m_lineOffset = m_moveStartOffset + position.m_y - m_moveStartPtY;
+ UpdatePoints();
+}
+
+void ConnectionLine::StartMove(wxPoint2DDouble position)
+{
+ m_moveStartPtY = position.m_y;
+ m_moveStartOffset = m_lineOffset;
+}
+
+wxPoint2DDouble ConnectionLine::GetMidPoint() const { return ((m_pointList[2] + m_pointList[3]) / 2.0); }
+
+bool ConnectionLine::SetParentLine(ConnectionLine* parent)
+{
+ if(m_nodeList[0]->GetNodeType() != Node::NODE_IN) return false;
+ if(!parent) return false;
+
+ m_type = ELEMENT_LINE;
+ m_parentLine = parent;
+ return true;
+}
+
+std::vector<ConnectionLine*> ConnectionLine::GetLineChildList() const
+{
+ std::vector<ConnectionLine*> childList;
+ for(auto it = m_childList.begin(), itEnd = m_childList.end(); it != itEnd; ++it) {
+ ConnectionLine* child = static_cast<ConnectionLine*>(*it);
+ childList.push_back(child);
+ }
+ return childList;
+}
+
+void ConnectionLine::RemoveParent(Element* parent)
+{
+ for(auto it = m_parentList.begin(); it != m_parentList.end(); ++it) {
+ Element* element = *it;
+ if(element == parent) m_parentList.erase(it--);
+ }
+}
diff --git a/Project/ConnectionLine.h b/Project/ConnectionLine.h
new file mode 100644
index 0000000..e9d238a
--- /dev/null
+++ b/Project/ConnectionLine.h
@@ -0,0 +1,43 @@
+#ifndef CONNECTIONLINE_H
+#define CONNECTIONLINE_H
+
+#include "ControlElement.h"
+
+class ConnectionLine : public ControlElement
+{
+ public:
+ enum ConnectionLineType { ELEMENT_ELEMENT = 0, ELEMENT_LINE };
+ ConnectionLine();
+ ConnectionLine(Node* firstNode, int id);
+ ~ConnectionLine();
+
+ virtual void Draw(wxPoint2DDouble translation, double scale) const;
+ virtual bool Contains(wxPoint2DDouble position) const;
+ virtual bool Intersects(wxRect2DDouble rect) const;
+ virtual void RemoveParent(Element* parent);
+ virtual void StartMove(wxPoint2DDouble position);
+ virtual void Move(wxPoint2DDouble position);
+ virtual bool AppendNode(Node* node, ControlElement* parent);
+ virtual void UpdatePoints();
+ virtual void SetTemporarySecondPoint(wxPoint2DDouble point) { m_tmpSndPt = point; }
+ virtual wxPoint2DDouble GetMidPoint() const;
+ virtual double GetOffset() const { return m_lineOffset; }
+ virtual void SetOffset(double offset) { m_lineOffset = offset; }
+ virtual ConnectionLineType GetType() const { return m_type; }
+ virtual void SetType(ConnectionLineType newType) { m_type = newType; }
+ virtual ConnectionLine* GetParentLine() const { return m_parentLine; }
+ virtual bool SetParentLine(ConnectionLine* parent);
+
+ virtual std::vector<ConnectionLine*> GetLineChildList() const;
+
+ protected:
+ double m_lineOffset = 0.0;
+ double m_moveStartPtY = 0.0;
+ double m_moveStartOffset = 0.0;
+ wxPoint2DDouble m_tmpSndPt;
+
+ ConnectionLineType m_type = ELEMENT_ELEMENT;
+ ConnectionLine* m_parentLine = NULL;
+};
+
+#endif // CONNECTIONLINE_H
diff --git a/Project/Constant.cpp b/Project/Constant.cpp
new file mode 100644
index 0000000..ff0ae02
--- /dev/null
+++ b/Project/Constant.cpp
@@ -0,0 +1,104 @@
+#include "Constant.h"
+#include "ConstantForm.h"
+
+Constant::Constant(int id) : ControlElement(id)
+{
+ SetValue(m_value);
+ m_angle = 180.0;
+ 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(nodeOut);
+}
+
+Constant::~Constant() {}
+void Constant::Draw(wxPoint2DDouble translation, double scale) const
+{
+ glLineWidth(1.0);
+ if(m_selected) {
+ glColor4dv(m_selectionColour.GetRGBA());
+ double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
+ DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
+ }
+ glColor4d(1.0, 1.0, 1.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
+
+ // Plot number.
+ glEnable(GL_TEXTURE_2D);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ m_glStringValue->bind();
+ m_glStringValue->render(m_position.m_x, m_position.m_y);
+ glDisable(GL_TEXTURE_2D);
+
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawNodes();
+}
+
+bool Constant::ShowForm(wxWindow* parent, Element* element)
+{
+ ConstantForm* form = new ConstantForm(parent, this);
+ if(form->ShowModal() == wxID_OK) {
+ form->Destroy();
+ return true;
+ }
+ form->Destroy();
+ return false;
+}
+
+void Constant::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 Constant::UpdatePoints()
+{
+ if(m_nodeList.size() != 0) {
+ if(m_angle == 0.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
+ } else if(m_angle == 90.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
+ } else if(m_angle == 180.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
+ } else if(m_angle == 270.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
+ }
+ }
+}
+
+void Constant::SetValue(double value)
+{
+ m_value = value;
+ wxString 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() + 6 + 2 * m_borderSize;
+ m_height = m_glStringValue->getheight() + 6 + 2 * m_borderSize;
+
+ UpdatePoints();
+} \ No newline at end of file
diff --git a/Project/Constant.h b/Project/Constant.h
new file mode 100644
index 0000000..9868627
--- /dev/null
+++ b/Project/Constant.h
@@ -0,0 +1,34 @@
+#ifndef CONSTANT_H
+#define CONSTANT_H
+
+#include "ControlElement.h"
+
+#include <wx/dcscreen.h>
+#include "wxGLString.h"
+
+class ConstantForm;
+
+class Constant : public ControlElement
+{
+ public:
+ Constant(int id);
+ ~Constant();
+
+ 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 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;
+};
+
+#endif // CONSTANT_H
diff --git a/Project/ConstantForm.cpp b/Project/ConstantForm.cpp
new file mode 100644
index 0000000..4406d63
--- /dev/null
+++ b/Project/ConstantForm.cpp
@@ -0,0 +1,27 @@
+#include "ConstantForm.h"
+#include "Constant.h"
+
+ConstantForm::ConstantForm(wxWindow* parent, Constant* constant) : ConstantFormBase(parent)
+{
+ m_parent = parent;
+ m_constant = constant;
+
+ m_textCtrlValue->SetValue(m_constant->StringFromDouble(m_constant->GetValue()));
+}
+
+ConstantForm::~ConstantForm() {}
+void ConstantForm::OnOKButtonClick(wxCommandEvent& event)
+{
+ if(ValidateData()) EndModal(wxID_OK);
+}
+
+bool ConstantForm::ValidateData()
+{
+ double value;
+ if(!m_constant->DoubleFromString(this, m_textCtrlValue->GetValue(), value,
+ _("Value entered incorrectly in the field \"Constant value\".")))
+ return false;
+
+ m_constant->SetValue(value);
+ return true;
+}
diff --git a/Project/ConstantForm.h b/Project/ConstantForm.h
new file mode 100644
index 0000000..ca7a44a
--- /dev/null
+++ b/Project/ConstantForm.h
@@ -0,0 +1,21 @@
+#ifndef CONSTANTFORM_H
+#define CONSTANTFORM_H
+#include "ElementForm.h"
+
+class Constant;
+
+class ConstantForm : public ConstantFormBase
+{
+ public:
+ ConstantForm(wxWindow* parent, Constant* constant);
+ virtual ~ConstantForm();
+ virtual bool ValidateData();
+
+ protected:
+ virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
+ virtual void OnOKButtonClick(wxCommandEvent& event);
+
+ wxWindow* m_parent = NULL;
+ Constant* m_constant = NULL;
+};
+#endif // CONSTANTFORM_H
diff --git a/Project/ControlEditor.cpp b/Project/ControlEditor.cpp
new file mode 100644
index 0000000..e457d0f
--- /dev/null
+++ b/Project/ControlEditor.cpp
@@ -0,0 +1,763 @@
+#include "ControlEditor.h"
+
+#include "FileHanding.h"
+#include "Camera.h"
+#include "ControlElement.h"
+#include "TransferFunction.h"
+#include "ConnectionLine.h"
+#include "Sum.h"
+#include "Multiplier.h"
+#include "Limiter.h"
+#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)
+{
+ SetBackgroundColour(*wxWHITE);
+ // m_font = wxFont(8, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
+ m_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
+ m_label = label;
+ m_image = image;
+ m_imageSize = wxSize(image.GetWidth(), image.GetHeight());
+
+ // Calculate label size.
+ wxScreenDC dc;
+ dc.SetFont(m_font);
+ wxSize textSize = dc.GetTextExtent(label);
+
+ int buttonWidth = 0;
+ if(textSize.GetWidth() > m_imageSize.GetWidth()) {
+ buttonWidth = textSize.GetWidth();
+ m_imagePosition = wxPoint((buttonWidth - m_imageSize.GetWidth()) / 2 + m_borderSize, m_borderSize);
+ m_labelPosition = wxPoint(m_borderSize, m_imageSize.GetHeight() + m_borderSize);
+ } else {
+ buttonWidth = m_imageSize.GetWidth();
+ m_imagePosition = wxPoint(m_borderSize, m_borderSize);
+ m_labelPosition =
+ wxPoint((buttonWidth - textSize.GetWidth()) / 2 + m_borderSize, m_imageSize.GetHeight() + m_borderSize);
+ }
+ m_buttonSize =
+ wxSize(buttonWidth + 2 * m_borderSize, textSize.GetHeight() + m_imageSize.GetHeight() + 2 * m_borderSize);
+ SetMinSize(m_buttonSize + wxSize(m_borderSize, m_borderSize));
+
+ // Events.
+ Bind(wxEVT_PAINT, &ControlElementButton::OnPaint, this);
+ Bind(wxEVT_ENTER_WINDOW, &ControlElementButton::OnMouseEnter, this);
+ Bind(wxEVT_LEAVE_WINDOW, &ControlElementButton::OnMouseLeave, this);
+ Bind(wxEVT_LEFT_DOWN, &ControlElementButton::OnLeftClickDown, this);
+ Bind(wxEVT_LEFT_UP, &ControlElementButton::OnLeftClickUp, this);
+}
+
+ControlElementButton::~ControlElementButton() {}
+void ControlElementButton::OnPaint(wxPaintEvent& event)
+{
+ wxPaintDC dc(this);
+ wxGraphicsContext* gc = wxGraphicsContext::Create(dc);
+ if(gc) {
+ if(m_mouseAbove) {
+ if(m_selected) {
+ gc->SetPen(wxPen(wxColour(0, 125, 255, 255), m_borderSize - 1));
+ gc->SetBrush(wxBrush(wxColour(0, 125, 255, 100)));
+ } else {
+ gc->SetPen(*wxTRANSPARENT_PEN);
+ gc->SetBrush(wxBrush(wxColour(0, 125, 255, 70)));
+ }
+ gc->DrawRectangle(m_borderSize / 2, m_borderSize / 2, m_buttonSize.GetWidth(), m_buttonSize.GetHeight());
+ }
+ gc->DrawBitmap(gc->CreateBitmapFromImage(m_image), m_imagePosition.x, m_imagePosition.y, m_imageSize.GetWidth(),
+ m_imageSize.GetHeight());
+ gc->SetFont(m_font, *wxBLACK);
+ gc->DrawText(m_label, m_labelPosition.x, m_labelPosition.y);
+ delete gc;
+ }
+}
+
+void ControlElementButton::OnMouseEnter(wxMouseEvent& event)
+{
+ m_mouseAbove = true;
+ Refresh();
+ event.Skip();
+}
+
+void ControlElementButton::OnMouseLeave(wxMouseEvent& event)
+{
+ m_mouseAbove = false;
+ Refresh();
+ event.Skip();
+}
+
+void ControlElementButton::OnLeftClickDown(wxMouseEvent& event)
+{
+ m_selected = true;
+ Refresh();
+ event.Skip();
+}
+
+void ControlElementButton::OnLeftClickUp(wxMouseEvent& event)
+{
+ m_selected = false;
+ Refresh();
+ event.Skip();
+}
+
+ControlEditor::ControlEditor(wxWindow* parent, int ioflags) : ControlEditorBase(parent)
+{
+ BuildControlElementPanel();
+ m_glContext = new wxGLContext(m_glCanvas);
+ m_camera = new Camera();
+ m_selectionRect = wxRect2DDouble(0, 0, 0, 0);
+ // m_camera->SetScale(1.2);
+ m_ioFlags = ioflags;
+}
+ControlEditor::~ControlEditor()
+{
+ // m_tfButton->Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(ControlEditor::LeftClickDown), m_tfButton, this);
+}
+
+void ControlEditor::BuildControlElementPanel()
+{
+ m_panelControlElements->SetDoubleBuffered(true);
+ wxWrapSizer* wrapSizer = new wxWrapSizer();
+ m_panelControlElements->SetSizer(wrapSizer);
+
+ ControlElementButton* ioButton = new ControlElementButton(m_panelControlElements, _("In/Out"),
+ wxImage("..\\data\\images\\control\\io.png"), ID_IO);
+ wrapSizer->Add(ioButton, 0, wxALL, 5);
+ ioButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+
+ ControlElementButton* tfButton = new ControlElementButton(
+ m_panelControlElements, _("Transfer fcn"), wxImage("..\\data\\images\\control\\transferFunc.png"), ID_TF);
+ wrapSizer->Add(tfButton, 0, wxALL, 5);
+ tfButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+
+ ControlElementButton* sumButton = new ControlElementButton(m_panelControlElements, _("Sum"),
+ wxImage("..\\data\\images\\control\\sum.png"), ID_SUM);
+ wrapSizer->Add(sumButton, 0, wxALL, 5);
+ sumButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+
+ ControlElementButton* constButton = new ControlElementButton(
+ m_panelControlElements, _("Constant"), wxImage("..\\data\\images\\control\\value.png"), ID_CONST);
+ wrapSizer->Add(constButton, 0, wxALL, 5);
+ constButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+
+ ControlElementButton* limButton = new ControlElementButton(
+ m_panelControlElements, _("Limiter"), wxImage("..\\data\\images\\control\\limiter.png"), ID_LIMITER);
+ wrapSizer->Add(limButton, 0, wxALL, 5);
+ limButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+
+ ControlElementButton* gainButton = new ControlElementButton(
+ m_panelControlElements, _("Gain"), wxImage("..\\data\\images\\control\\gain.png"), ID_GAIN);
+ wrapSizer->Add(gainButton, 0, wxALL, 5);
+ gainButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+
+ ControlElementButton* multButton = new ControlElementButton(
+ m_panelControlElements, _("Multiplier"), wxImage("..\\data\\images\\control\\mult.png"), ID_MULT);
+ wrapSizer->Add(multButton, 0, wxALL, 5);
+ multButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+
+ ControlElementButton* satButton = new ControlElementButton(m_panelControlElements, _("Exponential"),
+ wxImage("..\\data\\images\\control\\sat.png"), ID_EXP);
+ wrapSizer->Add(satButton, 0, wxALL, 5);
+ satButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+
+ ControlElementButton* rateLimButton = new ControlElementButton(
+ m_panelControlElements, _("Rate limiter"), wxImage("..\\data\\images\\control\\rateLimiter.png"), ID_RATELIM);
+ wrapSizer->Add(rateLimButton, 0, wxALL, 5);
+ rateLimButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
+}
+
+void ControlEditor::LeftClickDown(wxMouseEvent& event)
+{
+ AddElement(static_cast<ControlElementButtonID>(event.GetId()));
+ event.Skip();
+}
+
+void ControlEditor::SetViewport()
+{
+ glClearColor(1.0, 1.0, 1.0, 1.0); // White background.
+ glClear(GL_COLOR_BUFFER_BIT);
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_TEXTURE_2D);
+ glEnable(GL_COLOR_MATERIAL);
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_LINE_SMOOTH);
+
+ double width = m_glCanvas->GetSize().x - 1;
+ double height = m_glCanvas->GetSize().y - 1;
+
+ // Viewport fit the screen.
+ glViewport(0, 0, width, height);
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ gluOrtho2D(0.0, width, height, 0.0);
+
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+}
+
+void ControlEditor::AddElement(ControlElementButtonID id)
+{
+ switch(id) {
+ case ID_IO: {
+ m_mode = MODE_INSERT;
+ IOControl* io = new IOControl(m_ioFlags, m_lastElementID);
+ m_elementList.push_back(io);
+ } break;
+ case ID_TF: {
+ m_mode = MODE_INSERT;
+ TransferFunction* tf = new TransferFunction(m_lastElementID);
+ m_elementList.push_back(tf);
+ } break;
+ case ID_SUM: {
+ m_mode = MODE_INSERT;
+ Sum* sum = new Sum(m_lastElementID);
+ m_elementList.push_back(sum);
+ } break;
+ case ID_CONST: {
+ m_mode = MODE_INSERT;
+ Constant* constant = new Constant(m_lastElementID);
+ m_elementList.push_back(constant);
+ } break;
+ case ID_LIMITER: {
+ m_mode = MODE_INSERT;
+ Limiter* limiter = new Limiter(m_lastElementID);
+ m_elementList.push_back(limiter);
+ } break;
+ case ID_GAIN: {
+ m_mode = MODE_INSERT;
+ Gain* gain = new Gain(m_lastElementID);
+ m_elementList.push_back(gain);
+ } break;
+ case ID_MULT: {
+ m_mode = MODE_INSERT;
+ Multiplier* mult = new Multiplier(m_lastElementID);
+ m_elementList.push_back(mult);
+ } break;
+ case ID_EXP: {
+ m_mode = MODE_INSERT;
+ Exponential* exp = new Exponential(m_lastElementID);
+ m_elementList.push_back(exp);
+ } break;
+ case ID_RATELIM: {
+ m_mode = MODE_INSERT;
+ RateLimiter* rateLim = new RateLimiter(m_lastElementID);
+ m_elementList.push_back(rateLim);
+ } break;
+ }
+ m_lastElementID++;
+}
+
+void ControlEditor::OnPaint(wxPaintEvent& event)
+{
+ wxPaintDC dc(m_glCanvas);
+ m_glContext->SetCurrent(*m_glCanvas);
+ SetViewport();
+
+ // Set GLCanvas scale and translation.
+ glScaled(m_camera->GetScale(), m_camera->GetScale(), 0.0); // Scale
+ glTranslated(m_camera->GetTranslation().m_x, m_camera->GetTranslation().m_y, 0.0); // Translation
+
+ for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; ++it) {
+ ConnectionLine* line = *it;
+ line->Draw(m_camera->GetTranslation(), m_camera->GetScale());
+ }
+
+ for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
+ Element* element = *it;
+ element->Draw(m_camera->GetTranslation(), m_camera->GetScale());
+ }
+
+ // Selection rectangle
+ glLineWidth(1.0);
+ glColor4d(0.0, 0.5, 1.0, 1.0);
+ glBegin(GL_LINE_LOOP);
+ glVertex2d(m_selectionRect.m_x, m_selectionRect.m_y);
+ glVertex2d(m_selectionRect.m_x, m_selectionRect.m_y + m_selectionRect.m_height);
+ glVertex2d(m_selectionRect.m_x + m_selectionRect.m_width, m_selectionRect.m_y + m_selectionRect.m_height);
+ glVertex2d(m_selectionRect.m_x + m_selectionRect.m_width, m_selectionRect.m_y);
+ glEnd();
+ glColor4d(0.0, 0.5, 1.0, 0.3);
+ glBegin(GL_QUADS);
+ glVertex2d(m_selectionRect.m_x, m_selectionRect.m_y);
+ glVertex2d(m_selectionRect.m_x, m_selectionRect.m_y + m_selectionRect.m_height);
+ glVertex2d(m_selectionRect.m_x + m_selectionRect.m_width, m_selectionRect.m_y + m_selectionRect.m_height);
+ glVertex2d(m_selectionRect.m_x + m_selectionRect.m_width, m_selectionRect.m_y);
+ glEnd();
+
+ glFlush(); // Sends all pending information directly to the GPU.
+ m_glCanvas->SwapBuffers();
+ event.Skip();
+}
+
+void ControlEditor::OnDoubleClick(wxMouseEvent& event)
+{
+ wxPoint2DDouble clickPoint = event.GetPosition();
+ bool redraw = false;
+
+ if(m_mode == MODE_EDIT) {
+ for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
+ Element* element = *it;
+ if(element->Contains(m_camera->ScreenToWorld(clickPoint))) {
+ element->ShowForm(this, element);
+ CheckConnections();
+ auto childList = element->GetChildList();
+ for(auto itC = childList.begin(), itEndC = childList.end(); itC != itEndC; ++itC) {
+ ConnectionLine* line = static_cast<ConnectionLine*>(*itC);
+ line->UpdatePoints();
+ }
+ redraw = true;
+ }
+ }
+ }
+
+ if(redraw) Redraw();
+}
+
+void ControlEditor::OnLeftClickDown(wxMouseEvent& event)
+{
+ wxPoint2DDouble clickPoint = event.GetPosition();
+ bool foundElement = false;
+
+ if(m_mode == MODE_INSERT) {
+ m_mode = MODE_EDIT;
+ } else {
+ for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
+ ControlElement* element = *it;
+ bool foundNode = false;
+ auto nodeList = element->GetNodeList();
+ for(auto itN = nodeList.begin(), itNEnd = nodeList.end(); itN != itNEnd; ++itN) {
+ Node* node = *itN;
+ if(node->Contains(m_camera->ScreenToWorld(clickPoint))) {
+ m_mode = MODE_INSERT_LINE;
+ ConnectionLine* line = new ConnectionLine(node, m_lastElementID);
+ m_lastElementID++;
+ m_connectionList.push_back(line);
+ element->AddChild(line);
+ line->AddParent(element);
+ foundElement = true;
+ foundNode = true;
+ }
+ }
+
+ if(!foundNode) {
+ // Set movement initial position (not necessarily will be moved).
+ element->StartMove(m_camera->ScreenToWorld(clickPoint));
+
+ // Click in an element.
+ if(element->Contains(m_camera->ScreenToWorld(clickPoint))) {
+ if(!foundElement) {
+ element->SetSelected();
+ foundElement = true;
+ }
+ m_mode = MODE_MOVE_ELEMENT;
+ }
+ }
+ }
+ if(m_mode != MODE_INSERT_LINE) {
+ for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; ++it) {
+ ConnectionLine* line = *it;
+ line->StartMove(m_camera->ScreenToWorld(clickPoint));
+ if(line->Contains(m_camera->ScreenToWorld(clickPoint))) {
+ line->SetSelected();
+ foundElement = true;
+ m_mode = MODE_MOVE_LINE;
+ }
+ }
+ }
+ }
+
+ if(!foundElement) {
+ m_mode = MODE_SELECTION_RECT;
+ m_startSelRect = m_camera->ScreenToWorld(clickPoint);
+ }
+
+ Redraw();
+ event.Skip();
+}
+
+void ControlEditor::OnLeftClickUp(wxMouseEvent& event)
+{
+ bool foundNode = false;
+ for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; it++) {
+ ControlElement* element = *it;
+ if(m_mode == MODE_INSERT_LINE) {
+ auto nodeList = element->GetNodeList();
+ for(auto itN = nodeList.begin(), itNEnd = nodeList.end(); itN != itNEnd; ++itN) {
+ Node* node = *itN;
+ if(node->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
+ ConnectionLine* line = *(m_connectionList.end() - 1);
+ if(line->AppendNode(node, element)) {
+ line->AddParent(element);
+ element->AddChild(line);
+ line->UpdatePoints();
+ m_mode = MODE_EDIT;
+ foundNode = true;
+ }
+ }
+ }
+ } else if(m_mode == MODE_SELECTION_RECT) {
+ if(element->Intersects(m_selectionRect)) {
+ element->SetSelected();
+ } else if(!event.ControlDown()) {
+ element->SetSelected(false);
+ }
+ } else if(!event.ControlDown()) {
+ if(!element->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
+ element->SetSelected(false);
+ }
+ }
+ }
+ for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; ++it) {
+ ConnectionLine* cLine = *it;
+ if(m_mode == MODE_INSERT_LINE && !foundNode && it != (itEnd - 1)) {
+ if(cLine->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
+ ConnectionLine* iLine = *(m_connectionList.end() - 1);
+ if(iLine->SetParentLine(cLine)) {
+ cLine->AddChild(iLine);
+ iLine->UpdatePoints();
+ m_mode = MODE_EDIT;
+ foundNode = true;
+ }
+ }
+ } else if(m_mode == MODE_SELECTION_RECT) {
+ if(cLine->Intersects(m_selectionRect)) {
+ cLine->SetSelected();
+ } else if(!event.ControlDown()) {
+ cLine->SetSelected(false);
+ }
+ } else if(!event.ControlDown()) {
+ if(!cLine->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
+ cLine->SetSelected(false);
+ }
+ }
+ }
+
+ m_selectionRect = wxRect2DDouble(0, 0, 0, 0);
+
+ if(m_mode == MODE_INSERT_LINE && !foundNode) {
+ ConnectionLine* cLine = *(m_connectionList.end() - 1);
+ // Free nodes
+ auto nodeList = cLine->GetNodeList();
+ for(auto itN = nodeList.begin(), itEndN = nodeList.end(); itN != itEndN; ++itN) {
+ Node* node = *itN;
+ node->SetConnected(false);
+ }
+ // Remove the associated child from parents.
+ auto parentList = cLine->GetParentList();
+ for(auto it = parentList.begin(), itEnd = parentList.end(); it != itEnd; ++it) {
+ Element* element = *it;
+ element->RemoveChild(cLine);
+ }
+ m_connectionList.pop_back();
+ if(cLine) delete cLine;
+ m_mode = MODE_EDIT;
+ } else if(m_mode != MODE_INSERT) {
+ m_mode = MODE_EDIT;
+ }
+
+ Redraw();
+ event.Skip();
+}
+
+void ControlEditor::OnMiddleDown(wxMouseEvent& event)
+{
+ // Set to drag mode.
+ switch(m_mode) {
+ case MODE_INSERT: {
+ m_mode = MODE_DRAG_INSERT;
+ } break;
+ case MODE_PASTE: {
+ m_mode = MODE_DRAG_PASTE;
+ } break;
+ default: {
+ m_mode = MODE_DRAG;
+ } break;
+ }
+ m_camera->StartTranslation(m_camera->ScreenToWorld(event.GetPosition()));
+}
+
+void ControlEditor::OnMiddleUp(wxMouseEvent& event)
+{
+ switch(m_mode) {
+ case MODE_DRAG_INSERT: {
+ m_mode = MODE_INSERT;
+ } break;
+ case MODE_DRAG_PASTE: {
+ m_mode = MODE_PASTE;
+ } break;
+ case MODE_INSERT:
+ case MODE_PASTE: {
+ // Does nothing.
+ } break;
+ default: {
+ m_mode = MODE_EDIT;
+ } break;
+ }
+}
+
+void ControlEditor::OnMouseMotion(wxMouseEvent& event)
+{
+ wxPoint2DDouble clickPoint = event.GetPosition();
+ bool redraw = false;
+
+ switch(m_mode) {
+ case MODE_INSERT: {
+ Element* newElement = *(m_elementList.end() - 1); // Get the last element in the list.
+ newElement->Move(m_camera->ScreenToWorld(clickPoint));
+ redraw = true;
+ } break;
+ case MODE_INSERT_LINE: {
+ ConnectionLine* line = *(m_connectionList.end() - 1);
+ line->SetTemporarySecondPoint(m_camera->ScreenToWorld(clickPoint));
+ line->UpdatePoints();
+ redraw = true;
+ } break;
+ case MODE_DRAG:
+ case MODE_DRAG_INSERT:
+ case MODE_DRAG_PASTE: {
+ m_camera->SetTranslation(clickPoint);
+ redraw = true;
+ } break;
+ case MODE_MOVE_ELEMENT: {
+ for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; it++) {
+ Element* element = *it;
+ if(element->IsSelected()) {
+ element->Move(m_camera->ScreenToWorld(clickPoint));
+ auto childList = element->GetChildList();
+ for(auto itC = childList.begin(), itEndC = childList.end(); itC != itEndC; itC++) {
+ ConnectionLine* line = static_cast<ConnectionLine*>(*itC);
+ line->UpdatePoints();
+ }
+ redraw = true;
+ }
+ }
+ } break;
+ case MODE_MOVE_LINE: {
+ for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; it++) {
+ ConnectionLine* line = *it;
+ if(line->IsSelected()) {
+ line->Move(m_camera->ScreenToWorld(clickPoint));
+ redraw = true;
+ }
+ }
+ } break;
+ case MODE_SELECTION_RECT: {
+ wxPoint2DDouble currentPos = m_camera->ScreenToWorld(clickPoint);
+ double x, y, w, h;
+ if(currentPos.m_x < m_startSelRect.m_x) {
+ x = currentPos.m_x;
+ w = m_startSelRect.m_x - currentPos.m_x;
+ } else {
+ x = m_startSelRect.m_x;
+ w = currentPos.m_x - m_startSelRect.m_x;
+ }
+ if(currentPos.m_y < m_startSelRect.m_y) {
+ y = currentPos.m_y;
+ h = m_startSelRect.m_y - currentPos.m_y;
+ } else {
+ y = m_startSelRect.m_y;
+ h = currentPos.m_y - m_startSelRect.m_y;
+ }
+
+ m_selectionRect = wxRect2DDouble(x, y, w, h);
+ redraw = true;
+ } break;
+ default:
+ break;
+ }
+
+ if(redraw) Redraw();
+ event.Skip();
+}
+
+void ControlEditor::OnScroll(wxMouseEvent& event)
+{
+ if(event.GetWheelRotation() > 0)
+ m_camera->SetScale(event.GetPosition(), +0.05);
+ else
+ m_camera->SetScale(event.GetPosition(), -0.05);
+
+ Redraw();
+}
+
+void ControlEditor::OnIdle(wxIdleEvent& event)
+{
+ // Solve wxGLString bug.
+ if(m_firstDraw) {
+ TransferFunction* tf = new TransferFunction(0);
+ m_elementList.push_back(tf);
+ Redraw();
+ m_elementList.pop_back();
+ delete tf;
+ m_firstDraw = false;
+ }
+}
+
+void ControlEditor::OnKeyDown(wxKeyEvent& event)
+{
+ char key = event.GetUnicodeKey();
+ if(key != WXK_NONE) {
+ switch(key) {
+ case WXK_DELETE: // Delete selected elements.
+ {
+ DeleteSelectedElements();
+ } break;
+ case 'R': // Rotate the selected elements.
+ {
+ RotateSelectedElements(event.GetModifiers() != wxMOD_SHIFT);
+ } break;
+ }
+ }
+}
+
+void ControlEditor::RotateSelectedElements(bool clockwise)
+{
+ for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
+ Element* element = *it;
+ if(element->IsSelected()) {
+ element->Rotate(clockwise);
+ auto childList = element->GetChildList();
+ for(auto itC = childList.begin(), itEndC = childList.end(); itC != itEndC; itC++) {
+ ConnectionLine* line = static_cast<ConnectionLine*>(*itC);
+ line->UpdatePoints();
+ }
+ }
+ }
+ Redraw();
+}
+
+void ControlEditor::DeleteSelectedElements()
+{
+ for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
+ Element* element = *it;
+ if(element->IsSelected()) {
+ // Remove child/parent.
+ auto childList = element->GetChildList();
+ for(auto itC = childList.begin(), itEnd = childList.end(); itC != itEnd; ++itC) {
+ // The child is always a connection line.
+ ConnectionLine* child = static_cast<ConnectionLine*>(*itC);
+ // Delete the connection line.
+ for(auto itCo = m_connectionList.begin(); itCo != m_connectionList.end(); ++itCo) {
+ ConnectionLine* line = *itCo;
+ if(line == child) {
+ itCo = DeleteLineFromList(itCo);
+ break;
+ }
+ }
+ }
+ m_elementList.erase(it--);
+ if(element) delete element;
+ }
+ }
+
+ for(auto it = m_connectionList.begin(); it != m_connectionList.end(); ++it) {
+ ConnectionLine* line = *it;
+ if(line->IsSelected()) {
+ it = DeleteLineFromList(it);
+ }
+ }
+ Redraw();
+}
+
+std::vector<ConnectionLine*>::iterator ControlEditor::DeleteLineFromList(std::vector<ConnectionLine*>::iterator& it)
+{
+ ConnectionLine* cLine = *it;
+ auto childList = cLine->GetLineChildList();
+ for(auto itC = childList.begin(), itEndC = childList.end(); itC != itEndC; ++itC) {
+ ConnectionLine* child = *itC;
+ for(auto itL = m_connectionList.begin(); itL != m_connectionList.end(); ++itL) {
+ ConnectionLine* childOnList = *itL;
+ if(childOnList == child) {
+ itL = DeleteLineFromList(itL);
+ }
+ }
+ }
+ // Remove
+ auto parentList = cLine->GetParentList();
+ for(auto itP = parentList.begin(), itEnd = parentList.end(); itP != itEnd; ++itP) {
+ Element* parent = *itP;
+ if(parent) parent->RemoveChild(cLine);
+ }
+ if(cLine->GetParentLine()) cLine->GetParentLine()->RemoveChild(cLine);
+ // Free nodes
+ auto nodeList = cLine->GetNodeList();
+ for(auto itN = nodeList.begin(), itEndN = nodeList.end(); itN != itEndN; ++itN) {
+ Node* node = *itN;
+ node->SetConnected(false);
+ }
+ m_connectionList.erase(it--);
+ if(cLine) delete cLine;
+ return it;
+}
+
+void ControlEditor::CheckConnections()
+{
+ for(auto it = m_connectionList.begin(); it != m_connectionList.end(); ++it) {
+ ConnectionLine* cLine = *it;
+ if(cLine->GetType() == ConnectionLine::ELEMENT_ELEMENT) {
+ if(cLine->GetParentList().size() < 2) {
+ it = DeleteLineFromList(it);
+ }
+ }
+ }
+}
+
+void ControlEditor::OnExportClick(wxCommandEvent& event)
+{
+ FileHanding fileHandling(this);
+
+ wxFileDialog saveFileDialog(this, _("Save CTL file"), "", "", "CTL files (*.ctl)|*.ctl",
+ wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
+ if(saveFileDialog.ShowModal() == wxID_CANCEL) return;
+
+ fileHandling.SaveControl(saveFileDialog.GetPath());
+ wxFileName fileName(saveFileDialog.GetPath());
+ event.Skip();
+}
+
+void ControlEditor::OnImportClick(wxCommandEvent& event)
+{
+ wxFileDialog openFileDialog(this, _("Open CTL file"), "", "", "CTL files (*.ctl)|*.ctl",
+ wxFD_OPEN | wxFD_FILE_MUST_EXIST);
+ if(openFileDialog.ShowModal() == wxID_CANCEL) return;
+
+ wxFileName fileName(openFileDialog.GetPath());
+
+ FileHanding fileHandling(this);
+ if(!fileHandling.OpenControl(fileName, m_elementList, m_connectionList)) {
+ wxMessageDialog msgDialog(this, _("It was not possible to open the selected file."), _("Error"),
+ wxOK | wxCENTRE | wxICON_ERROR);
+ msgDialog.ShowModal();
+ }
+
+ //Get the highest id number
+ int majorElementID = 0;
+ for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
+ ControlElement* element = *it;
+ if(element->GetID() > majorElementID)
+ majorElementID = element->GetID();
+ }
+ for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; ++it) {
+ ConnectionLine* line = *it;
+ if(line->GetID() > majorElementID)
+ majorElementID = line->GetID();
+ }
+ m_lastElementID = ++majorElementID;
+
+ Redraw();
+ event.Skip();
+}
+
+/*void ControlEditor::SetElementsList(std::vector<ControlElement*> elementList)
+{
+ m_elementList.clear();
+ for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) {
+ ControlElement* element = *it;
+ m_elementList.push_back(element);
+ }
+}*/
diff --git a/Project/ControlEditor.h b/Project/ControlEditor.h
new file mode 100644
index 0000000..eb1bc4f
--- /dev/null
+++ b/Project/ControlEditor.h
@@ -0,0 +1,125 @@
+#ifndef CONTROLEDITOR_H
+#define CONTROLEDITOR_H
+
+#include "ControlEditorBase.h"
+#include <wx/wrapsizer.h>
+#include <wx/dcclient.h>
+#include <wx/dcscreen.h>
+#include <wx/graphics.h>
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+#include "IOControl.h"
+
+class FileHanding;
+class Camera;
+class Element;
+class ControlElement;
+class TransferFunction;
+class ConnectionLine;
+class Sum;
+class Multiplier;
+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 };
+
+class ControlElementButton : public wxWindow
+{
+ public:
+ ControlElementButton(wxWindow* parent, wxString label, wxImage image, wxWindowID id = wxID_ANY);
+ ~ControlElementButton();
+
+ protected:
+ virtual void OnPaint(wxPaintEvent& event);
+ virtual void OnMouseEnter(wxMouseEvent& event);
+ virtual void OnMouseLeave(wxMouseEvent& event);
+ virtual void OnLeftClickDown(wxMouseEvent& event);
+ virtual void OnLeftClickUp(wxMouseEvent& event);
+
+ wxString m_label;
+ wxFont m_font;
+ wxPoint m_labelPosition;
+
+ wxImage m_image;
+ wxSize m_imageSize;
+ wxPoint m_imagePosition;
+
+ int m_borderSize = 2;
+ bool m_mouseAbove = false;
+ bool m_selected = false;
+
+ wxSize m_buttonSize;
+};
+
+class ControlEditor : public ControlEditorBase
+{
+ public:
+ enum ControlEditorMode {
+ MODE_EDIT = 0,
+ MODE_MOVE_ELEMENT,
+ MODE_MOVE_LINE,
+ MODE_DRAG,
+ MODE_DRAG_INSERT,
+ MODE_INSERT,
+ MODE_INSERT_LINE,
+ MODE_SELECTION_RECT,
+ MODE_PASTE,
+ MODE_DRAG_PASTE
+ };
+
+ ControlEditor(wxWindow* parent,
+ int ioflags = IOControl::IN_TERMINAL_VOLTAGE | IOControl::IN_VELOCITY | IOControl::OUT_FIELD_VOLTAGE |
+ IOControl::OUT_MEC_POWER);
+ virtual ~ControlEditor();
+
+ virtual void AddElement(ControlElementButtonID id);
+ virtual void Redraw() { m_glCanvas->Refresh(); }
+ virtual void RotateSelectedElements(bool clockwise);
+ virtual void DeleteSelectedElements();
+ virtual void CheckConnections();
+ virtual std::vector<ConnectionLine*> GetConnectionLineList() const { return m_connectionList; }
+ virtual std::vector<ControlElement*> GetControlElementList() const { return m_elementList; }
+ virtual void SetElementsList(std::vector<ControlElement*> elementList) { m_elementList = elementList; }
+ virtual void SetConnectionsList(std::vector<ConnectionLine*> connectionList) { m_connectionList = connectionList; }
+
+ protected:
+ virtual void OnImportClick(wxCommandEvent& event);
+ virtual void OnExportClick(wxCommandEvent& event);
+ virtual void OnKeyDown(wxKeyEvent& event);
+ virtual void OnIdle(wxIdleEvent& event);
+ virtual void OnScroll(wxMouseEvent& event);
+ virtual void OnDoubleClick(wxMouseEvent& event);
+ virtual void OnLeftClickDown(wxMouseEvent& event);
+ virtual void OnLeftClickUp(wxMouseEvent& event);
+ virtual void OnMiddleDown(wxMouseEvent& event);
+ virtual void OnMiddleUp(wxMouseEvent& event);
+ virtual void OnMouseMotion(wxMouseEvent& event);
+ virtual void OnPaint(wxPaintEvent& event);
+ virtual void LeftClickDown(wxMouseEvent& event);
+
+ void BuildControlElementPanel();
+ void SetViewport();
+
+ std::vector<ConnectionLine*>::iterator DeleteLineFromList(std::vector<ConnectionLine*>::iterator& it);
+
+ wxGLContext* m_glContext = NULL;
+ Camera* m_camera = NULL;
+
+ ControlEditorMode m_mode = MODE_EDIT;
+
+ wxRect2DDouble m_selectionRect;
+ wxPoint2DDouble m_startSelRect;
+
+ std::vector<ControlElement*> m_elementList;
+ std::vector<ConnectionLine*> m_connectionList;
+
+ bool m_firstDraw = true;
+ int m_ioFlags;
+
+ int m_lastElementID = 0;
+};
+#endif // CONTROLEDITOR_H
diff --git a/Project/ControlEditor.wxcp b/Project/ControlEditor.wxcp
new file mode 100644
index 0000000..347a1a3
--- /dev/null
+++ b/Project/ControlEditor.wxcp
@@ -0,0 +1,1249 @@
+{
+ "metadata": {
+ "m_generatedFilesDir": ".",
+ "m_objCounter": 301,
+ "m_includeFiles": [],
+ "m_bitmapFunction": "wxC870InitBitmapResources",
+ "m_bitmapsFile": "ControlEditorBitmaps.cpp",
+ "m_GenerateCodeTypes": 1,
+ "m_outputFileName": "ControlEditorBase",
+ "m_firstWindowId": 10000,
+ "m_useEnum": true,
+ "m_useUnderscoreMacro": true,
+ "m_addHandlers": true,
+ "m_templateClasses": []
+ },
+ "windows": [{
+ "m_type": 4402,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxDEFAULT_FRAME_STYLE"],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "800,600"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "ControlEditorBase"
+ }, {
+ "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": "Control editor"
+ }, {
+ "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": "ControlEditor"
+ }, {
+ "type": "string",
+ "m_label": "File:",
+ "m_value": "ControlEditor"
+ }, {
+ "type": "string",
+ "m_label": "Class Decorator",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "wxFrame Type",
+ "m_selection": 0,
+ "m_options": ["wxFrame", "wxDocMDIParentFrame", "wxDocMDIChildFrame", "wxDocParentFrame", "wxDocChildFrame"]
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (16x16) :",
+ "m_path": "data/images/ctrlEditor16.png"
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (32x32) :",
+ "m_path": "data/images/ctrlEditor32.png"
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (64x64) :",
+ "m_path": "data/images/ctrlEditor64.png"
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (128x128):",
+ "m_path": "data/images/ctrlEditor128.png"
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (256x256):",
+ "m_path": "data/images/ctrlEditor256.png"
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4461,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxTB_TEXT", "wxTB_FLAT"],
+ "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": "Name:",
+ "m_value": "m_toolbarMain"
+ }, {
+ "type": "string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Bitmap Size:",
+ "m_value": "32,32"
+ }, {
+ "type": "string",
+ "m_label": "Margins:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Padding:",
+ "m_value": "1"
+ }, {
+ "type": "string",
+ "m_label": "Separator Size:",
+ "m_value": "5"
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4462,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_toolbarItemNew"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "New"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": "data/images/ribbon/new32.png"
+ }, {
+ "type": "filePicker",
+ "m_label": "Disabled-Bitmap File",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
+ }, {
+ "type": "bool",
+ "m_label": "Construct the Dropdown Menu:",
+ "m_value": true
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4462,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "ID_RIBBON_IMPORT"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_toolbarItemImport"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Import"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": "data/images/ribbon/imp32.png"
+ }, {
+ "type": "filePicker",
+ "m_label": "Disabled-Bitmap File",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
+ }, {
+ "type": "bool",
+ "m_label": "Construct the Dropdown Menu:",
+ "m_value": true
+ }],
+ "m_events": [{
+ "m_eventName": "wxEVT_COMMAND_TOOL_CLICKED",
+ "m_eventClass": "wxCommandEvent",
+ "m_eventHandler": "wxCommandEventHandler",
+ "m_functionNameAndSignature": "OnImportClick(wxCommandEvent& event)",
+ "m_description": "Process a wxEVT_COMMAND_TOOL_CLICKED event (a synonym for wxEVT_COMMAND_MENU_SELECTED). Pass the id of the tool",
+ "m_noBody": false
+ }],
+ "m_children": []
+ }, {
+ "m_type": 4462,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "ID_RIBBON_EXPORT"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_toolbarItemExport"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Export"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": "data/images/ribbon/exp32.png"
+ }, {
+ "type": "filePicker",
+ "m_label": "Disabled-Bitmap File",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
+ }, {
+ "type": "bool",
+ "m_label": "Construct the Dropdown Menu:",
+ "m_value": true
+ }],
+ "m_events": [{
+ "m_eventName": "wxEVT_COMMAND_TOOL_CLICKED",
+ "m_eventClass": "wxCommandEvent",
+ "m_eventHandler": "wxCommandEventHandler",
+ "m_functionNameAndSignature": "OnExportClick(wxCommandEvent& event)",
+ "m_description": "Process a wxEVT_COMMAND_TOOL_CLICKED event (a synonym for wxEVT_COMMAND_MENU_SELECTED). Pass the id of the tool",
+ "m_noBody": false
+ }],
+ "m_children": []
+ }, {
+ "m_type": 4504,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_tbSeparator1"
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["separator"]
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4462,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_toolbarItemCopy"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Copy"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": "data/images/ribbon/copy32.png"
+ }, {
+ "type": "filePicker",
+ "m_label": "Disabled-Bitmap File",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
+ }, {
+ "type": "bool",
+ "m_label": "Construct the Dropdown Menu:",
+ "m_value": true
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4462,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_toolbarItemPaste"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Paste"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": "data/images/ribbon/paste32.png"
+ }, {
+ "type": "filePicker",
+ "m_label": "Disabled-Bitmap File",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
+ }, {
+ "type": "bool",
+ "m_label": "Construct the Dropdown Menu:",
+ "m_value": true
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4462,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_toolbarItemUndo"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Undo"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": "data/images/ribbon/undo32.png"
+ }, {
+ "type": "filePicker",
+ "m_label": "Disabled-Bitmap File",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
+ }, {
+ "type": "bool",
+ "m_label": "Construct the Dropdown Menu:",
+ "m_value": true
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4462,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_toolbarItemRedo"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Redo"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": "data/images/ribbon/redo32.png"
+ }, {
+ "type": "filePicker",
+ "m_label": "Disabled-Bitmap File",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
+ }, {
+ "type": "bool",
+ "m_label": "Construct the Dropdown Menu:",
+ "m_value": true
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4504,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_tbSeparator2"
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["separator"]
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4462,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_toolbarItemDrag"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Drag"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": "data/images/ribbon/drag32.png"
+ }, {
+ "type": "filePicker",
+ "m_label": "Disabled-Bitmap File",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
+ }, {
+ "type": "bool",
+ "m_label": "Construct the Dropdown Menu:",
+ "m_value": true
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4462,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_toolbarItemMove"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Move"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": "data/images/ribbon/move32.png"
+ }, {
+ "type": "filePicker",
+ "m_label": "Disabled-Bitmap File",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
+ }, {
+ "type": "bool",
+ "m_label": "Construct the Dropdown Menu:",
+ "m_value": true
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4462,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_toolbarItemDelete"
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Delete"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": "data/images/ribbon/delete32.png"
+ }, {
+ "type": "filePicker",
+ "m_label": "Disabled-Bitmap File",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
+ }, {
+ "type": "bool",
+ "m_label": "Construct the Dropdown Menu:",
+ "m_value": true
+ }],
+ "m_events": [],
+ "m_children": []
+ }]
+ }, {
+ "m_type": 4480,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxAUI_MGR_LIVE_RESIZE", "wxAUI_MGR_TRANSPARENT_HINT", "wxAUI_MGR_TRANSPARENT_DRAG", "wxAUI_MGR_ALLOW_ACTIVE_PANE", "wxAUI_MGR_ALLOW_FLOATING"],
+ "m_sizerFlags": [],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_auimgr"
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "integer",
+ "m_label": "Pane Border Size",
+ "m_value": -1
+ }, {
+ "type": "colour",
+ "m_label": "Sash Colour",
+ "colour": "<Default>"
+ }, {
+ "type": "integer",
+ "m_label": "Sash Size",
+ "m_value": -1
+ }, {
+ "type": "choice",
+ "m_label": "Gradient Type",
+ "m_selection": 0,
+ "m_options": ["wxAUI_GRADIENT_NONE", "wxAUI_GRADIENT_VERTICAL", "wxAUI_GRADIENT_HORIZONTAL"]
+ }, {
+ "type": "colour",
+ "m_label": "Caption Colour",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Caption Gradient Colour",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Inactive Caption Colour",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Inactive Caption Gradient Colour",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Active Caption Text Colour",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Inactive Caption Text Colour",
+ "colour": "<Default>"
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4408,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxTAB_TRAVERSAL"],
+ "wxAuiPaneInfo": {
+ "m_name": "m_controlElementsPanel",
+ "m_caption": "Control elements",
+ "m_dockDirection": "wxAUI_DOCK_LEFT",
+ "m_layer": 0,
+ "m_row": 0,
+ "m_position": 0,
+ "m_bestSize": "200,200",
+ "m_minSize": "10,10",
+ "m_maxSize": "200,200",
+ "m_resizable": true,
+ "m_captionVisible": true,
+ "m_closeButton": false,
+ "m_minButton": true,
+ "m_maxButton": false,
+ "m_pinButton": true,
+ "m_toolbarPane": false
+ },
+ "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_panelControlElements"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "(255,255,255)"
+ }, {
+ "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": 4408,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxTAB_TRAVERSAL"],
+ "wxAuiPaneInfo": {
+ "m_name": "",
+ "m_caption": "",
+ "m_dockDirection": "wxAUI_DOCK_CENTER",
+ "m_layer": 0,
+ "m_row": 0,
+ "m_position": 0,
+ "m_bestSize": "100,100",
+ "m_minSize": "100,100",
+ "m_maxSize": "100,100",
+ "m_resizable": false,
+ "m_captionVisible": false,
+ "m_closeButton": false,
+ "m_minButton": false,
+ "m_maxButton": false,
+ "m_pinButton": false,
+ "m_toolbarPane": false
+ },
+ "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_panelWorkspace"
+ }, {
+ "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": 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": 4505,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "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_glCanvas"
+ }, {
+ "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": "WX_GL_RGBA",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_BUFFER_SIZE",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_LEVEL",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_DOUBLEBUFFER",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_STEREO",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_AUX_BUFFERS",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_MIN_RED",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_MIN_GREEN",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_MIN_BLUE",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_MIN_ALPHA",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_DEPTH_SIZE",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_STENCIL_SIZE",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_MIN_ACCUM_RED",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_MIN_ACCUM_GREEN",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_MIN_ACCUM_BLUE",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_MIN_ACCUM_ALPHA",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_SAMPLE_BUFFERS",
+ "m_value": "1"
+ }, {
+ "type": "string",
+ "m_label": "WX_GL_SAMPLES",
+ "m_value": "4"
+ }],
+ "m_events": [{
+ "m_eventName": "wxEVT_PAINT",
+ "m_eventClass": "wxPaintEvent",
+ "m_eventHandler": "wxPaintEventHandler",
+ "m_functionNameAndSignature": "OnPaint(wxPaintEvent& event)",
+ "m_description": "Process a wxEVT_PAINT event",
+ "m_noBody": false
+ }, {
+ "m_eventName": "wxEVT_LEFT_DOWN",
+ "m_eventClass": "wxMouseEvent",
+ "m_eventHandler": "wxMouseEventHandler",
+ "m_functionNameAndSignature": "OnLeftClickDown(wxMouseEvent& event)",
+ "m_description": "Process a wxEVT_LEFT_DOWN event. The handler of this event should normally call event.Skip() to allow the default processing to take place as otherwise the window under mouse wouldn't get the focus.",
+ "m_noBody": false
+ }, {
+ "m_eventName": "wxEVT_LEFT_UP",
+ "m_eventClass": "wxMouseEvent",
+ "m_eventHandler": "wxMouseEventHandler",
+ "m_functionNameAndSignature": "OnLeftClickUp(wxMouseEvent& event)",
+ "m_description": "Process a wxEVT_LEFT_UP event.",
+ "m_noBody": false
+ }, {
+ "m_eventName": "wxEVT_LEFT_DCLICK",
+ "m_eventClass": "wxMouseEvent",
+ "m_eventHandler": "wxMouseEventHandler",
+ "m_functionNameAndSignature": "OnDoubleClick(wxMouseEvent& event)",
+ "m_description": "Process a wxEVT_LEFT_DCLICK event.",
+ "m_noBody": false
+ }, {
+ "m_eventName": "wxEVT_MIDDLE_DOWN",
+ "m_eventClass": "wxMouseEvent",
+ "m_eventHandler": "wxMouseEventHandler",
+ "m_functionNameAndSignature": "OnMiddleDown(wxMouseEvent& event)",
+ "m_description": "Process a wxEVT_MIDDLE_DOWN event",
+ "m_noBody": false
+ }, {
+ "m_eventName": "wxEVT_MIDDLE_UP",
+ "m_eventClass": "wxMouseEvent",
+ "m_eventHandler": "wxMouseEventHandler",
+ "m_functionNameAndSignature": "OnMiddleUp(wxMouseEvent& event)",
+ "m_description": "Process a wxEVT_MIDDLE_UP event",
+ "m_noBody": false
+ }, {
+ "m_eventName": "wxEVT_MOTION",
+ "m_eventClass": "wxMouseEvent",
+ "m_eventHandler": "wxMouseEventHandler",
+ "m_functionNameAndSignature": "OnMouseMotion(wxMouseEvent& event)",
+ "m_description": "Process a wxEVT_MOTION event",
+ "m_noBody": false
+ }, {
+ "m_eventName": "wxEVT_MOUSEWHEEL",
+ "m_eventClass": "wxMouseEvent",
+ "m_eventHandler": "wxMouseEventHandler",
+ "m_functionNameAndSignature": "OnScroll(wxMouseEvent& event)",
+ "m_description": "Process a wxEVT_MOUSEWHEEL event",
+ "m_noBody": false
+ }, {
+ "m_eventName": "wxEVT_IDLE",
+ "m_eventClass": "wxIdleEvent",
+ "m_eventHandler": "wxIdleEventHandler",
+ "m_functionNameAndSignature": "OnIdle(wxIdleEvent& event)",
+ "m_description": "Process a wxEVT_IDLE event",
+ "m_noBody": false
+ }, {
+ "m_eventName": "wxEVT_KEY_DOWN",
+ "m_eventClass": "wxKeyEvent",
+ "m_eventHandler": "wxKeyEventHandler",
+ "m_functionNameAndSignature": "OnKeyDown(wxKeyEvent& event)",
+ "m_description": "Process a wxEVT_KEY_DOWN event (any key has been pressed)",
+ "m_noBody": false
+ }],
+ "m_children": []
+ }]
+ }]
+ }]
+ }, {
+ "m_type": 4464,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxSTB_DEFAULT_STYLE"],
+ "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_statusBarMain"
+ }, {
+ "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": "Field Count:",
+ "m_value": "1"
+ }],
+ "m_events": [],
+ "m_children": []
+ }]
+ }]
+} \ No newline at end of file
diff --git a/Project/ControlEditorBase.cpp b/Project/ControlEditorBase.cpp
new file mode 100644
index 0000000..1156e7b
--- /dev/null
+++ b/Project/ControlEditorBase.cpp
@@ -0,0 +1,172 @@
+//////////////////////////////////////////////////////////////////////
+// This file was auto-generated by codelite's wxCrafter Plugin
+// wxCrafter project file: ControlEditor.wxcp
+// Do not modify this file by hand!
+//////////////////////////////////////////////////////////////////////
+
+#include "ControlEditorBase.h"
+
+
+// Declare the bitmap loading function
+extern void wxC870InitBitmapResources();
+
+static bool bBitmapLoaded = false;
+
+
+ControlEditorBase::ControlEditorBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
+ : wxFrame(parent, id, title, pos, size, style)
+{
+ if ( !bBitmapLoaded ) {
+ // We need to initialise the default bitmap handler
+ wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
+ wxC870InitBitmapResources();
+ bBitmapLoaded = true;
+ }
+ // Set icon(s) to the application/dialog
+ wxIconBundle app_icons;
+ {
+ wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("ctrlEditor16"));
+ wxIcon icn;
+ icn.CopyFromBitmap(iconBmp);
+ app_icons.AddIcon( icn );
+ }
+ {
+ wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("ctrlEditor32"));
+ wxIcon icn;
+ icn.CopyFromBitmap(iconBmp);
+ app_icons.AddIcon( icn );
+ }
+ {
+ wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("ctrlEditor64"));
+ wxIcon icn;
+ icn.CopyFromBitmap(iconBmp);
+ app_icons.AddIcon( icn );
+ }
+ {
+ wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("ctrlEditor128"));
+ wxIcon icn;
+ icn.CopyFromBitmap(iconBmp);
+ app_icons.AddIcon( icn );
+ }
+ {
+ wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("ctrlEditor256"));
+ wxIcon icn;
+ icn.CopyFromBitmap(iconBmp);
+ app_icons.AddIcon( icn );
+ }
+ SetIcons( app_icons );
+
+
+ m_toolbarMain = this->CreateToolBar(wxTB_TEXT|wxTB_FLAT, wxID_ANY);
+ m_toolbarMain->SetToolBitmapSize(wxSize(32,32));
+
+ m_toolbarMain->AddTool(wxID_ANY, _("New"), wxXmlResource::Get()->LoadBitmap(wxT("new32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
+
+ m_toolbarMain->AddTool(ID_RIBBON_IMPORT, _("Import"), wxXmlResource::Get()->LoadBitmap(wxT("imp32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
+
+ m_toolbarMain->AddTool(ID_RIBBON_EXPORT, _("Export"), wxXmlResource::Get()->LoadBitmap(wxT("exp32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
+
+ m_toolbarMain->AddSeparator();
+
+ m_toolbarMain->AddTool(wxID_ANY, _("Copy"), wxXmlResource::Get()->LoadBitmap(wxT("copy32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
+
+ m_toolbarMain->AddTool(wxID_ANY, _("Paste"), wxXmlResource::Get()->LoadBitmap(wxT("paste32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
+
+ m_toolbarMain->AddTool(wxID_ANY, _("Undo"), wxXmlResource::Get()->LoadBitmap(wxT("undo32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
+
+ m_toolbarMain->AddTool(wxID_ANY, _("Redo"), wxXmlResource::Get()->LoadBitmap(wxT("redo32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
+
+ m_toolbarMain->AddSeparator();
+
+ m_toolbarMain->AddTool(wxID_ANY, _("Drag"), wxXmlResource::Get()->LoadBitmap(wxT("drag32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
+
+ m_toolbarMain->AddTool(wxID_ANY, _("Move"), wxXmlResource::Get()->LoadBitmap(wxT("move32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
+
+ m_toolbarMain->AddTool(wxID_ANY, _("Delete"), wxXmlResource::Get()->LoadBitmap(wxT("delete32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
+ m_toolbarMain->Realize();
+
+ m_auimgr = new wxAuiManager;
+ m_auimgr->SetManagedWindow( this );
+ m_auimgr->SetFlags( wxAUI_MGR_LIVE_RESIZE|wxAUI_MGR_TRANSPARENT_HINT|wxAUI_MGR_TRANSPARENT_DRAG|wxAUI_MGR_ALLOW_ACTIVE_PANE|wxAUI_MGR_ALLOW_FLOATING);
+ m_auimgr->GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_NONE);
+
+ m_panelControlElements = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxTAB_TRAVERSAL);
+ m_panelControlElements->SetBackgroundColour(wxColour(wxT("rgb(255,255,255)")));
+
+ m_auimgr->AddPane(m_panelControlElements, wxAuiPaneInfo().Name(wxT("m_controlElementsPanel")).Caption(_("Control elements")).Direction(wxAUI_DOCK_LEFT).Layer(0).Row(0).Position(0).BestSize(200,200).MinSize(10,10).MaxSize(200,200).CaptionVisible(true).MaximizeButton(false).CloseButton(false).MinimizeButton(true).PinButton(true));
+
+ m_panelWorkspace = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxTAB_TRAVERSAL);
+
+ m_auimgr->AddPane(m_panelWorkspace, wxAuiPaneInfo().Direction(wxAUI_DOCK_CENTER).Layer(0).Row(0).Position(0).BestSize(100,100).MinSize(100,100).MaxSize(100,100).Fixed().CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false));
+ m_auimgr->Update();
+
+ wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
+ m_panelWorkspace->SetSizer(boxSizerLvl2_1);
+
+ int *m_glCanvasAttr = new int[ 5 ];
+ m_glCanvasAttr[0] = WX_GL_SAMPLE_BUFFERS;
+ m_glCanvasAttr[1] = 1;
+ m_glCanvasAttr[2] = WX_GL_SAMPLES;
+ m_glCanvasAttr[3] = 4;
+ m_glCanvasAttr[4] = 0;
+ m_glCanvas = new wxGLCanvas(m_panelWorkspace, wxID_ANY, m_glCanvasAttr, wxDefaultPosition, wxDLG_UNIT(m_panelWorkspace, wxSize(-1,-1)), 0);
+ wxDELETEA( m_glCanvasAttr );
+
+ boxSizerLvl2_1->Add(m_glCanvas, 1, wxEXPAND, WXC_FROM_DIP(5));
+
+ m_statusBarMain = new wxStatusBar(this, wxID_ANY, wxSTB_DEFAULT_STYLE);
+ m_statusBarMain->SetFieldsCount(1);
+ this->SetStatusBar(m_statusBarMain);
+
+ SetName(wxT("ControlEditorBase"));
+ SetSize(800,600);
+ 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
+ this->Connect(ID_RIBBON_IMPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnImportClick), NULL, this);
+ this->Connect(ID_RIBBON_EXPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnExportClick), NULL, this);
+ m_glCanvas->Connect(wxEVT_PAINT, wxPaintEventHandler(ControlEditorBase::OnPaint), NULL, this);
+ m_glCanvas->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(ControlEditorBase::OnLeftClickDown), NULL, this);
+ m_glCanvas->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(ControlEditorBase::OnLeftClickUp), NULL, this);
+ m_glCanvas->Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(ControlEditorBase::OnDoubleClick), NULL, this);
+ m_glCanvas->Connect(wxEVT_MIDDLE_DOWN, wxMouseEventHandler(ControlEditorBase::OnMiddleDown), NULL, this);
+ m_glCanvas->Connect(wxEVT_MIDDLE_UP, wxMouseEventHandler(ControlEditorBase::OnMiddleUp), NULL, this);
+ m_glCanvas->Connect(wxEVT_MOTION, wxMouseEventHandler(ControlEditorBase::OnMouseMotion), NULL, this);
+ m_glCanvas->Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(ControlEditorBase::OnScroll), NULL, this);
+ m_glCanvas->Connect(wxEVT_IDLE, wxIdleEventHandler(ControlEditorBase::OnIdle), NULL, this);
+ m_glCanvas->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(ControlEditorBase::OnKeyDown), NULL, this);
+
+}
+
+ControlEditorBase::~ControlEditorBase()
+{
+ this->Disconnect(ID_RIBBON_IMPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnImportClick), NULL, this);
+ this->Disconnect(ID_RIBBON_EXPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnExportClick), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_PAINT, wxPaintEventHandler(ControlEditorBase::OnPaint), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(ControlEditorBase::OnLeftClickDown), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_LEFT_UP, wxMouseEventHandler(ControlEditorBase::OnLeftClickUp), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(ControlEditorBase::OnDoubleClick), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_MIDDLE_DOWN, wxMouseEventHandler(ControlEditorBase::OnMiddleDown), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_MIDDLE_UP, wxMouseEventHandler(ControlEditorBase::OnMiddleUp), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_MOTION, wxMouseEventHandler(ControlEditorBase::OnMouseMotion), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(ControlEditorBase::OnScroll), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_IDLE, wxIdleEventHandler(ControlEditorBase::OnIdle), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(ControlEditorBase::OnKeyDown), NULL, this);
+
+ m_auimgr->UnInit();
+ delete m_auimgr;
+
+}
diff --git a/Project/ControlEditorBase.h b/Project/ControlEditorBase.h
new file mode 100644
index 0000000..ac89b32
--- /dev/null
+++ b/Project/ControlEditorBase.h
@@ -0,0 +1,80 @@
+//////////////////////////////////////////////////////////////////////
+// This file was auto-generated by codelite's wxCrafter Plugin
+// wxCrafter project file: ControlEditor.wxcp
+// Do not modify this file by hand!
+//////////////////////////////////////////////////////////////////////
+
+#ifndef _PSP_PROJECT_CONTROLEDITOR_BASE_CLASSES_H
+#define _PSP_PROJECT_CONTROLEDITOR_BASE_CLASSES_H
+
+#include <wx/settings.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/xrc/xh_bmp.h>
+#include <wx/frame.h>
+#include <wx/iconbndl.h>
+#include <wx/artprov.h>
+#include <wx/sizer.h>
+#include <wx/toolbar.h>
+#include <wx/aui/framemanager.h>
+#include <wx/aui/dockart.h>
+#include <wx/panel.h>
+#include <wx/glcanvas.h>
+#include <wx/statusbr.h>
+#if wxVERSION_NUMBER >= 2900
+#include <wx/persist.h>
+#include <wx/persist/toplevel.h>
+#include <wx/persist/bookctrl.h>
+#include <wx/persist/treebook.h>
+#endif
+
+#ifdef WXC_FROM_DIP
+#undef WXC_FROM_DIP
+#endif
+#if wxVERSION_NUMBER >= 3100
+#define WXC_FROM_DIP(x) wxWindow::FromDIP(x, NULL)
+#else
+#define WXC_FROM_DIP(x) x
+#endif
+
+
+class ControlEditorBase : public wxFrame
+{
+public:
+ enum {
+ ID_RIBBON_EXPORT = 10001,
+ ID_RIBBON_IMPORT = 10002,
+ };
+protected:
+ wxToolBar* m_toolbarMain;
+ wxAuiManager* m_auimgr;
+ wxPanel* m_panelControlElements;
+ wxPanel* m_panelWorkspace;
+ wxGLCanvas* m_glCanvas;
+ wxStatusBar* m_statusBarMain;
+
+protected:
+ virtual void OnImportClick(wxCommandEvent& event) { event.Skip(); }
+ virtual void OnExportClick(wxCommandEvent& event) { event.Skip(); }
+ virtual void OnPaint(wxPaintEvent& event) { event.Skip(); }
+ virtual void OnLeftClickDown(wxMouseEvent& event) { event.Skip(); }
+ virtual void OnLeftClickUp(wxMouseEvent& event) { event.Skip(); }
+ virtual void OnDoubleClick(wxMouseEvent& event) { event.Skip(); }
+ virtual void OnMiddleDown(wxMouseEvent& event) { event.Skip(); }
+ virtual void OnMiddleUp(wxMouseEvent& event) { event.Skip(); }
+ virtual void OnMouseMotion(wxMouseEvent& event) { event.Skip(); }
+ virtual void OnScroll(wxMouseEvent& event) { event.Skip(); }
+ virtual void OnIdle(wxIdleEvent& event) { event.Skip(); }
+ virtual void OnKeyDown(wxKeyEvent& event) { event.Skip(); }
+
+public:
+ wxToolBar* GetToolbarMain() { return m_toolbarMain; }
+ wxPanel* GetPanelControlElements() { return m_panelControlElements; }
+ wxGLCanvas* GetGlCanvas() { return m_glCanvas; }
+ wxPanel* GetPanelWorkspace() { return m_panelWorkspace; }
+ wxAuiManager* GetAuimgr() { return m_auimgr; }
+ wxStatusBar* GetStatusBarMain() { return m_statusBarMain; }
+ ControlEditorBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Control editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(800,600), long style = wxDEFAULT_FRAME_STYLE);
+ virtual ~ControlEditorBase();
+};
+
+#endif
diff --git a/Project/ControlEditorBitmaps.cpp b/Project/ControlEditorBitmaps.cpp
new file mode 100644
index 0000000..b7212e1
--- /dev/null
+++ b/Project/ControlEditorBitmaps.cpp
@@ -0,0 +1,1186 @@
+//
+// This file was automatically generated by wxrc, do not edit by hand.
+//
+
+#include <wx/wxprec.h>
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#include <wx/filesys.h>
+#include <wx/fs_mem.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/xrc/xh_all.h>
+
+#if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
+ #define XRC_ADD_FILE(name, data, size, mime) \
+ wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
+#else
+ #define XRC_ADD_FILE(name, data, size, mime) \
+ wxMemoryFSHandler::AddFile(name, data, size)
+#endif
+
+static size_t xml_res_size_0 = 745;
+static unsigned char xml_res_file_0[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
+0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
+72,89,115,0,0,5,74,0,0,5,74,1,26,195,117,109,0,0,0,25,116,69,88,116,83,
+111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
+46,111,114,103,155,238,60,26,0,0,2,102,73,68,65,84,88,133,197,150,75,72,
+84,97,20,199,127,103,102,156,33,74,90,132,74,11,117,81,11,55,209,46,40,
+92,70,16,173,130,137,220,4,81,164,102,20,61,209,76,131,102,132,80,202,116,
+72,68,72,138,194,136,202,6,162,218,84,20,49,6,69,155,22,46,196,213,140,
+211,131,194,77,77,249,184,119,230,107,49,134,58,119,30,247,53,117,224,194,
+229,255,125,247,156,31,255,115,248,238,39,74,41,114,67,66,31,166,128,245,
+134,5,19,177,153,25,105,33,58,122,246,226,237,78,51,251,125,5,244,26,187,
+0,62,210,28,151,123,231,7,122,210,158,147,93,99,29,165,246,123,236,20,41,
+21,1,52,218,212,131,246,193,80,211,149,255,2,0,224,71,163,77,198,207,68,
+66,251,251,77,1,200,133,215,143,165,243,85,66,186,99,113,144,74,171,5,79,
+51,102,208,42,208,105,147,241,83,67,225,125,131,37,1,80,108,4,169,37,173,
+215,161,207,91,118,230,170,12,112,142,59,6,221,71,154,22,162,39,134,67,
+193,235,197,1,86,134,174,129,190,96,149,129,62,137,112,128,103,121,33,154,
+37,122,108,36,28,28,54,7,224,0,162,83,110,18,99,171,65,247,146,225,8,209,
+214,27,225,189,35,230,0,28,64,52,242,145,23,108,99,134,26,146,84,243,137,
+42,62,83,197,87,54,176,155,137,230,222,240,193,107,127,247,22,58,7,86,67,
+0,248,2,150,32,118,242,158,30,14,211,173,90,243,45,111,111,95,122,49,55,
+108,54,157,232,98,148,203,50,84,116,143,249,105,183,9,209,193,45,250,36,
+82,112,189,116,11,114,33,32,111,59,166,168,71,80,75,15,8,217,127,140,160,
+8,242,146,36,213,68,104,114,8,80,4,162,65,61,180,156,10,236,30,197,186,
+6,250,162,173,79,221,1,128,44,128,11,16,206,126,70,46,64,24,102,96,77,133,
+135,254,93,181,150,146,60,79,204,241,104,250,183,59,0,62,143,208,88,183,
+206,82,146,169,217,249,172,19,62,191,115,128,159,11,105,182,12,79,90,78,
+180,156,209,26,132,187,23,18,27,51,225,254,141,200,34,132,161,5,107,253,
+30,238,7,55,57,98,120,19,79,209,251,110,214,84,59,202,118,39,52,235,132,
+193,129,95,139,25,246,220,157,118,15,2,138,58,81,62,7,86,66,20,113,162,
+252,0,37,32,12,45,168,12,120,121,123,168,193,81,189,137,153,20,173,79,226,
+171,197,180,150,65,72,226,245,43,132,47,5,1,244,140,34,150,72,57,2,152,
+252,62,103,20,85,38,165,46,237,168,207,149,13,0,115,90,134,163,79,227,185,
+114,217,226,223,204,64,145,88,118,64,152,69,201,183,178,85,18,249,145,79,
+254,3,152,12,212,147,138,121,230,178,0,0,0,0,73,69,78,68,174,66,96,130};
+
+static size_t xml_res_size_1 = 2807;
+static unsigned char xml_res_file_1[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,128,0,0,0,128,8,6,0,
+0,0,195,62,97,203,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
+72,89,115,0,0,17,24,0,0,17,24,1,91,182,80,54,0,0,0,25,116,69,88,116,83,
+111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
+46,111,114,103,155,238,60,26,0,0,10,116,73,68,65,84,120,156,237,157,95,
+76,20,219,29,199,191,203,46,186,182,122,21,146,251,71,175,212,127,81,180,
+86,139,127,22,227,195,173,32,75,8,4,255,36,64,241,133,91,77,205,250,36,
+229,193,122,235,67,233,109,140,9,189,185,241,134,135,210,94,131,9,166,149,
+4,171,209,162,137,197,69,121,88,16,21,173,232,2,137,90,96,193,191,88,47,
+18,244,226,229,239,233,195,58,148,101,103,103,102,103,103,230,204,46,191,
+79,114,18,216,61,115,230,55,231,247,217,157,217,51,103,102,0,130,32,8,130,
+32,8,130,32,8,130,32,8,130,32,8,130,32,136,240,89,196,59,0,66,25,86,157,
+218,237,3,240,19,0,119,1,188,209,105,29,132,137,25,3,192,0,12,3,248,22,
+192,167,124,195,33,140,70,16,64,40,67,0,190,1,240,9,207,160,8,227,152,46,
+128,80,126,128,255,27,97,33,191,208,8,35,8,37,128,80,190,7,240,53,128,143,
+120,5,72,232,203,164,0,9,9,9,108,246,236,217,161,68,120,11,224,43,0,31,
+242,10,148,208,135,73,1,178,179,179,89,111,111,47,43,46,46,102,118,187,
+93,74,132,114,208,49,66,204,16,32,128,64,24,34,124,204,43,112,66,27,68,
+5,16,232,233,233,97,197,197,197,114,187,6,18,33,138,145,20,32,12,17,222,
+0,40,3,144,200,107,67,8,117,40,18,64,192,231,243,49,151,203,197,108,54,
+155,156,8,9,188,54,136,8,143,176,4,32,17,98,15,85,2,8,116,119,119,203,137,
+48,8,18,193,212,68,36,128,10,17,22,240,218,80,66,28,77,4,16,232,234,234,
+34,17,162,12,77,5,16,232,236,236,100,46,151,139,89,173,214,80,34,124,7,
+224,75,0,243,57,109,55,241,30,93,4,16,232,232,232,96,69,69,69,82,34,188,
+2,137,192,21,93,5,80,33,194,7,156,250,97,198,98,136,0,2,237,237,237,114,
+34,252,23,36,130,161,24,42,128,64,91,91,27,137,96,18,184,8,48,93,132,184,
+184,56,41,17,190,0,240,35,94,29,20,235,112,21,64,192,235,245,178,130,130,
+2,102,177,88,66,137,240,18,36,130,46,152,66,0,129,251,247,239,43,21,97,
+14,175,14,139,53,76,37,128,128,2,17,250,64,34,104,130,41,5,16,184,119,239,
+30,137,160,51,166,22,64,32,12,17,236,188,58,50,90,137,10,1,4,90,91,91,229,
+68,232,5,240,27,144,8,138,137,42,1,4,154,155,155,89,110,110,110,40,9,72,
+132,48,136,74,1,4,20,136,208,3,191,8,179,57,245,175,233,137,106,1,4,174,
+95,191,78,34,168,36,98,1,70,71,71,89,127,127,127,64,25,26,26,210,36,177,
+211,219,237,239,239,103,131,131,131,33,235,55,53,53,201,137,224,3,137,16,
+64,196,2,120,60,158,160,142,62,124,248,176,218,156,79,114,228,200,145,160,
+118,103,205,154,197,46,93,186,36,187,108,99,99,163,18,17,92,0,108,198,118,
+183,249,48,165,0,229,229,229,65,109,90,173,86,86,83,83,19,118,108,25,25,
+25,82,34,116,99,134,139,96,58,1,78,157,58,21,244,51,207,98,177,176,202,
+202,74,213,109,122,60,30,182,125,251,118,18,65,4,83,9,112,254,252,249,160,
+249,132,22,139,133,85,84,84,168,106,79,44,86,25,17,186,48,195,68,48,141,
+0,245,245,245,162,87,30,149,149,149,169,138,75,46,230,244,244,116,37,34,
+232,117,107,30,211,96,10,1,110,220,184,193,230,206,157,27,212,78,105,105,
+169,170,152,148,226,241,120,88,90,90,154,148,8,29,0,62,71,12,139,192,93,
+0,175,215,203,18,19,19,131,218,56,120,240,160,170,120,212,224,241,120,216,
+182,109,219,102,164,8,92,5,232,236,236,100,11,23,46,12,90,126,239,222,189,
+108,98,98,66,85,60,145,224,118,187,89,106,106,170,148,8,237,224,36,66,156,
+209,43,212,155,151,47,95,34,59,59,27,207,159,63,15,120,61,63,63,31,149,
+149,149,176,88,44,134,199,228,116,58,113,243,230,77,184,221,110,164,166,
+166,138,85,249,41,128,83,0,238,193,96,17,98,74,128,129,129,1,100,101,101,
+225,225,195,135,1,175,239,220,185,19,213,213,213,176,90,249,126,211,78,
+21,193,225,112,136,85,89,139,64,17,116,207,79,204,8,48,52,52,132,220,220,
+92,180,182,182,6,188,158,145,145,129,154,154,26,196,199,199,115,138,44,
+24,167,211,137,91,183,110,193,237,118,99,243,230,205,98,85,166,138,80,0,
+64,183,175,173,169,2,204,210,107,37,122,51,50,50,130,188,188,60,52,53,53,
+5,188,190,117,235,86,92,184,112,1,118,187,57,207,222,58,157,78,180,180,
+180,72,137,240,51,0,103,0,220,135,206,34,0,192,127,16,249,52,40,43,128,
+76,0,19,120,127,128,179,116,233,82,86,87,87,199,70,71,71,195,58,112,82,
+122,16,56,54,54,198,10,10,10,130,234,166,164,164,176,254,254,126,173,142,
+227,12,193,237,118,179,77,155,54,73,29,44,202,137,176,17,192,31,1,252,29,
+192,63,1,252,5,192,30,0,115,149,36,111,240,253,74,212,78,131,218,6,160,
+45,84,240,107,214,172,97,87,175,94,85,220,25,74,4,152,152,152,96,251,247,
+239,15,170,151,156,156,204,94,188,120,161,117,126,12,97,98,98,130,213,214,
+214,178,141,27,55,74,137,48,125,215,176,2,64,157,68,253,151,240,15,64,41,
+18,64,40,225,204,126,217,11,96,84,34,0,6,128,217,108,54,118,226,196,9,69,
+29,161,68,128,67,135,14,5,213,89,177,98,5,123,250,244,169,30,185,49,20,
+65,132,13,27,54,200,137,112,4,254,107,32,37,251,254,125,249,43,36,118,35,
+211,5,80,42,194,47,0,140,40,12,128,89,173,86,86,95,95,47,219,1,114,2,28,
+61,122,52,232,253,197,139,23,179,174,174,46,61,243,98,56,10,69,8,167,124,
+17,174,0,66,17,155,253,18,7,255,45,225,195,10,34,57,57,89,246,152,64,74,
+128,138,138,138,160,247,18,19,19,217,131,7,15,140,200,9,23,198,199,199,
+89,109,109,45,75,73,73,137,84,128,119,0,146,212,8,32,38,66,134,218,64,46,
+95,190,44,185,193,161,4,168,174,174,22,189,230,47,46,46,142,157,59,119,
+206,160,116,240,99,124,124,156,157,57,115,134,173,90,181,42,18,9,254,16,
+137,0,66,241,1,248,151,218,32,74,74,74,36,55,84,76,0,135,195,193,226,227,
+227,67,182,57,103,206,28,214,220,220,108,80,42,248,114,246,236,217,72,4,
+184,46,36,61,146,129,160,37,0,178,212,46,220,211,211,19,246,50,45,45,45,
+24,29,29,157,252,127,250,200,222,187,119,239,176,99,199,14,60,122,244,72,
+109,88,81,195,227,199,143,35,89,124,137,240,7,183,145,192,72,199,228,75,
+74,74,112,250,244,105,196,197,5,110,194,171,87,175,144,149,149,133,190,
+190,190,136,218,55,59,17,246,31,19,254,136,68,128,30,248,127,123,170,98,
+201,146,37,242,149,66,176,111,223,62,28,63,126,28,133,133,133,40,43,43,
+11,122,191,187,187,27,185,185,185,120,251,246,173,234,117,152,157,164,36,
+209,227,56,165,136,126,253,170,57,8,76,87,184,76,80,169,171,171,147,220,
+199,137,29,3,0,96,121,121,121,108,108,108,44,160,110,73,73,137,104,221,
+156,156,156,176,71,32,205,142,70,7,129,191,87,35,64,168,159,129,255,14,
+55,128,213,171,87,171,250,25,152,158,158,206,70,70,70,68,59,37,63,63,95,
+116,93,7,14,28,208,43,23,134,162,225,207,192,33,132,249,51,80,110,32,232,
+51,132,49,16,100,179,217,216,181,107,215,100,55,56,220,9,33,195,195,195,
+33,167,106,31,59,118,76,203,92,24,138,48,16,164,65,226,133,242,219,16,121,
+140,104,40,248,115,37,18,216,108,54,118,242,228,73,69,27,174,102,70,208,
+192,192,0,91,191,126,125,208,114,22,139,133,85,85,85,105,145,15,195,80,
+56,2,216,10,224,119,240,223,243,72,73,242,43,160,96,40,248,5,212,157,12,
+250,12,254,179,85,162,43,95,187,118,45,107,104,104,80,220,1,106,167,132,
+61,121,242,132,37,37,37,5,45,27,31,31,47,123,220,97,6,84,158,12,90,6,224,
+178,68,253,62,0,191,150,75,160,22,167,131,227,224,31,29,156,60,29,188,108,
+217,50,118,229,202,149,160,3,55,57,34,153,19,232,245,122,217,130,5,11,130,
+150,159,55,111,30,187,123,247,174,154,188,232,142,194,196,203,157,14,78,
+129,127,148,239,111,0,46,0,248,51,128,95,2,248,177,146,228,105,57,33,132,
+251,172,224,134,134,6,209,235,1,22,45,90,196,124,62,159,170,152,244,66,
+131,121,0,170,153,58,14,48,162,117,227,60,73,75,75,67,85,85,85,208,64,209,
+179,103,207,144,147,147,131,215,175,95,115,138,236,255,212,215,215,195,
+225,112,32,51,51,19,119,238,220,17,171,210,6,255,39,248,231,0,254,1,191,
+12,154,18,51,115,2,197,216,179,103,143,232,64,81,71,71,7,118,239,222,141,
+225,225,97,14,81,249,19,159,154,154,138,204,204,76,220,190,125,91,172,74,
+59,128,95,65,199,196,235,13,247,93,192,84,66,13,20,21,22,22,178,241,241,
+113,85,109,170,193,237,118,51,135,195,33,245,85,223,134,24,185,80,196,84,
+2,72,13,20,105,113,207,1,57,204,124,97,136,94,152,74,0,198,252,3,69,161,
+174,224,45,47,47,87,221,174,20,110,183,155,109,217,178,101,70,37,94,192,
+116,2,48,22,122,160,72,235,201,36,209,116,113,168,105,175,87,183,219,237,
+88,190,124,121,192,107,137,137,145,61,63,114,254,252,249,184,120,241,34,
+118,237,218,133,193,193,193,128,247,74,75,75,177,110,221,58,172,92,185,
+82,117,251,141,141,141,40,45,45,69,67,67,67,168,42,93,0,254,4,224,36,128,
+113,213,43,138,2,98,226,46,97,74,9,227,190,0,166,253,192,105,205,140,16,
+128,238,12,18,154,152,22,128,110,18,37,79,76,10,208,216,216,200,156,78,
+167,84,226,125,152,225,137,23,136,41,1,20,222,40,146,18,63,133,152,16,128,
+110,21,171,158,168,22,128,18,31,57,81,41,0,221,46,94,59,162,74,0,225,129,
+17,160,196,107,70,84,8,160,224,73,33,143,65,137,87,133,169,5,160,135,70,
+233,143,41,5,160,199,198,25,135,169,4,160,7,71,26,143,41,4,8,227,209,177,
+148,120,141,225,42,128,215,235,149,123,120,52,61,51,88,103,184,62,62,94,
+230,169,225,95,2,152,199,169,95,102,12,134,10,208,222,222,206,138,138,138,
+152,213,106,149,75,252,7,156,250,99,198,97,136,0,10,18,255,10,148,120,46,
+232,42,64,71,71,135,210,196,207,231,180,253,51,30,93,4,232,236,236,100,
+46,151,75,42,241,223,129,18,111,10,52,21,160,171,171,139,185,92,174,160,
+7,63,77,41,131,0,202,0,44,224,181,193,68,32,154,8,64,137,143,94,34,18,160,
+187,187,155,18,31,229,168,18,32,140,196,39,240,218,48,66,25,97,9,224,243,
+249,228,18,255,6,148,248,168,66,145,0,62,159,143,21,23,23,139,222,200,1,
+129,137,143,236,146,32,194,112,36,5,232,233,233,81,146,248,114,0,31,243,
+218,0,34,50,68,5,232,237,237,149,75,252,91,80,226,99,130,0,1,132,196,219,
+237,118,185,196,127,194,43,96,66,91,38,5,72,72,72,144,251,196,127,5,224,
+67,94,129,18,250,48,41,64,136,242,61,128,175,1,124,196,43,64,66,95,66,9,
+240,3,128,111,1,44,228,23,26,97,4,211,5,24,2,240,13,104,31,63,99,16,4,24,
+134,255,19,191,136,111,56,132,209,12,193,159,248,79,121,7,66,240,129,62,
+241,4,65,16,4,65,16,4,65,16,4,65,16,4,65,16,4,65,16,38,224,127,0,16,175,
+20,218,109,78,242,0,0,0,0,73,69,78,68,174,66,96,130};
+
+static size_t xml_res_size_2 = 499;
+static unsigned char xml_res_file_2[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,
+0,31,243,255,97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
+72,89,115,0,0,2,35,0,0,2,35,1,65,239,211,26,0,0,0,25,116,69,88,116,83,111,
+102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
+111,114,103,155,238,60,26,0,0,1,112,73,68,65,84,56,141,165,145,59,107,194,
+96,20,134,95,77,200,80,219,46,78,46,118,42,226,104,28,34,116,53,155,14,
+130,155,16,39,41,217,234,146,12,237,218,201,198,161,63,160,253,27,173,184,
+8,109,71,131,83,64,161,117,136,16,147,144,161,160,161,169,228,116,169,165,
+23,181,94,30,56,240,13,231,125,248,206,57,192,142,48,223,222,73,0,33,128,
+96,43,1,207,243,167,133,66,225,134,227,184,164,105,154,79,155,138,192,243,
+188,98,89,22,57,142,67,138,162,244,179,217,236,53,128,195,141,5,115,108,
+219,38,85,85,251,153,76,102,165,232,107,132,68,34,113,82,169,84,68,223,
+247,161,235,58,210,233,52,38,147,73,92,150,101,33,22,139,149,167,211,233,
+177,101,89,143,0,222,86,10,60,207,67,167,211,129,109,219,112,93,23,162,
+40,34,159,207,199,75,165,146,192,48,76,121,54,155,29,141,70,163,7,0,239,
+243,236,45,128,51,142,227,76,73,146,200,48,12,42,22,139,84,175,215,105,
+17,166,105,146,44,203,207,44,203,122,0,46,163,0,8,128,31,134,97,52,18,137,
+0,0,82,169,20,124,223,71,175,215,91,181,54,250,172,159,75,52,12,131,154,
+205,38,5,65,64,213,106,149,134,195,33,17,17,141,199,99,82,85,181,47,8,194,
+21,128,189,127,175,176,238,53,216,101,255,115,28,7,154,166,13,90,173,214,
+157,174,235,23,0,94,23,245,253,17,184,174,139,70,163,49,104,183,219,247,
+221,110,247,124,89,112,225,8,181,90,237,37,151,203,105,0,246,215,10,253,
+34,9,224,96,155,224,78,124,0,2,99,224,75,202,65,61,93,0,0,0,0,73,69,78,
+68,174,66,96,130};
+
+static size_t xml_res_size_3 = 6687;
+static unsigned char xml_res_file_3[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,0,0,0,1,0,8,6,0,0,0,
+92,114,168,102,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,
+89,115,0,0,34,36,0,0,34,36,1,228,91,10,25,0,0,0,25,116,69,88,116,83,111,
+102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
+111,114,103,155,238,60,26,0,0,25,156,73,68,65,84,120,156,237,221,121,112,
+21,101,186,6,240,39,39,202,166,178,95,217,101,199,40,32,42,107,197,148,
+160,38,133,48,128,12,78,24,161,6,102,80,47,92,239,173,73,244,90,35,163,
+130,65,64,72,24,52,9,16,106,142,227,202,0,215,202,120,101,36,200,148,38,
+44,86,18,194,38,91,88,36,200,34,92,23,178,176,132,132,228,4,146,239,254,
+113,104,132,67,146,211,203,215,219,57,207,175,170,255,73,117,190,126,187,
+207,121,159,116,206,233,254,26,32,34,34,34,34,34,34,34,34,34,34,34,34,34,
+34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
+34,34,34,34,34,34,34,34,34,34,34,162,176,246,123,0,183,219,93,4,17,217,
+195,7,224,20,128,153,0,110,179,183,20,34,178,154,15,128,184,182,156,2,131,
+128,40,172,220,24,0,202,114,18,12,2,162,176,80,95,0,48,8,136,194,68,99,
+1,160,44,39,192,32,32,10,73,106,2,64,89,142,0,152,10,192,99,75,165,68,36,
+157,150,0,80,150,195,0,166,3,136,180,161,94,34,146,72,79,0,48,8,136,66,
+132,145,0,80,150,131,0,226,193,127,13,136,92,71,70,0,220,24,4,60,35,32,
+114,17,153,1,16,24,4,60,35,32,114,184,6,3,32,54,54,86,116,233,210,197,72,
+16,236,3,48,17,64,132,133,251,67,68,26,52,24,0,233,233,233,194,231,243,
+9,175,215,107,52,8,14,192,255,25,1,131,128,200,97,26,13,0,133,18,4,157,
+59,119,102,16,16,133,16,85,1,32,57,8,246,131,65,64,228,8,154,2,64,81,93,
+93,45,188,94,175,232,212,169,19,131,128,200,197,116,5,128,162,178,178,82,
+164,165,165,25,13,130,125,96,16,16,217,194,80,0,40,42,42,42,68,90,90,154,
+232,216,177,163,145,32,40,0,48,222,202,157,39,10,119,82,2,128,65,64,228,
+78,82,3,32,48,8,58,116,232,96,36,8,182,129,65,64,100,42,83,2,64,113,233,
+210,37,25,65,144,15,6,1,145,41,76,13,128,27,131,32,57,57,89,180,109,219,
+214,72,16,228,129,65,64,36,149,37,1,16,24,4,109,218,180,49,26,4,79,88,121,
+144,136,66,149,165,1,192,32,32,114,22,91,2,64,81,94,94,46,43,8,30,183,242,
+160,17,133,10,91,3,32,48,8,90,183,110,109,52,8,30,179,242,224,17,185,157,
+35,2,192,132,32,24,101,225,49,36,114,45,71,5,128,162,172,172,76,36,37,37,
+137,86,173,90,25,13,130,145,86,30,76,34,183,113,100,0,40,74,75,75,101,4,
+65,54,128,225,86,30,84,34,183,112,116,0,40,148,32,104,217,178,165,209,32,
+24,102,229,193,37,114,58,87,4,128,162,164,164,68,86,16,12,181,242,32,19,
+57,149,171,2,64,193,32,32,146,195,149,1,160,40,41,41,17,179,103,207,22,
+45,90,180,48,26,4,67,172,60,232,68,78,225,234,0,80,20,23,23,203,10,130,
+193,86,30,124,34,187,133,68,0,40,148,32,104,222,188,185,222,16,168,3,144,
+5,224,97,43,95,4,34,187,132,84,0,40,206,158,61,203,32,32,82,33,36,3,64,
+33,49,8,30,178,242,69,33,178,74,72,7,128,66,9,130,102,205,154,233,13,130,
+90,248,131,224,65,43,95,28,34,179,133,69,0,40,78,159,62,45,18,18,18,100,
+4,193,32,43,95,36,114,23,62,20,211,161,186,117,235,134,244,244,116,20,21,
+21,33,33,33,1,205,154,53,211,58,132,7,192,56,0,123,0,100,2,136,146,93,35,
+185,31,3,192,225,148,32,56,122,244,40,18,18,18,208,180,105,83,173,67,120,
+224,127,150,193,33,248,131,224,94,217,53,146,123,49,0,92,226,158,123,238,
+185,233,140,192,64,16,28,6,131,128,174,97,0,184,140,18,4,18,206,8,148,32,
+232,39,187,70,114,15,6,128,75,117,239,222,253,122,16,204,156,57,19,183,
+221,118,155,214,33,148,32,56,2,127,16,244,149,93,35,57,31,3,192,229,186,
+119,239,14,175,215,139,99,199,142,25,13,130,111,193,32,8,59,12,128,16,209,
+163,71,15,89,65,112,8,192,42,0,125,100,215,72,206,195,0,8,49,74,16,20,21,
+21,233,13,130,219,1,76,131,255,51,2,6,65,136,99,0,132,168,158,61,123,222,
+20,4,145,145,145,90,135,8,12,130,222,178,107,36,251,49,0,66,156,196,32,
+56,2,127,16,244,146,93,35,217,135,1,16,38,122,245,234,5,175,215,139,194,
+194,66,76,155,54,141,65,64,0,24,0,97,231,190,251,238,195,170,85,171,112,
+224,192,1,189,65,208,4,191,4,129,23,64,87,217,53,146,117,24,0,97,234,254,
+251,239,151,17,4,51,1,28,135,63,8,186,200,174,145,204,199,0,8,115,74,16,
+236,223,191,31,211,166,77,131,199,163,249,45,161,4,193,9,48,8,92,135,1,
+64,0,128,254,253,251,203,14,130,206,178,107,36,249,24,0,116,147,1,3,6,92,
+15,130,248,248,120,68,68,68,104,29,34,48,8,58,201,174,145,228,97,0,80,189,
+6,12,24,128,204,204,76,35,65,208,20,254,32,248,14,64,58,24,4,142,196,0,
+160,70,13,28,56,16,153,153,153,216,183,111,159,222,32,104,1,32,1,192,49,
+248,131,160,163,236,26,73,63,6,0,169,242,192,3,15,24,13,130,59,224,15,2,
+229,140,128,65,224,0,12,0,210,68,9,130,189,123,247,202,10,130,14,178,107,
+36,245,24,0,164,203,160,65,131,144,153,153,137,130,130,2,140,27,55,78,207,
+16,74,16,28,7,131,192,54,12,0,50,100,248,240,225,200,202,202,146,17,4,223,
+1,72,6,208,86,102,125,212,56,205,247,138,18,80,93,93,141,170,170,170,160,
+235,181,110,221,90,207,41,178,116,66,8,92,184,112,65,245,250,205,154,53,
+67,243,230,205,53,109,99,196,136,17,215,131,96,209,162,69,216,176,97,131,
+214,50,239,4,48,27,192,127,1,200,0,176,4,192,57,173,131,80,232,114,204,
+115,1,22,47,94,172,106,110,254,226,226,98,75,235,106,200,75,47,189,164,
+250,121,2,221,186,117,19,39,79,158,52,188,205,252,252,124,49,110,220,56,
+189,207,52,16,0,46,193,127,70,208,198,172,55,20,241,95,128,144,151,148,
+148,132,212,212,84,85,235,222,125,247,221,200,206,206,70,143,30,61,12,111,
+55,58,58,26,89,89,89,200,207,207,215,251,175,129,114,70,240,61,24,4,166,
+97,0,132,176,140,140,12,204,159,63,95,213,186,237,219,183,199,230,205,155,
+113,239,189,114,103,11,87,130,32,47,47,15,177,177,177,122,134,184,11,55,
+7,65,107,153,245,133,59,6,64,136,90,189,122,53,18,18,18,84,173,219,178,
+101,75,252,235,95,255,66,255,254,253,77,171,231,145,71,30,65,118,118,54,
+114,115,115,241,196,19,79,232,25,66,9,130,211,96,16,72,195,0,8,65,235,215,
+175,199,140,25,51,80,87,87,23,116,221,22,45,90,32,43,43,11,67,134,12,177,
+160,50,32,38,38,6,57,57,57,200,205,205,197,227,143,63,174,103,8,37,8,142,
+3,152,7,160,149,196,242,194,14,3,32,196,108,217,178,5,191,253,237,111,113,
+245,234,213,160,235,54,105,210,4,159,126,250,41,30,125,244,81,11,42,187,
+89,76,76,12,54,109,218,132,220,220,92,60,246,216,99,122,134,104,11,32,9,
+12,2,67,24,0,33,100,215,174,93,120,234,169,167,80,93,93,29,116,221,200,
+200,72,172,94,189,26,99,198,140,177,160,178,134,197,196,196,96,243,230,
+205,200,205,205,197,168,81,163,244,12,209,14,12,2,221,24,0,33,162,168,168,
+8,227,198,141,195,165,75,151,130,174,235,241,120,176,106,213,42,196,199,
+199,91,80,153,58,49,49,49,216,178,101,11,114,115,115,49,114,228,72,61,67,
+4,6,65,75,137,229,133,44,6,64,8,56,115,230,12,226,226,226,80,92,92,28,116,
+221,136,136,8,172,92,185,18,83,167,78,181,160,50,237,98,98,98,176,117,235,
+86,100,103,103,99,248,240,225,122,134,96,16,104,192,0,112,185,146,146,18,
+196,197,197,225,244,233,211,170,214,79,73,73,193,172,89,179,76,174,202,
+184,216,216,88,108,223,190,29,217,217,217,24,54,108,152,158,33,218,227,
+151,32,152,13,255,109,201,20,128,1,224,98,23,47,94,196,232,209,163,113,
+244,232,81,85,235,207,159,63,31,127,250,211,159,76,174,74,174,216,216,88,
+236,216,177,3,217,217,217,24,58,116,168,158,33,218,195,255,181,225,41,48,
+8,110,193,0,112,169,170,170,42,140,31,63,30,123,247,238,85,181,126,98,98,
+34,230,206,157,107,114,85,230,137,141,141,197,206,157,59,141,4,193,191,
+225,230,32,208,118,179,67,136,98,0,184,208,149,43,87,240,155,223,252,6,
+185,185,185,170,214,127,246,217,103,85,95,14,236,116,55,6,129,206,107,23,
+24,4,55,96,0,184,76,93,93,29,166,79,159,142,141,27,55,170,90,255,119,191,
+251,29,254,246,183,191,57,226,174,68,153,98,99,99,177,107,215,46,100,103,
+103,99,240,224,193,122,134,184,27,12,2,6,128,155,8,33,240,194,11,47,224,
+147,79,62,81,181,254,196,137,19,241,225,135,31,234,153,226,219,53,148,32,
+88,191,126,61,30,126,248,97,61,67,4,6,65,51,137,229,57,94,232,190,51,66,
+208,171,175,190,138,119,223,125,87,213,186,113,113,113,248,228,147,79,244,
+60,30,220,117,34,34,34,48,126,252,120,236,222,189,91,70,16,20,1,72,68,152,
+4,1,3,192,37,210,211,211,145,146,146,162,106,221,232,232,104,172,91,183,
+14,77,155,54,53,185,42,103,9,12,130,135,30,122,72,207,48,221,0,164,33,76,
+130,128,1,224,2,31,127,252,49,94,122,233,37,85,235,62,248,224,131,248,226,
+139,47,112,199,29,119,152,92,149,115,41,65,240,205,55,223,96,253,250,245,
+120,240,193,7,245,12,163,4,193,81,248,131,32,36,211,148,1,224,112,235,214,
+173,195,243,207,63,15,33,68,208,117,7,14,28,136,156,156,28,180,110,205,
+59,101,129,91,131,96,208,160,65,122,134,185,7,55,159,17,132,84,16,48,0,
+28,44,39,39,7,83,166,76,81,117,103,95,159,62,125,240,229,151,95,162,93,
+187,118,22,84,230,46,30,143,7,227,199,143,199,158,61,123,144,153,153,137,
+168,168,40,61,195,40,65,16,82,103,4,12,0,135,218,177,99,7,126,253,235,95,
+195,231,243,5,93,183,91,183,110,200,206,206,70,167,78,124,250,86,99,60,
+30,15,226,227,227,113,232,208,33,100,102,102,234,157,253,168,59,126,9,130,
+153,112,249,196,186,12,0,7,42,44,44,196,216,177,99,81,81,81,17,116,93,153,
+243,248,133,11,37,8,14,31,62,108,52,8,188,240,63,242,204,181,65,192,0,112,
+152,227,199,143,99,244,232,209,56,119,46,248,140,216,102,205,227,23,46,
+2,131,160,95,191,126,122,134,233,1,23,7,65,125,1,192,39,180,216,228,199,
+31,127,68,92,92,28,126,250,233,167,160,235,90,49,143,95,184,80,130,224,
+200,145,35,50,130,160,8,46,10,130,250,2,96,7,128,85,0,122,91,92,139,110,
+106,254,79,118,186,178,178,50,196,197,197,225,228,201,147,65,215,181,122,
+30,191,112,17,24,4,125,251,246,213,51,76,79,200,15,130,190,0,198,95,27,
+239,5,0,255,14,96,236,181,109,73,247,3,252,15,102,168,129,63,8,122,153,
+177,17,149,238,0,48,11,192,215,104,228,33,18,30,143,71,68,71,71,139,229,
+203,151,139,139,23,47,26,126,168,69,48,178,31,12,82,89,89,41,162,163,163,
+85,141,217,164,73,19,177,113,227,70,147,247,144,132,16,162,166,166,70,124,
+252,241,199,162,79,159,62,70,30,112,114,28,254,198,141,212,248,222,143,
+6,240,62,128,159,131,140,127,6,192,10,0,186,174,122,170,143,18,0,202,226,
+131,245,65,224,1,48,29,192,143,208,120,192,219,181,107,39,146,147,147,69,
+85,85,149,105,111,12,153,1,224,243,249,196,232,209,163,85,141,23,25,25,
+41,50,51,51,77,219,47,170,159,164,32,56,124,237,61,29,44,8,238,7,144,169,
+115,27,89,240,159,45,24,18,24,0,55,6,129,23,64,87,163,27,8,162,55,128,253,
+13,212,160,122,233,215,175,159,56,116,232,144,41,111,8,89,1,112,245,234,
+85,17,31,31,175,106,44,143,199,35,214,172,89,99,202,254,144,58,74,16,244,
+238,221,219,200,123,243,16,234,15,2,15,128,197,0,106,13,190,247,107,0,188,
+162,173,229,110,214,80,0,4,6,65,23,35,27,105,64,12,128,179,65,182,175,122,
+185,235,174,187,196,63,255,249,79,233,111,4,25,1,80,87,87,39,158,123,238,
+57,85,227,68,68,68,136,191,254,245,175,210,247,131,244,81,130,160,87,175,
+94,178,130,224,78,0,235,100,189,239,175,45,255,3,157,183,56,7,11,0,179,
+130,96,36,26,121,0,168,222,37,50,50,82,100,101,101,73,125,3,200,8,128,151,
+95,126,89,245,62,44,89,178,68,106,253,36,135,207,231,147,21,4,69,178,223,
+247,215,150,13,208,254,217,131,234,0,8,12,130,206,90,55,116,131,30,0,138,
+53,110,87,245,114,215,93,119,137,194,194,66,105,47,188,209,0,120,243,205,
+55,85,215,62,127,254,124,105,117,147,57,124,62,159,240,122,189,162,107,
+215,174,166,188,127,13,46,234,110,33,189,129,214,0,80,150,106,232,11,130,
+72,0,123,37,239,244,45,75,191,126,253,68,117,117,181,148,23,220,72,0,100,
+100,100,168,174,57,49,49,81,74,189,100,13,37,8,186,116,233,98,119,211,7,
+46,79,105,105,72,189,1,16,24,4,106,47,76,127,206,170,3,145,154,154,42,229,
+133,214,27,0,107,214,172,17,30,143,71,213,239,62,251,236,179,162,174,174,
+78,74,189,100,45,7,6,193,81,0,183,171,236,71,195,1,160,44,149,0,210,209,
+120,16,52,135,255,105,175,150,28,136,54,109,218,136,178,178,50,195,47,176,
+158,0,200,202,202,18,183,223,126,187,170,223,123,242,201,39,69,109,109,
+173,225,58,201,94,74,16,116,238,220,217,238,0,16,0,254,179,190,6,52,243,
+94,128,22,0,18,224,191,70,58,29,64,199,122,214,153,2,255,196,11,150,56,
+127,254,60,254,254,247,191,91,181,185,235,182,109,219,134,103,158,121,6,
+87,174,92,81,181,254,215,95,127,141,29,59,118,152,92,21,153,173,73,147,
+38,152,57,115,38,78,156,56,1,175,215,139,206,157,141,124,76,102,216,127,
+3,80,53,51,172,172,51,128,192,165,2,183,6,193,87,38,109,171,193,101,248,
+240,225,134,147,93,203,25,192,190,125,251,68,235,214,173,53,215,217,190,
+125,123,81,84,84,36,225,239,16,57,69,117,117,181,240,122,189,162,77,155,
+54,118,157,5,220,242,136,37,43,239,6,188,3,254,51,130,239,224,15,130,110,
+240,127,239,111,169,221,187,119,227,194,133,11,150,108,235,216,177,99,24,
+61,122,180,174,237,149,150,150,98,204,152,49,170,158,247,71,238,208,180,
+105,83,204,156,57,19,83,166,76,177,171,132,184,192,31,216,113,59,176,18,
+4,223,194,134,185,216,107,107,107,113,224,192,1,75,182,245,212,83,79,225,
+236,217,179,186,127,255,248,241,227,152,56,113,34,170,170,170,36,86,69,
+118,43,44,44,180,107,211,183,220,47,96,231,124,0,182,61,163,237,248,241,
+227,150,108,167,180,180,212,240,24,5,5,5,152,60,121,50,106,107,107,37,84,
+68,78,112,226,196,9,187,54,125,203,29,190,97,57,33,136,85,255,2,52,230,
+206,59,239,84,189,238,134,13,27,240,226,139,47,154,88,13,89,169,188,188,
+220,174,77,183,10,252,65,88,6,128,221,18,19,19,81,80,80,160,105,246,222,
+21,43,86,224,47,127,249,139,137,85,81,56,10,203,0,176,115,218,236,63,252,
+225,15,72,77,77,197,128,1,3,52,63,188,99,246,236,217,182,124,141,73,114,
+181,108,217,210,174,77,95,12,252,129,157,1,112,217,174,13,247,238,109,207,
+100,71,147,38,77,194,123,239,189,119,253,65,157,163,70,141,194,71,31,125,
+164,250,217,125,66,8,60,255,252,243,200,201,201,49,179,76,50,89,175,94,
+182,205,177,115,203,135,95,118,4,64,37,128,101,0,162,0,88,254,241,118,100,
+100,36,30,120,224,1,171,55,139,184,184,56,172,93,187,22,145,145,55,223,
+156,245,204,51,207,96,209,162,69,170,199,169,169,169,193,211,79,63,109,
+217,55,25,36,223,192,129,3,237,218,244,30,53,43,153,125,33,208,141,147,
+142,126,105,210,182,26,92,70,140,24,97,248,130,14,181,23,2,41,75,116,116,
+180,168,168,168,104,116,204,196,196,68,77,99,118,233,210,69,156,62,125,
+218,240,190,144,117,42,43,43,69,90,90,154,104,219,182,173,93,23,2,13,189,
+165,219,235,33,59,0,234,187,2,80,49,195,234,131,144,158,158,110,248,133,
+212,18,0,131,6,13,18,231,207,159,15,58,102,109,109,173,120,250,233,167,
+53,237,203,128,1,3,84,141,77,246,82,174,0,236,212,169,147,93,141,47,224,
+191,0,207,210,75,129,27,107,124,69,51,0,223,91,117,16,218,183,111,47,46,
+92,184,96,248,5,85,27,0,125,251,246,21,63,255,252,179,234,113,171,170,170,
+68,76,76,140,166,125,26,53,106,148,180,219,156,73,46,135,221,12,244,31,
+141,244,225,77,140,6,128,154,187,0,111,100,217,89,128,140,191,254,66,168,
+15,128,35,71,142,104,30,187,172,172,76,68,69,69,105,218,175,233,211,167,
+243,214,97,7,113,88,227,11,88,116,59,176,214,121,0,20,145,240,127,56,97,
+234,65,184,247,222,123,133,207,231,147,242,2,203,158,22,60,208,153,51,103,
+52,207,46,51,103,206,28,41,251,70,250,57,112,30,0,101,25,175,165,33,237,
+152,18,172,59,36,78,6,26,184,56,109,74,48,53,14,28,56,160,249,46,194,21,
+43,86,72,219,71,82,207,225,83,130,37,107,109,70,173,147,130,202,186,201,
+121,36,76,154,20,116,195,134,13,82,95,112,43,2,64,8,33,54,111,222,44,154,
+54,109,170,105,95,215,173,91,39,105,47,41,24,73,141,111,246,164,160,154,
+191,234,231,180,224,65,88,21,0,66,8,177,118,237,90,17,17,17,161,122,159,
+155,55,111,46,10,10,10,36,236,37,53,196,164,105,193,63,147,245,190,191,
+182,172,133,228,105,193,173,122,48,72,79,72,152,36,52,42,42,74,215,135,
+112,106,88,25,0,90,182,167,44,156,76,196,28,22,60,24,100,33,128,171,6,223,
+251,62,0,47,107,105,184,64,245,61,26,204,138,198,191,145,7,64,60,128,83,
+208,120,0,148,71,131,153,249,213,152,213,1,32,132,16,9,9,9,154,142,67,239,
+222,189,197,217,179,103,165,109,63,156,73,106,124,181,143,6,139,130,190,
+71,131,213,93,251,189,62,65,187,43,8,39,61,28,180,5,128,231,1,108,66,35,
+59,31,25,25,41,30,125,244,81,145,145,145,33,202,203,203,77,127,67,216,17,
+0,122,46,20,26,54,108,88,208,43,16,169,97,54,63,28,116,4,252,127,120,131,
+253,75,126,10,254,175,221,7,105,28,191,65,167,224,204,199,131,55,248,1,
+161,213,79,206,177,35,0,132,16,226,242,229,203,154,47,20,26,55,110,156,
+184,122,245,170,212,58,66,93,109,109,173,200,204,204,20,125,251,246,53,
+210,248,39,160,175,241,235,211,27,192,175,224,255,99,248,2,252,83,233,63,
+9,255,183,103,210,117,8,190,138,45,26,12,0,89,23,248,168,101,87,0,8,33,
+68,105,105,169,230,11,133,102,205,154,37,189,142,80,36,185,241,111,51,169,
+15,164,170,239,43,2,253,147,216,145,233,218,181,107,135,236,236,108,116,
+237,170,254,35,25,175,215,139,165,75,151,154,88,149,187,213,213,213,225,
+31,255,248,7,238,187,239,62,76,158,60,25,199,142,29,211,51,204,41,0,179,
+0,244,3,240,46,252,31,230,57,94,88,78,8,226,118,93,187,118,197,198,141,
+27,53,77,108,242,202,43,175,112,50,145,0,74,227,223,127,255,253,152,60,
+121,50,138,138,138,244,12,115,10,254,198,239,11,23,53,190,130,1,224,82,
+3,7,14,196,103,159,125,166,122,70,33,113,109,50,145,77,155,54,153,92,153,
+243,5,54,254,209,163,71,245,12,243,61,92,220,248,10,6,128,139,61,246,216,
+99,248,240,195,15,175,207,48,20,76,77,77,13,38,77,154,20,182,147,137,40,
+141,223,191,127,127,163,141,255,34,128,123,225,226,198,87,48,0,92,110,202,
+148,41,88,184,112,161,234,245,203,203,203,49,118,236,88,156,57,115,198,
+196,170,156,165,174,174,14,89,89,89,120,248,225,135,49,121,242,100,124,
+251,237,183,122,134,57,141,95,26,63,29,254,15,165,93,143,1,16,2,94,123,
+237,53,252,241,143,127,84,189,254,15,63,252,128,177,99,199,58,98,122,116,
+51,41,141,63,120,240,96,76,152,48,1,251,247,239,215,51,140,210,248,253,
+16,66,141,175,96,0,132,136,180,180,52,76,154,52,73,245,250,7,15,30,196,
+164,73,147,80,83,83,99,98,85,246,16,66,32,43,43,11,67,134,12,193,132,9,
+19,176,111,223,62,61,195,156,65,8,254,197,15,196,0,8,17,30,143,7,171,87,
+175,198,35,143,60,162,250,119,182,108,217,130,25,51,102,64,8,97,98,101,
+214,9,108,252,189,123,247,234,25,70,105,124,229,47,126,181,204,26,157,134,
+1,16,66,154,55,111,142,207,63,255,28,81,81,81,170,127,103,237,218,181,72,
+74,74,50,177,42,243,5,54,254,158,61,170,38,191,13,84,12,224,207,8,147,198,
+87,48,0,66,76,187,118,237,176,113,227,70,116,236,216,216,84,140,55,91,176,
+96,1,50,50,50,76,172,202,60,57,57,57,24,58,116,168,140,198,239,1,32,5,97,
+210,248,10,6,64,8,234,217,179,39,190,250,234,43,180,106,117,203,163,224,
+26,148,152,152,136,207,63,255,220,196,170,228,82,26,63,46,46,14,223,124,
+243,141,158,33,2,27,63,44,31,193,204,0,8,81,202,133,66,77,154,52,81,181,
+126,109,109,45,166,78,157,138,237,219,183,155,92,153,49,57,57,57,24,54,
+108,24,226,226,226,176,123,247,110,61,67,148,128,141,127,29,3,32,132,61,
+254,248,227,154,46,20,186,124,249,50,38,76,152,160,247,90,120,83,221,216,
+248,187,118,237,210,51,4,27,191,30,12,128,16,55,117,234,84,44,88,176,64,
+245,250,37,37,37,24,51,102,12,138,139,139,77,172,74,189,156,156,28,12,31,
+62,220,72,227,151,226,230,198,183,237,153,148,78,228,138,91,22,157,166,
+71,143,30,136,141,141,13,186,158,218,211,111,179,189,254,250,235,184,124,
+249,50,118,238,220,169,250,119,86,174,92,137,121,243,230,153,87,84,16,57,
+57,57,152,51,103,14,118,236,216,161,119,136,82,0,25,0,222,1,80,46,173,48,
+178,141,99,230,3,32,243,228,230,230,138,145,35,71,26,185,31,191,4,192,60,
+0,182,61,131,219,77,120,6,64,142,144,151,151,135,185,115,231,98,235,214,
+173,122,135,40,3,176,2,252,139,175,9,3,128,108,149,151,151,135,55,222,120,
+3,91,182,108,209,59,132,210,248,169,0,46,74,43,44,76,48,0,200,22,121,121,
+121,72,74,74,194,230,205,155,245,14,113,14,192,114,176,241,13,97,0,144,
+165,242,242,242,48,111,222,60,35,19,147,92,2,176,18,254,71,94,133,246,237,
+140,22,96,0,144,37,242,243,243,145,148,148,196,198,119,24,6,0,153,42,63,
+63,31,201,201,201,216,176,97,131,222,33,216,248,38,98,0,144,41,182,109,
+219,134,197,139,23,27,105,252,10,248,191,199,79,1,112,94,90,97,116,19,6,
+0,73,85,80,80,128,69,139,22,177,241,93,130,1,64,82,108,223,190,29,111,189,
+245,150,140,198,95,2,255,39,252,100,1,6,0,25,34,169,241,63,0,176,8,124,
+40,141,229,24,0,164,203,254,253,251,241,214,91,111,225,211,79,63,213,59,
+165,88,37,128,247,193,198,183,21,3,128,52,57,112,224,0,22,46,92,40,163,
+241,23,3,248,89,106,113,164,25,3,128,84,97,227,135,38,6,0,53,170,176,176,
+16,11,22,44,48,210,248,151,1,188,7,255,247,248,63,73,45,142,12,99,0,80,
+189,36,52,190,15,192,199,240,223,154,203,198,119,40,6,0,221,228,224,193,
+131,152,63,127,190,145,198,175,1,240,17,128,55,1,252,40,179,54,146,143,
+1,64,0,128,67,135,14,33,37,37,5,107,214,172,65,93,93,157,158,33,216,248,
+46,196,0,8,115,74,227,175,93,187,22,181,181,181,122,134,80,26,127,62,128,
+31,100,214,70,230,99,0,132,169,195,135,15,35,57,57,153,141,31,230,24,0,
+97,230,200,145,35,88,188,120,177,140,198,95,0,224,255,100,214,70,214,99,
+0,132,9,9,141,127,5,192,39,240,127,170,127,66,102,109,100,31,6,64,136,59,
+113,226,4,82,82,82,240,254,251,239,27,109,252,55,1,28,151,90,28,217,142,
+1,16,162,78,158,60,137,228,228,100,124,240,193,7,184,122,245,170,158,33,
+216,248,97,128,1,16,98,78,157,58,133,197,139,23,203,104,252,249,0,190,147,
+90,28,57,14,3,32,68,72,108,252,5,0,156,247,112,64,50,5,3,192,229,190,255,
+254,123,44,90,180,200,72,227,215,1,248,95,0,175,131,141,31,118,24,0,46,
+37,177,241,231,0,40,146,90,28,185,6,3,192,101,78,159,62,141,183,223,126,
+27,94,175,23,62,159,79,207,16,108,124,186,142,1,224,18,18,27,127,46,128,
+163,82,139,35,215,98,0,56,220,153,51,103,176,116,233,82,188,251,238,187,
+168,174,174,214,51,132,210,248,111,0,248,86,106,113,228,122,12,0,135,98,
+227,147,21,24,0,14,115,246,236,89,164,166,166,34,61,61,221,72,227,111,132,
+255,84,127,159,212,226,40,228,48,0,28,162,184,184,24,239,188,243,14,150,
+45,91,134,170,170,42,61,67,8,0,95,192,255,23,127,175,212,226,40,100,49,
+0,108,198,198,39,59,49,0,108,82,82,82,130,183,223,126,91,70,227,39,1,216,
+35,181,56,10,27,12,0,139,73,108,252,121,0,190,145,89,27,133,31,6,128,69,
+74,75,75,177,116,233,82,44,95,190,28,151,47,95,214,59,76,14,128,63,131,
+141,79,146,48,0,76,86,90,90,138,21,43,86,32,53,53,21,229,229,229,122,135,
+201,1,240,42,128,221,242,42,35,98,0,152,70,98,227,191,6,96,151,188,202,
+136,126,193,0,144,172,172,172,12,203,151,47,151,209,248,175,3,216,41,175,
+50,162,91,49,0,36,81,26,63,45,45,13,23,47,94,212,59,12,27,159,44,197,0,
+48,232,220,185,115,88,182,108,153,209,198,207,135,191,241,191,150,87,25,
+81,112,12,0,157,46,93,186,132,149,43,87,34,57,57,25,23,46,92,208,59,76,
+62,252,183,229,110,149,86,24,145,6,12,0,141,36,54,254,92,0,91,228,85,70,
+164,29,3,64,37,137,141,255,6,128,205,242,42,35,210,143,1,16,132,210,248,
+41,41,41,56,127,254,188,222,97,216,248,228,72,12,128,6,84,84,84,32,35,35,
+67,70,227,39,1,216,36,175,50,34,121,24,0,1,148,198,95,178,100,9,206,157,
+59,167,119,152,124,0,41,0,178,228,85,70,20,222,124,240,223,8,115,203,146,
+158,158,46,140,186,116,233,146,72,75,75,19,29,58,116,168,119,27,42,151,
+124,0,227,173,60,40,68,225,194,148,0,168,168,168,144,209,248,219,192,198,
+39,50,149,212,0,80,26,191,99,199,142,70,26,191,0,108,124,34,75,72,9,0,54,
+62,145,59,25,10,128,202,202,74,145,150,150,38,58,117,234,100,164,241,247,
+1,136,7,16,97,225,126,19,17,116,6,64,117,117,181,240,122,189,108,124,34,
+151,211,20,0,74,227,119,238,220,217,72,227,239,7,27,159,200,17,84,5,128,
+207,231,147,209,248,7,192,198,39,114,148,70,3,64,105,252,46,93,186,176,
+241,137,66,80,131,1,16,27,27,107,180,241,247,1,152,8,54,62,145,99,53,24,
+0,6,150,131,0,166,3,240,88,184,31,68,164,131,204,0,80,26,63,210,210,61,
+32,34,221,100,4,192,65,248,255,199,231,95,124,34,151,49,18,0,135,192,191,
+248,68,174,166,39,0,14,131,141,79,20,18,180,4,192,17,0,83,193,83,125,162,
+144,161,38,0,78,0,152,9,78,116,66,20,114,26,11,0,54,62,81,136,171,47,0,
+78,130,141,79,20,22,110,12,0,54,62,81,152,241,1,56,5,54,62,81,88,250,61,
+128,219,237,46,130,136,136,136,136,136,136,136,136,136,136,136,136,136,
+136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
+136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
+136,168,81,255,15,142,86,241,164,142,198,204,179,0,0,0,0,73,69,78,68,174,
+66,96,130};
+
+static size_t xml_res_size_4 = 648;
+static unsigned char xml_res_file_4[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
+0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
+72,89,115,0,0,4,70,0,0,4,70,1,102,1,155,153,0,0,0,25,116,69,88,116,83,111,
+102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
+111,114,103,155,238,60,26,0,0,2,5,73,68,65,84,88,133,237,150,177,142,218,
+64,16,134,127,54,186,158,93,48,10,54,6,10,75,137,168,66,146,10,30,1,137,
+87,72,19,81,34,145,250,210,187,77,27,145,68,148,80,33,132,146,14,148,84,
+17,21,148,136,230,66,129,128,42,231,59,161,24,100,38,69,236,147,113,72,
+240,157,206,118,115,191,100,217,179,197,206,231,153,217,217,1,30,20,177,
+30,29,91,100,140,157,19,209,6,192,34,100,158,63,74,165,82,19,73,146,126,
+37,147,201,111,0,94,68,2,48,30,143,169,215,235,237,53,77,251,201,57,255,
+14,224,101,168,0,147,201,132,136,136,44,203,114,64,46,67,3,113,3,56,178,
+44,139,58,157,206,94,85,213,43,27,36,184,212,28,3,240,130,100,179,217,43,
+33,196,87,0,207,67,5,56,22,17,27,164,24,42,128,23,36,147,201,24,241,120,
+124,120,47,32,94,128,110,183,75,170,170,30,56,30,12,6,196,57,167,225,112,
+120,0,162,40,138,3,242,44,48,128,209,104,68,137,68,130,250,253,254,63,35,
+162,40,138,33,132,248,2,224,233,189,2,76,167,83,74,167,211,212,110,183,
+255,155,154,237,118,75,173,86,107,47,203,242,73,144,55,0,222,1,120,108,
+219,53,198,152,89,42,149,104,185,92,30,0,204,231,115,202,229,114,212,108,
+54,125,213,135,23,132,115,254,25,192,71,0,63,0,124,2,112,6,0,111,1,16,128,
+107,0,239,1,236,108,155,234,245,250,13,128,16,130,52,77,35,89,150,105,189,
+94,251,6,112,100,154,38,53,26,141,189,179,183,253,188,98,158,104,144,219,
+136,197,98,55,223,134,97,64,215,117,20,10,5,84,171,85,108,54,155,91,167,
+214,187,191,99,123,83,240,154,49,102,150,203,101,90,173,86,127,213,128,
+97,24,84,44,22,169,82,169,208,110,183,187,75,10,62,0,184,176,223,103,71,
+49,79,157,130,197,98,65,249,124,158,106,181,154,47,199,118,17,62,241,29,
+39,63,125,96,54,155,145,36,73,164,235,250,193,122,32,199,208,143,2,109,
+68,126,28,187,90,241,221,29,223,6,32,144,59,192,15,64,100,215,177,219,113,
+224,179,226,137,145,44,248,33,213,51,148,134,55,11,186,1,34,29,203,25,99,
+231,8,243,143,31,20,165,126,3,125,215,199,83,193,217,127,124,0,0,0,0,73,
+69,78,68,174,66,96,130};
+
+static size_t xml_res_size_5 = 1454;
+static unsigned char xml_res_file_5[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,64,0,0,0,64,8,6,0,0,
+0,170,105,113,222,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
+72,89,115,0,0,8,140,0,0,8,140,1,41,221,10,159,0,0,0,25,116,69,88,116,83,
+111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
+46,111,114,103,155,238,60,26,0,0,5,43,73,68,65,84,120,156,237,154,77,104,
+20,103,28,135,159,73,19,41,145,157,236,186,249,218,164,162,182,77,66,91,
+68,196,83,201,81,144,245,18,188,39,20,84,168,23,41,72,41,123,210,212,20,
+116,147,75,226,65,33,68,176,198,210,150,22,193,131,8,18,16,130,57,164,4,
+41,109,67,181,65,211,152,216,170,201,230,131,236,110,52,93,51,255,30,214,
+137,235,100,118,179,155,204,71,140,243,192,156,246,221,153,255,239,153,
+143,247,131,23,60,60,60,60,60,222,94,222,41,160,237,126,160,20,152,178,
+169,22,87,40,42,160,109,35,240,59,240,35,240,177,61,229,108,108,78,1,242,
+242,88,2,190,7,62,114,181,34,135,57,5,200,161,67,135,164,182,182,86,35,
+45,226,5,240,29,208,224,106,101,14,113,10,144,43,87,174,200,226,226,162,
+116,119,119,75,77,77,141,46,98,9,248,137,77,46,98,89,128,206,219,38,98,
+133,0,163,136,80,40,100,20,81,239,106,197,22,147,85,128,206,243,231,207,
+179,137,168,115,181,114,139,88,85,128,81,68,117,117,181,6,136,162,40,41,
+160,151,55,92,68,222,2,116,146,201,164,116,117,117,153,137,248,208,221,
+40,107,163,96,1,58,137,68,66,186,186,186,164,170,170,202,40,226,3,119,35,
+21,198,154,5,108,22,17,235,22,96,20,81,89,89,105,20,241,190,187,17,115,
+99,153,0,157,120,60,110,20,241,31,208,13,188,231,110,84,115,44,23,144,41,
+34,26,141,74,32,16,48,138,168,117,55,242,235,216,38,192,40,194,239,247,
+111,72,17,171,10,56,114,228,136,0,210,216,216,152,51,232,196,196,132,236,
+220,185,83,0,217,189,123,183,196,98,177,215,126,159,159,159,207,38,162,
+198,234,80,133,172,7,88,66,44,22,227,192,129,3,140,141,141,81,87,87,199,
+205,155,55,9,6,131,175,181,241,249,124,68,34,17,198,199,199,149,104,52,
+138,170,170,197,192,231,138,162,140,97,177,8,71,5,204,207,207,19,14,135,
+185,123,247,46,219,183,111,167,175,175,143,80,40,148,181,189,46,98,98,98,
+194,40,226,111,210,34,178,255,57,79,28,19,240,236,217,51,154,154,154,184,
+115,231,14,149,149,149,244,245,245,177,99,199,142,188,254,107,242,68,148,
+144,22,241,0,56,199,58,68,56,34,96,105,105,137,150,150,22,250,251,251,41,
+47,47,231,214,173,91,52,52,20,62,99,86,85,149,72,36,194,232,232,168,210,
+218,218,138,207,231,123,23,248,66,81,148,251,164,69,84,175,181,70,37,143,
+54,107,250,8,106,154,38,135,15,31,22,64,84,85,149,161,161,161,60,251,132,
+213,137,197,98,210,218,218,42,170,170,234,31,203,228,90,69,252,10,124,70,
+246,85,226,70,96,4,144,61,123,246,200,237,219,183,243,22,112,226,196,9,
+1,164,180,180,84,250,251,251,45,11,111,38,194,231,243,25,69,84,1,197,192,
+87,192,47,164,23,117,207,1,1,99,192,69,210,243,247,97,19,17,45,164,215,
+254,244,5,81,41,42,42,146,203,151,47,175,42,224,228,201,147,2,200,150,45,
+91,228,198,141,27,182,132,207,100,106,106,202,40,34,1,140,103,214,254,242,
+24,7,42,204,4,232,135,46,34,8,204,153,156,64,84,85,93,209,127,103,10,232,
+236,236,92,110,123,236,216,49,219,195,27,69,68,34,17,41,41,41,209,204,106,
+127,121,124,155,75,128,126,140,229,56,129,92,187,118,205,84,128,207,231,
+19,69,81,68,81,148,229,39,230,234,213,171,142,74,16,17,9,135,195,89,107,
+7,38,193,166,94,32,30,143,19,10,133,24,28,28,164,190,190,30,77,211,104,
+110,110,102,96,96,192,142,203,89,130,241,9,248,131,87,175,192,44,38,6,203,
+202,202,100,122,122,218,244,9,240,251,253,50,60,60,44,34,34,35,35,35,82,
+81,81,33,128,4,131,65,185,119,239,158,237,119,62,207,87,224,146,153,0,253,
+221,207,124,50,154,49,249,8,246,246,246,174,184,112,182,185,192,208,208,
+144,108,221,186,85,0,217,181,107,151,60,126,252,216,182,224,38,31,193,135,
+38,225,31,98,248,8,174,214,13,126,10,252,5,200,222,189,123,101,96,96,192,
+180,128,92,147,161,235,215,175,75,113,113,177,0,178,111,223,62,137,199,
+227,118,6,55,118,131,95,2,131,192,111,64,39,224,55,6,180,109,32,148,73,
+79,79,207,242,93,56,120,240,160,164,82,169,117,5,207,209,255,175,121,68,
+104,171,0,145,87,99,3,64,142,30,61,186,174,224,86,140,0,29,23,160,105,218,
+114,59,64,218,218,218,242,14,62,61,61,109,12,190,192,58,39,67,150,10,56,
+126,252,184,4,2,1,9,135,195,57,131,164,82,41,105,106,106,146,64,32,32,219,
+182,109,91,117,140,160,47,144,148,149,149,233,193,23,177,104,58,108,169,
+0,171,201,17,220,178,5,145,98,171,78,100,37,241,120,156,11,23,46,16,141,
+70,101,110,110,78,81,20,229,5,112,73,68,78,3,255,90,121,173,13,37,32,145,
+72,112,254,252,121,179,224,109,192,63,118,92,115,67,8,208,131,183,183,183,
+203,236,236,172,35,193,117,92,21,160,7,239,232,232,96,102,102,134,140,224,
+223,0,143,156,168,193,21,1,201,100,146,139,23,47,114,230,204,25,153,156,
+156,212,239,248,15,34,242,53,48,234,100,45,142,10,48,9,190,68,58,248,105,
+224,129,147,181,232,56,34,64,15,126,246,236,89,121,250,244,233,134,8,174,
+99,171,128,133,133,5,122,122,122,136,70,163,242,228,201,147,204,224,109,
+192,125,59,175,109,7,86,108,145,121,35,119,134,232,120,155,164,200,34,224,
+173,221,38,151,99,163,228,166,10,174,227,109,149,5,111,179,244,166,219,
+46,95,232,56,64,3,126,6,218,128,63,173,47,103,99,179,31,248,196,237,34,
+60,60,60,60,60,60,172,227,127,242,172,196,144,240,2,93,107,0,0,0,0,73,69,
+78,68,174,66,96,130};
+
+static size_t xml_res_size_6 = 845;
+static unsigned char xml_res_file_6[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
+0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
+72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
+111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
+46,111,114,103,155,238,60,26,0,0,2,202,73,68,65,84,88,133,189,151,191,75,
+91,81,20,199,63,231,249,226,139,162,160,208,66,210,116,180,160,67,113,176,
+226,32,130,21,156,28,116,20,58,118,118,232,42,214,36,214,150,118,18,236,
+127,80,42,56,198,210,77,16,161,237,32,209,193,14,254,192,14,29,140,9,88,
+80,26,137,121,106,60,29,18,127,52,47,198,151,248,226,217,238,185,247,221,
+239,135,115,223,61,231,92,81,85,220,152,124,252,101,113,112,56,0,12,3,29,
+32,65,208,96,97,54,9,154,4,54,129,5,90,91,150,116,172,205,118,181,239,109,
+0,242,110,45,200,169,78,34,188,0,154,93,209,66,26,101,14,159,76,233,120,
+87,178,42,0,137,46,251,145,166,9,224,21,208,232,82,184,216,50,192,12,122,
+52,173,225,254,172,107,0,137,198,3,136,196,128,158,42,133,139,109,5,213,
+17,13,119,167,138,39,12,135,248,235,239,157,136,196,61,20,7,232,65,36,46,
+111,214,158,58,244,174,71,64,38,190,5,209,92,156,186,250,16,102,189,135,
+250,151,182,139,106,247,245,72,92,70,64,162,203,126,206,115,95,80,66,156,
+157,192,217,73,45,0,30,35,18,147,232,178,223,1,128,77,4,120,118,57,174,
+29,68,79,225,231,6,10,71,32,19,75,33,212,216,65,105,112,44,55,235,169,193,
+113,100,48,165,77,199,187,146,249,8,156,27,145,146,226,80,171,72,52,114,
+170,147,0,194,236,142,69,106,247,15,74,83,217,79,188,143,68,154,214,150,
+135,6,169,196,224,173,226,80,139,72,52,115,112,56,96,130,142,252,231,181,
+234,104,127,96,221,248,149,152,38,134,239,230,249,114,182,177,159,229,175,
+157,187,238,26,54,65,218,225,42,23,116,6,26,248,58,250,164,236,70,150,101,
+225,247,251,203,174,41,101,207,63,109,179,252,59,125,221,213,97,160,4,42,
+221,200,182,109,178,217,146,169,189,66,147,160,129,104,197,0,222,65,104,
+208,81,11,238,27,194,64,197,81,161,238,15,66,146,6,194,157,0,238,6,161,
+73,19,116,11,232,189,112,173,167,142,25,252,188,93,21,136,152,245,101,175,
+232,198,190,3,114,211,4,137,129,190,188,240,164,237,28,241,68,166,42,0,
+200,84,154,49,23,12,2,161,69,132,163,42,21,157,230,62,99,166,105,109,89,
+50,116,172,205,70,153,247,12,192,45,132,50,167,99,109,118,254,26,90,190,
+48,194,241,61,66,100,240,201,20,20,26,18,13,247,238,161,204,122,10,80,30,
+98,230,162,93,191,74,68,22,17,96,245,30,32,86,208,163,233,139,65,233,166,
+84,9,121,14,146,191,29,55,55,165,0,58,221,151,4,134,16,18,158,3,228,78,
+18,156,231,134,138,223,6,142,90,160,111,251,215,145,186,110,188,61,142,
+85,164,174,91,35,61,63,139,39,74,22,35,157,238,75,98,209,7,124,184,211,
+237,16,142,17,227,61,22,125,133,232,58,151,220,250,56,141,254,120,132,125,
+26,69,24,117,213,186,229,133,143,80,230,177,124,97,13,247,238,149,93,90,
+209,243,60,149,24,204,183,112,210,142,18,184,236,37,84,82,249,162,166,91,
+32,49,2,161,69,183,207,243,127,112,231,61,10,138,240,143,199,0,0,0,0,73,
+69,78,68,174,66,96,130};
+
+static size_t xml_res_size_7 = 1244;
+static unsigned char xml_res_file_7[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
+0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
+72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
+111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
+46,111,114,103,155,238,60,26,0,0,4,89,73,68,65,84,88,133,181,151,93,76,
+91,101,24,199,127,207,161,165,5,193,208,32,210,2,83,230,72,216,98,252,64,
+36,16,23,162,33,89,118,49,3,75,140,31,17,221,197,174,208,132,41,94,44,186,
+32,208,73,102,188,218,148,59,19,99,162,33,89,116,78,70,162,162,219,8,6,
+48,153,29,55,114,49,150,0,19,55,40,91,130,108,192,74,79,219,211,215,139,
+150,66,219,211,210,18,247,191,122,63,158,243,60,191,243,158,247,60,239,
+243,138,82,138,76,36,125,211,54,150,239,54,1,45,192,62,16,23,40,87,116,
+214,11,202,11,92,3,46,224,40,26,86,237,85,122,70,126,183,3,144,83,19,46,
+130,170,11,161,21,40,204,136,22,86,81,244,99,149,147,234,68,173,119,71,
+0,226,30,177,35,5,157,64,7,144,159,97,224,68,249,128,211,168,181,94,213,
+253,146,63,99,0,113,123,156,136,12,0,245,27,99,182,28,33,207,170,69,188,
+6,195,4,140,204,62,93,84,87,80,234,176,234,174,91,76,156,208,146,130,127,
+60,246,12,34,158,173,193,1,58,26,74,89,62,94,195,242,241,26,142,62,251,
+72,54,193,1,234,17,241,200,39,19,79,165,5,144,206,81,23,225,208,79,132,
+2,21,217,70,200,64,21,40,245,179,184,61,78,83,0,113,143,216,9,27,131,40,
+202,9,5,32,20,120,0,12,84,32,50,32,238,17,123,18,0,58,61,192,243,177,254,
+131,131,168,143,110,238,77,0,113,143,151,33,28,75,50,77,3,209,92,93,68,
+91,109,9,109,181,37,20,230,230,100,11,209,33,167,38,92,0,22,0,244,160,27,
+200,51,53,77,1,240,65,67,41,47,62,30,73,11,67,51,43,172,6,140,108,0,242,
+9,170,46,224,29,139,244,77,219,16,222,32,221,95,21,10,16,10,164,78,108,
+57,2,103,14,238,2,224,246,253,16,159,142,165,205,61,17,9,173,210,55,253,
+190,133,197,249,3,40,10,182,179,55,130,1,252,126,63,118,187,61,105,206,
+162,9,239,213,151,2,112,125,201,79,255,228,18,77,149,15,3,48,121,199,199,
+132,215,103,230,178,144,229,187,77,22,80,135,183,199,141,72,215,51,74,239,
+60,231,202,231,235,150,74,0,62,27,95,76,5,0,208,98,1,217,75,218,245,143,
+168,198,153,31,131,232,122,161,24,71,225,102,118,30,62,82,29,107,63,225,
+176,241,229,203,149,177,126,67,197,67,233,220,238,211,80,56,205,102,74,
+11,172,113,125,239,90,48,214,206,215,140,184,205,89,86,184,105,107,213,
+132,146,124,75,172,111,203,73,74,182,91,36,46,13,81,113,0,182,28,225,68,
+163,139,201,182,39,105,125,186,56,54,126,115,37,254,111,208,117,29,191,
+223,244,124,201,66,202,101,73,28,58,247,90,21,141,143,69,246,228,153,131,
+187,152,187,167,51,54,183,134,32,73,143,111,236,9,179,141,153,169,52,148,
+196,157,80,125,127,222,142,181,173,154,240,237,225,221,236,113,216,145,
+228,248,49,136,157,175,132,120,53,132,56,128,223,102,86,232,159,92,138,
+245,29,118,11,223,189,186,155,226,188,212,217,110,231,16,202,171,129,154,
+74,28,254,232,242,60,11,171,155,223,124,143,195,206,187,117,143,166,117,
+181,67,136,107,26,200,64,226,232,138,110,208,254,203,63,113,99,86,45,197,
+55,216,6,194,179,112,63,221,35,23,52,156,229,23,17,214,18,103,46,223,88,
+229,155,191,150,204,30,202,10,194,23,12,167,50,93,197,81,52,172,169,246,
+42,29,197,89,51,139,15,47,221,226,143,155,73,108,89,67,152,74,209,175,218,
+171,244,72,150,176,89,187,17,214,19,109,124,193,48,175,124,63,195,239,115,
+171,255,55,132,15,171,156,132,104,61,160,186,247,47,160,248,194,204,114,
+61,24,230,245,115,179,92,154,93,201,26,98,197,231,103,232,250,29,179,169,
+211,27,229,250,102,158,180,209,3,92,53,179,246,135,194,188,121,126,150,
+161,233,123,25,7,215,13,197,91,231,103,25,153,254,55,177,166,184,130,90,
+235,221,232,196,149,229,210,57,234,66,25,30,20,229,102,78,173,154,240,85,
+115,37,205,213,69,105,131,7,12,197,219,63,206,242,235,204,150,85,179,228,
+130,37,247,22,74,213,109,45,207,227,78,10,213,219,232,5,14,33,204,155,57,
+14,134,21,71,7,255,230,135,169,229,180,193,143,12,220,136,15,14,96,4,230,
+9,27,135,18,239,6,230,23,147,206,81,23,97,99,144,173,69,234,22,105,2,133,
+54,243,204,24,52,148,217,175,119,21,45,167,57,250,130,241,177,210,94,205,
+116,122,16,142,161,82,212,139,219,73,88,7,237,115,114,195,238,172,174,102,
+241,32,227,101,232,65,119,180,110,220,182,116,139,6,94,67,113,22,155,181,
+91,117,239,95,72,107,154,213,245,124,113,254,64,164,132,147,189,40,156,
+177,90,66,201,98,228,80,83,83,32,3,56,203,47,102,122,61,255,15,18,39,215,
+228,219,192,187,72,0,0,0,0,73,69,78,68,174,66,96,130};
+
+static size_t xml_res_size_8 = 724;
+static unsigned char xml_res_file_8[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,31,0,0,0,31,8,6,0,0,
+0,31,174,22,57,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,
+89,115,0,0,4,157,0,0,4,157,1,124,52,107,161,0,0,0,25,116,69,88,116,83,111,
+102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
+111,114,103,155,238,60,26,0,0,2,81,73,68,65,84,72,137,189,151,61,104,19,
+97,28,135,159,55,38,33,53,105,74,62,68,107,18,23,65,90,104,172,86,16,210,
+162,131,20,69,164,186,170,69,45,10,130,5,113,112,42,136,100,8,214,118,112,
+9,40,14,213,197,89,23,71,59,22,151,150,104,4,77,106,83,138,226,34,129,214,
+80,228,114,185,228,28,108,74,130,249,120,239,114,241,7,55,220,189,31,207,
+243,231,184,247,207,9,0,226,203,35,8,253,29,29,230,1,47,190,253,210,237,
+167,147,241,100,65,102,190,29,128,114,201,129,221,238,235,20,30,35,237,
+235,19,219,57,247,236,157,35,143,103,158,109,182,155,111,3,160,162,8,74,
+197,78,217,0,140,137,143,193,9,117,105,237,118,60,30,148,131,3,148,75,160,
+169,150,8,140,138,180,255,134,237,245,234,221,71,51,251,228,224,240,23,
+110,149,0,105,223,21,237,109,182,149,128,237,159,39,22,10,196,248,228,155,
+210,222,124,141,207,79,31,144,131,27,16,136,120,157,109,231,140,144,233,
+155,80,22,179,141,4,26,195,37,4,246,187,29,188,191,53,64,191,199,33,33,
+144,245,94,84,22,179,241,185,155,7,229,224,109,4,230,198,195,132,122,157,
+36,206,132,218,194,1,142,147,245,94,42,46,101,18,137,235,187,11,90,195,
+155,8,156,232,223,203,181,163,1,0,166,134,131,156,12,185,1,88,19,17,86,
+24,100,133,65,114,132,89,39,84,119,121,217,238,141,150,55,62,92,152,125,
+234,131,234,33,35,35,0,96,119,34,128,228,249,67,216,196,142,189,128,39,
+103,35,156,122,153,225,158,126,95,102,183,32,197,202,97,96,185,125,229,
+181,2,154,202,100,52,64,44,236,169,27,26,139,120,184,60,228,151,222,170,
+26,121,56,208,35,52,30,142,6,26,142,205,143,135,113,59,12,109,103,12,126,
+117,200,207,111,69,33,247,179,190,111,124,47,168,168,101,157,201,104,99,
+177,102,145,123,231,59,89,72,229,89,72,229,25,8,246,144,154,30,198,229,
+114,1,112,238,213,42,95,242,138,33,48,24,172,188,54,197,98,17,69,49,14,
+172,141,161,202,27,9,8,33,76,175,55,93,121,53,138,162,160,155,236,5,29,
+195,1,244,146,185,102,100,9,28,48,213,13,173,131,155,16,176,22,110,80,192,
+122,184,1,129,238,192,37,5,186,7,151,16,232,46,188,141,64,247,225,45,4,
+254,15,188,137,128,169,179,125,125,83,225,216,243,207,187,247,63,10,146,
+223,118,21,190,199,110,30,174,150,117,54,182,76,254,94,105,42,84,202,182,
+26,184,67,131,210,150,185,221,76,68,71,3,248,3,55,71,228,58,37,20,139,19,
+0,0,0,0,73,69,78,68,174,66,96,130};
+
+static size_t xml_res_size_9 = 760;
+static unsigned char xml_res_file_9[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
+0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
+72,89,115,0,0,4,193,0,0,4,193,1,17,118,177,117,0,0,0,25,116,69,88,116,83,
+111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
+46,111,114,103,155,238,60,26,0,0,2,117,73,68,65,84,88,133,197,214,79,72,
+20,81,28,192,241,239,155,93,214,178,40,91,18,81,195,130,214,139,183,16,
+194,91,167,194,72,187,104,183,82,59,88,10,5,18,29,236,80,237,46,81,65,183,
+2,65,48,180,162,32,219,254,128,10,81,68,80,212,33,84,232,207,169,164,75,
+127,212,245,79,165,228,238,204,238,204,235,16,171,107,234,250,230,79,245,
+187,189,223,204,111,230,195,239,189,55,111,4,0,225,161,16,194,122,133,203,
+40,20,223,56,99,117,221,62,30,238,109,85,173,241,3,224,179,124,88,108,114,
+11,208,164,164,85,139,181,136,72,253,218,99,103,99,77,74,53,0,232,115,26,
+41,221,237,251,1,240,97,209,34,238,53,118,68,234,174,171,3,0,204,20,94,
+34,142,138,251,135,58,162,245,55,212,1,25,68,218,240,4,161,97,209,34,239,
+30,236,142,212,246,170,3,224,55,192,35,132,16,146,70,250,15,244,68,107,
+238,168,3,20,17,229,193,53,84,22,231,83,89,156,79,40,152,151,19,209,32,
+7,234,123,34,53,49,117,128,2,226,202,222,50,6,155,43,24,108,174,224,114,
+117,89,78,172,16,146,6,49,80,119,53,186,191,79,29,160,128,176,19,2,201,
+97,250,106,186,163,181,253,234,128,191,128,104,162,111,223,173,232,158,
+71,153,156,95,169,50,3,240,7,114,222,54,73,1,219,229,131,101,95,92,192,
+108,118,106,119,225,133,19,161,137,83,213,35,106,0,69,132,137,198,71,74,
+21,159,103,10,80,153,130,63,17,30,77,71,38,212,59,144,141,240,48,236,117,
+32,11,97,232,201,255,8,0,82,134,65,50,233,30,97,127,10,178,66,215,221,31,
+94,142,59,144,141,72,25,206,33,174,1,0,134,174,59,94,156,158,0,0,199,91,
+212,59,128,67,132,173,69,88,178,33,192,145,29,155,1,8,5,23,190,136,229,
+193,60,194,187,74,0,232,28,158,100,52,97,172,250,217,206,132,173,14,124,
+157,49,216,89,186,142,182,170,34,182,110,92,248,7,216,86,144,71,91,85,17,
+85,91,214,51,54,107,216,234,132,237,41,104,127,242,25,83,202,37,121,83,
+74,78,62,254,196,252,21,69,132,109,192,155,241,4,55,223,78,47,201,95,123,
+61,197,187,120,98,113,82,1,225,104,17,158,123,54,202,140,110,206,143,127,
+36,77,206,63,31,93,254,230,85,16,142,0,241,159,41,46,189,28,159,31,95,124,
+49,198,228,92,122,229,130,28,8,199,219,176,115,40,206,135,233,36,239,167,
+146,116,13,79,172,94,176,2,194,241,89,96,152,146,211,79,191,96,73,72,89,
+75,23,229,138,8,88,180,69,93,29,70,15,71,102,236,23,101,16,1,159,123,128,
+227,72,27,32,165,182,0,48,53,19,172,239,255,22,33,76,128,95,176,208,9,84,
+8,125,2,62,0,0,0,0,73,69,78,68,174,66,96,130};
+
+static size_t xml_res_size_10 = 1387;
+static unsigned char xml_res_file_10[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
+0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
+72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
+111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
+46,111,114,103,155,238,60,26,0,0,4,232,73,68,65,84,88,133,157,151,93,108,
+84,69,20,128,191,217,237,222,187,109,183,116,55,180,208,165,11,180,6,161,
+109,68,137,72,90,5,82,160,18,76,32,252,36,62,16,49,38,168,49,106,2,145,
+24,35,82,161,187,88,8,241,15,8,250,64,162,79,136,33,18,21,80,49,4,45,148,
+96,160,20,98,168,134,22,65,133,208,150,109,5,183,101,75,187,255,227,67,
+183,187,221,191,123,47,158,100,30,102,206,153,51,223,189,103,230,156,25,
+33,165,196,136,136,125,215,85,124,3,75,128,85,64,53,8,39,72,103,92,123,
+27,228,109,160,19,56,138,195,222,34,55,204,8,26,242,171,7,32,118,94,114,
+18,150,219,16,172,3,138,12,209,130,31,201,65,44,98,187,220,50,247,246,255,
+2,16,158,211,86,132,237,93,96,19,80,144,205,198,97,53,227,11,68,181,252,
+15,3,187,145,67,205,178,105,81,192,48,128,240,180,151,33,196,17,160,86,
+203,251,129,53,149,28,187,58,192,225,43,62,45,51,128,54,164,92,45,155,230,
+121,211,21,166,140,197,183,158,125,12,33,218,245,22,175,115,21,178,110,
+246,68,62,88,58,21,107,94,134,155,116,169,69,136,118,241,222,165,217,154,
+0,194,221,90,70,44,242,61,145,144,75,203,155,0,246,44,155,134,0,166,23,
+43,188,245,212,100,61,0,0,23,82,30,23,158,246,178,172,0,194,115,69,33,36,
+191,69,226,34,18,130,72,40,167,167,231,31,157,72,109,121,97,162,191,121,
+190,19,215,4,197,24,132,16,71,132,231,180,53,3,128,96,127,35,80,151,232,
+231,128,40,180,152,216,213,144,250,131,10,44,38,118,53,148,27,1,0,168,141,
+111,238,36,128,104,60,225,68,240,102,134,105,22,136,45,11,157,76,41,178,
+100,152,62,55,123,34,117,174,194,140,241,28,178,73,236,188,228,76,0,32,
+21,15,146,236,179,199,65,56,172,102,26,42,39,208,121,39,245,68,141,68,98,
+116,244,13,179,126,78,137,81,128,2,194,114,27,128,96,255,69,11,55,253,119,
+145,58,73,38,79,25,109,64,133,93,229,239,141,201,13,125,185,111,152,57,
+251,175,24,93,124,76,252,56,236,165,38,110,12,45,209,91,220,44,68,206,61,
+161,57,71,91,138,240,13,44,49,33,99,43,115,89,168,102,193,27,117,147,249,
+120,89,124,211,61,0,196,249,151,170,88,49,179,88,207,108,149,9,147,168,
+206,166,89,57,203,78,219,203,213,184,235,167,80,164,154,147,138,72,8,25,
+214,175,51,85,37,249,124,183,246,97,78,172,155,73,77,105,126,46,179,106,
+193,59,167,186,128,89,99,35,53,165,249,188,255,180,139,5,211,108,9,171,
+152,132,112,44,153,178,5,80,84,96,197,106,29,61,206,18,8,69,83,83,186,98,
+22,140,5,33,18,147,124,218,222,143,187,181,151,129,148,218,33,174,9,182,
+156,242,35,177,57,242,243,104,92,88,198,250,57,37,70,226,7,128,170,170,
+9,8,35,114,103,56,66,99,75,15,159,253,250,15,241,239,25,74,73,197,6,175,
+6,9,9,6,131,4,2,89,139,92,86,145,241,54,94,50,66,80,93,154,207,174,134,
+114,234,167,39,15,70,182,16,40,230,228,95,82,84,21,147,69,77,113,60,62,
+4,225,152,228,147,11,253,120,90,123,25,12,102,134,160,5,201,226,116,218,
+229,51,139,105,94,92,78,165,93,229,155,46,31,47,30,189,145,208,77,43,86,
+233,120,181,38,209,255,189,127,132,5,7,254,74,228,9,0,255,230,199,177,41,
+38,126,188,62,200,166,19,183,184,122,55,235,159,58,147,71,76,118,34,68,
+6,192,15,127,12,114,242,207,123,188,246,196,36,42,29,6,10,205,216,241,140,
+67,116,222,25,193,221,218,203,241,107,131,90,179,58,243,16,166,99,32,95,
+207,166,13,69,37,123,219,250,12,111,202,241,16,79,126,222,69,84,127,83,
+29,53,81,97,107,65,224,215,178,50,224,40,21,34,18,50,50,199,143,195,222,
+98,146,175,204,13,35,229,33,35,190,237,86,51,63,189,48,139,175,158,125,
+136,80,84,38,90,133,93,225,236,250,42,246,60,51,53,5,66,83,36,7,229,134,
+25,193,209,99,168,152,182,33,184,175,7,48,16,136,114,246,166,159,170,18,
+43,138,89,36,154,77,49,243,200,164,124,190,252,237,223,164,177,54,196,48,
+22,177,29,226,229,88,186,235,189,72,62,210,3,0,248,240,92,31,253,195,225,
+140,241,175,187,124,92,232,73,251,134,220,16,187,199,174,235,201,68,164,
+78,218,1,156,215,3,24,10,69,105,62,147,122,213,15,68,98,52,157,238,205,
+62,33,19,162,13,57,212,60,214,73,0,200,166,154,16,138,88,131,160,91,15,
+226,139,142,187,92,246,142,36,250,123,47,244,211,61,168,17,243,36,68,247,
+232,245,60,249,70,72,77,197,238,122,47,176,2,65,143,22,64,76,194,219,63,
+223,2,160,251,94,136,221,231,250,244,152,33,26,234,33,22,93,158,254,54,
+200,184,208,203,29,139,46,35,204,243,128,139,90,254,206,119,223,231,112,
+167,143,173,167,122,9,68,98,122,203,95,68,152,231,73,119,109,71,186,66,
+251,105,22,196,141,96,35,146,172,5,221,110,53,167,149,215,116,39,140,128,
+105,47,74,204,243,64,79,179,84,144,95,166,16,12,123,16,172,69,98,211,52,
+78,46,60,132,228,16,170,165,73,54,205,207,177,59,13,2,36,12,247,93,87,241,
+246,44,5,185,26,68,21,146,50,132,28,125,229,72,225,69,224,5,217,5,226,8,
+101,229,39,141,62,207,255,3,52,228,253,72,11,53,84,78,0,0,0,0,73,69,78,
+68,174,66,96,130};
+
+static size_t xml_res_size_11 = 834;
+static unsigned char xml_res_file_11[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
+0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
+72,89,115,0,0,4,193,0,0,4,193,1,17,118,177,117,0,0,0,25,116,69,88,116,83,
+111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
+46,111,114,103,155,238,60,26,0,0,2,191,73,68,65,84,88,133,189,214,95,72,
+20,65,28,192,241,239,236,237,221,94,137,217,147,82,113,15,161,16,249,24,
+17,190,154,80,20,24,25,151,4,253,67,210,58,43,130,222,18,41,202,243,37,
+162,151,144,34,178,68,138,186,176,212,254,19,189,20,5,62,4,41,81,4,82,25,
+21,97,89,87,88,230,221,185,183,211,195,157,94,247,135,107,246,254,244,131,
+101,102,118,118,126,243,97,119,102,88,33,165,68,28,123,86,133,176,158,144,
+103,148,243,93,180,139,243,253,7,14,7,90,85,199,232,177,66,234,64,69,190,
+0,13,139,125,244,249,186,58,164,190,255,200,213,22,181,49,0,145,223,26,
+102,36,223,249,1,112,96,209,42,174,53,159,246,55,94,80,7,0,152,17,10,137,
+240,113,189,233,172,223,219,171,14,40,48,66,195,162,133,129,29,231,58,54,
+93,82,7,20,1,209,44,6,183,118,251,27,174,168,3,10,140,16,72,118,113,99,
+75,143,127,67,159,58,160,8,136,38,110,121,123,253,245,3,234,128,2,35,0,
+118,114,123,227,197,206,245,55,213,1,69,64,108,151,247,234,47,251,215,221,
+153,109,11,41,37,162,253,113,53,50,250,50,235,72,221,21,187,178,132,3,11,
+15,159,209,176,208,176,16,16,47,37,26,50,94,198,218,159,156,229,203,38,
+218,234,70,117,101,250,236,91,200,130,136,162,241,142,69,106,249,34,66,
+3,149,79,144,138,40,224,231,176,15,40,2,194,62,160,192,136,180,53,224,212,
+4,1,111,165,210,96,167,203,133,203,112,207,181,79,14,141,243,224,237,100,
+126,0,135,38,168,91,90,170,156,192,237,54,48,12,3,128,192,139,160,173,201,
+51,2,66,166,197,194,227,195,54,179,252,123,139,42,3,114,138,148,45,186,
+71,244,179,92,142,1,240,26,15,93,52,22,25,144,130,104,224,33,107,197,16,
+0,143,88,65,151,180,1,16,128,167,204,200,217,33,156,130,121,97,1,102,34,
+95,182,72,3,24,186,198,115,95,117,206,0,0,247,96,9,188,143,213,157,142,
+4,70,9,96,90,146,158,145,175,121,1,214,4,67,84,154,96,232,16,149,217,159,
+205,8,56,120,255,131,242,100,135,68,47,123,73,254,215,152,79,136,80,188,
+94,163,143,240,67,212,38,245,183,177,143,51,114,115,102,128,221,112,203,
+48,11,196,84,198,190,144,9,110,162,148,233,191,146,238,27,114,102,174,158,
+219,81,108,35,66,38,132,237,172,1,93,19,116,214,46,86,158,192,19,172,99,
+56,152,124,114,86,77,220,165,116,250,35,0,227,162,130,192,204,106,116,233,
+64,215,29,0,60,37,177,200,51,2,124,43,203,149,1,224,141,95,127,69,223,27,
+24,139,3,156,75,56,26,222,29,223,9,233,39,102,26,32,108,90,172,234,126,
+101,3,144,30,167,126,78,81,19,175,79,207,68,19,29,25,126,106,210,0,18,24,
+253,22,74,189,109,43,166,132,53,87,183,82,183,225,44,194,97,100,6,252,151,
+48,35,16,141,106,9,128,196,4,190,20,42,127,187,108,213,79,136,109,2,96,
+82,150,72,50,157,133,177,57,249,3,235,9,253,190,72,67,151,122,0,0,0,0,73,
+69,78,68,174,66,96,130};
+
+static size_t xml_res_size_12 = 680;
+static unsigned char xml_res_file_12[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
+0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
+72,89,115,0,0,4,68,0,0,4,68,1,25,255,88,16,0,0,0,25,116,69,88,116,83,111,
+102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
+111,114,103,155,238,60,26,0,0,2,37,73,68,65,84,88,133,189,151,63,104,19,
+81,28,199,63,239,229,146,92,18,144,154,193,34,56,116,8,56,185,8,82,71,23,
+55,65,11,130,21,92,116,23,255,141,34,37,155,163,131,142,130,147,224,160,
+131,155,197,65,233,98,21,135,130,165,14,69,227,159,34,73,53,38,173,73,147,
+188,196,231,164,189,36,191,94,238,206,75,190,112,144,247,126,47,191,247,
+201,189,207,5,78,89,107,25,21,85,124,225,160,114,183,65,221,24,185,24,214,
+81,246,140,189,117,108,53,192,90,84,31,64,81,77,13,46,184,203,124,246,186,
+186,242,196,224,204,6,105,8,160,176,141,195,124,62,191,102,207,46,9,229,
+38,11,182,243,119,160,61,155,187,104,126,14,94,167,244,203,141,48,155,3,
+88,84,238,28,139,79,165,126,104,46,121,215,106,239,192,244,194,108,19,79,
+28,239,160,105,32,11,36,19,187,115,105,12,179,188,11,221,248,144,170,132,
+7,144,32,14,242,157,87,234,98,104,128,160,209,210,100,211,76,238,56,68,
+128,73,66,236,62,134,69,229,214,59,236,120,139,239,153,225,180,115,15,18,
+67,39,21,57,219,228,182,154,251,167,15,216,203,133,54,8,14,120,99,112,40,
+155,44,224,198,9,177,143,234,87,5,5,192,231,8,250,73,90,208,235,198,5,208,
+151,96,0,99,132,8,14,48,38,136,112,0,99,128,8,15,240,15,194,196,2,16,72,
+237,66,222,101,102,42,53,52,175,83,46,218,73,138,223,89,219,220,225,83,
+189,35,214,66,3,92,56,146,231,234,241,105,177,150,201,100,72,165,134,225,
+174,61,251,194,157,229,114,60,0,15,86,126,240,188,180,181,103,61,145,116,
+81,3,119,98,189,218,14,210,58,24,64,169,214,166,84,243,107,248,11,146,105,
+72,200,199,225,151,104,18,74,49,237,72,98,254,151,132,82,246,18,243,219,
+182,97,165,220,140,6,224,39,161,20,73,204,71,171,85,230,31,127,136,6,48,
+74,66,41,131,98,86,26,242,159,87,76,18,74,9,38,102,124,18,74,9,32,102,236,
+18,74,209,41,151,154,81,188,222,104,68,3,8,43,161,148,55,155,93,78,62,252,
+24,13,32,138,132,131,169,183,126,67,175,55,228,196,24,37,244,137,22,63,
+78,40,166,255,135,120,239,64,23,203,125,111,177,162,243,121,44,115,227,
+228,81,126,175,231,234,230,210,81,108,239,109,236,187,166,201,216,133,19,
+45,128,63,147,180,205,25,132,236,135,65,0,0,0,0,73,69,78,68,174,66,96,130};
+
+static size_t xml_res_size_13 = 708;
+static unsigned char xml_res_file_13[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
+0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
+72,89,115,0,0,5,163,0,0,5,163,1,164,52,119,130,0,0,0,25,116,69,88,116,83,
+111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
+46,111,114,103,155,238,60,26,0,0,2,65,73,68,65,84,88,133,197,151,189,107,
+19,113,24,199,63,207,229,146,212,40,173,118,16,117,112,208,69,16,28,10,
+138,56,104,193,197,127,160,8,110,110,29,44,74,209,74,91,46,103,154,74,65,
+240,101,17,58,184,72,55,157,116,18,234,34,138,155,131,130,173,98,21,193,
+183,56,136,73,91,95,146,92,238,113,136,74,122,36,185,203,93,94,158,237,
+126,207,243,251,62,159,251,253,158,223,155,168,42,161,45,43,7,113,249,142,
+173,43,97,37,140,240,217,1,225,16,6,75,204,200,13,50,50,216,125,0,48,129,
+56,194,89,12,86,200,202,56,25,73,116,15,64,137,213,124,109,3,174,98,176,
+204,140,140,116,7,160,58,2,94,219,131,112,135,172,60,229,178,28,246,19,
+16,111,17,22,44,57,153,48,152,218,100,18,164,58,183,3,59,155,248,21,88,
+32,198,4,83,250,213,23,96,117,90,78,40,220,3,18,73,19,250,234,253,95,56,
+43,0,105,246,113,147,17,173,212,5,88,75,203,17,215,101,17,37,245,207,217,
+102,8,16,94,160,156,193,210,199,27,0,242,147,114,64,12,30,1,91,189,125,
+218,14,81,5,89,160,194,4,182,230,36,63,205,94,148,39,192,142,70,241,29,
+129,128,85,148,81,67,148,219,205,146,3,20,29,248,237,180,53,121,25,152,
+39,197,125,83,133,254,32,245,94,252,11,208,134,145,120,136,203,24,182,190,
+130,250,235,184,83,16,31,81,198,73,235,221,218,198,150,165,66,64,148,80,
+174,147,34,203,121,253,225,117,6,149,121,143,203,241,255,16,37,232,51,112,
+137,49,138,114,177,73,191,7,8,231,176,244,117,163,128,160,0,229,129,57,
+125,231,109,116,50,242,205,172,191,153,63,71,185,64,90,23,253,132,35,157,
+5,191,202,184,158,213,241,9,56,141,203,80,144,228,16,162,6,106,77,133,74,
+209,1,129,181,164,201,21,92,174,97,235,207,86,52,162,45,42,165,4,220,114,
+4,43,105,105,46,140,68,36,128,254,56,243,216,234,70,209,136,118,31,136,
+152,60,58,64,27,44,232,20,36,11,147,50,228,23,52,176,139,151,140,105,177,
+19,0,187,49,120,230,23,180,158,99,255,22,88,106,5,160,231,83,208,123,0,
+169,222,215,122,7,224,192,41,224,109,207,0,6,103,245,67,60,193,81,224,77,
+79,0,0,82,182,126,142,11,199,68,104,120,108,118,20,0,32,53,171,95,98,38,
+195,34,44,119,19,96,195,62,176,249,146,230,214,51,50,92,41,51,39,66,75,
+143,76,0,195,36,223,106,159,63,132,231,183,174,19,196,144,63,0,0,0,0,73,
+69,78,68,174,66,96,130};
+
+static size_t xml_res_size_14 = 759;
+static unsigned char xml_res_file_14[] = {
+137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
+0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
+72,89,115,0,0,5,163,0,0,5,163,1,164,52,119,130,0,0,0,25,116,69,88,116,83,
+111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
+46,111,114,103,155,238,60,26,0,0,2,116,73,68,65,84,88,133,197,151,75,104,
+19,97,16,128,191,217,236,174,122,16,169,151,82,188,249,194,39,136,86,105,
+21,27,3,90,60,120,21,196,199,177,55,241,110,250,72,19,26,209,90,69,177,
+136,96,15,30,60,8,245,224,81,16,193,90,65,69,91,8,72,75,209,131,32,52,69,
+4,123,176,180,110,154,29,15,33,193,184,221,60,54,15,7,254,203,254,243,248,
+152,153,127,254,127,69,85,9,42,18,159,222,142,145,109,209,254,195,31,130,
+250,48,130,5,126,187,89,18,83,119,16,119,6,149,35,65,131,3,152,213,5,158,
+177,49,150,47,35,86,31,104,75,238,171,86,229,35,48,128,36,166,206,34,122,
+29,101,107,241,134,17,106,40,128,196,167,59,16,247,54,208,185,182,70,109,
+25,16,191,38,148,107,239,91,201,132,134,17,46,1,82,194,71,26,228,123,69,
+209,84,135,52,214,254,180,36,128,140,143,135,72,181,94,193,48,99,152,246,
+166,138,28,87,46,14,112,70,7,218,95,172,9,32,253,111,194,184,171,163,40,
+251,0,48,237,220,170,175,44,161,198,73,141,29,124,87,0,144,190,201,54,212,
+29,65,245,188,71,189,49,16,63,81,186,52,214,254,73,136,190,186,8,122,31,
+101,163,175,122,99,32,210,24,238,49,3,139,103,40,15,129,140,175,234,170,
+147,91,245,149,54,92,227,81,161,7,164,119,114,15,100,71,81,34,190,38,117,
+207,132,164,188,167,160,119,226,28,232,8,202,150,198,67,72,202,115,23,104,
+50,252,4,75,118,33,220,34,119,108,138,165,206,229,240,29,68,0,50,240,122,
+55,89,247,46,202,41,207,102,33,19,114,3,205,60,240,26,155,47,225,159,177,
+237,85,74,149,28,163,154,232,154,5,186,165,119,226,52,48,140,234,254,194,
+102,62,11,150,245,67,7,58,190,122,92,39,62,250,55,245,95,82,209,117,172,
+201,240,115,236,240,1,68,123,16,153,47,130,112,86,130,63,40,42,5,0,208,
+24,174,38,35,99,56,191,119,98,24,113,132,95,0,184,154,109,10,64,1,228,102,
+247,146,14,117,13,98,201,14,96,12,113,107,234,200,192,87,169,14,134,23,
+128,30,137,7,123,85,229,165,38,99,200,149,230,191,2,212,42,85,151,64,238,
+125,89,199,252,183,189,101,21,237,13,235,9,149,119,95,125,15,44,164,183,
+33,50,85,86,47,179,2,90,126,108,55,182,4,21,140,237,198,247,64,25,136,230,
+52,161,47,132,46,54,239,20,120,32,228,51,161,204,133,154,222,244,129,32,
+0,76,123,14,147,136,70,59,211,205,159,3,217,204,28,206,114,68,163,135,210,
+208,236,65,36,50,139,197,9,29,58,158,206,127,170,190,4,182,177,136,147,
+125,92,181,157,226,96,91,87,53,118,180,232,47,234,15,114,76,236,98,147,
+84,227,24,0,0,0,0,73,69,78,68,174,66,96,130};
+
+static size_t xml_res_size_15 = 1741;
+static unsigned char xml_res_file_15[] = {
+60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,
+110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101,
+115,111,117,114,99,101,32,120,109,108,110,115,61,34,104,116,116,112,58,
+47,47,119,119,119,46,119,120,119,105,100,103,101,116,115,46,111,114,103,
+47,119,120,120,114,99,34,62,10,32,32,60,33,45,45,32,72,97,110,100,108,101,
+114,32,71,101,110,101,114,97,116,105,111,110,32,105,115,32,79,78,32,45,
+45,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,
+120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,111,112,121,51,
+50,34,62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,105,116,109,
+97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,
+114,105,98,98,111,110,95,99,111,112,121,51,50,46,112,110,103,60,47,111,
+98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,
+115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,116,
+114,108,69,100,105,116,111,114,49,50,56,34,62,67,111,110,116,114,111,108,
+69,100,105,116,111,114,66,105,116,109,97,112,115,46,99,112,112,36,100,97,
+116,97,95,105,109,97,103,101,115,95,99,116,114,108,69,100,105,116,111,114,
+49,50,56,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,
+98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,
+112,34,32,110,97,109,101,61,34,99,116,114,108,69,100,105,116,111,114,49,
+54,34,62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,105,116,109,
+97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,
+99,116,114,108,69,100,105,116,111,114,49,54,46,112,110,103,60,47,111,98,
+106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,
+61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,116,114,
+108,69,100,105,116,111,114,50,53,54,34,62,67,111,110,116,114,111,108,69,
+100,105,116,111,114,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,
+97,95,105,109,97,103,101,115,95,99,116,114,108,69,100,105,116,111,114,50,
+53,54,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,
+106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,
+34,32,110,97,109,101,61,34,99,116,114,108,69,100,105,116,111,114,51,50,
+34,62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,105,116,109,
+97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,
+99,116,114,108,69,100,105,116,111,114,51,50,46,112,110,103,60,47,111,98,
+106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,
+61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,116,114,
+108,69,100,105,116,111,114,54,52,34,62,67,111,110,116,114,111,108,69,100,
+105,116,111,114,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,
+95,105,109,97,103,101,115,95,99,116,114,108,69,100,105,116,111,114,54,52,
+46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,
+99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,
+97,109,101,61,34,100,101,108,101,116,101,51,50,34,62,67,111,110,116,114,
+111,108,69,100,105,116,111,114,66,105,116,109,97,112,115,46,99,112,112,
+36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,
+100,101,108,101,116,101,51,50,46,112,110,103,60,47,111,98,106,101,99,116,
+62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,
+66,105,116,109,97,112,34,32,110,97,109,101,61,34,100,114,97,103,51,50,34,
+62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,105,116,109,97,
+112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,
+105,98,98,111,110,95,100,114,97,103,51,50,46,112,110,103,60,47,111,98,106,
+101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,
+34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,101,120,112,
+51,50,34,62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,105,116,
+109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,
+95,114,105,98,98,111,110,95,101,120,112,51,50,46,112,110,103,60,47,111,
+98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,
+115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,105,
+109,112,51,50,34,62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,
+105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,
+101,115,95,114,105,98,98,111,110,95,105,109,112,51,50,46,112,110,103,60,
+47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,
+97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,
+34,109,111,118,101,51,50,34,62,67,111,110,116,114,111,108,69,100,105,116,
+111,114,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,
+109,97,103,101,115,95,114,105,98,98,111,110,95,109,111,118,101,51,50,46,
+112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,
+116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,
+97,109,101,61,34,110,101,119,51,50,34,62,67,111,110,116,114,111,108,69,
+100,105,116,111,114,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,
+97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,110,101,119,51,
+50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,
+101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,
+32,110,97,109,101,61,34,112,97,115,116,101,51,50,34,62,67,111,110,116,114,
+111,108,69,100,105,116,111,114,66,105,116,109,97,112,115,46,99,112,112,
+36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,
+112,97,115,116,101,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,
+10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,
+105,116,109,97,112,34,32,110,97,109,101,61,34,114,101,100,111,51,50,34,
+62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,105,116,109,97,
+112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,
+105,98,98,111,110,95,114,101,100,111,51,50,46,112,110,103,60,47,111,98,
+106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,
+61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,117,110,
+100,111,51,50,34,62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,
+105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,
+101,115,95,114,105,98,98,111,110,95,117,110,100,111,51,50,46,112,110,103,
+60,47,111,98,106,101,99,116,62,10,60,47,114,101,115,111,117,114,99,101,
+62,10};
+
+void wxC870InitBitmapResources()
+{
+
+ // Check for memory FS. If not present, load the handler:
+ {
+ wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"), wxT("dummy one"));
+ wxFileSystem fsys;
+ wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file"));
+ wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file"));
+ if (f) delete f;
+ else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase);
+ }
+
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_copy32.png"), xml_res_file_0, xml_res_size_0, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ctrlEditor128.png"), xml_res_file_1, xml_res_size_1, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ctrlEditor16.png"), xml_res_file_2, xml_res_size_2, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ctrlEditor256.png"), xml_res_file_3, xml_res_size_3, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ctrlEditor32.png"), xml_res_file_4, xml_res_size_4, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ctrlEditor64.png"), xml_res_file_5, xml_res_size_5, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_delete32.png"), xml_res_file_6, xml_res_size_6, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_drag32.png"), xml_res_file_7, xml_res_size_7, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_exp32.png"), xml_res_file_8, xml_res_size_8, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_imp32.png"), xml_res_file_9, xml_res_size_9, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_move32.png"), xml_res_file_10, xml_res_size_10, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_new32.png"), xml_res_file_11, xml_res_size_11, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_paste32.png"), xml_res_file_12, xml_res_size_12, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_redo32.png"), xml_res_file_13, xml_res_size_13, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_undo32.png"), xml_res_file_14, xml_res_size_14, wxT("image/png"));
+ XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_ControlEditorBitmaps.xrc"), xml_res_file_15, xml_res_size_15, wxT("text/xml"));
+ wxXmlResource::Get()->Load(wxT("memory:XRC_resource/ControlEditorBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_ControlEditorBitmaps.xrc"));
+}
diff --git a/Project/ControlElement.cpp b/Project/ControlElement.cpp
index d12f9cf..d75c606 100644
--- a/Project/ControlElement.cpp
+++ b/Project/ControlElement.cpp
@@ -1,10 +1,120 @@
#include "ControlElement.h"
-ControlElement::ControlElement() : Element()
+Node::Node(wxPoint2DDouble position, NodeType nodeType, double borderSize)
{
+ double totalRadius = m_radius + borderSize;
+ m_rect = wxRect2DDouble(position.m_x - totalRadius, position.m_y - totalRadius, totalRadius * 2, totalRadius * 2);
+ m_nodeType = nodeType;
+
+ m_triPts.push_back(GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, m_radius));
+ m_triPts.push_back(GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, -m_radius));
+ m_triPts.push_back(GetPosition() + wxPoint2DDouble(-m_radius + 1, 0));
}
-ControlElement::~ControlElement()
+Node::~Node() {}
+
+void Node::SetPosition(wxPoint2DDouble position)
{
+ m_rect = wxRect2DDouble(
+ position.m_x - m_rect.m_width / 2, position.m_y - m_rect.m_height / 2, m_rect.m_width, m_rect.m_height);
+ m_triPts[0] = GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, m_radius);
+ m_triPts[1] = GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, -m_radius);
+ m_triPts[2] = GetPosition() + wxPoint2DDouble(-m_radius + 1, 0);
+
+ // Rotate according to the angle (node rect center as reference)
+ if(m_angle != 0.0) RotateTriPt(m_angle);
}
+void Node::StartMove(wxPoint2DDouble position)
+{
+ m_moveStartPt = position;
+ m_movePos = m_rect.GetPosition() - wxPoint2DDouble(-m_rect.m_width / 2, -m_rect.m_height / 2);
+}
+
+void Node::Move(wxPoint2DDouble position) { SetPosition(m_movePos + position - m_moveStartPt); }
+
+wxPoint2DDouble Node::GetPosition() const
+{
+ return m_rect.GetPosition() + wxPoint2DDouble(m_rect.GetSize().GetWidth() / 2, m_rect.GetSize().GetHeight() / 2);
+}
+
+void Node::RotateTriPt(double angle)
+{
+ double radAngle = wxDegToRad(angle);
+ wxPoint2DDouble rectCenter =
+ m_rect.GetPosition() + wxPoint2DDouble(m_rect.GetSize().GetWidth() / 2.0, m_rect.GetSize().GetHeight() / 2.0);
+ m_triPts[0] = wxPoint2DDouble(std::cos(radAngle) * (m_triPts[0].m_x - rectCenter.m_x) -
+ std::sin(radAngle) * (m_triPts[0].m_y - rectCenter.m_y) + rectCenter.m_x,
+ std::sin(radAngle) * (m_triPts[0].m_x - rectCenter.m_x) +
+ std::cos(radAngle) * (m_triPts[0].m_y - rectCenter.m_y) + rectCenter.m_y);
+ m_triPts[1] = wxPoint2DDouble(std::cos(radAngle) * (m_triPts[1].m_x - rectCenter.m_x) -
+ std::sin(radAngle) * (m_triPts[1].m_y - rectCenter.m_y) + rectCenter.m_x,
+ std::sin(radAngle) * (m_triPts[1].m_x - rectCenter.m_x) +
+ std::cos(radAngle) * (m_triPts[1].m_y - rectCenter.m_y) + rectCenter.m_y);
+ m_triPts[2] = wxPoint2DDouble(std::cos(radAngle) * (m_triPts[2].m_x - rectCenter.m_x) -
+ std::sin(radAngle) * (m_triPts[2].m_y - rectCenter.m_y) + rectCenter.m_x,
+ std::sin(radAngle) * (m_triPts[2].m_x - rectCenter.m_x) +
+ std::cos(radAngle) * (m_triPts[2].m_y - rectCenter.m_y) + rectCenter.m_y);
+}
+
+void Node::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;
+
+ // Update input triangle points.
+ m_triPts[0] = GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, m_radius);
+ m_triPts[1] = GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, -m_radius);
+ m_triPts[2] = GetPosition() + wxPoint2DDouble(-m_radius + 1, 0);
+
+ // Rotate according to the angle (node rect center as reference)
+ if(m_angle != 0.0) RotateTriPt(m_angle);
+}
+
+bool Node::Contains(wxPoint2DDouble position) const
+{
+ if(m_connected) return false;
+ return m_rect.Contains(position);
+}
+
+ControlElement::ControlElement(int id)
+ : Element()
+{
+ m_elementID = id;
+}
+
+ControlElement::~ControlElement() {}
+
+void ControlElement::DrawNodes() const
+{
+ for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
+ Node* node = *it;
+ DrawCircle(node->GetPosition(), node->GetRadius(), 10, GL_POLYGON);
+ if(node->GetNodeType() == Node::NODE_IN) {
+ DrawTriangle(node->GetInTrianglePts());
+ }
+ }
+}
+
+void ControlElement::StartMove(wxPoint2DDouble position)
+{
+ m_moveStartPt = position;
+ m_movePos = m_position;
+ for(int i = 0; i < (int)m_nodeList.size(); ++i) {
+ m_nodeList[i]->StartMove(position);
+ }
+}
+
+void ControlElement::Move(wxPoint2DDouble position)
+{
+ SetPosition(m_movePos + position - m_moveStartPt);
+ for(int i = 0; i < (int)m_nodeList.size(); ++i) {
+ m_nodeList[i]->Move(position);
+ }
+}
diff --git a/Project/ControlElement.h b/Project/ControlElement.h
index 69f9d83..1cf4e0b 100644
--- a/Project/ControlElement.h
+++ b/Project/ControlElement.h
@@ -3,12 +3,75 @@
#include "Element.h"
+class Node
+{
+public:
+ enum NodeType { NODE_IN = 0, NODE_OUT };
+
+ Node(wxPoint2DDouble position = wxPoint2DDouble(0, 0), NodeType nodeType = NODE_IN, double borderSize = 0.0);
+ ~Node();
+
+ wxRect2DDouble GetRect() const { return m_rect; }
+ void SetRect(wxRect2DDouble rect) { m_rect = rect; }
+
+ wxPoint2DDouble GetPosition() const;
+ void SetPosition(wxPoint2DDouble position);
+
+ NodeType GetNodeType() const { return m_nodeType; }
+ void SetNodeType(NodeType nodeType) { m_nodeType = nodeType; }
+
+ double GetRadius() const { return m_radius; }
+ std::vector<wxPoint2DDouble> GetInTrianglePts() const { return m_triPts; }
+
+ double GetAngle() const { return m_angle; }
+ void SetAngle(double angle) { m_angle = angle; }
+
+ void Rotate(bool clockwise = true);
+
+ void RotateTriPt(double angle);
+
+ void StartMove(wxPoint2DDouble position);
+ void Move(wxPoint2DDouble position);
+ bool Contains(wxPoint2DDouble position) const;
+
+ bool IsConnected() const { return m_connected; }
+ void SetConnected(bool connected = true) { m_connected = connected; }
+
+ int GetID() const { return m_id; }
+ void SetID(int id) { m_id = id; }
+
+protected:
+ int m_id = -1;
+
+ wxRect2DDouble m_rect;
+ NodeType m_nodeType;
+
+ bool m_connected = false;
+
+ wxPoint2DDouble m_moveStartPt;
+ wxPoint2DDouble m_movePos;
+
+ double m_radius = 3.0;
+ std::vector<wxPoint2DDouble> m_triPts;
+ double m_angle = 0.0;
+};
+
class ControlElement : public Element
{
public:
- ControlElement();
+ ControlElement(int id);
~ControlElement();
+ virtual void StartMove(wxPoint2DDouble position);
+ virtual void Move(wxPoint2DDouble position);
+
+ void SetNodeList(std::vector<Node*> nodeList) { m_nodeList = nodeList; }
+ std::vector<Node*> GetNodeList() const { return m_nodeList; }
+
+ virtual void DrawNodes() const;
+
+protected:
+ std::vector<Node*> m_nodeList;
};
#endif // CONTROLELEMENT_H
diff --git a/Project/ControlElementContainer.cpp b/Project/ControlElementContainer.cpp
new file mode 100644
index 0000000..f5372a8
--- /dev/null
+++ b/Project/ControlElementContainer.cpp
@@ -0,0 +1,54 @@
+#include "ControlElementContainer.h"
+#include "ControlEditor.h"
+#include "ControlElement.h"
+
+ControlElementContainer::ControlElementContainer() {}
+ControlElementContainer::~ControlElementContainer() {}
+void ControlElementContainer::FillContainer(ControlEditor* editor)
+{
+ ClearContainer();
+ m_ctrlElementsList = editor->GetControlElementList();
+ m_cLineList = editor->GetConnectionLineList();
+ auto cElementList = editor->GetControlElementList();
+ for(auto it = cElementList.begin(), itEnd = cElementList.end(); it != itEnd; ++it) {
+ if(Constant* constant = dynamic_cast<Constant*>(*it)) {
+ m_constantList.push_back(constant);
+ } else if(Exponential* exponential = dynamic_cast<Exponential*>(*it)) {
+ m_exponentialList.push_back(exponential);
+ } else if(Gain* gain = dynamic_cast<Gain*>(*it)) {
+ m_gainList.push_back(gain);
+ } else if(IOControl* ioControl = dynamic_cast<IOControl*>(*it)) {
+ m_ioControlList.push_back(ioControl);
+ } else if(Limiter* limiter = dynamic_cast<Limiter*>(*it)) {
+ m_limiterList.push_back(limiter);
+ } else if(Multiplier* multiplier = dynamic_cast<Multiplier*>(*it)) {
+ m_multiplierList.push_back(multiplier);
+ } else if(RateLimiter* rateLimiter = dynamic_cast<RateLimiter*>(*it)) {
+ m_rateLimiterList.push_back(rateLimiter);
+ } else if(Sum* sum = dynamic_cast<Sum*>(*it)) {
+ m_sumList.push_back(sum);
+ } else if(TransferFunction* tf = dynamic_cast<TransferFunction*>(*it)) {
+ m_tfList.push_back(tf);
+ }
+ }
+}
+
+void ControlElementContainer::ClearContainer()
+{
+ m_cLineList.clear();
+ m_constantList.clear();
+ m_exponentialList.clear();
+ m_gainList.clear();
+ m_ioControlList.clear();
+ m_limiterList.clear();
+ m_multiplierList.clear();
+ m_rateLimiterList.clear();
+ m_sumList.clear();
+ m_tfList.clear();
+}
+
+void ControlElementContainer::FillContainer(std::vector<ControlElement*> controlElementList, std::vector<ConnectionLine*> connectionLineList)
+{
+ m_ctrlElementsList = controlElementList;
+ m_cLineList = connectionLineList;
+}
diff --git a/Project/ControlElementContainer.h b/Project/ControlElementContainer.h
new file mode 100644
index 0000000..119ba82
--- /dev/null
+++ b/Project/ControlElementContainer.h
@@ -0,0 +1,56 @@
+#ifndef CONTROLELEMENTCONTAINER_H
+#define CONTROLELEMENTCONTAINER_H
+
+#include <vector>
+
+class ControlEditor;
+class ControlElement;
+
+#include "ConnectionLine.h"
+#include "Constant.h"
+#include "Exponential.h"
+#include "Gain.h"
+#include "IOControl.h"
+#include "Limiter.h"
+#include "Multiplier.h"
+#include "RateLimiter.h"
+#include "Sum.h"
+#include "TransferFunction.h"
+
+class ControlElementContainer
+{
+ public:
+ ControlElementContainer();
+ ~ControlElementContainer();
+
+ virtual void FillContainer(ControlEditor* editor);
+ virtual void FillContainer(std::vector<ControlElement*> controlElementList, std::vector<ConnectionLine*> connectionLineList);
+ virtual void ClearContainer();
+
+ std::vector<ControlElement*> GetControlElementsList() const { return m_ctrlElementsList; }
+ std::vector<ConnectionLine*> GetConnectionLineList() const { return m_cLineList; }
+ std::vector<Constant*> GetConstantList() const { return m_constantList; }
+ std::vector<Exponential*> GetExponentialList() const { return m_exponentialList; }
+ std::vector<Gain*> GetGainList() const { return m_gainList; }
+ std::vector<IOControl*> GetIOControlList() const { return m_ioControlList; }
+ std::vector<Limiter*> GetLimiterList() const { return m_limiterList; }
+ std::vector<Multiplier*> GetMultiplierList() const { return m_multiplierList; }
+ std::vector<RateLimiter*> GetRateLimiterList() const { return m_rateLimiterList; }
+ std::vector<Sum*> GetSumList() const { return m_sumList; }
+ std::vector<TransferFunction*> GetTFList() const { return m_tfList; }
+ protected:
+ std::vector<ControlElement*> m_ctrlElementsList;
+ std::vector<Constant*> m_constantList;
+
+ std::vector<ConnectionLine*> m_cLineList;
+ std::vector<Exponential*> m_exponentialList;
+ std::vector<Gain*> m_gainList;
+ std::vector<IOControl*> m_ioControlList;
+ std::vector<Limiter*> m_limiterList;
+ std::vector<Multiplier*> m_multiplierList;
+ std::vector<RateLimiter*> m_rateLimiterList;
+ std::vector<Sum*> m_sumList;
+ std::vector<TransferFunction*> m_tfList;
+};
+
+#endif // CONTROLELEMENTCONTAINER_H
diff --git a/Project/Element.cpp b/Project/Element.cpp
index fa08905..ca24196 100644
--- a/Project/Element.cpp
+++ b/Project/Element.cpp
@@ -1,6 +1,6 @@
#include "Element.h"
-Element::Element() {}
+Element::Element() { m_selectionColour.SetRGBA(0.0, 0.5, 1.0, 0.5); }
Element::~Element() {}
@@ -357,3 +357,38 @@ OpenGLColour::OpenGLColour(GLdouble red, GLdouble green, GLdouble blue, GLdouble
{
SetRGBA(red, green, blue, alpha);
}
+
+double Element::PointToLineDistance(wxPoint2DDouble point, int* segmentNumber) const
+{
+ //[Ref] http://geomalgorithms.com/a02-_lines.html
+ double distance = 100.0; // Big initial distance.
+ wxPoint2DDouble p0 = point;
+
+ for(int i = 1; i < (int)m_pointList.size() - 2; i++) {
+ double d = 0.0;
+
+ wxPoint2DDouble p1 = m_pointList[i];
+ wxPoint2DDouble p2 = m_pointList[i + 1];
+
+ wxPoint2DDouble v = p2 - p1;
+ wxPoint2DDouble w = p0 - p1;
+
+ double c1 = w.m_x * v.m_x + w.m_y * v.m_y;
+ double c2 = v.m_x * v.m_x + v.m_y * v.m_y;
+
+ if(c1 <= 0.0) {
+ d = std::sqrt(std::pow(p0.m_y - p1.m_y, 2) + std::pow(p0.m_x - p1.m_x, 2));
+ } else if(c2 <= c1) {
+ d = std::sqrt(std::pow(p0.m_y - p2.m_y, 2) + std::pow(p0.m_x - p2.m_x, 2));
+ } else {
+ d = std::abs((p2.m_y - p1.m_y) * p0.m_x - (p2.m_x - p1.m_x) * p0.m_y + p2.m_x * p1.m_y - p2.m_y * p1.m_x) /
+ std::sqrt(std::pow(p2.m_y - p1.m_y, 2) + std::pow(p2.m_x - p1.m_x, 2));
+ }
+ if(d < distance) {
+ distance = d;
+ if(segmentNumber) *segmentNumber = i;
+ }
+ }
+
+ return distance;
+}
diff --git a/Project/Element.h b/Project/Element.h
index 8a9f56f..4935f11 100644
--- a/Project/Element.h
+++ b/Project/Element.h
@@ -9,7 +9,7 @@
#include <complex>
-#include <wx/log.h>
+//#include <wx/log.h>
/**
* @enum PickboxID
@@ -225,12 +225,19 @@ public:
virtual std::vector<wxPoint2DDouble> GetPointList() const { return m_pointList; }
/**
- * @brief Add a parent to the element. The parent must be a bus. The element basic points are calculated in this
- * method, so apply this when the element is being inserted.
+ * @brief Add a parent to the element. This method must be used on power elements that connect to a bus, so the
+ * parent must be a bus.
+ * The element basic points are calculated in this method, so apply this when the element is being inserted.
* @param parent Element parent.
* @param position Node position in the parent.
*/
- virtual bool AddParent(Element* parent, wxPoint2DDouble position) = 0;
+ virtual bool AddParent(Element* parent, wxPoint2DDouble position) { return false; }
+
+ /**
+ * @brief Add a parent to the element.
+ * @param parent Element parent.
+ */
+ virtual void AddParent(Element* parent) { m_parentList.push_back(parent); }
/**
* @brief Checks if the element contains a position.
@@ -380,29 +387,29 @@ public:
* @return True if the element constains the pickbox, false otherwise.
*/
virtual bool PickboxContains(wxPoint2DDouble position) { return false; }
-
+
/**
* @brief Move the pickbox.
* @param position position that the pickbox will be moved.
*/
virtual void MovePickbox(wxPoint2DDouble position) {}
-
+
/**
* @brief Get the best cursor to shown to the user when the mouse is above a pickbox.
* @return Cursor.
*/
virtual wxCursor GetBestPickboxCursor() const { return wxCURSOR_ARROW; }
-
+
/**
* @brief Remove the pickboxes.
*/
virtual void ResetPickboxes() { m_activePickboxID = ID_PB_NONE; }
-
+
/**
* @brief Remove the active nodes.
*/
virtual void ResetNodes() { m_activeNodeID = 0; }
-
+
/**
* @brief Convert the element position to screen position.
* @param translation System translation.
@@ -412,7 +419,7 @@ public:
*/
virtual wxPoint2DDouble
WorldToScreen(wxPoint2DDouble translation, double scale, double offsetX = 0.0, double offsetY = 0.0) const;
-
+
/**
* @brief Convert a generic position to screen position.
* @param position Position to be converted.
@@ -426,8 +433,7 @@ public:
double scale,
double offsetX = 0.0,
double offsetY = 0.0) const;
- virtual bool
-
+
/**
* @brief Check if two roteted rectangles intersect.
* @param rect1 First rect.
@@ -435,6 +441,7 @@ public:
* @param angle1 Rotation algle of first rectangle.
* @param angle2 Rotation angle of second rectangle.
*/
+ virtual bool
RotatedRectanglesIntersects(wxRect2DDouble rect1, wxRect2DDouble rect2, double angle1, double angle2) const;
/**
@@ -451,7 +458,7 @@ public:
double finalAngle,
int numSegments,
GLenum mode = GL_LINE_LOOP) const;
-
+
/**
* @brief Draw rectangle.
* @param position Rectangle position.
@@ -460,41 +467,41 @@ public:
* @param mode OpenGl primitive.
*/
virtual void DrawRectangle(wxPoint2DDouble position, double width, double height, GLenum mode = GL_QUADS) const;
-
+
/**
* @brief Draw rectangle.
* @param points Rectangle vertices.
* @param mode OpenGl primitive.
*/
virtual void DrawRectangle(wxPoint2DDouble* points, GLenum mode = GL_QUADS) const;
-
+
/**
* @brief Draw a triangle.
* @param points Triangle vertices.
* @param mode OpenGl primitive.
*/
virtual void DrawTriangle(std::vector<wxPoint2DDouble> points, GLenum mode = GL_TRIANGLES) const;
-
+
/**
* @brief Draw a point.
* @param position Point position.
* @param size Point size.
*/
virtual void DrawPoint(wxPoint2DDouble position, double size) const;
-
+
/**
* @brief Draw line.
* @param points Line vertices.
* @param mode OpenGl primitive.
*/
virtual void DrawLine(std::vector<wxPoint2DDouble> points, GLenum mode = GL_LINE_STRIP) const;
-
+
/**
* @brief Draw pickbox.
* @param position Pickbox position.
*/
virtual void DrawPickbox(wxPoint2DDouble position) const;
-
+
/**
* @brief Rotate a point as element position being the origin.
* @param pointToRotate Point that will be rotated.
@@ -508,16 +515,16 @@ public:
* @return Parent list.
*/
virtual std::vector<Element*> GetParentList() const { return m_parentList; }
-
+
/**
* @brief Get the Child list.
* @return Child List.
*/
virtual std::vector<Element*> GetChildList() const { return m_childList; }
-
- //virtual wxPoint2DDouble GetMoveStartPosition() const { return m_moveStartPt; }
- //virtual wxPoint2DDouble GetMovePosition() const { return m_movePos; }
-
+
+ // virtual wxPoint2DDouble GetMoveStartPosition() const { return m_moveStartPt; }
+ // virtual wxPoint2DDouble GetMovePosition() const { return m_movePos; }
+
/**
* @brief Calculate the element boundaries.
* @param leftUp Top-left position of the element.
@@ -538,7 +545,7 @@ public:
* @return True if the form is shown, false otherwise.
*/
virtual bool ShowForm(wxWindow* parent, Element* element) { return false; }
-
+
/**
* @brief Get a double value from a string. Show a error message if the conversion fail.
* @param parent Message box parent.
@@ -547,7 +554,7 @@ public:
* @param errorMsg Error message.
*/
bool DoubleFromString(wxWindow* parent, wxString strValue, double& value, wxString errorMsg);
-
+
/**
* @brief Convert a string to int. Show a error message if the conversion fail.
* @param parent Message box parent.
@@ -564,6 +571,14 @@ public:
*/
static wxString StringFromDouble(double value, int minDecimal = 1);
+ /**
+ * @brief Calculate the distance between a line (formed by point list) and a point.
+ * @param point origin point.
+ * @param segmentNumber Sotores the segment number clicked
+ * @return The distance between the point and the line.
+ */
+ virtual double PointToLineDistance(wxPoint2DDouble point, int* segmentNumber = NULL) const;
+
protected:
int m_elementID = 0;
std::vector<Element*> m_parentList;
@@ -594,6 +609,8 @@ protected:
wxPoint2DDouble m_movePos;
bool m_online = true;
+
+ OpenGLColour m_selectionColour;
};
#endif // ELEMENT_H
diff --git a/Project/ElementForm.cpp b/Project/ElementForm.cpp
index b77c191..986b28d 100644
--- a/Project/ElementForm.cpp
+++ b/Project/ElementForm.cpp
@@ -2785,3 +2785,779 @@ TextFormBase::~TextFormBase()
m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TextFormBase::OnCancelButtonClick), NULL, this);
}
+
+TransferFunctionFormBase::TransferFunctionFormBase(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_staticTextNumerator = new wxStaticText(m_panelGeneral, wxID_ANY, _("Numerator parameters"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+
+ boxSizerLvl2_1->Add(m_staticTextNumerator, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_textCtrlNumerator = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlNumerator->SetHint(wxT(""));
+ #endif
+
+ boxSizerLvl2_1->Add(m_textCtrlNumerator, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+ m_textCtrlNumerator->SetMinSize(wxSize(300,-1));
+
+ m_staticTextDenominator = new wxStaticText(m_panelGeneral, wxID_ANY, _("Denominator parameters"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+
+ boxSizerLvl2_1->Add(m_staticTextDenominator, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_textCtrlDenominator = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlDenominator->SetHint(wxT(""));
+ #endif
+
+ boxSizerLvl2_1->Add(m_textCtrlDenominator, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+ m_textCtrlDenominator->SetMinSize(wxSize(300,-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("TransferFunctionFormBase"));
+ 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(TransferFunctionFormBase::OnOKClick), NULL, this);
+ m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TransferFunctionFormBase::OnCancelClick), NULL, this);
+
+}
+
+TransferFunctionFormBase::~TransferFunctionFormBase()
+{
+ m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TransferFunctionFormBase::OnOKClick), NULL, this);
+ m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TransferFunctionFormBase::OnCancelClick), NULL, this);
+
+}
+
+SumFormBase::SumFormBase(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_staticTextSigns = new wxStaticText(m_panelGeneral, wxID_ANY, _("Signs"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+
+ boxSizerLvl2_1->Add(m_staticTextSigns, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_textCtrlSigns = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlSigns->SetHint(wxT(""));
+ #endif
+
+ boxSizerLvl2_1->Add(m_textCtrlSigns, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+ m_textCtrlSigns->SetMinSize(wxSize(300,-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("SumFormBase"));
+ 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(SumFormBase::OnOKClick), NULL, this);
+ m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SumFormBase::OnCancelClick), NULL, this);
+
+}
+
+SumFormBase::~SumFormBase()
+{
+ m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SumFormBase::OnOKClick), NULL, this);
+ m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SumFormBase::OnCancelClick), NULL, this);
+
+}
+
+LimiterFormBase::LimiterFormBase(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_staticTextUpLimiter = new wxStaticText(m_panelGeneral, wxID_ANY, _("Upper limit"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+
+ boxSizerLvl2_1->Add(m_staticTextUpLimiter, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_textCtrlUpLimit = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlUpLimit->SetHint(wxT(""));
+ #endif
+
+ boxSizerLvl2_1->Add(m_textCtrlUpLimit, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+ m_textCtrlUpLimit->SetMinSize(wxSize(100,-1));
+
+ m_staticTextLowLimit = new wxStaticText(m_panelGeneral, wxID_ANY, _("Lower limit"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+
+ boxSizerLvl2_1->Add(m_staticTextLowLimit, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_textCtrlLowLimit = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlLowLimit->SetHint(wxT(""));
+ #endif
+
+ boxSizerLvl2_1->Add(m_textCtrlLowLimit, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+ m_textCtrlLowLimit->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("LimiterFormBase"));
+ 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(LimiterFormBase::OnOKButtonClick), NULL, this);
+ m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LimiterFormBase::OnCancelButtonClick), NULL, this);
+
+}
+
+LimiterFormBase::~LimiterFormBase()
+{
+ m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LimiterFormBase::OnOKButtonClick), NULL, this);
+ m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LimiterFormBase::OnCancelButtonClick), NULL, this);
+
+}
+
+RateLimiterFormBase::RateLimiterFormBase(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_staticTextUpLimiter = new wxStaticText(m_panelGeneral, wxID_ANY, _("Upper limit"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+
+ boxSizerLvl2_1->Add(m_staticTextUpLimiter, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_textCtrlUpLimit = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlUpLimit->SetHint(wxT(""));
+ #endif
+
+ boxSizerLvl2_1->Add(m_textCtrlUpLimit, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+ m_textCtrlUpLimit->SetMinSize(wxSize(100,-1));
+
+ m_staticTextLowLimit = new wxStaticText(m_panelGeneral, wxID_ANY, _("Lower limit"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+
+ boxSizerLvl2_1->Add(m_staticTextLowLimit, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_textCtrlLowLimit = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlLowLimit->SetHint(wxT(""));
+ #endif
+
+ boxSizerLvl2_1->Add(m_textCtrlLowLimit, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+ m_textCtrlLowLimit->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("RateLimiterFormBase"));
+ 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(RateLimiterFormBase::OnOKButtonClick), NULL, this);
+ m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RateLimiterFormBase::OnCancelButtonClick), NULL, this);
+
+}
+
+RateLimiterFormBase::~RateLimiterFormBase()
+{
+ m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RateLimiterFormBase::OnOKButtonClick), NULL, this);
+ m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RateLimiterFormBase::OnCancelButtonClick), NULL, this);
+
+}
+
+ExponentialFormBase::ExponentialFormBase(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_staticTextExp = new wxStaticText(m_panelGeneral, wxID_ANY, _("y = A.eB.x"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), wxALIGN_CENTRE);
+
+ boxSizerLvl2_1->Add(m_staticTextExp, 1, wxLEFT|wxRIGHT|wxTOP|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_staticTextAValue = new wxStaticText(m_panelGeneral, wxID_ANY, _("A value"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+
+ boxSizerLvl2_1->Add(m_staticTextAValue, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_textCtrlAValue = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlAValue->SetHint(wxT(""));
+ #endif
+
+ boxSizerLvl2_1->Add(m_textCtrlAValue, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+ m_textCtrlAValue->SetMinSize(wxSize(100,-1));
+
+ m_staticTextBValue = new wxStaticText(m_panelGeneral, wxID_ANY, _("B value"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+
+ boxSizerLvl2_1->Add(m_staticTextBValue, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_textCtrlBValue = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ #if wxVERSION_NUMBER >= 3000
+ m_textCtrlBValue->SetHint(wxT(""));
+ #endif
+
+ boxSizerLvl2_1->Add(m_textCtrlBValue, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+ m_textCtrlBValue->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("ExponentialFormBase"));
+ 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(ExponentialFormBase::OnOKButtonClick), NULL, this);
+ m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ExponentialFormBase::OnCancelButtonClick), NULL, this);
+
+}
+
+ExponentialFormBase::~ExponentialFormBase()
+{
+ m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ExponentialFormBase::OnOKButtonClick), NULL, this);
+ m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ExponentialFormBase::OnCancelButtonClick), NULL, this);
+
+}
+
+ConstantFormBase::ConstantFormBase(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, _("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));
+
+ 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("ConstantFormBase"));
+ 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(ConstantFormBase::OnOKButtonClick), NULL, this);
+ m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ConstantFormBase::OnCancelButtonClick), NULL, this);
+
+}
+
+ConstantFormBase::~ConstantFormBase()
+{
+ m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ConstantFormBase::OnOKButtonClick), NULL, this);
+ 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);
+
+}
+
+IOControlFormBase::IOControlFormBase(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_checkBoxInput = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Input"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ m_checkBoxInput->SetValue(false);
+
+ boxSizerLvl2_1->Add(m_checkBoxInput, 0, wxLEFT|wxRIGHT|wxTOP, WXC_FROM_DIP(5));
+
+ wxArrayString m_choiceInputArr;
+ m_choiceInput = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceInputArr, 0);
+
+ boxSizerLvl2_1->Add(m_choiceInput, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
+
+ m_checkBoxOutput = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Output"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
+ m_checkBoxOutput->SetValue(false);
+
+ boxSizerLvl2_1->Add(m_checkBoxOutput, 0, wxLEFT|wxRIGHT|wxTOP, WXC_FROM_DIP(5));
+
+ wxArrayString m_choiceOutputArr;
+ m_choiceOutput = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceOutputArr, 0);
+
+ boxSizerLvl2_1->Add(m_choiceOutput, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
+
+ 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("IOControlFormBase"));
+ 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_checkBoxInput->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(IOControlFormBase::OnInputChecked), NULL, this);
+ m_checkBoxOutput->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(IOControlFormBase::OnOutputChecked), NULL, this);
+ m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IOControlFormBase::OnOKButtonClick), NULL, this);
+ m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IOControlFormBase::OnCancelButtonClick), NULL, this);
+
+}
+
+IOControlFormBase::~IOControlFormBase()
+{
+ m_checkBoxInput->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(IOControlFormBase::OnInputChecked), NULL, this);
+ m_checkBoxOutput->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(IOControlFormBase::OnOutputChecked), NULL, this);
+ m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IOControlFormBase::OnOKButtonClick), NULL, this);
+ m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IOControlFormBase::OnCancelButtonClick), NULL, this);
+
+}
diff --git a/Project/ElementForm.h b/Project/ElementForm.h
index 9756bc8..2d07908 100644
--- a/Project/ElementForm.h
+++ b/Project/ElementForm.h
@@ -771,4 +771,236 @@ public:
virtual ~TextFormBase();
};
+
+class TransferFunctionFormBase : public wxDialog
+{
+protected:
+ wxNotebook* m_notebook;
+ wxPanel* m_panelGeneral;
+ wxStaticText* m_staticTextNumerator;
+ wxTextCtrl* m_textCtrlNumerator;
+ wxStaticText* m_staticTextDenominator;
+ wxTextCtrl* m_textCtrlDenominator;
+ wxButton* m_buttonOK;
+ wxButton* m_ButtonCancel;
+
+protected:
+ virtual void OnOKClick(wxCommandEvent& event) { event.Skip(); }
+ virtual void OnCancelClick(wxCommandEvent& event) { event.Skip(); }
+
+public:
+ wxStaticText* GetStaticTextNumerator() { return m_staticTextNumerator; }
+ wxTextCtrl* GetTextCtrlNumerator() { return m_textCtrlNumerator; }
+ wxStaticText* GetStaticTextDenominator() { return m_staticTextDenominator; }
+ wxTextCtrl* GetTextCtrlDenominator() { return m_textCtrlDenominator; }
+ wxPanel* GetPanelGeneral() { return m_panelGeneral; }
+ wxNotebook* GetNotebook() { return m_notebook; }
+ wxButton* GetButtonOK() { return m_buttonOK; }
+ wxButton* GetButtonCancel() { return m_ButtonCancel; }
+ TransferFunctionFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Transfer function"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
+ virtual ~TransferFunctionFormBase();
+};
+
+
+class SumFormBase : public wxDialog
+{
+protected:
+ wxNotebook* m_notebook;
+ wxPanel* m_panelGeneral;
+ wxStaticText* m_staticTextSigns;
+ wxTextCtrl* m_textCtrlSigns;
+ wxButton* m_buttonOK;
+ wxButton* m_ButtonCancel;
+
+protected:
+ virtual void OnOKClick(wxCommandEvent& event) { event.Skip(); }
+ virtual void OnCancelClick(wxCommandEvent& event) { event.Skip(); }
+
+public:
+ wxStaticText* GetStaticTextSigns() { return m_staticTextSigns; }
+ wxTextCtrl* GetTextCtrlSigns() { return m_textCtrlSigns; }
+ wxPanel* GetPanelGeneral() { return m_panelGeneral; }
+ wxNotebook* GetNotebook() { return m_notebook; }
+ wxButton* GetButtonOK() { return m_buttonOK; }
+ wxButton* GetButtonCancel() { return m_ButtonCancel; }
+ SumFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Sum"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
+ virtual ~SumFormBase();
+};
+
+
+class LimiterFormBase : public wxDialog
+{
+protected:
+ wxNotebook* m_notebook;
+ wxPanel* m_panelGeneral;
+ wxStaticText* m_staticTextUpLimiter;
+ wxTextCtrl* m_textCtrlUpLimit;
+ wxStaticText* m_staticTextLowLimit;
+ wxTextCtrl* m_textCtrlLowLimit;
+ wxButton* m_buttonOK;
+ wxButton* m_ButtonCancel;
+
+protected:
+ virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
+ virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
+
+public:
+ wxStaticText* GetStaticTextUpLimiter() { return m_staticTextUpLimiter; }
+ wxTextCtrl* GetTextCtrlUpLimit() { return m_textCtrlUpLimit; }
+ wxStaticText* GetStaticTextLowLimit() { return m_staticTextLowLimit; }
+ wxTextCtrl* GetTextCtrlLowLimit() { return m_textCtrlLowLimit; }
+ wxPanel* GetPanelGeneral() { return m_panelGeneral; }
+ wxNotebook* GetNotebook() { return m_notebook; }
+ wxButton* GetButtonOK() { return m_buttonOK; }
+ wxButton* GetButtonCancel() { return m_ButtonCancel; }
+ LimiterFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Limiter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
+ virtual ~LimiterFormBase();
+};
+
+
+class RateLimiterFormBase : public wxDialog
+{
+protected:
+ wxNotebook* m_notebook;
+ wxPanel* m_panelGeneral;
+ wxStaticText* m_staticTextUpLimiter;
+ wxTextCtrl* m_textCtrlUpLimit;
+ wxStaticText* m_staticTextLowLimit;
+ wxTextCtrl* m_textCtrlLowLimit;
+ wxButton* m_buttonOK;
+ wxButton* m_ButtonCancel;
+
+protected:
+ virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
+ virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
+
+public:
+ wxStaticText* GetStaticTextUpLimiter() { return m_staticTextUpLimiter; }
+ wxTextCtrl* GetTextCtrlUpLimit() { return m_textCtrlUpLimit; }
+ wxStaticText* GetStaticTextLowLimit() { return m_staticTextLowLimit; }
+ wxTextCtrl* GetTextCtrlLowLimit() { return m_textCtrlLowLimit; }
+ wxPanel* GetPanelGeneral() { return m_panelGeneral; }
+ wxNotebook* GetNotebook() { return m_notebook; }
+ wxButton* GetButtonOK() { return m_buttonOK; }
+ wxButton* GetButtonCancel() { return m_ButtonCancel; }
+ RateLimiterFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Rate limiter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
+ virtual ~RateLimiterFormBase();
+};
+
+
+class ExponentialFormBase : public wxDialog
+{
+protected:
+ wxNotebook* m_notebook;
+ wxPanel* m_panelGeneral;
+ wxStaticText* m_staticTextExp;
+ wxStaticText* m_staticTextAValue;
+ wxTextCtrl* m_textCtrlAValue;
+ wxStaticText* m_staticTextBValue;
+ wxTextCtrl* m_textCtrlBValue;
+ wxButton* m_buttonOK;
+ wxButton* m_buttonCancel;
+
+protected:
+ virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
+ virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
+
+public:
+ wxStaticText* GetStaticTextExp() { return m_staticTextExp; }
+ wxStaticText* GetStaticTextAValue() { return m_staticTextAValue; }
+ wxTextCtrl* GetTextCtrlAValue() { return m_textCtrlAValue; }
+ wxStaticText* GetStaticTextBValue() { return m_staticTextBValue; }
+ wxTextCtrl* GetTextCtrlBValue() { return m_textCtrlBValue; }
+ wxPanel* GetPanelGeneral() { return m_panelGeneral; }
+ wxNotebook* GetNotebook() { return m_notebook; }
+ wxButton* GetButtonOK() { return m_buttonOK; }
+ wxButton* GetButtonCancel() { return m_buttonCancel; }
+ ExponentialFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Exponential"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
+ virtual ~ExponentialFormBase();
+};
+
+
+class ConstantFormBase : 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; }
+ ConstantFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Constant"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
+ 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();
+};
+
+
+class IOControlFormBase : public wxDialog
+{
+protected:
+ wxNotebook* m_notebook;
+ wxPanel* m_panelGeneral;
+ wxCheckBox* m_checkBoxInput;
+ wxChoice* m_choiceInput;
+ wxCheckBox* m_checkBoxOutput;
+ wxChoice* m_choiceOutput;
+ wxButton* m_buttonOK;
+ wxButton* m_ButtonCancel;
+
+protected:
+ virtual void OnInputChecked(wxCommandEvent& event) { event.Skip(); }
+ virtual void OnOutputChecked(wxCommandEvent& event) { event.Skip(); }
+ virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
+ virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
+
+public:
+ wxCheckBox* GetCheckBoxInput() { return m_checkBoxInput; }
+ wxChoice* GetChoiceInput() { return m_choiceInput; }
+ wxCheckBox* GetCheckBoxOutput() { return m_checkBoxOutput; }
+ wxChoice* GetChoiceOutput() { return m_choiceOutput; }
+ wxPanel* GetPanelGeneral() { return m_panelGeneral; }
+ wxNotebook* GetNotebook() { return m_notebook; }
+ wxButton* GetButtonOK() { return m_buttonOK; }
+ wxButton* GetButtonCancel() { return m_ButtonCancel; }
+ IOControlFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Input / Output"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
+ virtual ~IOControlFormBase();
+};
+
#endif
diff --git a/Project/ElementForm.wxcp b/Project/ElementForm.wxcp
index 877a38d..1b02c55 100644
--- a/Project/ElementForm.wxcp
+++ b/Project/ElementForm.wxcp
@@ -1,7 +1,7 @@
{
"metadata": {
"m_generatedFilesDir": ".",
- "m_objCounter": 1580,
+ "m_objCounter": 1833,
"m_includeFiles": [],
"m_bitmapFunction": "wxC9EE9InitBitmapResources",
"m_bitmapsFile": "ElementFormBitmaps.cpp",
@@ -29334,5 +29334,6616 @@
}]
}]
}]
+ }, {
+ "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": "TransferFunctionFormBase"
+ }, {
+ "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": "Transfer function"
+ }, {
+ "type": "virtualFolderPicker",
+ "m_label": "Virtual Folder:",
+ "m_path": "Project:wxcrafter"
+ }, {
+ "type": "choice",
+ "m_label": "Centre:",
+ "m_selection": 1,
+ "m_options": ["", "wxBOTH", "wxVERTICAL", "wxHORIZONTAL"]
+ }, {
+ "type": "string",
+ "m_label": "Inherited Class",
+ "m_value": "TransferFunctionForm"
+ }, {
+ "type": "string",
+ "m_label": "File:",
+ "m_value": "TransferFunctionForm"
+ }, {
+ "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_staticTextNumerator"
+ }, {
+ "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": "Numerator parameters"
+ }, {
+ "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": "300,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_textCtrlNumerator"
+ }, {
+ "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": 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_staticTextDenominator"
+ }, {
+ "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": "Denominator parameters"
+ }, {
+ "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": "300,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_textCtrlDenominator"
+ }, {
+ "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": "OnOKClick(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": "OnCancelClick(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": "SumFormBase"
+ }, {
+ "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": "Sum"
+ }, {
+ "type": "virtualFolderPicker",
+ "m_label": "Virtual Folder:",
+ "m_path": "Project:wxcrafter"
+ }, {
+ "type": "choice",
+ "m_label": "Centre:",
+ "m_selection": 1,
+ "m_options": ["", "wxBOTH", "wxVERTICAL", "wxHORIZONTAL"]
+ }, {
+ "type": "string",
+ "m_label": "Inherited Class",
+ "m_value": "SumForm"
+ }, {
+ "type": "string",
+ "m_label": "File:",
+ "m_value": "SumForm"
+ }, {
+ "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_staticTextSigns"
+ }, {
+ "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": "Signs"
+ }, {
+ "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": "300,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_textCtrlSigns"
+ }, {
+ "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": "OnOKClick(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": "OnCancelClick(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": "LimiterFormBase"
+ }, {
+ "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": "Limiter"
+ }, {
+ "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": "LimiterForm"
+ }, {
+ "type": "string",
+ "m_label": "File:",
+ "m_value": "LimiterForm"
+ }, {
+ "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_staticTextUpLimiter"
+ }, {
+ "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": "Upper limit"
+ }, {
+ "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_textCtrlUpLimit"
+ }, {
+ "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": 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_staticTextLowLimit"
+ }, {
+ "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": "Lower limit"
+ }, {
+ "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_textCtrlLowLimit"
+ }, {
+ "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": "RateLimiterFormBase"
+ }, {
+ "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": "Rate limiter"
+ }, {
+ "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": "RateLimiterForm"
+ }, {
+ "type": "string",
+ "m_label": "File:",
+ "m_value": "RateLimiterForm"
+ }, {
+ "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_staticTextUpLimiter"
+ }, {
+ "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": "Upper limit"
+ }, {
+ "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_textCtrlUpLimit"
+ }, {
+ "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": 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_staticTextLowLimit"
+ }, {
+ "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": "Lower limit"
+ }, {
+ "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_textCtrlLowLimit"
+ }, {
+ "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": "ExponentialFormBase"
+ }, {
+ "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": "Exponential"
+ }, {
+ "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": "ExponentialForm"
+ }, {
+ "type": "string",
+ "m_label": "File:",
+ "m_value": "ExponentialForm"
+ }, {
+ "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": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxALIGN_CENTRE"],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxEXPAND", "wxALIGN_CENTER_HORIZONTAL", "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_staticTextExp"
+ }, {
+ "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": "y = A.eB.x"
+ }, {
+ "type": "string",
+ "m_label": "Wrap:",
+ "m_value": "-1"
+ }],
+ "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_staticTextAValue"
+ }, {
+ "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": "A 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_textCtrlAValue"
+ }, {
+ "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": 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_staticTextBValue"
+ }, {
+ "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": "B 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_textCtrlBValue"
+ }, {
+ "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": "ConstantFormBase"
+ }, {
+ "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": "Constant"
+ }, {
+ "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": "ConstantForm"
+ }, {
+ "type": "string",
+ "m_label": "File:",
+ "m_value": "ConstantForm"
+ }, {
+ "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": "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:",
+ "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": "IOControlFormBase"
+ }, {
+ "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": "Input / Output"
+ }, {
+ "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": "IOControlForm"
+ }, {
+ "type": "string",
+ "m_label": "File:",
+ "m_value": "IOControlForm"
+ }, {
+ "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": 4415,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP"],
+ "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_checkBoxInput"
+ }, {
+ "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": "Input"
+ }, {
+ "type": "bool",
+ "m_label": "Value:",
+ "m_value": false
+ }],
+ "m_events": [{
+ "m_eventName": "wxEVT_COMMAND_CHECKBOX_CLICKED",
+ "m_eventClass": "wxCommandEvent",
+ "m_eventHandler": "wxCommandEventHandler",
+ "m_functionNameAndSignature": "OnInputChecked(wxCommandEvent& event)",
+ "m_description": "Process a wxEVT_COMMAND_CHECKBOX_CLICKED event, when the checkbox is clicked.",
+ "m_noBody": false
+ }],
+ "m_children": []
+ }, {
+ "m_type": 4411,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "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_choiceInput"
+ }, {
+ "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": "Choices:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Selection:",
+ "m_value": ""
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4415,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP"],
+ "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_checkBoxOutput"
+ }, {
+ "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": "Output"
+ }, {
+ "type": "bool",
+ "m_label": "Value:",
+ "m_value": false
+ }],
+ "m_events": [{
+ "m_eventName": "wxEVT_COMMAND_CHECKBOX_CLICKED",
+ "m_eventClass": "wxCommandEvent",
+ "m_eventHandler": "wxCommandEventHandler",
+ "m_functionNameAndSignature": "OnOutputChecked(wxCommandEvent& event)",
+ "m_description": "Process a wxEVT_COMMAND_CHECKBOX_CLICKED event, when the checkbox is clicked.",
+ "m_noBody": false
+ }],
+ "m_children": []
+ }, {
+ "m_type": 4411,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "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_choiceOutput"
+ }, {
+ "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": "Choices:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Selection:",
+ "m_value": ""
+ }],
+ "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": []
+ }]
+ }]
+ }]
}]
} \ No newline at end of file
diff --git a/Project/ElementFormBitmaps.cpp b/Project/ElementFormBitmaps.cpp
index 6d7225c..b955c05 100644
--- a/Project/ElementFormBitmaps.cpp
+++ b/Project/ElementFormBitmaps.cpp
@@ -44,6 +44,6 @@ void wxC9EE9InitBitmapResources()
else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase);
}
- XRC_ADD_FILE(wxT("XRC_resource/ElementFormBitmaps.cpp$C__Users_Thales_Documents_GitHub_PSP_Project_ElementFormBitmaps.xrc"), xml_res_file_0, xml_res_size_0, wxT("text/xml"));
- wxXmlResource::Get()->Load(wxT("memory:XRC_resource/ElementFormBitmaps.cpp$C__Users_Thales_Documents_GitHub_PSP_Project_ElementFormBitmaps.xrc"));
+ XRC_ADD_FILE(wxT("XRC_resource/ElementFormBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_ElementFormBitmaps.xrc"), xml_res_file_0, xml_res_size_0, wxT("text/xml"));
+ wxXmlResource::Get()->Load(wxT("memory:XRC_resource/ElementFormBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_ElementFormBitmaps.xrc"));
}
diff --git a/Project/Exponential.cpp b/Project/Exponential.cpp
new file mode 100644
index 0000000..7c4f1fe
--- /dev/null
+++ b/Project/Exponential.cpp
@@ -0,0 +1,113 @@
+#include "Exponential.h"
+#include "ExponentialForm.h"
+
+Exponential::Exponential(int id) : ControlElement(id)
+{
+ m_width = m_height = 36.0;
+ Node* nodeIn = new Node(m_position + wxPoint2DDouble(-18, 0), Node::NODE_IN, m_borderSize);
+ nodeIn->StartMove(m_position);
+ Node* nodeOut = new Node(m_position + wxPoint2DDouble(18, 0), Node::NODE_OUT, m_borderSize);
+ nodeOut->SetAngle(180.0);
+ nodeOut->StartMove(m_position);
+ m_nodeList.push_back(nodeIn);
+ m_nodeList.push_back(nodeOut);
+}
+
+Exponential::~Exponential() {}
+void Exponential::Draw(wxPoint2DDouble translation, double scale) const
+{
+ glLineWidth(1.0);
+ if(m_selected) {
+ glColor4dv(m_selectionColour.GetRGBA());
+ double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
+ DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
+ }
+ glColor4d(1.0, 1.0, 1.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
+
+ // Plot symbol.
+ std::vector<wxPoint2DDouble> axis;
+ axis.push_back(m_position + wxPoint2DDouble(-13, 13));
+ axis.push_back(m_position + wxPoint2DDouble(13, 13));
+ axis.push_back(m_position + wxPoint2DDouble(-13, -13));
+ axis.push_back(m_position + wxPoint2DDouble(-13, 13));
+ DrawLine(axis, GL_LINES);
+
+ glLineWidth(2.0);
+ std::vector<wxPoint2DDouble> expSymbol;
+ expSymbol.push_back(m_position + wxPoint2DDouble(-13, 13));
+ expSymbol.push_back(m_position + wxPoint2DDouble(-6, 13));
+ expSymbol.push_back(m_position + wxPoint2DDouble(2, 12));
+ expSymbol.push_back(m_position + wxPoint2DDouble(4, 11));
+ expSymbol.push_back(m_position + wxPoint2DDouble(6, 10));
+ expSymbol.push_back(m_position + wxPoint2DDouble(8, 7));
+ expSymbol.push_back(m_position + wxPoint2DDouble(11, -1));
+ expSymbol.push_back(m_position + wxPoint2DDouble(12, -7));
+ expSymbol.push_back(m_position + wxPoint2DDouble(13, -13));
+ glColor4d(0.0, 0.3, 1.0, 1.0);
+ DrawLine(expSymbol);
+
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawNodes();
+}
+
+bool Exponential::ShowForm(wxWindow* parent, Element* element)
+{
+ ExponentialForm* form = new ExponentialForm(parent, this);
+ if(form->ShowModal() == wxID_OK) {
+ form->Destroy();
+ return true;
+ }
+ form->Destroy();
+ return false;
+}
+
+void Exponential::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 Exponential::UpdatePoints()
+{
+ if(m_angle == 0.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(18, 0));
+ } else if(m_angle == 90.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -18));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, 18));
+ } else if(m_angle == 180.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(18, 0));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
+ } else if(m_angle == 270.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, 18));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, -18));
+ }
+}
+
+void Exponential::GetValues(double& aValue, double& bValue)
+{
+ aValue = m_aValue;
+ bValue = m_bValue;
+}
+
+void Exponential::SetValues(double aValue, double bValue)
+{
+ m_aValue = aValue;
+ m_bValue = bValue;
+}
diff --git a/Project/Exponential.h b/Project/Exponential.h
new file mode 100644
index 0000000..8260d66
--- /dev/null
+++ b/Project/Exponential.h
@@ -0,0 +1,31 @@
+#ifndef EXPONENTIAL_H
+#define EXPONENTIAL_H
+
+#include "ControlElement.h"
+
+class ExponentialForm;
+
+class Exponential : public ControlElement
+{
+public:
+ Exponential(int id);
+ ~Exponential();
+
+ 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 UpdatePoints();
+
+ virtual void GetValues(double& aValue, double &bValue);
+ virtual void SetValues(double aValue, double bValue);
+
+protected:
+ double m_aValue = 0.001;
+ double m_bValue = 5.0;
+
+};
+
+#endif // EXPONENTIAL_H
diff --git a/Project/ExponentialForm.cpp b/Project/ExponentialForm.cpp
new file mode 100644
index 0000000..a2b487a
--- /dev/null
+++ b/Project/ExponentialForm.cpp
@@ -0,0 +1,44 @@
+#include "ExponentialForm.h"
+#include "Exponential.h"
+
+ExponentialForm::ExponentialForm(wxWindow* parent, Exponential* exponential) : ExponentialFormBase(parent)
+{
+ wxString expSymbol = wxString::FromUTF8("\xF0\x9D\x91\x92");
+ wxString superscriptCapitalB = wxString::FromUTF8("\xE1\xB4\xAE");
+ wxString superscriptSmallX = wxString::FromUTF8("\xCB\xA3");
+ m_staticTextExp->SetLabel("y = A" + expSymbol + superscriptCapitalB + superscriptSmallX);
+
+ wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
+ font.SetPointSize(14);
+ m_staticTextExp->SetFont(font);
+
+ m_parent = parent;
+ m_exponential = exponential;
+
+ double a, b;
+ m_exponential->GetValues(a, b);
+ m_textCtrlAValue->SetValue(m_exponential->StringFromDouble(a));
+ m_textCtrlBValue->SetValue(m_exponential->StringFromDouble(b));
+
+ SetInitialSize();
+ Layout();
+}
+
+ExponentialForm::~ExponentialForm() {}
+void ExponentialForm::OnOKButtonClick(wxCommandEvent& event)
+{
+ if(ValidateData()) EndModal(wxID_OK);
+}
+
+bool ExponentialForm::ValidateData()
+{
+ double a, b;
+ if(!m_exponential->DoubleFromString(this, m_textCtrlAValue->GetValue(), a,
+ _("Value entered incorrectly in the field \"A value\".")))
+ return false;
+ if(!m_exponential->DoubleFromString(this, m_textCtrlBValue->GetValue(), b,
+ _("Value entered incorrectly in the field \"B value\".")))
+ return false;
+ m_exponential->SetValues(a, b);
+ return true;
+}
diff --git a/Project/ExponentialForm.h b/Project/ExponentialForm.h
new file mode 100644
index 0000000..c53ef9f
--- /dev/null
+++ b/Project/ExponentialForm.h
@@ -0,0 +1,21 @@
+#ifndef EXPONENTIALFORM_H
+#define EXPONENTIALFORM_H
+#include "ElementForm.h"
+
+class Exponential;
+
+class ExponentialForm : public ExponentialFormBase
+{
+ public:
+ ExponentialForm(wxWindow* parent, Exponential* exponential);
+ virtual ~ExponentialForm();
+ virtual bool ValidateData();
+
+ protected:
+ virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
+ virtual void OnOKButtonClick(wxCommandEvent& event);
+
+ wxWindow* m_parent = NULL;
+ Exponential* m_exponential = NULL;
+};
+#endif // EXPONENTIALFORM_H
diff --git a/Project/FileHanding.cpp b/Project/FileHanding.cpp
index 1eec1ee..ac649bb 100644
--- a/Project/FileHanding.cpp
+++ b/Project/FileHanding.cpp
@@ -1,11 +1,9 @@
#include "FileHanding.h"
FileHanding::~FileHanding() {}
-
FileHanding::FileHanding(Workspace* workspace) { m_workspace = workspace; }
-
+FileHanding::FileHanding(ControlEditor* controlEditor) { m_controlEditor = controlEditor; }
FileHanding::FileHanding() {}
-
void FileHanding::SaveProject(wxFileName path)
{
// Erase the file (if exists or not) and write the initial data
@@ -99,7 +97,7 @@ void FileHanding::SaveProject(wxFileName path)
data.number = i;
bus->SetElectricalData(data);
- } //}
+ } //}
//{ Capacitor
auto capacitorsNode = AppendNode(doc, elementsNode, "CapacitorList");
@@ -150,7 +148,7 @@ void FileHanding::SaveProject(wxFileName path)
auto swTime = AppendNode(doc, switching, "Time");
SetNodeValue(doc, swTime, swData.swTime[j]);
}
- } //}
+ } //}
//{ IndMotor
auto indMotorsNode = AppendNode(doc, elementsNode, "IndMotorList");
@@ -193,7 +191,7 @@ void FileHanding::SaveProject(wxFileName path)
auto reactivePower = AppendNode(doc, electricalProp, "ReactivePower");
SetNodeValue(doc, reactivePower, data.reactivePower);
SetNodeAttribute(doc, reactivePower, "UnitID", data.reactivePowerUnit);
- } //}
+ } //}
//{ Inductor
auto inductorsNode = AppendNode(doc, elementsNode, "InductorList");
@@ -244,7 +242,7 @@ void FileHanding::SaveProject(wxFileName path)
auto swTime = AppendNode(doc, switching, "Time");
SetNodeValue(doc, swTime, swData.swTime[j]);
}
- } //}
+ } //}
//{ Line
auto linesNode = AppendNode(doc, elementsNode, "LineList");
@@ -323,7 +321,7 @@ void FileHanding::SaveProject(wxFileName path)
auto swTime = AppendNode(doc, switching, "Time");
SetNodeValue(doc, swTime, swData.swTime[j]);
}
- } //}
+ } //}
//{ Load
auto loadsNode = AppendNode(doc, elementsNode, "LoadList");
@@ -379,7 +377,7 @@ void FileHanding::SaveProject(wxFileName path)
auto swTime = AppendNode(doc, switching, "Time");
SetNodeValue(doc, swTime, swData.swTime[j]);
}
- } //}
+ } //}
//{ SyncGenerator
auto syncGeneratorsNode = AppendNode(doc, elementsNode, "SyncGeneratorList");
@@ -509,7 +507,7 @@ void FileHanding::SaveProject(wxFileName path)
auto swTime = AppendNode(doc, switching, "Time");
SetNodeValue(doc, swTime, swData.swTime[j]);
}
- } //}
+ } //}
//{ SyncMotor
auto syncMotorsNode = AppendNode(doc, elementsNode, "SyncMotorList");
@@ -638,7 +636,7 @@ void FileHanding::SaveProject(wxFileName path)
auto swTime = AppendNode(doc, switching, "Time");
SetNodeValue(doc, swTime, swData.swTime[j]);
}*/
- } //}
+ } //}
//{ Transfomer
auto transformersNode = AppendNode(doc, elementsNode, "TransformerList");
@@ -738,7 +736,7 @@ void FileHanding::SaveProject(wxFileName path)
auto swTime = AppendNode(doc, switching, "Time");
SetNodeValue(doc, swTime, swData.swTime[j]);
}
- } //}
+ } //}
//{ Text
auto textsNode = AppendNode(doc, elementsNode, "TextList");
@@ -829,7 +827,7 @@ bool FileHanding::OpenProject(wxFileName path)
double angle = GetNodeValueDouble(cadPropNode, "Angle");
bus->SetWidth(width);
bus->SetHeight(height);
- bus->SetPosition(bus->GetPosition()); // Update bus rectangle.
+ bus->SetPosition(bus->GetPosition()); // Update bus rectangle.
int numRot = angle / bus->GetRotationAngle();
bool clockwise = true;
if(numRot < 0) {
@@ -867,7 +865,7 @@ bool FileHanding::OpenProject(wxFileName path)
elementList.push_back(bus);
busList.push_back(bus);
busNode = busNode->next_sibling("Bus");
- } //}
+ } //}
//{ Capacitor
auto capacitorListNode = elementsNode->first_node("CapacitorList");
@@ -939,7 +937,7 @@ bool FileHanding::OpenProject(wxFileName path)
elementList.push_back(capacitor);
capacitorList.push_back(capacitor);
capacitorNode = capacitorNode->next_sibling("Capacitor");
- } //}
+ } //}
//{ IndMotor
auto indMotorListNode = elementsNode->first_node("IndMotorList");
@@ -1002,7 +1000,7 @@ bool FileHanding::OpenProject(wxFileName path)
elementList.push_back(indMotor);
indMotorList.push_back(indMotor);
indMotorNode = indMotorNode->next_sibling("IndMotor");
- } //}
+ } //}
//{ Inductor
auto inductorListNode = elementsNode->first_node("InductorList");
@@ -1074,7 +1072,7 @@ bool FileHanding::OpenProject(wxFileName path)
elementList.push_back(inductor);
inductorList.push_back(inductor);
inductorNode = inductorNode->next_sibling("Inductor");
- } //}
+ } //}
//{ Line
auto lineListNode = elementsNode->first_node("LineList");
@@ -1102,7 +1100,7 @@ bool FileHanding::OpenProject(wxFileName path)
auto parentIDList = cadPropNode->first_node("ParentIDList");
if(!parentIDList) return false;
auto parentNode = parentIDList->first_node("ParentID");
- long parentID[2] = { -1, -1 };
+ long parentID[2] = {-1, -1};
while(parentNode) {
long index = 0;
wxString(parentNode->first_attribute("ID")->value()).ToLong(&index);
@@ -1182,7 +1180,7 @@ bool FileHanding::OpenProject(wxFileName path)
elementList.push_back(line);
lineList.push_back(line);
lineNode = lineNode->next_sibling("Line");
- } //}
+ } //}
//{ Load
auto loadListNode = elementsNode->first_node("LoadList");
@@ -1257,7 +1255,7 @@ bool FileHanding::OpenProject(wxFileName path)
elementList.push_back(load);
loadList.push_back(load);
loadNode = loadNode->next_sibling("Load");
- } //}
+ } //}
//{ SyncGenerator
auto syncGeneratorListNode = elementsNode->first_node("SyncGeneratorList");
@@ -1375,7 +1373,7 @@ bool FileHanding::OpenProject(wxFileName path)
elementList.push_back(syncGenerator);
syncGeneratorList.push_back(syncGenerator);
syncGeneratorNode = syncGeneratorNode->next_sibling("SyncGenerator");
- } //}
+ } //}
//{ SyncMotor
auto syncMotorListNode = elementsNode->first_node("SyncMotorList");
@@ -1472,7 +1470,7 @@ bool FileHanding::OpenProject(wxFileName path)
elementList.push_back(syncMotor);
syncMotorList.push_back(syncMotor);
syncMotorNode = syncMotorNode->next_sibling("SyncMotor");
- } //}
+ } //}
//{ Transformer
auto transformerListNode = elementsNode->first_node("TransformerList");
@@ -1508,7 +1506,7 @@ bool FileHanding::OpenProject(wxFileName path)
auto parentIDList = cadPropNode->first_node("ParentIDList");
if(!parentIDList) return false;
auto parentNode = parentIDList->first_node("ParentID");
- long parentID[2] = { -1, -1 };
+ long parentID[2] = {-1, -1};
while(parentNode) {
long index = 0;
wxString(parentNode->first_attribute("ID")->value()).ToLong(&index);
@@ -1602,7 +1600,7 @@ bool FileHanding::OpenProject(wxFileName path)
elementList.push_back(transformer);
transformerList.push_back(transformer);
transfomerNode = transfomerNode->next_sibling("Transfomer");
- } //}
+ } //}
m_workspace->SetElementList(elementList);
@@ -1611,7 +1609,6 @@ bool FileHanding::OpenProject(wxFileName path)
if(!textListNode) return false;
auto textNode = textListNode->first_node("Text");
while(textNode) {
-
auto cadPropNode = textNode->first_node("CADProperties");
if(!cadPropNode) return false;
@@ -1630,7 +1627,7 @@ bool FileHanding::OpenProject(wxFileName path)
auto textProperties = textNode->first_node("TextProperties");
if(!textProperties) return false;
-
+
text->SetElementType((ElementType)GetNodeValueDouble(textProperties, "ElementType"));
text->SetDataType((DataType)GetNodeValueDouble(textProperties, "DataType"));
text->SetUnit((ElectricalUnit)GetNodeValueDouble(textProperties, "DataUnit"));
@@ -1689,16 +1686,907 @@ bool FileHanding::OpenProject(wxFileName path)
textList.push_back(text);
textNode = textNode->next_sibling("Text");
- } //}
+ } //}
m_workspace->SetTextList(textList);
return true;
}
+void FileHanding::SaveControl(wxFileName path)
+{
+ // Same process present in SaveProject():
+ std::ofstream writeProjectsFile(path.GetFullPath());
+ writeProjectsFile.close();
+
+ rapidxml::xml_document<> doc;
+ rapidxml::file<> xmlFile(path.GetFullPath());
+ doc.parse<0>(xmlFile.data());
+
+ rapidxml::xml_node<>* decl = doc.allocate_node(rapidxml::node_declaration);
+ rapidxml::xml_attribute<>* ver = doc.allocate_attribute("version", "1.0");
+ rapidxml::xml_attribute<>* encoding = doc.allocate_attribute("encoding", "utf-8");
+ decl->append_attribute(ver);
+ decl->append_attribute(encoding);
+ doc.append_node(decl);
+
+ rapidxml::xml_node<>* rootNode = doc.allocate_node(rapidxml::node_element, "Control");
+ doc.append_node(rootNode);
+
+ rapidxml::xml_node<>* projectNameNode = AppendNode(doc, rootNode, "Name");
+ SetNodeValue(doc, projectNameNode, path.GetName());
+
+ auto elementsNode = AppendNode(doc, rootNode, "ControlElements");
+ SaveControlElements(doc, elementsNode);
+ std::ofstream writeXML(path.GetFullPath());
+ writeXML << doc;
+ writeXML.close();
+}
+
+bool FileHanding::OpenControl(wxFileName path,
+ std::vector<ControlElement*>& ctrlElementList,
+ std::vector<ConnectionLine*>& ctrlConnectionList)
+{
+ rapidxml::xml_document<> doc;
+ rapidxml::file<> xmlFile(path.GetFullPath());
+
+ doc.parse<0>(xmlFile.data());
+
+ auto projectNode = doc.first_node("Control");
+ if(!projectNode) return false;
+ // auto nameNode = projectNode->first_node("Name");
+ // if(!nameNode) return false;
+ // m_controlEditor->SetName(nameNode->value());
+
+ // Open elements
+ auto elementsNode = projectNode->first_node("ControlElements");
+ if(!elementsNode) return false;
+
+ // auto elementsNode = AppendNode(doc, rootNode, "ControlElements");
+ ControlElementContainer* ctrlElementContainer = new ControlElementContainer();
+ if(!OpenControlElements(doc, elementsNode, ctrlElementContainer)) return false;
+ ctrlElementList = ctrlElementContainer->GetControlElementsList();
+ ctrlConnectionList = ctrlElementContainer->GetConnectionLineList();
+ return true;
+}
+
+void FileHanding::SaveControlElements(rapidxml::xml_document<>& doc,
+ rapidxml::xml_node<>* elementsNode,
+ ControlElementContainer* ctrlContainer)
+{
+ if(!ctrlContainer) {
+ ctrlContainer = new ControlElementContainer();
+ ctrlContainer->FillContainer(m_controlEditor);
+ }
+
+ //{ Constant
+ auto constsNode = AppendNode(doc, elementsNode, "ConstantList");
+ auto constList = ctrlContainer->GetConstantList();
+ for(auto it = constList.begin(), itEnd = constList.end(); it != itEnd; ++it) {
+ Constant* constant = *it;
+ auto constNode = AppendNode(doc, constsNode, "Constant");
+ SetNodeAttribute(doc, constNode, "ID", constant->GetID());
+ auto cadProp = AppendNode(doc, constNode, "CADProperties");
+ auto position = AppendNode(doc, cadProp, "Position");
+ auto posX = AppendNode(doc, position, "X");
+ SetNodeValue(doc, posX, constant->GetPosition().m_x);
+ auto posY = AppendNode(doc, position, "Y");
+ SetNodeValue(doc, posY, constant->GetPosition().m_y);
+ auto size = AppendNode(doc, cadProp, "Size");
+ auto width = AppendNode(doc, size, "Width");
+ SetNodeValue(doc, width, constant->GetWidth());
+ auto height = AppendNode(doc, size, "Height");
+ SetNodeValue(doc, height, constant->GetHeight());
+ auto angle = AppendNode(doc, cadProp, "Angle");
+ SetNodeValue(doc, angle, constant->GetAngle());
+
+ // Nodes
+ auto nodeList = AppendNode(doc, constNode, "NodeList");
+ SaveControlNodes(doc, nodeList, constant->GetNodeList());
+
+ // Control properties
+ auto value = AppendNode(doc, constNode, "Value");
+ SetNodeValue(doc, value, constant->GetValue());
+ } //}
+
+ //{ Exponential
+ auto expsNode = AppendNode(doc, elementsNode, "ExponentialList");
+ auto expList = ctrlContainer->GetExponentialList();
+ for(auto it = expList.begin(), itEnd = expList.end(); it != itEnd; ++it) {
+ Exponential* exponential = *it;
+ auto expNode = AppendNode(doc, expsNode, "Exponential");
+ SetNodeAttribute(doc, expNode, "ID", exponential->GetID());
+ auto cadProp = AppendNode(doc, expNode, "CADProperties");
+ auto position = AppendNode(doc, cadProp, "Position");
+ auto posX = AppendNode(doc, position, "X");
+ SetNodeValue(doc, posX, exponential->GetPosition().m_x);
+ auto posY = AppendNode(doc, position, "Y");
+ SetNodeValue(doc, posY, exponential->GetPosition().m_y);
+ auto size = AppendNode(doc, cadProp, "Size");
+ auto width = AppendNode(doc, size, "Width");
+ SetNodeValue(doc, width, exponential->GetWidth());
+ auto height = AppendNode(doc, size, "Height");
+ SetNodeValue(doc, height, exponential->GetHeight());
+ auto angle = AppendNode(doc, cadProp, "Angle");
+ SetNodeValue(doc, angle, exponential->GetAngle());
+
+ // Nodes
+ auto nodeList = AppendNode(doc, expNode, "NodeList");
+ SaveControlNodes(doc, nodeList, exponential->GetNodeList());
+
+ // Control properties
+ double a, b;
+ exponential->GetValues(a, b);
+ auto value = AppendNode(doc, expNode, "Value");
+ auto aValue = AppendNode(doc, value, "A");
+ SetNodeValue(doc, aValue, a);
+ auto bValue = AppendNode(doc, value, "B");
+ SetNodeValue(doc, bValue, b);
+ } //}
+
+ //{ Gain
+ auto gainsNode = AppendNode(doc, elementsNode, "GainList");
+ auto gainList = ctrlContainer->GetGainList();
+ for(auto it = gainList.begin(), itEnd = gainList.end(); it != itEnd; ++it) {
+ Gain* gain = *it;
+ auto gainNode = AppendNode(doc, gainsNode, "Gain");
+ SetNodeAttribute(doc, gainNode, "ID", gain->GetID());
+ auto cadProp = AppendNode(doc, gainNode, "CADProperties");
+ auto position = AppendNode(doc, cadProp, "Position");
+ auto posX = AppendNode(doc, position, "X");
+ SetNodeValue(doc, posX, gain->GetPosition().m_x);
+ auto posY = AppendNode(doc, position, "Y");
+ SetNodeValue(doc, posY, gain->GetPosition().m_y);
+ auto size = AppendNode(doc, cadProp, "Size");
+ auto width = AppendNode(doc, size, "Width");
+ SetNodeValue(doc, width, gain->GetWidth());
+ auto height = AppendNode(doc, size, "Height");
+ SetNodeValue(doc, height, gain->GetHeight());
+ auto angle = AppendNode(doc, cadProp, "Angle");
+ SetNodeValue(doc, angle, gain->GetAngle());
+
+ // Nodes
+ auto nodeList = AppendNode(doc, gainNode, "NodeList");
+ SaveControlNodes(doc, nodeList, gain->GetNodeList());
+
+ // Control properties
+ auto value = AppendNode(doc, gainNode, "Value");
+ SetNodeValue(doc, value, gain->GetValue());
+ } //}
+
+ //{ IO
+ auto iosNode = AppendNode(doc, elementsNode, "IOList");
+ auto ioList = ctrlContainer->GetIOControlList();
+ for(auto it = ioList.begin(), itEnd = ioList.end(); it != itEnd; ++it) {
+ IOControl* io = *it;
+ auto ioNode = AppendNode(doc, iosNode, "IO");
+ SetNodeAttribute(doc, ioNode, "ID", io->GetID());
+ auto cadProp = AppendNode(doc, ioNode, "CADProperties");
+ auto position = AppendNode(doc, cadProp, "Position");
+ auto posX = AppendNode(doc, position, "X");
+ SetNodeValue(doc, posX, io->GetPosition().m_x);
+ auto posY = AppendNode(doc, position, "Y");
+ SetNodeValue(doc, posY, io->GetPosition().m_y);
+ auto size = AppendNode(doc, cadProp, "Size");
+ auto width = AppendNode(doc, size, "Width");
+ SetNodeValue(doc, width, io->GetWidth());
+ auto height = AppendNode(doc, size, "Height");
+ SetNodeValue(doc, height, io->GetHeight());
+ auto angle = AppendNode(doc, cadProp, "Angle");
+ SetNodeValue(doc, angle, io->GetAngle());
+
+ // Nodes
+ auto nodeList = AppendNode(doc, ioNode, "NodeList");
+ SaveControlNodes(doc, nodeList, io->GetNodeList());
+
+ // Control properties
+ auto value = AppendNode(doc, ioNode, "Value");
+ SetNodeValue(doc, value, io->GetValue());
+ auto ioFlags = AppendNode(doc, ioNode, "IOFlags");
+ SetNodeValue(doc, ioFlags, io->GetIOFlags());
+ }//}
+
+ //{ Limiter
+ auto limitersNode = AppendNode(doc, elementsNode, "LimiterList");
+ auto limiterList = ctrlContainer->GetLimiterList();
+ for(auto it = limiterList.begin(), itEnd = limiterList.end(); it != itEnd; ++it) {
+ Limiter* limiter = *it;
+ auto limiterNode = AppendNode(doc, limitersNode, "Limiter");
+ SetNodeAttribute(doc, limiterNode, "ID", limiter->GetID());
+ auto cadProp = AppendNode(doc, limiterNode, "CADProperties");
+ auto position = AppendNode(doc, cadProp, "Position");
+ auto posX = AppendNode(doc, position, "X");
+ SetNodeValue(doc, posX, limiter->GetPosition().m_x);
+ auto posY = AppendNode(doc, position, "Y");
+ SetNodeValue(doc, posY, limiter->GetPosition().m_y);
+ auto size = AppendNode(doc, cadProp, "Size");
+ auto width = AppendNode(doc, size, "Width");
+ SetNodeValue(doc, width, limiter->GetWidth());
+ auto height = AppendNode(doc, size, "Height");
+ SetNodeValue(doc, height, limiter->GetHeight());
+ auto angle = AppendNode(doc, cadProp, "Angle");
+ SetNodeValue(doc, angle, limiter->GetAngle());
+
+ // Nodes
+ auto nodeList = AppendNode(doc, limiterNode, "NodeList");
+ SaveControlNodes(doc, nodeList, limiter->GetNodeList());
+
+ // Control properties
+ auto upLimit = AppendNode(doc, limiterNode, "UpperLimit");
+ SetNodeValue(doc, upLimit, limiter->GetUpLimit());
+ auto lowLimit = AppendNode(doc, limiterNode, "LowerLimit");
+ SetNodeValue(doc, lowLimit, limiter->GetLowLimit());
+ }//}
+
+ //{ Multiplier
+ auto multipliersNode = AppendNode(doc, elementsNode, "MultiplierList");
+ auto multiplierList = ctrlContainer->GetMultiplierList();
+ for(auto it = multiplierList.begin(), itEnd = multiplierList.end(); it != itEnd; ++it) {
+ Multiplier* multiplier = *it;
+ auto multiplierNode = AppendNode(doc, multipliersNode, "Multiplier");
+ SetNodeAttribute(doc, multiplierNode, "ID", multiplier->GetID());
+ auto cadProp = AppendNode(doc, multiplierNode, "CADProperties");
+ auto position = AppendNode(doc, cadProp, "Position");
+ auto posX = AppendNode(doc, position, "X");
+ SetNodeValue(doc, posX, multiplier->GetPosition().m_x);
+ auto posY = AppendNode(doc, position, "Y");
+ SetNodeValue(doc, posY, multiplier->GetPosition().m_y);
+ auto size = AppendNode(doc, cadProp, "Size");
+ auto width = AppendNode(doc, size, "Width");
+ SetNodeValue(doc, width, multiplier->GetWidth());
+ auto height = AppendNode(doc, size, "Height");
+ SetNodeValue(doc, height, multiplier->GetHeight());
+ auto angle = AppendNode(doc, cadProp, "Angle");
+ SetNodeValue(doc, angle, multiplier->GetAngle());
+
+ // Nodes
+ auto nodeList = AppendNode(doc, multiplierNode, "NodeList");
+ SaveControlNodes(doc, nodeList, multiplier->GetNodeList());
+ } //}
+
+ //{ Rate limiter
+ auto rateLimitersNode = AppendNode(doc, elementsNode, "RateLimiterList");
+ auto rateLimiterList = ctrlContainer->GetRateLimiterList();
+ for(auto it = rateLimiterList.begin(), itEnd = rateLimiterList.end(); it != itEnd; ++it) {
+ RateLimiter* rateLimiter = *it;
+ auto rateLimiterNode = AppendNode(doc, rateLimitersNode, "RateLimiter");
+ SetNodeAttribute(doc, rateLimiterNode, "ID", rateLimiter->GetID());
+ auto cadProp = AppendNode(doc, rateLimiterNode, "CADProperties");
+ auto position = AppendNode(doc, cadProp, "Position");
+ auto posX = AppendNode(doc, position, "X");
+ SetNodeValue(doc, posX, rateLimiter->GetPosition().m_x);
+ auto posY = AppendNode(doc, position, "Y");
+ SetNodeValue(doc, posY, rateLimiter->GetPosition().m_y);
+ auto size = AppendNode(doc, cadProp, "Size");
+ auto width = AppendNode(doc, size, "Width");
+ SetNodeValue(doc, width, rateLimiter->GetWidth());
+ auto height = AppendNode(doc, size, "Height");
+ SetNodeValue(doc, height, rateLimiter->GetHeight());
+ auto angle = AppendNode(doc, cadProp, "Angle");
+ SetNodeValue(doc, angle, rateLimiter->GetAngle());
+
+ // Nodes
+ auto nodeList = AppendNode(doc, rateLimiterNode, "NodeList");
+ SaveControlNodes(doc, nodeList, rateLimiter->GetNodeList());
+
+ // Control properties
+ auto upLimit = AppendNode(doc, rateLimiterNode, "UpperLimit");
+ SetNodeValue(doc, upLimit, rateLimiter->GetUpLimit());
+ auto lowLimit = AppendNode(doc, rateLimiterNode, "LowerLimit");
+ SetNodeValue(doc, lowLimit, rateLimiter->GetLowLimit());
+ } //}
+
+ //{ Sum
+ auto sumsNode = AppendNode(doc, elementsNode, "SumList");
+ auto sumList = ctrlContainer->GetSumList();
+ for(auto it = sumList.begin(), itEnd = sumList.end(); it != itEnd; ++it) {
+ Sum* sum = *it;
+ auto sumNode = AppendNode(doc, sumsNode, "Sum");
+ SetNodeAttribute(doc, sumNode, "ID", sum->GetID());
+ auto cadProp = AppendNode(doc, sumNode, "CADProperties");
+ auto position = AppendNode(doc, cadProp, "Position");
+ auto posX = AppendNode(doc, position, "X");
+ SetNodeValue(doc, posX, sum->GetPosition().m_x);
+ auto posY = AppendNode(doc, position, "Y");
+ SetNodeValue(doc, posY, sum->GetPosition().m_y);
+ auto size = AppendNode(doc, cadProp, "Size");
+ auto width = AppendNode(doc, size, "Width");
+ SetNodeValue(doc, width, sum->GetWidth());
+ auto height = AppendNode(doc, size, "Height");
+ SetNodeValue(doc, height, sum->GetHeight());
+ auto angle = AppendNode(doc, cadProp, "Angle");
+ SetNodeValue(doc, angle, sum->GetAngle());
+
+ // Nodes
+ auto nodeList = AppendNode(doc, sumNode, "NodeList");
+ SaveControlNodes(doc, nodeList, sum->GetNodeList());
+
+ //Control properties
+ auto signsNode = AppendNode(doc, sumNode, "Signs");
+ auto signs = sum->GetSignalList();
+ for(int i = 0; i < (int)signs.size(); ++i) {
+ auto value = AppendNode(doc, signsNode, "Value");
+ SetNodeValue(doc, value, static_cast<int>(signs[i]));
+ }
+
+ } //}
+
+ //{ Transfer function
+ auto tfsNode = AppendNode(doc, elementsNode, "TransferFunctionList");
+ auto tfList = ctrlContainer->GetTFList();
+ for(auto it = tfList.begin(), itEnd = tfList.end(); it != itEnd; ++it) {
+ TransferFunction* tf = *it;
+ auto tfNode = AppendNode(doc, tfsNode, "TransferFunction");
+ SetNodeAttribute(doc, tfNode, "ID", tf->GetID());
+ auto cadProp = AppendNode(doc, tfNode, "CADProperties");
+ auto position = AppendNode(doc, cadProp, "Position");
+ auto posX = AppendNode(doc, position, "X");
+ SetNodeValue(doc, posX, tf->GetPosition().m_x);
+ auto posY = AppendNode(doc, position, "Y");
+ SetNodeValue(doc, posY, tf->GetPosition().m_y);
+ auto size = AppendNode(doc, cadProp, "Size");
+ auto width = AppendNode(doc, size, "Width");
+ SetNodeValue(doc, width, tf->GetWidth());
+ auto height = AppendNode(doc, size, "Height");
+ SetNodeValue(doc, height, tf->GetHeight());
+ auto angle = AppendNode(doc, cadProp, "Angle");
+ SetNodeValue(doc, angle, tf->GetAngle());
+
+ // Nodes
+ auto nodeList = AppendNode(doc, tfNode, "NodeList");
+ SaveControlNodes(doc, nodeList, tf->GetNodeList());
+
+ //Control properties
+ auto numeratorNode = AppendNode(doc, tfNode, "Numerator");
+ auto numerator = tf->GetNumerator();
+ for(int i = 0; i < (int)numerator.size(); ++i) {
+ auto value = AppendNode(doc, numeratorNode, "Value");
+ SetNodeValue(doc, value, numerator[i]);
+ }
+ auto denominatorNode = AppendNode(doc, tfNode, "Denominator");
+ auto denominator = tf->GetDenominator();
+ for(int i = 0; i < (int)denominator.size(); ++i) {
+ auto value = AppendNode(doc, denominatorNode, "Value");
+ SetNodeValue(doc, value, denominator[i]);
+ }
+ } //}
+
+ //{ Connection line
+ auto cLinesNode = AppendNode(doc, elementsNode, "ConnectionList");
+ auto connLineList = ctrlContainer->GetConnectionLineList();
+ for(auto it = connLineList.begin(), itEnd = connLineList.end(); it != itEnd; ++it) {
+ ConnectionLine* cLine = *it;
+ auto cLineNode = AppendNode(doc, cLinesNode, "Connection");
+ SetNodeAttribute(doc, cLineNode, "ID", cLine->GetID());
+
+ // CAD properties
+ auto cadProp = AppendNode(doc, cLineNode, "CADProperties");
+ auto offset = AppendNode(doc, cadProp, "Offset");
+ SetNodeValue(doc, offset, cLine->GetOffset());
+
+ // Parent list
+ auto parentsNode = AppendNode(doc, cLineNode, "ParentList");
+ auto parentList = cLine->GetParentList();
+ int nodeIndex = 0;
+ for(auto itP = parentList.begin(), itPEnd = parentList.end(); itP != itPEnd; ++itP) {
+ Element* parent = *itP;
+ auto parentNode = AppendNode(doc, parentsNode, "Parent");
+ auto elementID = AppendNode(doc, parentNode, "ElementID");
+ SetNodeValue(doc, elementID, parent->GetID());
+ auto nodeID = AppendNode(doc, parentNode, "NodeID");
+ SetNodeValue(doc, nodeID, cLine->GetNodeList()[nodeIndex]->GetID());
+ nodeIndex++;
+ }
+
+ auto parentLine = AppendNode(doc, cLineNode, "ParentLine");
+ if(cLine->GetParentLine()) {
+ ConnectionLine* parent = cLine->GetParentLine();
+ SetNodeAttribute(doc, parentLine, "ID", parent->GetID());
+ } else {
+ SetNodeAttribute(doc, parentLine, "ID", -1);
+ }
+ } //}
+}
+
+bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc,
+ rapidxml::xml_node<>* elementsNode,
+ ControlElementContainer* ctrlContainer)
+{
+ std::vector<ControlElement*> elementList;
+ std::vector<ConnectionLine*> connectionList;
+
+ //{ Constant
+ auto constListNode = elementsNode->first_node("ConstantList");
+ if(!constListNode) return false;
+ auto constNode = constListNode->first_node("Constant");
+ while(constNode) {
+ int id = GetAttributeValueInt(constNode, "ID");
+ Constant* constant = new Constant(id);
+
+ auto cadPropNode = constNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ double value = GetNodeValueDouble(constNode, "Value");
+
+ constant->SetWidth(width);
+ constant->SetHeight(height);
+ constant->SetAngle(angle);
+ constant->SetPosition(wxPoint2DDouble(posX, posY));
+ constant->StartMove(constant->GetPosition());
+
+ constant->SetValue(value);
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(constNode, nodeVector)) return false;
+
+ constant->SetNodeList(nodeVector);
+ constant->UpdatePoints();
+ elementList.push_back(constant);
+
+ constNode = constNode->next_sibling("Constant");
+ } //}
+
+ //{ Exponential
+ auto expListNode = elementsNode->first_node("ExponentialList");
+ if(!expListNode) return false;
+ auto expNode = expListNode->first_node("Exponential");
+ while(expNode) {
+ int id = GetAttributeValueInt(expNode, "ID");
+ Exponential* exponential = new Exponential(id);
+
+ auto cadPropNode = expNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ auto value = expNode->first_node("Value");
+ double a = GetNodeValueDouble(value, "A");
+ double b = GetNodeValueDouble(value, "B");
+
+ exponential->SetWidth(width);
+ exponential->SetHeight(height);
+ exponential->SetAngle(angle);
+ exponential->SetPosition(wxPoint2DDouble(posX, posY));
+ exponential->StartMove(exponential->GetPosition());
+
+ exponential->SetValues(a, b);
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(expNode, nodeVector)) return false;
+
+ exponential->SetNodeList(nodeVector);
+ exponential->UpdatePoints();
+ elementList.push_back(exponential);
+
+ expNode = expNode->next_sibling("Exponential");
+ } //}
+
+ //{ Gain
+ auto gainListNode = elementsNode->first_node("GainList");
+ if(!gainListNode) return false;
+ auto gainNode = gainListNode->first_node("Gain");
+ while(gainNode) {
+ int id = GetAttributeValueInt(gainNode, "ID");
+ Gain* gain = new Gain(id);
+
+ auto cadPropNode = gainNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ double value = GetNodeValueDouble(gainNode, "Value");
+
+ gain->SetWidth(width);
+ gain->SetHeight(height);
+ gain->SetAngle(angle);
+ gain->SetPosition(wxPoint2DDouble(posX, posY));
+ gain->SetValue(value);
+ gain->StartMove(gain->GetPosition());
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(gainNode, nodeVector)) return false;
+
+ gain->SetNodeList(nodeVector);
+ gain->UpdatePoints();
+ elementList.push_back(gain);
+
+ gainNode = gainNode->next_sibling("Gain");
+ }
+ //}
+
+ //{ IO
+ auto ioListNode = elementsNode->first_node("IOList");
+ if(!ioListNode) return false;
+ auto ioNode = ioListNode->first_node("IO");
+ while(ioNode) {
+ int id = GetAttributeValueInt(ioNode, "ID");
+
+ auto cadPropNode = ioNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(ioNode, nodeVector)) return false;
+
+ IOControl::IOFlags value = static_cast<IOControl::IOFlags>(GetNodeValueInt(ioNode, "Value"));
+ int ioFlags = GetNodeValueInt(ioNode, "IOFlags");
+
+ IOControl* io = new IOControl(ioFlags, id);
+
+ io->SetWidth(width);
+ io->SetHeight(height);
+ io->SetAngle(angle);
+ io->SetPosition(wxPoint2DDouble(posX, posY));
+ io->SetValue(value);
+ io->StartMove(io->GetPosition());
+ io->SetNodeList(nodeVector);
+ io->UpdatePoints();
+ elementList.push_back(io);
+
+ ioNode = ioNode->next_sibling("IO");
+ }
+ //}
+
+ //{ Limiter
+ auto limiterListNode = elementsNode->first_node("LimiterList");
+ if(!limiterListNode) return false;
+ auto limiterNode = limiterListNode->first_node("Limiter");
+ while(limiterNode) {
+ int id = GetAttributeValueInt(limiterNode, "ID");
+ Limiter* limiter = new Limiter(id);
+
+ auto cadPropNode = limiterNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ double upLimit = GetNodeValueDouble(limiterNode, "UpperLimit");
+ double lowLimit = GetNodeValueDouble(limiterNode, "LowerLimit");
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(limiterNode, nodeVector)) return false;
+
+ limiter->SetWidth(width);
+ limiter->SetHeight(height);
+ limiter->SetAngle(angle);
+ limiter->SetPosition(wxPoint2DDouble(posX, posY));
+ limiter->SetUpLimit(upLimit);
+ limiter->SetLowLimit(lowLimit);
+
+ limiter->StartMove(limiter->GetPosition());
+ limiter->SetNodeList(nodeVector);
+ limiter->UpdatePoints();
+ elementList.push_back(limiter);
+
+ limiterNode = limiterNode->next_sibling("Limiter");
+ }
+ //}
+
+ //{ Multiplier
+ auto multiplierListNode = elementsNode->first_node("MultiplierList");
+ if(!multiplierListNode) return false;
+ auto multiplierNode = multiplierListNode->first_node("Multiplier");
+ while(multiplierNode) {
+ int id = GetAttributeValueInt(multiplierNode, "ID");
+ Multiplier* multiplier = new Multiplier(id);
+
+ auto cadPropNode = multiplierNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(multiplierNode, nodeVector)) return false;
+
+ multiplier->SetWidth(width);
+ multiplier->SetHeight(height);
+ multiplier->SetAngle(angle);
+ multiplier->SetPosition(wxPoint2DDouble(posX, posY));
+
+ multiplier->StartMove(multiplier->GetPosition());
+ multiplier->SetNodeList(nodeVector);
+ multiplier->UpdatePoints();
+ elementList.push_back(multiplier);
+
+ multiplierNode = multiplierNode->next_sibling("Multiplier");
+ }
+ //}
+
+ //{ Rate limiter
+ auto rateLimiterListNode = elementsNode->first_node("RateLimiterList");
+ if(!rateLimiterListNode) return false;
+ auto rateLimiterNode = rateLimiterListNode->first_node("RateLimiter");
+ while(rateLimiterNode) {
+ int id = GetAttributeValueInt(rateLimiterNode, "ID");
+ RateLimiter* limiter = new RateLimiter(id);
+
+ auto cadPropNode = rateLimiterNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ double upLimit = GetNodeValueDouble(rateLimiterNode, "UpperLimit");
+ double lowLimit = GetNodeValueDouble(rateLimiterNode, "LowerLimit");
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(rateLimiterNode, nodeVector)) return false;
+
+ limiter->SetWidth(width);
+ limiter->SetHeight(height);
+ limiter->SetAngle(angle);
+ limiter->SetPosition(wxPoint2DDouble(posX, posY));
+ limiter->SetUpLimit(upLimit);
+ limiter->SetLowLimit(lowLimit);
+
+ limiter->StartMove(limiter->GetPosition());
+ limiter->SetNodeList(nodeVector);
+ limiter->UpdatePoints();
+ elementList.push_back(limiter);
+
+ rateLimiterNode = rateLimiterNode->next_sibling("RateLimiter");
+ }
+ //}
+
+ //{ Sum
+ auto sumListNode = elementsNode->first_node("SumList");
+ if(!sumListNode) return false;
+ auto sumNode = sumListNode->first_node("Sum");
+ while(sumNode) {
+ int id = GetAttributeValueInt(sumNode, "ID");
+ Sum* sum = new Sum(id);
+
+ auto cadPropNode = sumNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ std::vector<Sum::Signal> signs;
+ auto signsNode = sumNode->first_node("Signs");
+ auto sign = signsNode->first_node("Value");
+ while(sign) {
+ long value;
+ wxString(sign->value()).ToCLong(&value);
+ signs.push_back(static_cast<Sum::Signal>(value));
+ sign = sign->next_sibling("Value");
+ }
+ sum->SetSignalList(signs);
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(sumNode, nodeVector)) return false;
+
+ sum->SetWidth(width);
+ sum->SetHeight(height);
+ sum->SetAngle(angle);
+ sum->SetPosition(wxPoint2DDouble(posX, posY));
+
+ sum->StartMove(sum->GetPosition());
+ sum->SetNodeList(nodeVector);
+ sum->UpdatePoints();
+ elementList.push_back(sum);
+
+ sumNode = sumNode->next_sibling("Sum");
+ }
+ //}
+
+ //{ Transfer function
+ auto tfListNode = elementsNode->first_node("TransferFunctionList");
+ if(!tfListNode) return false;
+ auto tfNode = tfListNode->first_node("TransferFunction");
+ while(tfNode) {
+ int id = GetAttributeValueInt(tfNode, "ID");
+ TransferFunction* tf = new TransferFunction(id);
+
+ auto cadPropNode = tfNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+
+ auto position = cadPropNode->first_node("Position");
+ double posX = GetNodeValueDouble(position, "X");
+ double posY = GetNodeValueDouble(position, "Y");
+ auto size = cadPropNode->first_node("Size");
+ double width = GetNodeValueDouble(size, "Width");
+ double height = GetNodeValueDouble(size, "Height");
+ double angle = GetNodeValueDouble(cadPropNode, "Angle");
+
+ std::vector<double> numerator, denominator;
+ auto numeratorNode = tfNode->first_node("Numerator");
+ auto nValue = numeratorNode->first_node("Value");
+ while(nValue) {
+ double value = 0.0;
+ wxString(nValue->value()).ToCDouble(&value);
+ numerator.push_back(value);
+ nValue = nValue->next_sibling("Value");
+ }
+ auto denominatorNode = tfNode->first_node("Denominator");
+ auto dValue = denominatorNode->first_node("Value");
+ while(dValue) {
+ double value = 0.0;
+ wxString(dValue->value()).ToCDouble(&value);
+ denominator.push_back(value);
+ dValue = dValue->next_sibling("Value");
+ }
+
+ std::vector<Node*> nodeVector;
+ if(!OpenControlNodeList(tfNode, nodeVector)) return false;
+
+ tf->SetWidth(width);
+ tf->SetHeight(height);
+ tf->SetAngle(angle);
+ tf->SetPosition(wxPoint2DDouble(posX, posY));
+
+ tf->SetNumerator(numerator);
+ tf->SetDenominator(denominator);
+
+ tf->StartMove(tf->GetPosition());
+ tf->SetNodeList(nodeVector);
+
+ tf->UpdateTFText();
+
+ elementList.push_back(tf);
+
+ tfNode = tfNode->next_sibling("TransferFunction");
+ }
+ //}
+
+ // Connection line
+ auto connectionListNode = elementsNode->first_node("ConnectionList");
+ if(!connectionListNode) return false;
+ auto connNode = connectionListNode->first_node("Connection");
+ while(connNode) {
+ ConnectionLine* cLine = NULL;
+ int id = GetAttributeValueInt(connNode, "ID");
+
+ auto cadPropNode = connNode->first_node("CADProperties");
+ if(!cadPropNode) return false;
+ double offset = GetNodeValueDouble(cadPropNode, "Offset");
+
+ auto parentList = connNode->first_node("ParentList");
+ if(!parentList) return false;
+
+ auto parentNode = parentList->first_node("Parent");
+ bool firstNode = true;
+ while(parentNode) {
+ int elementID = GetNodeValueInt(parentNode, "ElementID");
+ int nodeID = GetNodeValueInt(parentNode, "NodeID");
+
+ ControlElement* element = GetControlElementFromID(elementList, elementID);
+ Node* node = element->GetNodeList()[nodeID];
+
+ if(firstNode) cLine = new ConnectionLine(node, id);
+ cLine->AddParent(element);
+ element->AddChild(cLine);
+ if(!firstNode) cLine->AppendNode(node, element);
+
+ if(firstNode) firstNode = false;
+ parentNode = parentNode->next_sibling("Parent");
+ }
+
+ auto parentLine = connNode->first_node("ParentLine");
+ if(!parentLine) return false;
+ int parentLineID = GetAttributeValueInt(parentLine, "ID");
+ if(parentLineID != -1) {
+ for(auto it = connectionList.begin(), itEnd = connectionList.end(); it != itEnd; ++it) {
+ ConnectionLine* parent = *it;
+ if(parent->GetID() == parentLineID) {
+ cLine->SetParentLine(parent);
+ parent->AddChild(cLine);
+ }
+ }
+ }
+
+ cLine->SetOffset(offset);
+ cLine->UpdatePoints();
+ connectionList.push_back(cLine);
+ connNode = connNode->next_sibling("Connection");
+ }
+ ctrlContainer->FillContainer(elementList, connectionList);
+ return true;
+}
+
+void FileHanding::SaveControlNodes(rapidxml::xml_document<>& doc,
+ rapidxml::xml_node<>* nodesN,
+ std::vector<Node*> nodeList)
+{
+ int id = 0;
+ for(auto it = nodeList.begin(), itEnd = nodeList.end(); it != itEnd; ++it) {
+ Node* node = *it;
+ node->SetID(id);
+ auto nodeN = AppendNode(doc, nodesN, "Node");
+ SetNodeAttribute(doc, nodeN, "ID", id);
+ auto nodePosition = AppendNode(doc, nodeN, "Position");
+ auto posNodeX = AppendNode(doc, nodePosition, "X");
+ SetNodeValue(doc, posNodeX, node->GetPosition().m_x);
+ auto posNodeY = AppendNode(doc, nodePosition, "Y");
+ SetNodeValue(doc, posNodeY, node->GetPosition().m_y);
+ auto angle = AppendNode(doc, nodeN, "Angle");
+ SetNodeValue(doc, angle, node->GetAngle());
+ auto nodeType = AppendNode(doc, nodeN, "Type");
+ SetNodeValue(doc, nodeType, node->GetNodeType());
+ id++;
+ }
+}
+
+ControlElement* FileHanding::GetControlElementFromID(std::vector<ControlElement*> elementList, int id)
+{
+ for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) {
+ ControlElement* element = *it;
+ if(element->GetID() == id) return element;
+ }
+ return NULL;
+}
+
+bool FileHanding::OpenControlNodeList(rapidxml::xml_node<>* elementNode, std::vector<Node*>& nodeVector)
+{
+ auto nodeList = elementNode->first_node("NodeList");
+ if(!nodeList) return false;
+ auto nodeN = nodeList->first_node("Node");
+ while(nodeN) {
+ auto nodePosition = nodeN->first_node("Position");
+ double nodePosX = GetNodeValueDouble(nodePosition, "X");
+ double nodePosY = GetNodeValueDouble(nodePosition, "Y");
+ double nodeAngle = GetNodeValueDouble(nodeN, "Angle");
+ Node::NodeType nodeType = (Node::NodeType)GetNodeValueInt(nodeN, "Type");
+ Node* node = new Node(wxPoint2DDouble(nodePosX, nodePosY), nodeType, 2.0);
+ node->SetAngle(nodeAngle);
+ nodeVector.push_back(node);
+ nodeN = nodeN->next_sibling("Node");
+ }
+ return true;
+}
+
rapidxml::xml_node<>* FileHanding::AppendNode(rapidxml::xml_document<>& doc,
- rapidxml::xml_node<>* parentNode,
- const char* name,
- rapidxml::node_type nodeType)
+ rapidxml::xml_node<>* parentNode,
+ const char* name,
+ rapidxml::node_type nodeType)
{
rapidxml::xml_node<>* node = doc.allocate_node(nodeType, name);
parentNode->append_node(node);
@@ -1721,25 +2609,25 @@ void FileHanding::SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node
}
void FileHanding::SetNodeAttribute(rapidxml::xml_document<>& doc,
- rapidxml::xml_node<>* node,
- const char* atrName,
- wxString value)
+ rapidxml::xml_node<>* node,
+ const char* atrName,
+ wxString value)
{
node->append_attribute(doc.allocate_attribute(atrName, doc.allocate_string(value.mb_str())));
}
void FileHanding::SetNodeAttribute(rapidxml::xml_document<>& doc,
- rapidxml::xml_node<>* node,
- const char* atrName,
- int value)
+ rapidxml::xml_node<>* node,
+ const char* atrName,
+ int value)
{
node->append_attribute(doc.allocate_attribute(atrName, doc.allocate_string(wxString::Format("%d", value))));
}
void FileHanding::SetNodeAttribute(rapidxml::xml_document<>& doc,
- rapidxml::xml_node<>* node,
- const char* atrName,
- double value)
+ rapidxml::xml_node<>* node,
+ const char* atrName,
+ double value)
{
node->append_attribute(
doc.allocate_attribute(atrName, doc.allocate_string(wxString::FromCDouble(value, 13).mb_str())));
@@ -1777,3 +2665,12 @@ int FileHanding::GetAttributeValueInt(rapidxml::xml_node<>* parent, const char*
}
return (int)iValue;
}
+
+int FileHanding::GetAttributeValueInt(rapidxml::xml_node<>* node, const char* atrName)
+{
+ long intValue;
+ auto atr = node->first_attribute(atrName);
+ if(!atr) return false;
+ wxString(atr->value()).ToCLong(&intValue);
+ return (int)intValue;
+}
diff --git a/Project/FileHanding.h b/Project/FileHanding.h
index 4546f15..c952824 100644
--- a/Project/FileHanding.h
+++ b/Project/FileHanding.h
@@ -6,6 +6,8 @@
#include <sstream>
#include "Workspace.h"
+#include "ControlEditor.h"
+#include "ControlElementContainer.h"
#include "ElectricCalculation.h"
#include "Text.h"
@@ -19,15 +21,24 @@ class FileHanding
public:
FileHanding();
FileHanding(Workspace* workspace);
+ FileHanding(ControlEditor* controlEditor);
~FileHanding();
void SetWorkspace(Workspace* workspace) { m_workspace = workspace; }
+ void SetControlEditor(ControlEditor* controlEditor) { m_controlEditor = controlEditor; }
void SaveProject(wxFileName path);
bool OpenProject(wxFileName path);
+
+ void SaveControl(wxFileName path);
+ bool OpenControl(wxFileName path, std::vector<ControlElement*>& ctrlElementList, std::vector<ConnectionLine*>& ctrlConnectionList);
+
+ void SaveControlElements(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementsNode, ControlElementContainer* ctrlContainer = NULL);
+ bool OpenControlElements(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementsNode, ControlElementContainer* ctrlContainer = NULL);
protected:
Workspace* m_workspace = NULL;
+ ControlEditor* m_controlEditor = NULL;
rapidxml::xml_node<>* AppendNode(rapidxml::xml_document<>& doc,
rapidxml::xml_node<>* parentNode,
@@ -42,6 +53,11 @@ protected:
double GetNodeValueDouble(rapidxml::xml_node<>* parent, const char* nodeName);
int GetNodeValueInt(rapidxml::xml_node<>* parent, const char* nodeName);
int GetAttributeValueInt(rapidxml::xml_node<>* parent, const char* nodeName, const char* atrName);
+ int GetAttributeValueInt(rapidxml::xml_node<>* node, const char* atrName);
+
+ void SaveControlNodes(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* nodesN, std::vector<Node*> nodeList);
+ ControlElement* GetControlElementFromID(std::vector<ControlElement*> elementList, int id);
+ bool OpenControlNodeList(rapidxml::xml_node<>* elementNode, std::vector<Node*>& nodeVector);
};
#endif // FILEHANDING_H
diff --git a/Project/Gain.cpp b/Project/Gain.cpp
new file mode 100644
index 0000000..faea89c
--- /dev/null
+++ b/Project/Gain.cpp
@@ -0,0 +1,169 @@
+#include "Gain.h"
+#include "GainForm.h"
+
+Gain::Gain(int id) : ControlElement(id)
+{
+ 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..8844372
--- /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(int id);
+ ~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/IOControl.cpp b/Project/IOControl.cpp
new file mode 100644
index 0000000..d9ea52e
--- /dev/null
+++ b/Project/IOControl.cpp
@@ -0,0 +1,224 @@
+#include "IOControl.h"
+#include "IOControlForm.h"
+
+IOControl::IOControl(int ioFlags, int id) : ControlElement(id)
+{
+ m_ioFlags = ioFlags;
+
+ Node* node = new Node(m_position, Node::NODE_IN, m_borderSize);
+ m_nodeList.push_back(node);
+
+ if(ioFlags & IN_TERMINAL_VOLTAGE)
+ SetValue(IN_TERMINAL_VOLTAGE);
+ else if(ioFlags & IN_VELOCITY)
+ SetValue(IN_VELOCITY);
+ node->StartMove(m_position);
+}
+
+IOControl::~IOControl() {}
+void IOControl::Draw(wxPoint2DDouble translation, double scale) const
+{
+ std::vector<wxPoint2DDouble> pts;
+ if(m_angle == 0.0) {
+ pts.push_back(m_rect.GetLeftTop() + wxPoint2DDouble(m_borderSize, m_borderSize));
+ pts.push_back(m_rect.GetRightTop() + wxPoint2DDouble(-m_borderSize - 10, m_borderSize));
+ pts.push_back(m_position + wxPoint2DDouble(m_width / 2 - m_borderSize, 0));
+ pts.push_back(m_rect.GetRightBottom() + wxPoint2DDouble(-m_borderSize - 10, -m_borderSize));
+ pts.push_back(m_rect.GetLeftBottom() + wxPoint2DDouble(m_borderSize, -m_borderSize));
+ } else if(m_angle == 90.0) {
+ pts.push_back(m_rect.GetLeftTop() + wxPoint2DDouble(m_borderSize, m_borderSize));
+ pts.push_back(m_rect.GetRightTop() + wxPoint2DDouble(-m_borderSize, m_borderSize));
+ pts.push_back(m_rect.GetRightBottom() + wxPoint2DDouble(-m_borderSize, -m_borderSize - 10));
+ pts.push_back(m_position + wxPoint2DDouble(0, m_height / 2 - m_borderSize));
+ pts.push_back(m_rect.GetLeftBottom() + wxPoint2DDouble(m_borderSize, -m_borderSize - 10));
+ } else if(m_angle == 180.0) {
+ pts.push_back(m_rect.GetLeftTop() + wxPoint2DDouble(m_borderSize + 10, m_borderSize));
+ pts.push_back(m_rect.GetRightTop() + wxPoint2DDouble(-m_borderSize, m_borderSize));
+ pts.push_back(m_rect.GetRightBottom() + wxPoint2DDouble(-m_borderSize, -m_borderSize));
+ pts.push_back(m_rect.GetLeftBottom() + wxPoint2DDouble(m_borderSize + 10, -m_borderSize));
+ pts.push_back(m_position + wxPoint2DDouble(-m_width / 2 + m_borderSize, 0));
+ } else if(m_angle == 270.0) {
+ pts.push_back(m_position + wxPoint2DDouble(0, -m_height / 2 + m_borderSize));
+ pts.push_back(m_rect.GetRightTop() + wxPoint2DDouble(-m_borderSize, m_borderSize + 10));
+ pts.push_back(m_rect.GetRightBottom() + wxPoint2DDouble(-m_borderSize, -m_borderSize));
+ pts.push_back(m_rect.GetLeftBottom() + wxPoint2DDouble(m_borderSize, -m_borderSize));
+ pts.push_back(m_rect.GetLeftTop() + wxPoint2DDouble(m_borderSize, m_borderSize + 10));
+ }
+
+ if(m_selected) {
+ glColor4dv(m_selectionColour.GetRGBA());
+ double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
+ std::vector<wxPoint2DDouble> selPts = pts;
+ if(m_angle == 0.0) {
+ selPts[0] += wxPoint2DDouble(-borderSize / 2, -borderSize / 2);
+ selPts[1] += wxPoint2DDouble(borderSize / 2, -borderSize / 2);
+ selPts[2] += wxPoint2DDouble(1.5 * borderSize / 2, 0);
+ selPts[3] += wxPoint2DDouble(borderSize / 2, borderSize / 2);
+ selPts[4] += wxPoint2DDouble(-borderSize / 2, borderSize / 2);
+ } else if(m_angle == 90.0) {
+ selPts[0] += wxPoint2DDouble(-borderSize / 2, -borderSize / 2);
+ selPts[1] += wxPoint2DDouble(borderSize / 2, -borderSize / 2);
+ selPts[2] += wxPoint2DDouble(borderSize / 2, borderSize / 2);
+ selPts[3] += wxPoint2DDouble(0, 1.5 * borderSize / 2);
+ selPts[4] += wxPoint2DDouble(-borderSize / 2, borderSize / 2);
+ } else if(m_angle == 180.0) {
+ selPts[0] += wxPoint2DDouble(-borderSize / 2, -borderSize / 2);
+ selPts[1] += wxPoint2DDouble(borderSize / 2, -borderSize / 2);
+ selPts[2] += wxPoint2DDouble(borderSize / 2, borderSize / 2);
+ selPts[3] += wxPoint2DDouble(-borderSize / 2, borderSize / 2);
+ selPts[4] += wxPoint2DDouble(-1.5 * borderSize / 2, 0);
+ } else if(m_angle == 270.0) {
+ selPts[0] += wxPoint2DDouble(0, -1.5 * borderSize / 2);
+ selPts[1] += wxPoint2DDouble(borderSize / 2, -borderSize / 2);
+ selPts[2] += wxPoint2DDouble(borderSize / 2, borderSize / 2);
+ selPts[3] += wxPoint2DDouble(-borderSize / 2, borderSize / 2);
+ selPts[4] += wxPoint2DDouble(-borderSize / 2, -borderSize / 2);
+ }
+ DrawLine(selPts, GL_POLYGON);
+ }
+ glLineWidth(1.0);
+ glColor4d(1.0, 1.0, 1.0, 1.0);
+ DrawLine(pts, GL_POLYGON);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawLine(pts, 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 - 5, m_position.m_y);
+ } else if(m_angle == 90.0) {
+ m_glStringValue->render(m_position.m_x, m_position.m_y - 5);
+ } else if(m_angle == 180.0) {
+ m_glStringValue->render(m_position.m_x + 5, m_position.m_y);
+ } else if(m_angle == 270.0) {
+ m_glStringValue->render(m_position.m_x, m_position.m_y + 5);
+ }
+
+ glDisable(GL_TEXTURE_2D);
+
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawNodes();
+}
+
+bool IOControl::ShowForm(wxWindow* parent, Element* element)
+{
+ IOControlForm* form = new IOControlForm(parent, this);
+ if(form->ShowModal() == wxID_OK) {
+ form->Destroy();
+ return true;
+ }
+ form->Destroy();
+ return false;
+}
+
+void IOControl::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);
+ }
+}
+
+wxString IOControl::GenerateText()
+{
+ wxString omega = wxString::FromUTF8("\xCF\x89");
+
+ switch(m_value) {
+ case IN_TERMINAL_VOLTAGE: {
+ m_ioNodeType = Node::NODE_OUT;
+ return _("Vt");
+ } break;
+ case IN_VELOCITY: {
+ m_ioNodeType = Node::NODE_OUT;
+ return omega;
+ } break;
+ case IN_ACTIVE_POWER: {
+ m_ioNodeType = Node::NODE_OUT;
+ return _("Pe");
+ } break;
+ case IN_REACTIVE_POWER: {
+ m_ioNodeType = Node::NODE_OUT;
+ return _("Qe");
+ } break;
+ case OUT_FIELD_VOLTAGE: {
+ m_ioNodeType = Node::NODE_IN;
+ return _("Vf");
+ } break;
+ case OUT_MEC_POWER: {
+ m_ioNodeType = Node::NODE_IN;
+ return _("Pm");
+ } break;
+ }
+ return "";
+}
+
+void IOControl::SetValue(IOFlags value)
+{
+ m_value = value;
+ wxString text = GenerateText();
+
+ 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() + 10 + 2 * m_borderSize;
+ m_height = m_glStringValue->getheight() + 10 + 2 * m_borderSize;
+
+ SetPosition(m_position); // Update rectangle.
+
+ UpdatePoints();
+}
+
+void IOControl::UpdatePoints()
+{
+ if(m_nodeList.size() != 0) {
+ Node* node = m_nodeList[0];
+ if(node->GetNodeType() != m_ioNodeType) {
+ // Rotate 180 degrees
+ node->Rotate();
+ node->Rotate();
+ }
+ node->SetNodeType(m_ioNodeType);
+ if(m_angle == 0.0) {
+ if(m_ioNodeType == Node::NODE_IN)
+ node->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
+ else
+ node->SetPosition(m_position + wxPoint2DDouble(m_width / 2 - 2, 0));
+ } else if(m_angle == 90.0) {
+ if(m_ioNodeType == Node::NODE_IN)
+ node->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
+ else
+ node->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2 - 2));
+ } else if(m_angle == 180.0) {
+ if(m_ioNodeType == Node::NODE_IN)
+ node->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
+ else
+ node->SetPosition(m_position + wxPoint2DDouble(2 - m_width / 2, 0));
+ } else if(m_angle == 270.0) {
+ if(m_ioNodeType == Node::NODE_IN)
+ node->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
+ else
+ node->SetPosition(m_position + wxPoint2DDouble(0, 2 - m_height / 2));
+ }
+ }
+}
diff --git a/Project/IOControl.h b/Project/IOControl.h
new file mode 100644
index 0000000..7b3f4d0
--- /dev/null
+++ b/Project/IOControl.h
@@ -0,0 +1,49 @@
+#ifndef IOCONTROL_H
+#define IOCONTROL_H
+
+#include "ControlElement.h"
+
+#include <wx/dcscreen.h>
+#include "wxGLString.h"
+
+class IOControlForm;
+
+class IOControl : public ControlElement
+{
+ public:
+ enum IOFlags {
+ IN_TERMINAL_VOLTAGE = 1 << 0,
+ IN_VELOCITY = 1 << 1,
+ IN_ACTIVE_POWER = 1 << 2,
+ IN_REACTIVE_POWER = 1 << 3,
+ OUT_FIELD_VOLTAGE = 1 << 4,
+ OUT_MEC_POWER = 1 << 5
+ };
+
+ IOControl(int ioFlags, int id);
+ ~IOControl();
+
+ 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 wxString GenerateText();
+ virtual void UpdatePoints();
+
+ virtual IOFlags GetValue() const { return m_value; }
+ virtual void SetValue(IOFlags value);
+ virtual int GetIOFlags() const { return m_ioFlags; }
+
+ protected:
+ IOFlags m_value;
+ int m_ioFlags;
+
+ Node::NodeType m_ioNodeType = Node::NODE_IN;
+
+ wxGLString* m_glStringValue = NULL;
+ int m_fontSize = 10;
+};
+
+#endif // IOCONTROL_H
diff --git a/Project/IOControlForm.cpp b/Project/IOControlForm.cpp
new file mode 100644
index 0000000..8a848d9
--- /dev/null
+++ b/Project/IOControlForm.cpp
@@ -0,0 +1,89 @@
+#include "IOControlForm.h"
+
+IOControlForm::IOControlForm(wxWindow* parent, IOControl* ioControl) : IOControlFormBase(parent)
+{
+ m_parent = parent;
+ m_ioControl = ioControl;
+
+ int ioFlags = m_ioControl->GetIOFlags();
+ int inChoiceNumber = -1;
+ int outChoiceNumber = -1;
+
+ if(ioFlags & IOControl::IN_TERMINAL_VOLTAGE) {
+ m_choiceInput->Append(_("Terminal voltage"));
+ m_inputFlags.push_back(IOControl::IN_TERMINAL_VOLTAGE);
+ if(m_ioControl->GetValue() == IOControl::IN_TERMINAL_VOLTAGE) inChoiceNumber = (int)m_inputFlags.size() - 1;
+ }
+ if(ioFlags & IOControl::IN_VELOCITY) {
+ m_choiceInput->Append(_("Velocity"));
+ m_inputFlags.push_back(IOControl::IN_VELOCITY);
+ if(m_ioControl->GetValue() == IOControl::IN_VELOCITY) inChoiceNumber = (int)m_inputFlags.size() - 1;
+ }
+ if(ioFlags & IOControl::IN_ACTIVE_POWER) {
+ m_choiceInput->Append(_("Active power"));
+ m_inputFlags.push_back(IOControl::IN_ACTIVE_POWER);
+ if(m_ioControl->GetValue() == IOControl::IN_ACTIVE_POWER) inChoiceNumber = (int)m_inputFlags.size() - 1;
+ }
+ if(ioFlags & IOControl::IN_REACTIVE_POWER) {
+ m_choiceInput->Append(_("Reactive power"));
+ m_inputFlags.push_back(IOControl::IN_REACTIVE_POWER);
+ if(m_ioControl->GetValue() == IOControl::IN_REACTIVE_POWER) inChoiceNumber = (int)m_inputFlags.size() - 1;
+ }
+ if(ioFlags & IOControl::OUT_FIELD_VOLTAGE) {
+ m_choiceOutput->Append(_("Field voltage"));
+ m_outputFlags.push_back(IOControl::OUT_FIELD_VOLTAGE);
+ if(m_ioControl->GetValue() == IOControl::OUT_FIELD_VOLTAGE) outChoiceNumber = (int)m_outputFlags.size() - 1;
+ }
+ if(ioFlags & IOControl::OUT_MEC_POWER) {
+ m_choiceOutput->Append(_("Mechanical power"));
+ m_outputFlags.push_back(IOControl::OUT_MEC_POWER);
+ if(m_ioControl->GetValue() == IOControl::OUT_MEC_POWER) outChoiceNumber = (int)m_outputFlags.size() - 1;
+ }
+
+ if(inChoiceNumber != -1) {
+ m_choiceInput->SetSelection(inChoiceNumber);
+ m_checkBoxInput->SetValue(true);
+ m_checkBoxOutput->SetValue(false);
+ m_choiceOutput->Enable(false);
+ } else {
+ m_choiceOutput->SetSelection(outChoiceNumber);
+ m_checkBoxInput->SetValue(false);
+ m_checkBoxOutput->SetValue(true);
+ m_choiceInput->Enable(false);
+ }
+}
+
+IOControlForm::~IOControlForm() {}
+void IOControlForm::OnOKButtonClick(wxCommandEvent& event)
+{
+ if(ValidateData()) EndModal(wxID_OK);
+}
+
+bool IOControlForm::ValidateData()
+{
+ if(m_checkBoxInput->GetValue() && m_choiceInput->GetSelection() != -1) {
+ m_ioControl->SetValue(m_inputFlags[m_choiceInput->GetSelection()]);
+ return true;
+ } else if(m_checkBoxOutput->GetValue() && m_choiceOutput->GetSelection() != -1) {
+ m_ioControl->SetValue(m_outputFlags[m_choiceOutput->GetSelection()]);
+ return true;
+ }
+
+ return false;
+}
+
+void IOControlForm::OnInputChecked(wxCommandEvent& event)
+{
+ m_checkBoxInput->SetValue(true);
+ m_checkBoxOutput->SetValue(false);
+ m_choiceOutput->Enable(false);
+ m_choiceInput->Enable(true);
+}
+
+void IOControlForm::OnOutputChecked(wxCommandEvent& event)
+{
+ m_checkBoxOutput->SetValue(true);
+ m_checkBoxInput->SetValue(false);
+ m_choiceOutput->Enable(true);
+ m_choiceInput->Enable(false);
+}
diff --git a/Project/IOControlForm.h b/Project/IOControlForm.h
new file mode 100644
index 0000000..8b3f2d9
--- /dev/null
+++ b/Project/IOControlForm.h
@@ -0,0 +1,27 @@
+#ifndef IOCONTROLFORM_H
+#define IOCONTROLFORM_H
+
+#include "ElementForm.h"
+#include "IOControl.h"
+
+class IOControlForm : public IOControlFormBase
+{
+ public:
+ IOControlForm(wxWindow* parent, IOControl* ioControl);
+ virtual ~IOControlForm();
+
+ virtual bool ValidateData();
+
+ protected:
+ virtual void OnInputChecked(wxCommandEvent& event);
+ virtual void OnOutputChecked(wxCommandEvent& event);
+ virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); };
+ virtual void OnOKButtonClick(wxCommandEvent& event);
+
+ wxWindow* m_parent;
+ IOControl* m_ioControl;
+
+ std::vector<IOControl::IOFlags> m_inputFlags;
+ std::vector<IOControl::IOFlags> m_outputFlags;
+};
+#endif // IOCONTROLFORM_H
diff --git a/Project/Limiter.cpp b/Project/Limiter.cpp
new file mode 100644
index 0000000..2a0b707
--- /dev/null
+++ b/Project/Limiter.cpp
@@ -0,0 +1,89 @@
+#include "Limiter.h"
+#include "LimiterForm.h"
+
+Limiter::Limiter(int id) : ControlElement(id)
+{
+ m_width = m_height = 36.0;
+ Node* nodeIn = new Node(m_position + wxPoint2DDouble(-18, 0), Node::NODE_IN, m_borderSize);
+ nodeIn->StartMove(m_position);
+ Node* nodeOut = new Node(m_position + wxPoint2DDouble(18, 0), Node::NODE_OUT, m_borderSize);
+ nodeOut->SetAngle(180.0);
+ nodeOut->StartMove(m_position);
+ m_nodeList.push_back(nodeIn);
+ m_nodeList.push_back(nodeOut);
+}
+
+Limiter::~Limiter() {}
+void Limiter::Draw(wxPoint2DDouble translation, double scale) const
+{
+ glLineWidth(1.0);
+ if(m_selected) {
+ glColor4dv(m_selectionColour.GetRGBA());
+ double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
+ DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
+ }
+ glColor4d(1.0, 1.0, 1.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
+
+ // Plot symbol.
+ glLineWidth(2.0);
+ std::vector<wxPoint2DDouble> limSymbol;
+ limSymbol.push_back(m_position + wxPoint2DDouble(10, -10));
+ limSymbol.push_back(m_position + wxPoint2DDouble(2, -10));
+ limSymbol.push_back(m_position + wxPoint2DDouble(-2, 10));
+ limSymbol.push_back(m_position + wxPoint2DDouble(-10, 10));
+ glColor4d(0.0, 0.3, 1.0, 1.0);
+ DrawLine(limSymbol);
+
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawNodes();
+}
+
+bool Limiter::ShowForm(wxWindow* parent, Element* element)
+{
+ LimiterForm* limiter = new LimiterForm(parent, this);
+ if(limiter->ShowModal() == wxID_OK) {
+ limiter->Destroy();
+ return true;
+ }
+ limiter->Destroy();
+ return false;
+}
+
+void Limiter::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 Limiter::UpdatePoints()
+{
+ if(m_angle == 0.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(18, 0));
+ } else if(m_angle == 90.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -18));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, 18));
+ } else if(m_angle == 180.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(18, 0));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
+ } else if(m_angle == 270.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, 18));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, -18));
+ }
+}
diff --git a/Project/Limiter.h b/Project/Limiter.h
new file mode 100644
index 0000000..5f4e55b
--- /dev/null
+++ b/Project/Limiter.h
@@ -0,0 +1,33 @@
+#ifndef LIMITER_H
+#define LIMITER_H
+
+#include "ControlElement.h"
+
+class LimiterForm;
+
+class Limiter : public ControlElement
+{
+public:
+ Limiter(int id);
+ ~Limiter();
+
+ 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 UpdatePoints();
+
+ double GetUpLimit() const { return m_upLimit; }
+ double GetLowLimit() const { return m_lowLimit; }
+
+ void SetUpLimit(double upLimit) { m_upLimit = upLimit; }
+ void SetLowLimit(double lowLimit) { m_lowLimit = lowLimit; }
+
+protected:
+ double m_upLimit = 5.0;
+ double m_lowLimit = -5.0;
+};
+
+#endif // LIMITER_H
diff --git a/Project/LimiterForm.cpp b/Project/LimiterForm.cpp
new file mode 100644
index 0000000..dfbffb8
--- /dev/null
+++ b/Project/LimiterForm.cpp
@@ -0,0 +1,34 @@
+#include "LimiterForm.h"
+#include "Limiter.h"
+
+LimiterForm::LimiterForm(wxWindow* parent, Limiter* limiter) : LimiterFormBase(parent)
+{
+ m_limiter = limiter;
+ m_parent = parent;
+
+ m_textCtrlUpLimit->SetValue(m_limiter->StringFromDouble(m_limiter->GetUpLimit()));
+ m_textCtrlLowLimit->SetValue(m_limiter->StringFromDouble(m_limiter->GetLowLimit()));
+}
+
+LimiterForm::~LimiterForm() {}
+void LimiterForm::OnOKButtonClick(wxCommandEvent& event)
+{
+ if(ValidateData()) EndModal(wxID_OK);
+}
+
+bool LimiterForm::ValidateData()
+{
+ double upLimit;
+ double lowLimit;
+
+ if(!m_limiter->DoubleFromString(this, m_textCtrlUpLimit->GetValue(), upLimit,
+ _("Value entered incorrectly in the field \"Upper limit\".")))
+ return false;
+ if(!m_limiter->DoubleFromString(this, m_textCtrlLowLimit->GetValue(), lowLimit,
+ _("Value entered incorrectly in the field \"Lower limit\".")))
+ return false;
+
+ m_limiter->SetUpLimit(upLimit);
+ m_limiter->SetLowLimit(lowLimit);
+ return true;
+} \ No newline at end of file
diff --git a/Project/LimiterForm.h b/Project/LimiterForm.h
new file mode 100644
index 0000000..f26ee9d
--- /dev/null
+++ b/Project/LimiterForm.h
@@ -0,0 +1,21 @@
+#ifndef LIMITERFORM_H
+#define LIMITERFORM_H
+#include "ElementForm.h"
+
+class Limiter;
+
+class LimiterForm : public LimiterFormBase
+{
+ public:
+ LimiterForm(wxWindow* parent, Limiter* limiter);
+ virtual ~LimiterForm();
+ virtual bool ValidateData();
+
+ protected:
+ virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
+ virtual void OnOKButtonClick(wxCommandEvent& event);
+
+ wxWindow* m_parent = NULL;
+ Limiter* m_limiter = NULL;
+};
+#endif // LIMITERFORM_H
diff --git a/Project/Line.cpp b/Project/Line.cpp
index 66a43c5..86d947c 100644
--- a/Project/Line.cpp
+++ b/Project/Line.cpp
@@ -267,41 +267,6 @@ void Line::MoveNode(Element* parent, wxPoint2DDouble position)
UpdatePowerFlowArrowsPosition();
}
-double Line::PointToLineDistance(wxPoint2DDouble point, int* segmentNumber) const
-{
- //[Ref] http://geomalgorithms.com/a02-_lines.html
- double distance = 100.0; // Big initial distance.
- wxPoint2DDouble p0 = point;
-
- for(int i = 1; i < (int)m_pointList.size() - 2; i++) {
- double d = 0.0;
-
- wxPoint2DDouble p1 = m_pointList[i];
- wxPoint2DDouble p2 = m_pointList[i + 1];
-
- wxPoint2DDouble v = p2 - p1;
- wxPoint2DDouble w = p0 - p1;
-
- double c1 = w.m_x * v.m_x + w.m_y * v.m_y;
- double c2 = v.m_x * v.m_x + v.m_y * v.m_y;
-
- if(c1 <= 0.0) {
- d = std::sqrt(std::pow(p0.m_y - p1.m_y, 2) + std::pow(p0.m_x - p1.m_x, 2));
- } else if(c2 <= c1) {
- d = std::sqrt(std::pow(p0.m_y - p2.m_y, 2) + std::pow(p0.m_x - p2.m_x, 2));
- } else {
- d = std::abs((p2.m_y - p1.m_y) * p0.m_x - (p2.m_x - p1.m_x) * p0.m_y + p2.m_x * p1.m_y - p2.m_y * p1.m_x) /
- std::sqrt(std::pow(p2.m_y - p1.m_y, 2) + std::pow(p2.m_x - p1.m_x, 2));
- }
- if(d < distance) {
- distance = d;
- if(segmentNumber) *segmentNumber = i;
- }
- }
-
- return distance;
-}
-
bool Line::GetContextMenu(wxMenu& menu)
{
menu.Append(ID_EDIT_ELEMENT, _("Edit line"));
diff --git a/Project/Line.h b/Project/Line.h
index 1ff1102..0abcd82 100644
--- a/Project/Line.h
+++ b/Project/Line.h
@@ -65,7 +65,6 @@ public:
virtual void SetPointList(std::vector<wxPoint2DDouble> pointList);
protected:
- double PointToLineDistance(wxPoint2DDouble point, int* segmentNumber = NULL) const;
void UpdatePowerFlowArrowsPosition();
LineElectricalData m_electricaData;
};
diff --git a/Project/MainFrame.cpp b/Project/MainFrame.cpp
index bb180a3..87c547e 100644
--- a/Project/MainFrame.cpp
+++ b/Project/MainFrame.cpp
@@ -111,8 +111,7 @@ void MainFrame::CreateAddElementsMenu()
m_addElementsMenu->Append(capacitorElement);
m_addElementsMenu->Append(inductorElement);
- m_addElementsMenu->Connect(
- wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnAddElementsClick), NULL, this);
+ m_addElementsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrame::OnAddElementsClick, this);
}
void MainFrame::OnNewClick(wxRibbonButtonBarEvent& event)
@@ -198,7 +197,7 @@ void MainFrame::OnMoveClick(wxRibbonButtonBarEvent& event)
element->StartMove(averagePos);
}
}
- workspace->SetWorkspaceMode(MODE_MOVE_ELEMENT);
+ workspace->SetWorkspaceMode(Workspace::MODE_MOVE_ELEMENT);
}
}
@@ -304,7 +303,7 @@ void MainFrame::OnAddElementsClick(wxCommandEvent& event)
Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
if(workspace) {
- if(workspace->GetWorkspaceMode() != MODE_INSERT) {
+ if(workspace->GetWorkspaceMode() != Workspace::MODE_INSERT) {
auto elementList = workspace->GetElementList();
wxString statusBarText = "";
bool newElement = false;
@@ -383,7 +382,7 @@ void MainFrame::OnAddElementsClick(wxCommandEvent& event)
}
if(newElement) {
workspace->SetElementList(elementList);
- workspace->SetWorkspaceMode(MODE_INSERT);
+ workspace->SetWorkspaceMode(Workspace::MODE_INSERT);
workspace->SetStatusBarText(statusBarText);
workspace->Redraw();
}
diff --git a/Project/Multiplier.cpp b/Project/Multiplier.cpp
new file mode 100644
index 0000000..ee644ed
--- /dev/null
+++ b/Project/Multiplier.cpp
@@ -0,0 +1,86 @@
+#include "Multiplier.h"
+
+Multiplier::Multiplier(int id) : ControlElement(id)
+{
+ m_width = m_height = 36.0;
+ Node* nodeIn1 = new Node(m_position + wxPoint2DDouble(-18, -9), Node::NODE_IN, m_borderSize);
+ nodeIn1->StartMove(m_position);
+ Node* nodeIn2 =
+ new Node(m_position + wxPoint2DDouble(-18, 9), Node::NODE_IN, m_borderSize);
+ nodeIn2->StartMove(m_position);
+ Node* nodeOut = new Node(m_position + wxPoint2DDouble(18, 0), Node::NODE_OUT, m_borderSize);
+ nodeOut->SetAngle(180.0);
+ nodeOut->StartMove(m_position);
+ m_nodeList.push_back(nodeIn1);
+ m_nodeList.push_back(nodeIn2);
+ m_nodeList.push_back(nodeOut);
+}
+
+Multiplier::~Multiplier() {}
+
+void Multiplier::Draw(wxPoint2DDouble translation, double scale) const
+{
+ glLineWidth(1.0);
+ if(m_selected) {
+ glColor4dv(m_selectionColour.GetRGBA());
+ double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
+ DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
+ }
+ glColor4d(1.0, 1.0, 1.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
+
+ // Plot x.
+ glLineWidth(2.0);
+ std::vector<wxPoint2DDouble> xSymbol;
+ xSymbol.push_back(m_position + wxPoint2DDouble(-5, -5));
+ xSymbol.push_back(m_position + wxPoint2DDouble(5, 5));
+ xSymbol.push_back(m_position + wxPoint2DDouble(-5, 5));
+ xSymbol.push_back(m_position + wxPoint2DDouble(5, -5));
+ glColor4d(0.0, 0.3, 1.0, 1.0);
+ DrawLine(xSymbol, GL_LINES);
+
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawNodes();
+}
+
+void Multiplier::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 Multiplier::UpdatePoints()
+{
+ if(m_angle == 0.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-18, -9));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-18, 9));
+ m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(18, 0));
+ } else if(m_angle == 90.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(9, -18));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-9, -18));
+ m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(0, 18));
+ } else if(m_angle == 180.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(18, 9));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(18, -9));
+ m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
+ } else if(m_angle == 270.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-9, 18));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(9, 18));
+ m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(0, -18));
+ }
+}
diff --git a/Project/Multiplier.h b/Project/Multiplier.h
new file mode 100644
index 0000000..8a25b23
--- /dev/null
+++ b/Project/Multiplier.h
@@ -0,0 +1,21 @@
+#ifndef MULTIPLIER_H
+#define MULTIPLIER_H
+
+#include "ControlElement.h"
+
+class Multiplier : public ControlElement
+{
+ public:
+ Multiplier(int id);
+ ~Multiplier();
+
+ 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) { return false; }
+ virtual void Rotate(bool clockwise = true);
+
+ virtual void UpdatePoints();
+};
+
+#endif // MULTIPLIER_H
diff --git a/Project/PowerElement.cpp b/Project/PowerElement.cpp
index 06fb4aa..03ab97e 100644
--- a/Project/PowerElement.cpp
+++ b/Project/PowerElement.cpp
@@ -8,7 +8,6 @@ PowerElement::PowerElement()
m_offlineElementColour.SetRGBA(0.5, 0.5, 0.5, 1.0);
m_closedSwitchColour.SetRGBA(0.0, 0.4, 0.0, 1.0);
m_openedSwitchColour.SetRGBA(1.0, 0.1, 0.1, 1.0);
- m_selectionColour.SetRGBA(0.0, 0.5, 1.0, 0.5);
m_powerFlowArrowColour.SetRGBA(1.0, 0.51, 0.0, 1.0);
}
diff --git a/Project/PowerElement.h b/Project/PowerElement.h
index c8108b7..7399fe8 100644
--- a/Project/PowerElement.h
+++ b/Project/PowerElement.h
@@ -173,7 +173,6 @@ protected:
OpenGLColour m_offlineElementColour;
OpenGLColour m_closedSwitchColour;
OpenGLColour m_openedSwitchColour;
- OpenGLColour m_selectionColour;
OpenGLColour m_powerFlowArrowColour;
};
diff --git a/Project/Project.mk b/Project/Project.mk
index 8c2c0bc..f2b403d 100644
--- a/Project/Project.mk
+++ b/Project/Project.mk
@@ -5,15 +5,15 @@
## Release
ProjectName :=Project
ConfigurationName :=Release
-WorkspacePath :=C:/Users/Thales/Documents/GitHub/PSP
-ProjectPath :=C:/Users/Thales/Documents/GitHub/PSP/Project
+WorkspacePath :=C:/Users/NDSE-69/Documents/GitHub/PSP
+ProjectPath :=C:/Users/NDSE-69/Documents/GitHub/PSP/Project
IntermediateDirectory :=./Release
OutDir := $(IntermediateDirectory)
CurrentFileName :=
CurrentFilePath :=
CurrentFileFullPath :=
-User :=Thales
-Date :=18/01/2017
+User :=NDSE-69
+Date :=24/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
@@ -64,11 +64,13 @@ AS := C:/TDM-GCC-64/bin/as.exe
CodeLiteDir:=C:\Program Files\CodeLite
WXWIN:=C:\wxWidgets-3.1.0
WXCFG:=gcc_dll\mswu
-Objects0=$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) $(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IntermediateDirectory)/ArtMetro.cpp$(ObjectSuffix) $(IntermediateDirectory)/wxGLString.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrameBitmaps.cpp$(ObjectSuffix) \
- $(IntermediateDirectory)/WorkspaceBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrameBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/WorkspaceBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementForm.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)/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)
+Objects0=$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) $(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IntermediateDirectory)/ArtMetro.cpp$(ObjectSuffix) $(IntermediateDirectory)/wxGLString.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) \
+ $(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)/Gain.cpp$(ObjectSuffix) $(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) \
+ $(IntermediateDirectory)/wxMathPlot_mathplot.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) $(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix)
@@ -100,7 +102,7 @@ PreBuild:
## Objects
##
$(IntermediateDirectory)/main.cpp$(ObjectSuffix): main.cpp $(IntermediateDirectory)/main.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/main.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/main.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/main.cpp$(DependSuffix): main.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/main.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/main.cpp$(DependSuffix) -MM main.cpp
@@ -108,9 +110,9 @@ $(IntermediateDirectory)/main.cpp$(PreprocessSuffix): main.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/main.cpp$(PreprocessSuffix) main.cpp
$(IntermediateDirectory)/win_resources.rc$(ObjectSuffix): win_resources.rc
- $(RcCompilerName) -i "C:/Users/Thales/Documents/GitHub/PSP/Project/win_resources.rc" $(RcCmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(RcIncludePath)
+ $(RcCompilerName) -i "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/win_resources.rc" $(RcCmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(RcIncludePath)
$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix): ElementDataObject.cpp $(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ElementDataObject.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ElementDataObject.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix): ElementDataObject.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix) -MM ElementDataObject.cpp
@@ -118,7 +120,7 @@ $(IntermediateDirectory)/ElementDataObject.cpp$(PreprocessSuffix): ElementDataOb
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElementDataObject.cpp$(PreprocessSuffix) ElementDataObject.cpp
$(IntermediateDirectory)/Element.cpp$(ObjectSuffix): Element.cpp $(IntermediateDirectory)/Element.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Element.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Element.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/Element.cpp$(DependSuffix): Element.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Element.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Element.cpp$(DependSuffix) -MM Element.cpp
@@ -126,7 +128,7 @@ $(IntermediateDirectory)/Element.cpp$(PreprocessSuffix): Element.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Element.cpp$(PreprocessSuffix) Element.cpp
$(IntermediateDirectory)/ArtMetro.cpp$(ObjectSuffix): ArtMetro.cpp $(IntermediateDirectory)/ArtMetro.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ArtMetro.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ArtMetro.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ArtMetro.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ArtMetro.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/ArtMetro.cpp$(DependSuffix): ArtMetro.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ArtMetro.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ArtMetro.cpp$(DependSuffix) -MM ArtMetro.cpp
@@ -134,7 +136,7 @@ $(IntermediateDirectory)/ArtMetro.cpp$(PreprocessSuffix): ArtMetro.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ArtMetro.cpp$(PreprocessSuffix) ArtMetro.cpp
$(IntermediateDirectory)/wxGLString.cpp$(ObjectSuffix): wxGLString.cpp $(IntermediateDirectory)/wxGLString.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/wxGLString.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/wxGLString.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/wxGLString.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/wxGLString.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/wxGLString.cpp$(DependSuffix): wxGLString.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/wxGLString.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/wxGLString.cpp$(DependSuffix) -MM wxGLString.cpp
@@ -142,7 +144,7 @@ $(IntermediateDirectory)/wxGLString.cpp$(PreprocessSuffix): wxGLString.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/wxGLString.cpp$(PreprocessSuffix) wxGLString.cpp
$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix): MainFrame.cpp $(IntermediateDirectory)/MainFrame.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/MainFrame.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/MainFrame.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/MainFrame.cpp$(DependSuffix): MainFrame.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MainFrame.cpp$(DependSuffix) -MM MainFrame.cpp
@@ -150,7 +152,7 @@ $(IntermediateDirectory)/MainFrame.cpp$(PreprocessSuffix): MainFrame.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MainFrame.cpp$(PreprocessSuffix) MainFrame.cpp
$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix): Workspace.cpp $(IntermediateDirectory)/Workspace.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Workspace.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Workspace.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/Workspace.cpp$(DependSuffix): Workspace.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Workspace.cpp$(DependSuffix) -MM Workspace.cpp
@@ -158,15 +160,31 @@ $(IntermediateDirectory)/Workspace.cpp$(PreprocessSuffix): Workspace.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Workspace.cpp$(PreprocessSuffix) Workspace.cpp
$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix): FileHanding.cpp $(IntermediateDirectory)/FileHanding.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/FileHanding.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/FileHanding.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/FileHanding.cpp$(DependSuffix): FileHanding.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/FileHanding.cpp$(DependSuffix) -MM FileHanding.cpp
$(IntermediateDirectory)/FileHanding.cpp$(PreprocessSuffix): FileHanding.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/FileHanding.cpp$(PreprocessSuffix) FileHanding.cpp
+$(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix): ControlEditor.cpp $(IntermediateDirectory)/ControlEditor.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlEditor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/ControlEditor.cpp$(DependSuffix): ControlEditor.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlEditor.cpp$(DependSuffix) -MM ControlEditor.cpp
+
+$(IntermediateDirectory)/ControlEditor.cpp$(PreprocessSuffix): ControlEditor.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlEditor.cpp$(PreprocessSuffix) ControlEditor.cpp
+
+$(IntermediateDirectory)/Camera.cpp$(ObjectSuffix): Camera.cpp $(IntermediateDirectory)/Camera.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Camera.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/Camera.cpp$(DependSuffix): Camera.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Camera.cpp$(DependSuffix) -MM Camera.cpp
+
+$(IntermediateDirectory)/Camera.cpp$(PreprocessSuffix): Camera.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Camera.cpp$(PreprocessSuffix) Camera.cpp
+
$(IntermediateDirectory)/MainFrameBitmaps.cpp$(ObjectSuffix): MainFrameBitmaps.cpp $(IntermediateDirectory)/MainFrameBitmaps.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/MainFrameBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MainFrameBitmaps.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/MainFrameBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MainFrameBitmaps.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/MainFrameBitmaps.cpp$(DependSuffix): MainFrameBitmaps.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MainFrameBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MainFrameBitmaps.cpp$(DependSuffix) -MM MainFrameBitmaps.cpp
@@ -174,7 +192,7 @@ $(IntermediateDirectory)/MainFrameBitmaps.cpp$(PreprocessSuffix): MainFrameBitma
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MainFrameBitmaps.cpp$(PreprocessSuffix) MainFrameBitmaps.cpp
$(IntermediateDirectory)/WorkspaceBitmaps.cpp$(ObjectSuffix): WorkspaceBitmaps.cpp $(IntermediateDirectory)/WorkspaceBitmaps.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/WorkspaceBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/WorkspaceBitmaps.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/WorkspaceBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/WorkspaceBitmaps.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/WorkspaceBitmaps.cpp$(DependSuffix): WorkspaceBitmaps.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/WorkspaceBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/WorkspaceBitmaps.cpp$(DependSuffix) -MM WorkspaceBitmaps.cpp
@@ -182,7 +200,7 @@ $(IntermediateDirectory)/WorkspaceBitmaps.cpp$(PreprocessSuffix): WorkspaceBitma
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/WorkspaceBitmaps.cpp$(PreprocessSuffix) WorkspaceBitmaps.cpp
$(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix): BusFormBitmaps.cpp $(IntermediateDirectory)/BusFormBitmaps.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/BusFormBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/BusFormBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/BusFormBitmaps.cpp$(DependSuffix): BusFormBitmaps.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/BusFormBitmaps.cpp$(DependSuffix) -MM BusFormBitmaps.cpp
@@ -190,15 +208,23 @@ $(IntermediateDirectory)/BusFormBitmaps.cpp$(PreprocessSuffix): BusFormBitmaps.c
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/BusFormBitmaps.cpp$(PreprocessSuffix) BusFormBitmaps.cpp
$(IntermediateDirectory)/ElementFormBitmaps.cpp$(ObjectSuffix): ElementFormBitmaps.cpp $(IntermediateDirectory)/ElementFormBitmaps.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ElementFormBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementFormBitmaps.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ElementFormBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementFormBitmaps.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/ElementFormBitmaps.cpp$(DependSuffix): ElementFormBitmaps.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElementFormBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElementFormBitmaps.cpp$(DependSuffix) -MM ElementFormBitmaps.cpp
$(IntermediateDirectory)/ElementFormBitmaps.cpp$(PreprocessSuffix): ElementFormBitmaps.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElementFormBitmaps.cpp$(PreprocessSuffix) ElementFormBitmaps.cpp
+$(IntermediateDirectory)/ControlEditorBitmaps.cpp$(ObjectSuffix): ControlEditorBitmaps.cpp $(IntermediateDirectory)/ControlEditorBitmaps.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlEditorBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlEditorBitmaps.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/ControlEditorBitmaps.cpp$(DependSuffix): ControlEditorBitmaps.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlEditorBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlEditorBitmaps.cpp$(DependSuffix) -MM ControlEditorBitmaps.cpp
+
+$(IntermediateDirectory)/ControlEditorBitmaps.cpp$(PreprocessSuffix): ControlEditorBitmaps.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlEditorBitmaps.cpp$(PreprocessSuffix) ControlEditorBitmaps.cpp
+
$(IntermediateDirectory)/MainFrameBase.cpp$(ObjectSuffix): MainFrameBase.cpp $(IntermediateDirectory)/MainFrameBase.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/MainFrameBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MainFrameBase.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/MainFrameBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MainFrameBase.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/MainFrameBase.cpp$(DependSuffix): MainFrameBase.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MainFrameBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MainFrameBase.cpp$(DependSuffix) -MM MainFrameBase.cpp
@@ -206,7 +232,7 @@ $(IntermediateDirectory)/MainFrameBase.cpp$(PreprocessSuffix): MainFrameBase.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MainFrameBase.cpp$(PreprocessSuffix) MainFrameBase.cpp
$(IntermediateDirectory)/WorkspaceBase.cpp$(ObjectSuffix): WorkspaceBase.cpp $(IntermediateDirectory)/WorkspaceBase.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/WorkspaceBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/WorkspaceBase.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/WorkspaceBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/WorkspaceBase.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/WorkspaceBase.cpp$(DependSuffix): WorkspaceBase.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/WorkspaceBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/WorkspaceBase.cpp$(DependSuffix) -MM WorkspaceBase.cpp
@@ -214,15 +240,23 @@ $(IntermediateDirectory)/WorkspaceBase.cpp$(PreprocessSuffix): WorkspaceBase.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/WorkspaceBase.cpp$(PreprocessSuffix) WorkspaceBase.cpp
$(IntermediateDirectory)/ElementForm.cpp$(ObjectSuffix): ElementForm.cpp $(IntermediateDirectory)/ElementForm.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ElementForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementForm.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ElementForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementForm.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/ElementForm.cpp$(DependSuffix): ElementForm.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElementForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElementForm.cpp$(DependSuffix) -MM ElementForm.cpp
$(IntermediateDirectory)/ElementForm.cpp$(PreprocessSuffix): ElementForm.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElementForm.cpp$(PreprocessSuffix) ElementForm.cpp
+$(IntermediateDirectory)/ControlEditorBase.cpp$(ObjectSuffix): ControlEditorBase.cpp $(IntermediateDirectory)/ControlEditorBase.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlEditorBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlEditorBase.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/ControlEditorBase.cpp$(DependSuffix): ControlEditorBase.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlEditorBase.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlEditorBase.cpp$(DependSuffix) -MM ControlEditorBase.cpp
+
+$(IntermediateDirectory)/ControlEditorBase.cpp$(PreprocessSuffix): ControlEditorBase.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlEditorBase.cpp$(PreprocessSuffix) ControlEditorBase.cpp
+
$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix): Bus.cpp $(IntermediateDirectory)/Bus.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Bus.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Bus.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/Bus.cpp$(DependSuffix): Bus.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Bus.cpp$(DependSuffix) -MM Bus.cpp
@@ -230,7 +264,7 @@ $(IntermediateDirectory)/Bus.cpp$(PreprocessSuffix): Bus.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Bus.cpp$(PreprocessSuffix) Bus.cpp
$(IntermediateDirectory)/Line.cpp$(ObjectSuffix): Line.cpp $(IntermediateDirectory)/Line.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Line.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Line.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/Line.cpp$(DependSuffix): Line.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Line.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Line.cpp$(DependSuffix) -MM Line.cpp
@@ -238,7 +272,7 @@ $(IntermediateDirectory)/Line.cpp$(PreprocessSuffix): Line.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Line.cpp$(PreprocessSuffix) Line.cpp
$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix): Transformer.cpp $(IntermediateDirectory)/Transformer.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Transformer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Transformer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/Transformer.cpp$(DependSuffix): Transformer.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Transformer.cpp$(DependSuffix) -MM Transformer.cpp
@@ -246,7 +280,7 @@ $(IntermediateDirectory)/Transformer.cpp$(PreprocessSuffix): Transformer.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Transformer.cpp$(PreprocessSuffix) Transformer.cpp
$(IntermediateDirectory)/Machines.cpp$(ObjectSuffix): Machines.cpp $(IntermediateDirectory)/Machines.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Machines.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Machines.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/Machines.cpp$(DependSuffix): Machines.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Machines.cpp$(DependSuffix) -MM Machines.cpp
@@ -254,7 +288,7 @@ $(IntermediateDirectory)/Machines.cpp$(PreprocessSuffix): Machines.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Machines.cpp$(PreprocessSuffix) Machines.cpp
$(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix): SyncGenerator.cpp $(IntermediateDirectory)/SyncGenerator.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/SyncGenerator.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SyncGenerator.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/SyncGenerator.cpp$(DependSuffix): SyncGenerator.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SyncGenerator.cpp$(DependSuffix) -MM SyncGenerator.cpp
@@ -262,7 +296,7 @@ $(IntermediateDirectory)/SyncGenerator.cpp$(PreprocessSuffix): SyncGenerator.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SyncGenerator.cpp$(PreprocessSuffix) SyncGenerator.cpp
$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix): IndMotor.cpp $(IntermediateDirectory)/IndMotor.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/IndMotor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/IndMotor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/IndMotor.cpp$(DependSuffix): IndMotor.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IndMotor.cpp$(DependSuffix) -MM IndMotor.cpp
@@ -270,7 +304,7 @@ $(IntermediateDirectory)/IndMotor.cpp$(PreprocessSuffix): IndMotor.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IndMotor.cpp$(PreprocessSuffix) IndMotor.cpp
$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix): Branch.cpp $(IntermediateDirectory)/Branch.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Branch.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Branch.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/Branch.cpp$(DependSuffix): Branch.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Branch.cpp$(DependSuffix) -MM Branch.cpp
@@ -278,7 +312,7 @@ $(IntermediateDirectory)/Branch.cpp$(PreprocessSuffix): Branch.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Branch.cpp$(PreprocessSuffix) Branch.cpp
$(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix): SyncMotor.cpp $(IntermediateDirectory)/SyncMotor.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/SyncMotor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SyncMotor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/SyncMotor.cpp$(DependSuffix): SyncMotor.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SyncMotor.cpp$(DependSuffix) -MM SyncMotor.cpp
@@ -286,7 +320,7 @@ $(IntermediateDirectory)/SyncMotor.cpp$(PreprocessSuffix): SyncMotor.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SyncMotor.cpp$(PreprocessSuffix) SyncMotor.cpp
$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix): Shunt.cpp $(IntermediateDirectory)/Shunt.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Shunt.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Shunt.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/Shunt.cpp$(DependSuffix): Shunt.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Shunt.cpp$(DependSuffix) -MM Shunt.cpp
@@ -294,7 +328,7 @@ $(IntermediateDirectory)/Shunt.cpp$(PreprocessSuffix): Shunt.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Shunt.cpp$(PreprocessSuffix) Shunt.cpp
$(IntermediateDirectory)/Load.cpp$(ObjectSuffix): Load.cpp $(IntermediateDirectory)/Load.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Load.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Load.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Load.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Load.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/Load.cpp$(DependSuffix): Load.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Load.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Load.cpp$(DependSuffix) -MM Load.cpp
@@ -302,7 +336,7 @@ $(IntermediateDirectory)/Load.cpp$(PreprocessSuffix): Load.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Load.cpp$(PreprocessSuffix) Load.cpp
$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix): Inductor.cpp $(IntermediateDirectory)/Inductor.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Inductor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Inductor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/Inductor.cpp$(DependSuffix): Inductor.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Inductor.cpp$(DependSuffix) -MM Inductor.cpp
@@ -310,7 +344,7 @@ $(IntermediateDirectory)/Inductor.cpp$(PreprocessSuffix): Inductor.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Inductor.cpp$(PreprocessSuffix) Inductor.cpp
$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix): Capacitor.cpp $(IntermediateDirectory)/Capacitor.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Capacitor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Capacitor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/Capacitor.cpp$(DependSuffix): Capacitor.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Capacitor.cpp$(DependSuffix) -MM Capacitor.cpp
@@ -318,7 +352,7 @@ $(IntermediateDirectory)/Capacitor.cpp$(PreprocessSuffix): Capacitor.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Capacitor.cpp$(PreprocessSuffix) Capacitor.cpp
$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix): PowerElement.cpp $(IntermediateDirectory)/PowerElement.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/PowerElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/PowerElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/PowerElement.cpp$(DependSuffix): PowerElement.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/PowerElement.cpp$(DependSuffix) -MM PowerElement.cpp
@@ -326,7 +360,7 @@ $(IntermediateDirectory)/PowerElement.cpp$(PreprocessSuffix): PowerElement.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/PowerElement.cpp$(PreprocessSuffix) PowerElement.cpp
$(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix): ElectricCalculation.cpp $(IntermediateDirectory)/ElectricCalculation.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ElectricCalculation.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ElectricCalculation.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/ElectricCalculation.cpp$(DependSuffix): ElectricCalculation.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElectricCalculation.cpp$(DependSuffix) -MM ElectricCalculation.cpp
@@ -334,7 +368,7 @@ $(IntermediateDirectory)/ElectricCalculation.cpp$(PreprocessSuffix): ElectricCal
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElectricCalculation.cpp$(PreprocessSuffix) ElectricCalculation.cpp
$(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix): PowerFlow.cpp $(IntermediateDirectory)/PowerFlow.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/PowerFlow.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/PowerFlow.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/PowerFlow.cpp$(DependSuffix): PowerFlow.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/PowerFlow.cpp$(DependSuffix) -MM PowerFlow.cpp
@@ -342,7 +376,7 @@ $(IntermediateDirectory)/PowerFlow.cpp$(PreprocessSuffix): PowerFlow.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/PowerFlow.cpp$(PreprocessSuffix) PowerFlow.cpp
$(IntermediateDirectory)/Fault.cpp$(ObjectSuffix): Fault.cpp $(IntermediateDirectory)/Fault.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Fault.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Fault.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/Fault.cpp$(DependSuffix): Fault.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Fault.cpp$(DependSuffix) -MM Fault.cpp
@@ -350,7 +384,7 @@ $(IntermediateDirectory)/Fault.cpp$(PreprocessSuffix): Fault.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Fault.cpp$(PreprocessSuffix) Fault.cpp
$(IntermediateDirectory)/Text.cpp$(ObjectSuffix): Text.cpp $(IntermediateDirectory)/Text.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/Text.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Text.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Text.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Text.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/Text.cpp$(DependSuffix): Text.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Text.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Text.cpp$(DependSuffix) -MM Text.cpp
@@ -358,7 +392,7 @@ $(IntermediateDirectory)/Text.cpp$(PreprocessSuffix): Text.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Text.cpp$(PreprocessSuffix) Text.cpp
$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix): GraphicalElement.cpp $(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/GraphicalElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GraphicalElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix): GraphicalElement.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix) -MM GraphicalElement.cpp
@@ -366,15 +400,111 @@ $(IntermediateDirectory)/GraphicalElement.cpp$(PreprocessSuffix): GraphicalEleme
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GraphicalElement.cpp$(PreprocessSuffix) GraphicalElement.cpp
$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix): ControlElement.cpp $(IntermediateDirectory)/ControlElement.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ControlElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/ControlElement.cpp$(DependSuffix): ControlElement.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlElement.cpp$(DependSuffix) -MM ControlElement.cpp
$(IntermediateDirectory)/ControlElement.cpp$(PreprocessSuffix): ControlElement.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlElement.cpp$(PreprocessSuffix) ControlElement.cpp
+$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix): TransferFunction.cpp $(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TransferFunction.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix): TransferFunction.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix) -MM TransferFunction.cpp
+
+$(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix): TransferFunction.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix) TransferFunction.cpp
+
+$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix): ConnectionLine.cpp $(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ConnectionLine.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix): ConnectionLine.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix) -MM ConnectionLine.cpp
+
+$(IntermediateDirectory)/ConnectionLine.cpp$(PreprocessSuffix): ConnectionLine.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ConnectionLine.cpp$(PreprocessSuffix) ConnectionLine.cpp
+
+$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix): Sum.cpp $(IntermediateDirectory)/Sum.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Sum.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/Sum.cpp$(DependSuffix): Sum.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Sum.cpp$(DependSuffix) -MM Sum.cpp
+
+$(IntermediateDirectory)/Sum.cpp$(PreprocessSuffix): Sum.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Sum.cpp$(PreprocessSuffix) Sum.cpp
+
+$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix): Multiplier.cpp $(IntermediateDirectory)/Multiplier.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Multiplier.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/Multiplier.cpp$(DependSuffix): Multiplier.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Multiplier.cpp$(DependSuffix) -MM Multiplier.cpp
+
+$(IntermediateDirectory)/Multiplier.cpp$(PreprocessSuffix): Multiplier.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Multiplier.cpp$(PreprocessSuffix) Multiplier.cpp
+
+$(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix): Limiter.cpp $(IntermediateDirectory)/Limiter.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Limiter.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/Limiter.cpp$(DependSuffix): Limiter.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Limiter.cpp$(DependSuffix) -MM Limiter.cpp
+
+$(IntermediateDirectory)/Limiter.cpp$(PreprocessSuffix): Limiter.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Limiter.cpp$(PreprocessSuffix) Limiter.cpp
+
+$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix): RateLimiter.cpp $(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/RateLimiter.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix): RateLimiter.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix) -MM RateLimiter.cpp
+
+$(IntermediateDirectory)/RateLimiter.cpp$(PreprocessSuffix): RateLimiter.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/RateLimiter.cpp$(PreprocessSuffix) RateLimiter.cpp
+
+$(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix): Exponential.cpp $(IntermediateDirectory)/Exponential.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Exponential.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/Exponential.cpp$(DependSuffix): Exponential.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Exponential.cpp$(DependSuffix) -MM Exponential.cpp
+
+$(IntermediateDirectory)/Exponential.cpp$(PreprocessSuffix): Exponential.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Exponential.cpp$(PreprocessSuffix) Exponential.cpp
+
+$(IntermediateDirectory)/Constant.cpp$(ObjectSuffix): Constant.cpp $(IntermediateDirectory)/Constant.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Constant.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/Constant.cpp$(DependSuffix): Constant.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Constant.cpp$(DependSuffix) -MM 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)/IOControl.cpp$(ObjectSuffix): IOControl.cpp $(IntermediateDirectory)/IOControl.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/IOControl.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/IOControl.cpp$(DependSuffix): IOControl.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IOControl.cpp$(DependSuffix) -MM IOControl.cpp
+
+$(IntermediateDirectory)/IOControl.cpp$(PreprocessSuffix): IOControl.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IOControl.cpp$(PreprocessSuffix) IOControl.cpp
+
+$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix): ControlElementContainer.cpp $(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlElementContainer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix): ControlElementContainer.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix) -MM ControlElementContainer.cpp
+
+$(IntermediateDirectory)/ControlElementContainer.cpp$(PreprocessSuffix): ControlElementContainer.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlElementContainer.cpp$(PreprocessSuffix) ControlElementContainer.cpp
+
+$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix): wxMathPlot/mathplot.cpp $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/wxMathPlot/mathplot.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix): wxMathPlot/mathplot.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix) -MM wxMathPlot/mathplot.cpp
+
+$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(PreprocessSuffix): wxMathPlot/mathplot.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(PreprocessSuffix) wxMathPlot/mathplot.cpp
+
$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix): BusForm.cpp $(IntermediateDirectory)/BusForm.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/BusForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IncludePath)
+ $(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
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/BusForm.cpp$(DependSuffix) -MM BusForm.cpp
@@ -382,7 +512,7 @@ $(IntermediateDirectory)/BusForm.cpp$(PreprocessSuffix): BusForm.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/BusForm.cpp$(PreprocessSuffix) BusForm.cpp
$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix): GeneratorStabForm.cpp $(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/GeneratorStabForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GeneratorStabForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix): GeneratorStabForm.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix) -MM GeneratorStabForm.cpp
@@ -390,7 +520,7 @@ $(IntermediateDirectory)/GeneratorStabForm.cpp$(PreprocessSuffix): GeneratorStab
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GeneratorStabForm.cpp$(PreprocessSuffix) GeneratorStabForm.cpp
$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix): LineForm.cpp $(IntermediateDirectory)/LineForm.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/LineForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/LineForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/LineForm.cpp$(DependSuffix): LineForm.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LineForm.cpp$(DependSuffix) -MM LineForm.cpp
@@ -398,7 +528,7 @@ $(IntermediateDirectory)/LineForm.cpp$(PreprocessSuffix): LineForm.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LineForm.cpp$(PreprocessSuffix) LineForm.cpp
$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix): SwitchingForm.cpp $(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/SwitchingForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SwitchingForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix): SwitchingForm.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix) -MM SwitchingForm.cpp
@@ -406,7 +536,7 @@ $(IntermediateDirectory)/SwitchingForm.cpp$(PreprocessSuffix): SwitchingForm.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SwitchingForm.cpp$(PreprocessSuffix) SwitchingForm.cpp
$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix): TransformerForm.cpp $(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/TransformerForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TransformerForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix): TransformerForm.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix) -MM TransformerForm.cpp
@@ -414,7 +544,7 @@ $(IntermediateDirectory)/TransformerForm.cpp$(PreprocessSuffix): TransformerForm
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransformerForm.cpp$(PreprocessSuffix) TransformerForm.cpp
$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix): LoadForm.cpp $(IntermediateDirectory)/LoadForm.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/LoadForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/LoadForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/LoadForm.cpp$(DependSuffix): LoadForm.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LoadForm.cpp$(DependSuffix) -MM LoadForm.cpp
@@ -422,7 +552,7 @@ $(IntermediateDirectory)/LoadForm.cpp$(PreprocessSuffix): LoadForm.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LoadForm.cpp$(PreprocessSuffix) LoadForm.cpp
$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix): ReactiveShuntElementForm.cpp $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ReactiveShuntElementForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ReactiveShuntElementForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix): ReactiveShuntElementForm.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix) -MM ReactiveShuntElementForm.cpp
@@ -430,7 +560,7 @@ $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(PreprocessSuffix): Reacti
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(PreprocessSuffix) ReactiveShuntElementForm.cpp
$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix): IndMotorForm.cpp $(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/IndMotorForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/IndMotorForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix): IndMotorForm.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix) -MM IndMotorForm.cpp
@@ -438,7 +568,7 @@ $(IntermediateDirectory)/IndMotorForm.cpp$(PreprocessSuffix): IndMotorForm.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IndMotorForm.cpp$(PreprocessSuffix) IndMotorForm.cpp
$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix): SyncMachineForm.cpp $(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/SyncMachineForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SyncMachineForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix): SyncMachineForm.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix) -MM SyncMachineForm.cpp
@@ -446,13 +576,77 @@ $(IntermediateDirectory)/SyncMachineForm.cpp$(PreprocessSuffix): SyncMachineForm
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SyncMachineForm.cpp$(PreprocessSuffix) SyncMachineForm.cpp
$(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix): TextForm.cpp $(IntermediateDirectory)/TextForm.cpp$(DependSuffix)
- $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/TextForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IncludePath)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TextForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/TextForm.cpp$(DependSuffix): TextForm.cpp
@$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TextForm.cpp$(DependSuffix) -MM TextForm.cpp
$(IntermediateDirectory)/TextForm.cpp$(PreprocessSuffix): TextForm.cpp
$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TextForm.cpp$(PreprocessSuffix) TextForm.cpp
+$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix): TransferFunctionForm.cpp $(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TransferFunctionForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix): TransferFunctionForm.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix) -MM TransferFunctionForm.cpp
+
+$(IntermediateDirectory)/TransferFunctionForm.cpp$(PreprocessSuffix): TransferFunctionForm.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransferFunctionForm.cpp$(PreprocessSuffix) TransferFunctionForm.cpp
+
+$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix): SumForm.cpp $(IntermediateDirectory)/SumForm.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SumForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/SumForm.cpp$(DependSuffix): SumForm.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SumForm.cpp$(DependSuffix) -MM SumForm.cpp
+
+$(IntermediateDirectory)/SumForm.cpp$(PreprocessSuffix): SumForm.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SumForm.cpp$(PreprocessSuffix) SumForm.cpp
+
+$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix): LimiterForm.cpp $(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/LimiterForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix): LimiterForm.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix) -MM LimiterForm.cpp
+
+$(IntermediateDirectory)/LimiterForm.cpp$(PreprocessSuffix): LimiterForm.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LimiterForm.cpp$(PreprocessSuffix) LimiterForm.cpp
+
+$(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix): RateLimiterForm.cpp $(IntermediateDirectory)/RateLimiterForm.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/RateLimiterForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/RateLimiterForm.cpp$(DependSuffix): RateLimiterForm.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/RateLimiterForm.cpp$(DependSuffix) -MM RateLimiterForm.cpp
+
+$(IntermediateDirectory)/RateLimiterForm.cpp$(PreprocessSuffix): RateLimiterForm.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/RateLimiterForm.cpp$(PreprocessSuffix) RateLimiterForm.cpp
+
+$(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix): ExponentialForm.cpp $(IntermediateDirectory)/ExponentialForm.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ExponentialForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/ExponentialForm.cpp$(DependSuffix): ExponentialForm.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ExponentialForm.cpp$(DependSuffix) -MM ExponentialForm.cpp
+
+$(IntermediateDirectory)/ExponentialForm.cpp$(PreprocessSuffix): ExponentialForm.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ExponentialForm.cpp$(PreprocessSuffix) ExponentialForm.cpp
+
+$(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix): ConstantForm.cpp $(IntermediateDirectory)/ConstantForm.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ConstantForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/ConstantForm.cpp$(DependSuffix): ConstantForm.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ConstantForm.cpp$(DependSuffix) -MM 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
+
+$(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix): IOControlForm.cpp $(IntermediateDirectory)/IOControlForm.cpp$(DependSuffix)
+ $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/IOControlForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix) $(IncludePath)
+$(IntermediateDirectory)/IOControlForm.cpp$(DependSuffix): IOControlForm.cpp
+ @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IOControlForm.cpp$(DependSuffix) -MM IOControlForm.cpp
+
+$(IntermediateDirectory)/IOControlForm.cpp$(PreprocessSuffix): IOControlForm.cpp
+ $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IOControlForm.cpp$(PreprocessSuffix) IOControlForm.cpp
+
-include $(IntermediateDirectory)/*$(DependSuffix)
##
diff --git a/Project/Project.project b/Project/Project.project
index 38e449f..ac88084 100644
--- a/Project/Project.project
+++ b/Project/Project.project
@@ -38,11 +38,25 @@
<File Name="Element.cpp"/>
<VirtualDirectory Name="control element">
<File Name="ControlElement.cpp"/>
+ <File Name="TransferFunction.cpp"/>
+ <File Name="ConnectionLine.cpp"/>
+ <File Name="Sum.cpp"/>
+ <File Name="Multiplier.cpp"/>
+ <File Name="Limiter.cpp"/>
+ <File Name="RateLimiter.cpp"/>
+ <File Name="Exponential.cpp"/>
+ <File Name="Constant.cpp"/>
+ <File Name="Gain.cpp"/>
+ <File Name="IOControl.cpp"/>
+ <File Name="ControlElementContainer.cpp"/>
</VirtualDirectory>
</VirtualDirectory>
<VirtualDirectory Name="view">
<File Name="ArtMetro.cpp"/>
<File Name="wxGLString.cpp"/>
+ <VirtualDirectory Name="wxMathPlot">
+ <File Name="wxMathPlot/mathplot.cpp"/>
+ </VirtualDirectory>
</VirtualDirectory>
<VirtualDirectory Name="controller">
<File Name="MainFrame.cpp"/>
@@ -62,6 +76,18 @@
<VirtualDirectory Name="graphical element form">
<File Name="TextForm.cpp"/>
</VirtualDirectory>
+ <File Name="ControlEditor.cpp"/>
+ <File Name="Camera.cpp"/>
+ <VirtualDirectory Name="control element form">
+ <File Name="TransferFunctionForm.cpp"/>
+ <File Name="SumForm.cpp"/>
+ <File Name="LimiterForm.cpp"/>
+ <File Name="RateLimiterForm.cpp"/>
+ <File Name="ExponentialForm.cpp"/>
+ <File Name="ConstantForm.cpp"/>
+ <File Name="GainForm.cpp"/>
+ <File Name="IOControlForm.cpp"/>
+ </VirtualDirectory>
</VirtualDirectory>
<File Name="main.cpp"/>
</VirtualDirectory>
@@ -101,11 +127,25 @@
</VirtualDirectory>
<VirtualDirectory Name="control element">
<File Name="ControlElement.h"/>
+ <File Name="TransferFunction.h"/>
+ <File Name="ConnectionLine.h"/>
+ <File Name="Sum.h"/>
+ <File Name="Multiplier.h"/>
+ <File Name="Limiter.h"/>
+ <File Name="RateLimiter.h"/>
+ <File Name="Exponential.h"/>
+ <File Name="Constant.h"/>
+ <File Name="Gain.h"/>
+ <File Name="IOControl.h"/>
+ <File Name="ControlElementContainer.h"/>
</VirtualDirectory>
</VirtualDirectory>
<VirtualDirectory Name="view">
<File Name="ArtMetro.h"/>
<File Name="wxGLString.h"/>
+ <VirtualDirectory Name="wxMathPlot">
+ <File Name="wxMathPlot/mathplot.h"/>
+ </VirtualDirectory>
</VirtualDirectory>
<VirtualDirectory Name="controller">
<File Name="MainFrame.h"/>
@@ -125,6 +165,18 @@
<VirtualDirectory Name="graphical element form">
<File Name="TextForm.h"/>
</VirtualDirectory>
+ <File Name="ControlEditor.h"/>
+ <File Name="Camera.h"/>
+ <VirtualDirectory Name="control element form">
+ <File Name="TransferFunctionForm.h"/>
+ <File Name="SumForm.h"/>
+ <File Name="LimiterForm.h"/>
+ <File Name="RateLimiterForm.h"/>
+ <File Name="ExponentialForm.h"/>
+ <File Name="ConstantForm.h"/>
+ <File Name="GainForm.h"/>
+ <File Name="IOControlForm.h"/>
+ </VirtualDirectory>
</VirtualDirectory>
</VirtualDirectory>
<VirtualDirectory Name="resources">
@@ -136,6 +188,7 @@
<File Name="WorkspaceBitmaps.cpp"/>
<File Name="BusFormBitmaps.cpp"/>
<File Name="ElementFormBitmaps.cpp"/>
+ <File Name="ControlEditorBitmaps.cpp"/>
</VirtualDirectory>
<VirtualDirectory Name="base">
<File Name="MainFrameBase.h"/>
@@ -144,10 +197,14 @@
<File Name="WorkspaceBase.cpp"/>
<File Name="ElementForm.h"/>
<File Name="ElementForm.cpp"/>
+ <File Name="ControlEditorBase.h"/>
+ <File Name="ControlEditorBase.cpp"/>
</VirtualDirectory>
<File Name="MainFrame.wxcp"/>
<File Name="Workspace.wxcp"/>
<File Name="ElementForm.wxcp"/>
+ <File Name="ControlEditor.wxcp"/>
+ <File Name="ChartView.wxcp"/>
</VirtualDirectory>
<Settings Type="Executable">
<GlobalSettings>
diff --git a/Project/Project.txt b/Project/Project.txt
index 86d63a5..806024e 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/MainFrameBitmaps.cpp.o ./Release/WorkspaceBitmaps.cpp.o ./Release/BusFormBitmaps.cpp.o ./Release/ElementFormBitmaps.cpp.o ./Release/MainFrameBase.cpp.o ./Release/WorkspaceBase.cpp.o ./Release/ElementForm.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/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/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/IOControl.cpp.o ./Release/ControlElementContainer.cpp.o ./Release/wxMathPlot_mathplot.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 ./Release/IOControlForm.cpp.o
diff --git a/Project/RateLimiter.cpp b/Project/RateLimiter.cpp
new file mode 100644
index 0000000..5da0578
--- /dev/null
+++ b/Project/RateLimiter.cpp
@@ -0,0 +1,97 @@
+#include "RateLimiter.h"
+#include "RateLimiterForm.h"
+
+RateLimiter::RateLimiter(int id) : ControlElement(id)
+{
+ m_width = m_height = 36.0;
+ Node* nodeIn = new Node(m_position + wxPoint2DDouble(-18, 0), Node::NODE_IN, m_borderSize);
+ nodeIn->StartMove(m_position);
+ Node* nodeOut = new Node(m_position + wxPoint2DDouble(18, 0), Node::NODE_OUT, m_borderSize);
+ nodeOut->SetAngle(180.0);
+ nodeOut->StartMove(m_position);
+ m_nodeList.push_back(nodeIn);
+ m_nodeList.push_back(nodeOut);
+}
+
+RateLimiter::~RateLimiter()
+{
+}
+
+void RateLimiter::Draw(wxPoint2DDouble translation, double scale) const
+{
+ glLineWidth(1.0);
+ if(m_selected) {
+ glColor4dv(m_selectionColour.GetRGBA());
+ double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
+ DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
+ }
+ glColor4d(1.0, 1.0, 1.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
+
+ // Plot symbol.
+ std::vector<wxPoint2DDouble> axis;
+ axis.push_back(m_position + wxPoint2DDouble(-13, 0));
+ axis.push_back(m_position + wxPoint2DDouble(13, 0));
+ axis.push_back(m_position + wxPoint2DDouble(0, -13));
+ axis.push_back(m_position + wxPoint2DDouble(0, 13));
+ DrawLine(axis, GL_LINES);
+
+ glLineWidth(2.0);
+ std::vector<wxPoint2DDouble> limSymbol;
+ limSymbol.push_back(m_position + wxPoint2DDouble(10, -10));
+ limSymbol.push_back(m_position + wxPoint2DDouble(-10, 10));
+ glColor4d(0.0, 0.3, 1.0, 1.0);
+ DrawLine(limSymbol);
+
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawNodes();
+}
+
+bool RateLimiter::ShowForm(wxWindow* parent, Element* element)
+{
+ RateLimiterForm* form = new RateLimiterForm(parent, this);
+ if(form->ShowModal() == wxID_OK) {
+ form->Destroy();
+ return true;
+ }
+ form->Destroy();
+ return false;
+}
+
+void RateLimiter::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 RateLimiter::UpdatePoints()
+{
+ if(m_angle == 0.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(18, 0));
+ } else if(m_angle == 90.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -18));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, 18));
+ } else if(m_angle == 180.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(18, 0));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
+ } else if(m_angle == 270.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, 18));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, -18));
+ }
+}
diff --git a/Project/RateLimiter.h b/Project/RateLimiter.h
new file mode 100644
index 0000000..d17642b
--- /dev/null
+++ b/Project/RateLimiter.h
@@ -0,0 +1,32 @@
+#ifndef RATELIMITER_H
+#define RATELIMITER_H
+
+#include "ControlElement.h"
+
+class RateLimiterForm;
+
+class RateLimiter : public ControlElement
+{
+ public:
+ RateLimiter(int id);
+ ~RateLimiter();
+
+ 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 UpdatePoints();
+
+ double GetUpLimit() const { return m_upLimit; }
+ double GetLowLimit() const { return m_lowLimit; }
+ void SetUpLimit(double upLimit) { m_upLimit = upLimit; }
+ void SetLowLimit(double lowLimit) { m_lowLimit = lowLimit; }
+
+ protected:
+ double m_upLimit = 5.0;
+ double m_lowLimit = -5.0;
+};
+
+#endif // RATELIMITER_H
diff --git a/Project/RateLimiterForm.cpp b/Project/RateLimiterForm.cpp
new file mode 100644
index 0000000..e0d11f2
--- /dev/null
+++ b/Project/RateLimiterForm.cpp
@@ -0,0 +1,35 @@
+#include "RateLimiterForm.h"
+#include "RateLimiter.h"
+
+RateLimiterForm::RateLimiterForm(wxWindow* parent, RateLimiter* rateLimiter) : RateLimiterFormBase(parent)
+{
+ m_rateLimiter = rateLimiter;
+ m_parent = parent;
+
+ m_textCtrlUpLimit->SetValue(m_rateLimiter->StringFromDouble(m_rateLimiter->GetUpLimit()));
+ m_textCtrlLowLimit->SetValue(m_rateLimiter->StringFromDouble(m_rateLimiter->GetLowLimit()));
+}
+
+RateLimiterForm::~RateLimiterForm() {}
+bool RateLimiterForm::ValidateData()
+{
+ double upLimit;
+ double lowLimit;
+
+ if(!m_rateLimiter->DoubleFromString(this, m_textCtrlUpLimit->GetValue(), upLimit,
+ _("Value entered incorrectly in the field \"Upper limit\".")))
+ return false;
+ if(!m_rateLimiter->DoubleFromString(this, m_textCtrlLowLimit->GetValue(), lowLimit,
+ _("Value entered incorrectly in the field \"Lower limit\".")))
+ return false;
+
+ m_rateLimiter->SetUpLimit(upLimit);
+ m_rateLimiter->SetLowLimit(lowLimit);
+
+ return true;
+}
+
+void RateLimiterForm::OnOKButtonClick(wxCommandEvent& event)
+{
+ if(ValidateData()) EndModal(wxID_OK);
+}
diff --git a/Project/RateLimiterForm.h b/Project/RateLimiterForm.h
new file mode 100644
index 0000000..539504e
--- /dev/null
+++ b/Project/RateLimiterForm.h
@@ -0,0 +1,21 @@
+#ifndef RATELIMITERFORM_H
+#define RATELIMITERFORM_H
+#include "ElementForm.h"
+
+class RateLimiter;
+
+class RateLimiterForm : public RateLimiterFormBase
+{
+ public:
+ RateLimiterForm(wxWindow* parent, RateLimiter* rateLimiter);
+ virtual ~RateLimiterForm();
+ bool ValidateData();
+
+ protected:
+ virtual void OnCancelButtonClick(wxCommandEvent& event) {EndModal(wxID_OK);}
+ virtual void OnOKButtonClick(wxCommandEvent& event);
+
+ wxWindow* m_parent = NULL;
+ RateLimiter* m_rateLimiter = NULL;
+};
+#endif // RATELIMITERFORM_H
diff --git a/Project/Sum.cpp b/Project/Sum.cpp
new file mode 100644
index 0000000..606b367
--- /dev/null
+++ b/Project/Sum.cpp
@@ -0,0 +1,183 @@
+#include "Sum.h"
+#include "SumForm.h"
+
+Sum::Sum(int id)
+ : ControlElement(id)
+{
+ m_width = m_height = 36.0;
+ Node* nodeIn1 = new Node(m_position + wxPoint2DDouble(-m_width / 2, 9 - m_height / 2), Node::NODE_IN, m_borderSize);
+ nodeIn1->StartMove(m_position);
+ Node* nodeIn2 =
+ new Node(m_position + wxPoint2DDouble(-m_width / 2, 27 - m_height / 2), Node::NODE_IN, m_borderSize);
+ nodeIn2->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(nodeIn1);
+ m_nodeList.push_back(nodeIn2);
+ m_nodeList.push_back(nodeOut);
+ m_signalList.push_back(SIGNAL_POSITIVE);
+ m_signalList.push_back(SIGNAL_NEGATIVE);
+
+ UpdatePoints();
+}
+
+Sum::~Sum() {}
+
+void Sum::Draw(wxPoint2DDouble translation, double scale) const
+{
+ glLineWidth(1.0);
+ if(m_selected) {
+ glColor4dv(m_selectionColour.GetRGBA());
+ double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
+ DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
+ }
+ glColor4d(1.0, 1.0, 1.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
+
+ // Plot signals.
+ glLineWidth(2.0);
+ wxPoint2DDouble signalOffset[4];
+ wxPoint2DDouble sigmaOffset;
+ if(m_angle == 0.0) {
+ signalOffset[0] = wxPoint2DDouble(6, 0);
+ signalOffset[1] = wxPoint2DDouble(12, 0);
+ signalOffset[2] = wxPoint2DDouble(9, -3);
+ signalOffset[3] = wxPoint2DDouble(9, 3);
+ sigmaOffset = wxPoint2DDouble(6, 0);
+ } else if(m_angle == 90.0) {
+ signalOffset[0] = wxPoint2DDouble(-3, 9);
+ signalOffset[1] = wxPoint2DDouble(3, 9);
+ signalOffset[2] = wxPoint2DDouble(0, 6);
+ signalOffset[3] = wxPoint2DDouble(0, 12);
+ sigmaOffset = wxPoint2DDouble(0, 6);
+ } else if(m_angle == 180.0) {
+ signalOffset[0] = wxPoint2DDouble(-6, 0);
+ signalOffset[1] = wxPoint2DDouble(-12, 0);
+ signalOffset[2] = wxPoint2DDouble(-9, -3);
+ signalOffset[3] = wxPoint2DDouble(-9, 3);
+ sigmaOffset = wxPoint2DDouble(-6, 0);
+ } else if(m_angle == 270.0) {
+ signalOffset[0] = wxPoint2DDouble(-3, -9);
+ signalOffset[1] = wxPoint2DDouble(3, -9);
+ signalOffset[2] = wxPoint2DDouble(0, -6);
+ signalOffset[3] = wxPoint2DDouble(0, -12);
+ sigmaOffset = wxPoint2DDouble(0, -6);
+ }
+ for(int i = 0; i < (int)m_nodeList.size() - 1; ++i) {
+ std::vector<wxPoint2DDouble> hLine;
+ hLine.push_back(m_nodeList[i]->GetPosition() + signalOffset[0]);
+ hLine.push_back(m_nodeList[i]->GetPosition() + signalOffset[1]);
+ DrawLine(hLine);
+ if(m_signalList[i] == SIGNAL_POSITIVE) {
+ std::vector<wxPoint2DDouble> vLine;
+ vLine.push_back(m_nodeList[i]->GetPosition() + signalOffset[2]);
+ vLine.push_back(m_nodeList[i]->GetPosition() + signalOffset[3]);
+ DrawLine(vLine);
+ }
+ }
+
+ // Plot sigma.
+ std::vector<wxPoint2DDouble> sigma;
+ sigma.push_back(m_position + wxPoint2DDouble(4, 9) + sigmaOffset);
+ sigma.push_back(m_position + wxPoint2DDouble(-6, 9) + sigmaOffset);
+ sigma.push_back(m_position + wxPoint2DDouble(0, 0) + sigmaOffset);
+ sigma.push_back(m_position + wxPoint2DDouble(-6, -9) + sigmaOffset);
+ sigma.push_back(m_position + wxPoint2DDouble(4, -9) + sigmaOffset);
+ glColor4d(0.0, 0.3, 1.0, 1.0);
+ DrawLine(sigma);
+
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawNodes();
+}
+
+bool Sum::ShowForm(wxWindow* parent, Element* element)
+{
+ SumForm* sumForm = new SumForm(parent, this);
+ if(sumForm->ShowModal() == wxID_OK) {
+ sumForm->Destroy();
+ return true;
+ }
+ sumForm->Destroy();
+ return false;
+}
+
+void Sum::UpdatePoints()
+{
+ if(m_angle == 0.0 || m_angle == 180.0) {
+ m_height = 18.0 * (m_nodeList.size() - 1);
+ m_width = 36.0;
+ } else {
+ m_width = 18.0 * (m_nodeList.size() - 1);
+ m_height = 42.0;
+ }
+
+ for(int i = 0; i < (int)m_nodeList.size() - 1; ++i) {
+ if(m_angle == 0.0)
+ m_nodeList[i]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 9 + 18 * i - m_height / 2));
+ else if(m_angle == 90.0)
+ m_nodeList[i]->SetPosition(m_position + wxPoint2DDouble(m_width / 2 - 9 - 18 * i, -m_height / 2));
+ else if(m_angle == 180.0)
+ m_nodeList[i]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, m_height / 2 - 9 - 18 * i));
+ else if(m_angle == 270.0)
+ m_nodeList[i]->SetPosition(m_position + wxPoint2DDouble(9 + 18 * i - m_width / 2, m_height / 2));
+ }
+ if(m_angle == 0.0)
+ m_nodeList[m_nodeList.size() - 1]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
+ else if(m_angle == 90.0)
+ m_nodeList[m_nodeList.size() - 1]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
+ else if(m_angle == 180.0)
+ m_nodeList[m_nodeList.size() - 1]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
+ else if(m_angle == 270.0)
+ m_nodeList[m_nodeList.size() - 1]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
+
+ SetPosition(m_position); // Update rect.
+}
+
+void Sum::AddInNode()
+{
+ Node* newNode = new Node(wxPoint2DDouble(0, 0), Node::NODE_IN, m_borderSize);
+ m_nodeList.insert(m_nodeList.end() - 1, newNode);
+}
+
+void Sum::RemoveInNode()
+{
+ Node* nodeToRemove = *(m_nodeList.end() - 2);
+ bool foundChild = false;
+ for(auto it = m_childList.begin(), itEnd = m_childList.end(); it != itEnd; ++it) {
+ ControlElement* child = static_cast<ControlElement*>(*it);
+ auto childNodeList = child->GetNodeList();
+ for(auto itN = childNodeList.begin(), itEndN = childNodeList.end(); itN != itEndN; ++itN) {
+ Node* node = *itN;
+ if(node == nodeToRemove) {
+ child->RemoveParent(this);
+ RemoveChild(child);
+ foundChild = true;
+ break;
+ }
+ }
+ if(foundChild) break;
+ }
+ m_nodeList.erase(m_nodeList.end() - 2);
+}
+
+void Sum::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);
+ }
+}
diff --git a/Project/Sum.h b/Project/Sum.h
new file mode 100644
index 0000000..a99067e
--- /dev/null
+++ b/Project/Sum.h
@@ -0,0 +1,32 @@
+#ifndef SUM_H
+#define SUM_H
+
+#include "ControlElement.h"
+
+class SumForm;
+
+class Sum : public ControlElement
+{
+public:
+ enum Signal { SIGNAL_POSITIVE = 0, SIGNAL_NEGATIVE };
+ Sum(int id);
+ ~Sum();
+
+ 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 std::vector<Signal> GetSignalList() const { return m_signalList; }
+ virtual void SetSignalList(std::vector<Signal> signalList) { m_signalList = signalList; }
+
+ virtual void UpdatePoints();
+ void AddInNode();
+ void RemoveInNode();
+
+protected:
+ std::vector<Signal> m_signalList;
+};
+
+#endif // SUM_H
diff --git a/Project/SumForm.cpp b/Project/SumForm.cpp
new file mode 100644
index 0000000..2bb7c67
--- /dev/null
+++ b/Project/SumForm.cpp
@@ -0,0 +1,78 @@
+#include "SumForm.h"
+#include "Sum.h"
+
+SumForm::SumForm(wxWindow* parent, Sum* sum)
+ : SumFormBase(parent)
+{
+ m_parent = parent;
+ m_sum = sum;
+
+ wxString signalStr = "";
+ auto signalList = m_sum->GetSignalList();
+ for(auto it = signalList.begin(), itEnd = signalList.end(); it != itEnd; ++it) {
+ Sum::Signal signal = *it;
+ switch(signal) {
+ case Sum::SIGNAL_POSITIVE: {
+ signalStr += "+";
+ } break;
+ case Sum::SIGNAL_NEGATIVE: {
+ signalStr += "-";
+ } break;
+ }
+ if(it != itEnd - 1) signalStr += " ";
+ }
+ m_textCtrlSigns->SetValue(signalStr);
+}
+
+SumForm::~SumForm() {}
+
+void SumForm::OnOKClick(wxCommandEvent& event)
+{
+ if(ValidateData()) EndModal(wxID_OK);
+}
+
+bool SumForm::ValidateData()
+{
+ wxString signalStr = "";
+ for(int i = 0; i < (int)m_textCtrlSigns->GetValue().length(); ++i) {
+ if(m_textCtrlSigns->GetValue()[i] != ' ') signalStr += m_textCtrlSigns->GetValue()[i];
+ }
+ if(signalStr.size() < 2){
+ wxMessageDialog msg(this, _("You must assign at least two signals."), _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
+ msg.ShowModal();
+ return false;
+ }
+
+ std::vector<Sum::Signal> signalList;
+ for(int i = 0; i < (int)signalStr.length(); ++i) {
+ switch(signalStr[i].GetValue()) {
+ case '+': {
+ signalList.push_back(Sum::SIGNAL_POSITIVE);
+ } break;
+ case '-': {
+ signalList.push_back(Sum::SIGNAL_NEGATIVE);
+ } break;
+ default: {
+ wxMessageDialog msg(this, _("Value entered incorrectly in the field \"Signs\"."), _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
+ msg.ShowModal();
+ return false;
+ }
+ }
+ }
+
+ int diff = (int)signalList.size() - (int)m_sum->GetSignalList().size();
+
+ if(diff < 0) {
+ diff = std::abs(diff);
+ for(int i = 0; i < diff; ++i) {
+ m_sum->RemoveInNode();
+ }
+ } else if(diff > 0) {
+ for(int i = 0; i < diff; ++i) {
+ m_sum->AddInNode();
+ }
+ }
+ m_sum->SetSignalList(signalList);
+ m_sum->UpdatePoints();
+ return true;
+}
diff --git a/Project/SumForm.h b/Project/SumForm.h
new file mode 100644
index 0000000..cf29421
--- /dev/null
+++ b/Project/SumForm.h
@@ -0,0 +1,22 @@
+#ifndef SUMFORM_H
+#define SUMFORM_H
+
+#include "ElementForm.h"
+
+class Sum;
+
+class SumForm : public SumFormBase
+{
+public:
+ SumForm(wxWindow* parent, Sum* sum);
+ virtual ~SumForm();
+
+ bool ValidateData();
+
+protected:
+ virtual void OnCancelClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
+ virtual void OnOKClick(wxCommandEvent& event);
+ wxWindow* m_parent = NULL;
+ Sum* m_sum = NULL;
+};
+#endif // SUMFORM_H
diff --git a/Project/Text.cpp b/Project/Text.cpp
index 588e9a1..060e666 100644
--- a/Project/Text.cpp
+++ b/Project/Text.cpp
@@ -84,7 +84,7 @@ void Text::SetText(wxString text)
{
glEnable(GL_TEXTURE_2D);
m_text = text;
- wxFont font(m_fontSize, wxFONTFAMILY_ROMAN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
+ wxFont font(m_fontSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
wxScreenDC dc;
if(m_glString) {
diff --git a/Project/TransferFunction.cpp b/Project/TransferFunction.cpp
new file mode 100644
index 0000000..9c8ffea
--- /dev/null
+++ b/Project/TransferFunction.cpp
@@ -0,0 +1,250 @@
+#include "TransferFunction.h"
+#include "TransferFunctionForm.h"
+
+TransferFunction::TransferFunction(int id) : ControlElement(id)
+{
+ // Superscript unicode numbers
+ m_supNumber[0] = L'\u2070';
+ m_supNumber[1] = L'\u00B9';
+ m_supNumber[2] = L'\u00B2';
+ m_supNumber[3] = L'\u00B3';
+ m_supNumber[4] = L'\u2074';
+ m_supNumber[5] = L'\u2075';
+ m_supNumber[6] = L'\u2076';
+ m_supNumber[7] = L'\u2077';
+ m_supNumber[8] = L'\u2078';
+ m_supNumber[9] = L'\u2079';
+
+ m_numerator.clear();
+ m_numerator.push_back(1);
+ m_denominator.clear();
+ m_denominator.push_back(1);
+ m_denominator.push_back(1);
+ UpdateTFText();
+
+ Node* node1 = new Node(m_position + wxPoint2DDouble(-m_width / 2, 0), Node::NODE_IN, m_borderSize);
+ node1->StartMove(m_position);
+ Node* node2 = new Node(m_position + wxPoint2DDouble(m_width / 2, 0), Node::NODE_OUT, m_borderSize);
+ node2->SetAngle(180.0);
+ node2->StartMove(m_position);
+ m_nodeList.push_back(node1);
+ m_nodeList.push_back(node2);
+}
+
+TransferFunction::~TransferFunction() {}
+
+void TransferFunction::Draw(wxPoint2DDouble translation, double scale) const
+{
+ glLineWidth(1.0);
+ if(m_selected) {
+ glColor4dv(m_selectionColour.GetRGBA());
+ double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
+ DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
+ }
+ glColor4d(1.0, 1.0, 1.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
+
+ std::vector<wxPoint2DDouble> linePts;
+ linePts.push_back(wxPoint2DDouble(m_position.m_x - m_width / 2 + 5 + m_borderSize, m_position.m_y));
+ linePts.push_back(wxPoint2DDouble(m_position.m_x + m_width / 2 - 5 - m_borderSize, m_position.m_y));
+ DrawLine(linePts);
+
+ DrawNodes();
+
+ glEnable(GL_TEXTURE_2D);
+ glColor4d(0.0, 0.0, 0.0, 1.0);
+ m_glStringNum->bind();
+ m_glStringNum->render(m_position.m_x, m_position.m_y - m_height / 4);
+ m_glStringDen->bind();
+ m_glStringDen->render(m_position.m_x, m_position.m_y + m_height / 4);
+ glDisable(GL_TEXTURE_2D);
+}
+
+void TransferFunction::SetText(wxString numerator, wxString denominator)
+{
+ wxFont font(m_fontSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
+ wxScreenDC dc;
+
+ if(m_glStringNum) {
+ delete m_glStringNum;
+ m_glStringNum = NULL;
+ }
+ m_glStringNum = new wxGLString(numerator);
+ m_glStringNum->setFont(font);
+ m_glStringNum->consolidate(&dc);
+
+ if(m_glStringDen) {
+ delete m_glStringDen;
+ m_glStringDen = NULL;
+ }
+ m_glStringDen = new wxGLString(denominator);
+ m_glStringDen->setFont(font);
+ m_glStringDen->consolidate(&dc);
+
+ double nWidth = m_glStringNum->getWidth() + 5 + m_borderSize;
+ double dWidth = m_glStringDen->getWidth() + 5 + m_borderSize;
+
+ m_width = nWidth > dWidth ? nWidth : dWidth;
+ m_height = m_glStringNum->getheight() + m_glStringDen->getheight() + 2 * m_borderSize;
+ SetPosition(m_position); // Update rect properly.
+}
+
+wxString TransferFunction::GetSuperscriptNumber(int number)
+{
+ wxString strNumber = wxString::Format("%d", number);
+ wxString superscriptStr = "";
+ for(int i = 0; i < (int)strNumber.length(); ++i) {
+ wxString digitStr = strNumber[i];
+ long digit = 0;
+ digitStr.ToLong(&digit);
+ superscriptStr += wxString(m_supNumber[digit]);
+ }
+ return superscriptStr;
+}
+
+void TransferFunction::GetTFString(wxString& numerator, wxString& denominator)
+{
+ numerator = "";
+ denominator = "";
+ int index = static_cast<int>(m_numerator.size()) - 1;
+ for(auto it = m_numerator.begin(), itEnd = m_numerator.end(); it != itEnd; ++it) {
+ double value = *it;
+ if(value != 0.0) {
+ wxString signal;
+ if(index == static_cast<int>(m_numerator.size()) - 1) {
+ if(value >= 0.0)
+ signal += "";
+ else
+ signal += "-";
+ } else {
+ if(value >= 0.0)
+ signal += "+ ";
+ else
+ signal += "- ";
+ }
+
+ if(index == 0) {
+ numerator += signal + StringFromDouble(std::abs(value), 0);
+ break;
+ } else if(index == 1) {
+ if(value == 1.0) {
+ numerator += signal + "s";
+ } else {
+ numerator += signal + StringFromDouble(std::abs(value), 0) + "s";
+ }
+ } else {
+ if(value == 1.0) {
+ numerator += signal + "s" + GetSuperscriptNumber(index);
+ } else {
+ numerator += signal + StringFromDouble(std::abs(value), 0) + "s" + GetSuperscriptNumber(index);
+ }
+ }
+ numerator += " ";
+ }
+ --index;
+ }
+
+ index = static_cast<int>(m_denominator.size()) - 1;
+ for(auto it = m_denominator.begin(), itEnd = m_denominator.end(); it != itEnd; ++it) {
+ double value = *it;
+ if(value != 0.0) {
+ wxString signal;
+ if(index == static_cast<int>(m_denominator.size()) - 1) {
+ if(value >= 0.0)
+ signal += "";
+ else
+ signal += "-";
+ } else {
+ if(value >= 0.0)
+ signal += "+ ";
+ else
+ signal += "- ";
+ }
+
+ if(index == 0) {
+ denominator += signal + StringFromDouble(std::abs(value), 0);
+ break;
+ } else if(index == 1) {
+ if(value == 1.0) {
+ denominator += signal + "s";
+ } else {
+ denominator += signal + StringFromDouble(std::abs(value), 0) + "s";
+ }
+ } else {
+ if(value == 1.0) {
+ denominator += signal + "s" + GetSuperscriptNumber(index);
+ } else {
+ denominator += signal + StringFromDouble(std::abs(value), 0) + "s" + GetSuperscriptNumber(index);
+ }
+ }
+ denominator += " ";
+ }
+ --index;
+ }
+}
+
+void TransferFunction::UpdateTFText()
+{
+ wxString num, den;
+ GetTFString(num, den);
+ SetText(num, den);
+ if(m_nodeList.size() == 2) {
+ if(m_angle == 0.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
+ } else if(m_angle == 90.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
+ } else if(m_angle == 180.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
+ } else if(m_angle == 270.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
+ }
+ }
+}
+
+bool TransferFunction::ShowForm(wxWindow* parent, Element* element)
+{
+ TransferFunctionForm* tfForm = new TransferFunctionForm(parent, this);
+ if(tfForm->ShowModal() == wxID_OK) {
+ tfForm->Destroy();
+ return true;
+ }
+ tfForm->Destroy();
+ return false;
+}
+
+void TransferFunction::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;
+
+ if(m_angle == 0.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
+ } else if(m_angle == 90.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
+ } else if(m_angle == 180.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
+ } else if(m_angle == 270.0) {
+ m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
+ m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
+ }
+
+ for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
+ Node* node = *it;
+ node->Rotate(clockwise);
+ }
+}
diff --git a/Project/TransferFunction.h b/Project/TransferFunction.h
new file mode 100644
index 0000000..45681ce
--- /dev/null
+++ b/Project/TransferFunction.h
@@ -0,0 +1,43 @@
+#ifndef TRANSFERFUNCTION_H
+#define TRANSFERFUNCTION_H
+
+#include "ControlElement.h"
+
+#include <wx/dcscreen.h>
+#include "wxGLString.h"
+
+class TransferFunctionForm;
+
+class TransferFunction : public ControlElement
+{
+public:
+ TransferFunction(int id);
+ ~TransferFunction();
+
+ 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 std::vector<double> GetNumerator() const { return m_numerator; }
+ virtual std::vector<double> GetDenominator() const { return m_denominator; }
+ virtual void SetNumerator(std::vector<double> numerator) { m_numerator = numerator; }
+ virtual void SetDenominator(std::vector<double> denominator) { m_denominator = denominator; }
+ virtual void UpdateTFText();
+
+protected:
+ virtual void SetText(wxString numerator, wxString denominator);
+ virtual wxString GetSuperscriptNumber(int number);
+ virtual void GetTFString(wxString& numerator, wxString& denominator);
+
+ wchar_t m_supNumber[10];
+
+ wxGLString* m_glStringNum = NULL;
+ wxGLString* m_glStringDen = NULL;
+ int m_fontSize = 10;
+ std::vector<double> m_numerator;
+ std::vector<double> m_denominator;
+};
+
+#endif // TRANSFERFUNCTION_H
diff --git a/Project/TransferFunctionForm.cpp b/Project/TransferFunctionForm.cpp
new file mode 100644
index 0000000..d71b28b
--- /dev/null
+++ b/Project/TransferFunctionForm.cpp
@@ -0,0 +1,76 @@
+#include "TransferFunctionForm.h"
+#include "TransferFunction.h"
+
+TransferFunctionForm::TransferFunctionForm(wxWindow* parent, TransferFunction* transferFunction)
+ : TransferFunctionFormBase(parent)
+{
+ m_parent = parent;
+ m_tf = transferFunction;
+ LoadTFData();
+}
+
+TransferFunctionForm::~TransferFunctionForm() {}
+void TransferFunctionForm::OnCancelClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
+void TransferFunctionForm::OnOKClick(wxCommandEvent& event)
+{
+ if(ValidateData()) EndModal(wxID_OK);
+}
+
+void TransferFunctionForm::LoadTFData()
+{
+ auto num = m_tf->GetNumerator();
+ auto den = m_tf->GetDenominator();
+
+ wxString numStr = "";
+ for(auto it = num.begin(), itEnd = num.end(); it != itEnd; ++it) {
+ double value = *it;
+ if(it == num.begin())
+ numStr = m_tf->StringFromDouble(value, 0);
+ else
+ numStr += " " + m_tf->StringFromDouble(value, 0);
+ }
+ m_textCtrlNumerator->SetValue(numStr);
+
+ wxString denStr = "";
+ for(auto it = den.begin(), itEnd = den.end(); it != itEnd; ++it) {
+ double value = *it;
+ if(it == den.begin())
+ denStr = m_tf->StringFromDouble(value, 0);
+ else
+ denStr += " " + m_tf->StringFromDouble(value, 0);
+ }
+ m_textCtrlDenominator->SetValue(denStr);
+}
+
+bool TransferFunctionForm::ValidateData()
+{
+ wxString num = m_textCtrlNumerator->GetValue();
+ std::vector<double> numerator;
+ while(num != "") {
+ wxString rest;
+ wxString strValue = num.BeforeFirst(' ', &rest);
+ num = rest;
+ double value = 0;
+ if(!m_tf->DoubleFromString(this, strValue, value,
+ _("Value entered incorrectly in the field \"Numerator parameters\".")))
+ return false;
+ numerator.push_back(value);
+ }
+
+ wxString den = m_textCtrlDenominator->GetValue();
+ std::vector<double> denominator;
+ while(den != "") {
+ wxString rest;
+ wxString strValue = den.BeforeFirst(' ', &rest);
+ den = rest;
+ double value = 0;
+ if(!m_tf->DoubleFromString(this, strValue, value,
+ _("Value entered incorrectly in the field \"Denominator parameters\".")))
+ return false;
+ denominator.push_back(value);
+ }
+ m_tf->SetNumerator(numerator);
+ m_tf->SetDenominator(denominator);
+ m_tf->UpdateTFText();
+ return true;
+}
diff --git a/Project/TransferFunctionForm.h b/Project/TransferFunctionForm.h
new file mode 100644
index 0000000..269eda6
--- /dev/null
+++ b/Project/TransferFunctionForm.h
@@ -0,0 +1,23 @@
+#ifndef TRANSFERFUNCTIONFORM_H
+#define TRANSFERFUNCTIONFORM_H
+
+#include "ElementForm.h"
+
+class TransferFunction;
+
+class TransferFunctionForm : public TransferFunctionFormBase
+{
+public:
+ TransferFunctionForm(wxWindow* parent, TransferFunction* transferFunction);
+ virtual ~TransferFunctionForm();
+ bool ValidateData();
+
+protected:
+ virtual void OnCancelClick(wxCommandEvent& event);
+ virtual void OnOKClick(wxCommandEvent& event);
+ void LoadTFData();
+
+ wxWindow* m_parent = NULL;
+ TransferFunction* m_tf = NULL;
+};
+#endif // TRANSFERFUNCTIONFORM_H
diff --git a/Project/Transformer.h b/Project/Transformer.h
index d557cda..723a5df 100644
--- a/Project/Transformer.h
+++ b/Project/Transformer.h
@@ -35,10 +35,10 @@ struct TransformerElectricalData {
double turnsRatio = 1.0;
double phaseShift = 0.0;
bool useTransformerPower = false;
-
+
// Power flow (p.u.)
- std::complex<double> current[2] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0)};
- std::complex<double> powerFlow[2] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0)};
+ std::complex<double> current[2] = { std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0) };
+ std::complex<double> powerFlow[2] = { std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0) };
// Fault
double zeroResistance = 0.0;
@@ -53,12 +53,12 @@ struct TransformerElectricalData {
class Transformer : public Branch
{
- public:
+public:
Transformer();
Transformer(wxString name);
virtual ~Transformer();
-
- virtual Element* GetCopy();
+
+ virtual Element* GetCopy();
virtual bool AddParent(Element* parent, wxPoint2DDouble position);
virtual bool Contains(wxPoint2DDouble position) const;
virtual void Draw(wxPoint2DDouble translation, double scale) const;
@@ -77,9 +77,9 @@ class Transformer : public Branch
virtual void SetElectricaData(TransformerElectricalData electricalData) { m_electricalData = electricalData; }
virtual void SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit);
- protected:
+protected:
void UpdatePowerFlowArrowsPosition();
TransformerElectricalData m_electricalData;
};
-#endif // TRANSFORMER_H
+#endif // TRANSFORMER_H
diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp
index 7f9cce4..5575764 100644
--- a/Project/Workspace.cpp
+++ b/Project/Workspace.cpp
@@ -1,5 +1,5 @@
#include "Workspace.h"
-
+#include "Camera.h"
#include "Element.h"
//#include "Bus.h"
#include "Line.h"
@@ -17,44 +17,6 @@
#include "PowerFlow.h"
#include "Fault.h"
-// Camera
-Camera::Camera()
-{
- m_translation = wxPoint2DDouble(0, 0);
- m_scale = 1.0;
-}
-
-Camera::~Camera() {}
-wxPoint2DDouble Camera::ScreenToWorld(wxPoint2DDouble screenCoords) const
-{
- return wxPoint2DDouble(
- screenCoords.m_x / m_scale - m_translation.m_x, screenCoords.m_y / m_scale - m_translation.m_y);
-}
-
-void Camera::SetTranslation(wxPoint2DDouble screenPoint)
-{
- m_translation = screenPoint / m_scale - m_translationStartPt;
-}
-
-void Camera::SetScale(wxPoint2DDouble screenPoint, double delta)
-{
- m_translation -= screenPoint * (1.0 - m_scale) / m_scale;
-
- m_scale += delta;
-
- // Limits: 5% - 300%
- if(m_scale < m_zoomMin) m_scale = m_zoomMin;
- if(m_scale > m_zoomMax) m_scale = m_zoomMax;
-
- m_translation += screenPoint * (1.0 - m_scale) / m_scale;
-}
-
-wxPoint2DDouble Camera::GetMousePosition(bool worldCoords) const
-{
- if(worldCoords) return ScreenToWorld(m_mousePosition);
- return m_mousePosition;
-}
-
// Workspace
Workspace::Workspace()
: WorkspaceBase(NULL)
@@ -355,8 +317,7 @@ void Workspace::OnRightClickDown(wxMouseEvent& event)
if(element->GetContextMenu(menu)) {
m_timer->Stop();
menu.SetClientData(element);
- menu.Connect(
- wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(Workspace::OnPopupClick), NULL, this);
+ menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &Workspace::OnPopupClick, this);
PopupMenu(&menu);
redraw = true;
@@ -623,16 +584,6 @@ void Workspace::OnMiddleDown(wxMouseEvent& event)
m_mode = MODE_DRAG;
} break;
}
- /*if(m_mode != MODE_INSERT && m_mode != MODE_INSERT_TEXT && m_mode == MODE_PASTE && m_mode != MODE_DRAG_INSERT &&
- m_mode != MODE_DRAG_INSERT_TEXT && m_mode != MODE_DRAG_PASTE) {
- m_mode = MODE_DRAG;
- } else if(m_mode == MODE_INSERT_TEXT) {
- m_mode = MODE_DRAG_INSERT_TEXT;
- }else if(m_mode == MODE_PASTE) {
- m_mode = MODE_DRAG_PASTE;
- } else {
- m_mode = MODE_DRAG_INSERT;
- }*/
m_camera->StartTranslation(m_camera->ScreenToWorld(event.GetPosition()));
UpdateStatusBar();
}
@@ -704,7 +655,7 @@ void Workspace::OnKeyDown(wxKeyEvent& event)
m_statusBar->SetStatusText(_("Insert Text: Click to insert, ESC to cancel."));
Redraw();
}
- }
+ } break;
case 'F': {
if(event.GetModifiers() == wxMOD_SHIFT) {
Fit();
@@ -745,18 +696,8 @@ void Workspace::OnKeyDown(wxKeyEvent& event)
}
// Tests - Ctrl + Shift + L
if(event.ControlDown() && event.ShiftDown()) {
- int numChild = 0;
- int numParent = 0;
- for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
- Element* element = *it;
- if(element->Contains(m_camera->GetMousePosition())) {
- for(int i = 0; i < (int)element->GetParentList().size(); i++) {
- if(element->GetParentList()[i]) numParent++;
- }
- numChild = element->GetChildList().size();
- }
- }
- wxMessageBox(wxString::Format("%d parents\n%d childs", numParent, numChild));
+ ControlEditor* ce = new ControlEditor(this, IOControl::IN_TERMINAL_VOLTAGE | IOControl::OUT_FIELD_VOLTAGE);
+ ce->Show();
}
} break;
case 'T': // Insert a transformer.
diff --git a/Project/Workspace.h b/Project/Workspace.h
index 3b03220..bf03a9e 100644
--- a/Project/Workspace.h
+++ b/Project/Workspace.h
@@ -12,6 +12,8 @@
#include "WorkspaceBase.h"
#include "Bus.h"
+#include "ControlEditor.h"
+
class Camera;
class Element;
// class Bus;
@@ -30,21 +32,6 @@ class Text;
class PowerFlow;
class Fault;
-enum WorkspaceMode {
- MODE_EDIT = 0,
- MODE_MOVE_ELEMENT,
- MODE_MOVE_PICKBOX,
- MODE_MOVE_NODE,
- MODE_DRAG,
- MODE_DRAG_INSERT,
- MODE_DRAG_INSERT_TEXT,
- MODE_INSERT,
- MODE_INSERT_TEXT,
- MODE_SELECTION_RECT,
- MODE_PASTE,
- MODE_DRAG_PASTE
-};
-
enum ElementID {
ID_BUS = 0,
ID_LINE,
@@ -63,6 +50,21 @@ enum ElementID {
class Workspace : public WorkspaceBase
{
public:
+ enum WorkspaceMode {
+ MODE_EDIT = 0,
+ MODE_MOVE_ELEMENT,
+ MODE_MOVE_PICKBOX,
+ MODE_MOVE_NODE,
+ MODE_DRAG,
+ MODE_DRAG_INSERT,
+ MODE_DRAG_INSERT_TEXT,
+ MODE_INSERT,
+ MODE_INSERT_TEXT,
+ MODE_SELECTION_RECT,
+ MODE_PASTE,
+ MODE_DRAG_PASTE
+ };
+
Workspace();
Workspace(wxWindow* parent, wxString name = wxEmptyString, wxStatusBar* statusBar = NULL);
~Workspace();
@@ -73,10 +75,10 @@ public:
std::vector<Element*> GetAllElements() const;
WorkspaceMode GetWorkspaceMode() const { return m_mode; }
Camera* GetCamera() const { return m_camera; }
-
+
void CopySelection();
bool Paste();
-
+
wxFileName GetSavedPath() const { return m_savedPath; }
void SetName(wxString name) { m_name = name; }
@@ -90,13 +92,15 @@ public:
void Redraw() { m_glCanvas->Refresh(); }
void RotateSelectedElements(bool clockwise = true);
void DeleteSelectedElements();
- bool GetElementsCorners(wxPoint2DDouble& leftUpCorner, wxPoint2DDouble& rightDownCorner, std::vector<Element*> elementList);
+ bool GetElementsCorners(wxPoint2DDouble& leftUpCorner,
+ wxPoint2DDouble& rightDownCorner,
+ std::vector<Element*> elementList);
void Fit();
void UnselectAll();
void ValidateBusesVoltages(Element* initialBus);
void ValidateElementsVoltages();
-
+
void UpdateElementsID();
void UpdateTextElements();
@@ -137,42 +141,13 @@ protected:
int m_elementNumber[NUM_ELEMENTS];
std::vector<Text*> m_textList;
-
+
wxFileName m_savedPath;
-
+
wxRect2DDouble m_selectionRect;
wxPoint2DDouble m_startSelRect;
-
- bool m_justOpened = false;
-};
-
-class Camera
-{
-public:
- Camera();
- ~Camera();
-
- void SetScale(wxPoint2DDouble screenPoint, double delta);
- void SetScale(double scale) { m_scale = scale; }
- void SetTranslation(wxPoint2DDouble screenPoint);
- void StartTranslation(wxPoint2DDouble startPoint) { this->m_translationStartPt = startPoint; }
- void UpdateMousePosition(wxPoint2DDouble mousePosition) { this->m_mousePosition = mousePosition; }
- double GetScale() const { return m_scale; }
- wxPoint2DDouble GetTranslation() const { return m_translation; }
- wxPoint2DDouble GetMousePosition(bool worldCoords = true) const;
- wxPoint2DDouble ScreenToWorld(wxPoint2DDouble screenCoords) const;
- double GetZoomMin() const { return m_zoomMin; }
- double GetZoomMax() const { return m_zoomMax; }
-protected:
- wxPoint2DDouble m_translation;
- wxPoint2DDouble m_translationStartPt;
- double m_scale;
-
- wxPoint2DDouble m_mousePosition;
-
- double m_zoomMin = 0.01;
- double m_zoomMax = 3.0;
+ bool m_justOpened = false;
};
#endif // WORKSPACE_H
diff --git a/Project/data/images/control/gain.png b/Project/data/images/control/gain.png
new file mode 100644
index 0000000..33a3532
--- /dev/null
+++ b/Project/data/images/control/gain.png
Binary files differ
diff --git a/Project/data/images/control/io.png b/Project/data/images/control/io.png
new file mode 100644
index 0000000..2a2201f
--- /dev/null
+++ b/Project/data/images/control/io.png
Binary files differ
diff --git a/Project/data/images/control/limiter.png b/Project/data/images/control/limiter.png
new file mode 100644
index 0000000..3aff22d
--- /dev/null
+++ b/Project/data/images/control/limiter.png
Binary files differ
diff --git a/Project/data/images/control/mult.png b/Project/data/images/control/mult.png
new file mode 100644
index 0000000..fcdda5a
--- /dev/null
+++ b/Project/data/images/control/mult.png
Binary files differ
diff --git a/Project/data/images/control/rateLimiter.png b/Project/data/images/control/rateLimiter.png
new file mode 100644
index 0000000..d1b7f74
--- /dev/null
+++ b/Project/data/images/control/rateLimiter.png
Binary files differ
diff --git a/Project/data/images/control/sat.png b/Project/data/images/control/sat.png
new file mode 100644
index 0000000..a7c2555
--- /dev/null
+++ b/Project/data/images/control/sat.png
Binary files differ
diff --git a/Project/data/images/control/sum.png b/Project/data/images/control/sum.png
new file mode 100644
index 0000000..b572434
--- /dev/null
+++ b/Project/data/images/control/sum.png
Binary files differ
diff --git a/Project/data/images/control/transferFunc.png b/Project/data/images/control/transferFunc.png
new file mode 100644
index 0000000..5902a99
--- /dev/null
+++ b/Project/data/images/control/transferFunc.png
Binary files differ
diff --git a/Project/data/images/control/value.png b/Project/data/images/control/value.png
new file mode 100644
index 0000000..822908b
--- /dev/null
+++ b/Project/data/images/control/value.png
Binary files differ
diff --git a/Project/data/images/ctrlEditor128.png b/Project/data/images/ctrlEditor128.png
new file mode 100644
index 0000000..1eadfe9
--- /dev/null
+++ b/Project/data/images/ctrlEditor128.png
Binary files differ
diff --git a/Project/data/images/ctrlEditor16.png b/Project/data/images/ctrlEditor16.png
new file mode 100644
index 0000000..4b74bef
--- /dev/null
+++ b/Project/data/images/ctrlEditor16.png
Binary files differ
diff --git a/Project/data/images/ctrlEditor256.png b/Project/data/images/ctrlEditor256.png
new file mode 100644
index 0000000..10a05b5
--- /dev/null
+++ b/Project/data/images/ctrlEditor256.png
Binary files differ
diff --git a/Project/data/images/ctrlEditor32.png b/Project/data/images/ctrlEditor32.png
new file mode 100644
index 0000000..c0044f0
--- /dev/null
+++ b/Project/data/images/ctrlEditor32.png
Binary files differ
diff --git a/Project/data/images/ctrlEditor64.png b/Project/data/images/ctrlEditor64.png
new file mode 100644
index 0000000..432476f
--- /dev/null
+++ b/Project/data/images/ctrlEditor64.png
Binary files differ
diff --git a/Project/data/images/ribbon/exp32.png b/Project/data/images/ribbon/exp32.png
new file mode 100644
index 0000000..c466c86
--- /dev/null
+++ b/Project/data/images/ribbon/exp32.png
Binary files differ
diff --git a/Project/data/images/ribbon/imp32.png b/Project/data/images/ribbon/imp32.png
new file mode 100644
index 0000000..59984aa
--- /dev/null
+++ b/Project/data/images/ribbon/imp32.png
Binary files differ
diff --git a/Project/data/lang/pt_BR/pt_BR.mo b/Project/data/lang/pt_BR/pt_BR.mo
index 87e0859..bbe9337 100644
--- a/Project/data/lang/pt_BR/pt_BR.mo
+++ b/Project/data/lang/pt_BR/pt_BR.mo
Binary files differ
diff --git a/Project/data/lang/pt_BR/pt_BR.po b/Project/data/lang/pt_BR/pt_BR.po
index 5b2ef4c..749b4c1 100644
--- a/Project/data/lang/pt_BR/pt_BR.po
+++ b/Project/data/lang/pt_BR/pt_BR.po
@@ -1,119 +1,302 @@
msgid ""
msgstr ""
"Project-Id-Version: PSP-UFU pt_BR 0.0.1\n"
-"POT-Creation-Date: 2016-09-23 17:03-0300\n"
-"PO-Revision-Date: 2016-09-23 17:11-0300\n"
+"POT-Creation-Date: 2017-01-20 20:38-0200\n"
+"PO-Revision-Date: 2017-01-20 23:15-0200\n"
"Last-Translator: \n"
"Language-Team: Thales Lima Oliveira <thaleslima.ufu@gmail.com>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.8.8\n"
-"X-Poedit-Basepath: ../../../..\n"
+"X-Generator: Poedit 1.8.11\n"
+"X-Poedit-Basepath: ../../..\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Poedit-KeywordsList: _\n"
"X-Poedit-SearchPath-0: .\n"
-#: Bus.cpp:173
+#: Bus.cpp:175
msgid "Edit bus"
msgstr ""
-#: BusForm.cpp:92
-msgid "Value entered incorrectly in the field \"Nominal voltage\"."
+#: Bus.cpp:204 Transformer.cpp:405 Transformer.cpp:416
+msgid " V"
msgstr ""
-#: BusForm.cpp:98
+#: Bus.cpp:204 Transformer.cpp:408 Transformer.cpp:419
+msgid " kV"
+msgstr ""
+
+#: Bus.cpp:206
+msgid ""
+"\n"
+"V = "
+msgstr ""
+
+#: Bus.cpp:206 Bus.cpp:212 Bus.cpp:213 Bus.cpp:214 Bus.cpp:216 Bus.cpp:217
+#: Bus.cpp:218 Bus.cpp:221 Capacitor.cpp:190 IndMotor.cpp:99 IndMotor.cpp:118
+#: Inductor.cpp:184 Line.cpp:530 Line.cpp:532 Line.cpp:534 Line.cpp:536
+#: Load.cpp:205 Load.cpp:222 SyncGenerator.cpp:158 SyncGenerator.cpp:177
+#: SyncMotor.cpp:124 SyncMotor.cpp:143 Transformer.cpp:434 Transformer.cpp:436
+#: Transformer.cpp:438 Transformer.cpp:440
+msgid " p.u."
+msgstr ""
+
+#: Bus.cpp:211
+msgid ""
+"\n"
+"\n"
+"Fault info:"
+msgstr ""
+
+#: Bus.cpp:212
+msgid ""
+"\n"
+"Va = "
+msgstr ""
+
+#: Bus.cpp:213
+msgid ""
+"\n"
+"Vb = "
+msgstr ""
+
+#: Bus.cpp:214
+msgid ""
+"\n"
+"Vc = "
+msgstr ""
+
+#: Bus.cpp:216
+msgid ""
+"\n"
+"Ia = "
+msgstr ""
+
+#: Bus.cpp:217
+msgid ""
+"\n"
+"Ib = "
+msgstr ""
+
+#: Bus.cpp:218
+msgid ""
+"\n"
+"Ic = "
+msgstr ""
+
+#: Bus.cpp:221
+msgid ""
+"\n"
+"\n"
+"Ssc = "
+msgstr ""
+
+#: BusForm.cpp:77
+msgid "Value entered incorrectly in the field \"Rated voltage\"."
+msgstr ""
+
+#: BusForm.cpp:83
msgid "Value entered incorrectly in the field \"Controlled voltage\"."
msgstr ""
-#: BusForm.cpp:149
+#: BusForm.cpp:118
msgid "Value entered incorrectly in the field \"Fault resistance\"."
msgstr ""
-#: BusForm.cpp:153
+#: BusForm.cpp:122
msgid "Value entered incorrectly in the field \"Fault reactance\"."
msgstr ""
-#: BusForm.cpp:160
+#: BusForm.cpp:129
msgid "Value entered incorrectly in the field \"Time\"."
msgstr ""
-#: BusForm.cpp:164
+#: BusForm.cpp:133
msgid "Value entered incorrectly in the field \"Fault lenght\"."
msgstr ""
-#: BusForm.cpp:168
+#: BusForm.cpp:137
msgid ""
"Value entered incorrectly in the field \"Fault resistence (stability)\"."
msgstr ""
-#: BusForm.cpp:172
+#: BusForm.cpp:141
msgid "Value entered incorrectly in the field \"Fault reactance (stability)\"."
msgstr ""
-#: BusForm.cpp:233
+#: BusForm.cpp:200
msgid "Lines AB"
msgstr ""
-#: BusForm.cpp:234
+#: BusForm.cpp:201
msgid "Lines BC"
msgstr ""
-#: BusForm.cpp:235
+#: BusForm.cpp:202
msgid "Lines CA"
msgstr ""
-#: BusForm.cpp:241
+#: BusForm.cpp:207
msgid "Line A"
msgstr ""
-#: BusForm.cpp:242
+#: BusForm.cpp:208
msgid "Line B"
msgstr ""
-#: BusForm.cpp:243
+#: BusForm.cpp:209
msgid "Line C"
msgstr ""
-#: BusForm.cpp:253
+#: BusForm.cpp:216 TextForm.cpp:958
msgid "V"
msgstr ""
-#: BusForm.cpp:258
+#: BusForm.cpp:219 TextForm.cpp:959
msgid "kV"
msgstr ""
-#: Capacitor.cpp:105
+#: Capacitor.cpp:116
msgid "Edit Capacitor"
msgstr ""
-#: Element.cpp:298 MainFrameBase.cpp:150
-msgid "Rotate clockwise"
+#: Capacitor.cpp:135
+msgid "Capacitor"
msgstr ""
-#: Element.cpp:302
-msgid "Rotate counter-clockwise"
+#: Capacitor.cpp:187 IndMotor.cpp:115 Inductor.cpp:181 Load.cpp:219
+#: SyncGenerator.cpp:174 SyncMotor.cpp:140
+msgid ""
+"\n"
+"Q = "
+msgstr ""
+
+#: Capacitor.cpp:193 IndMotor.cpp:121 Inductor.cpp:187 Load.cpp:225
+#: SyncGenerator.cpp:180 SyncMotor.cpp:146
+msgid " VAr"
+msgstr ""
+
+#: Capacitor.cpp:196 IndMotor.cpp:124 Inductor.cpp:190 Load.cpp:228
+#: SyncGenerator.cpp:183 SyncMotor.cpp:149
+msgid " kVAr"
+msgstr ""
+
+#: Capacitor.cpp:199 IndMotor.cpp:127 Inductor.cpp:193 Load.cpp:231
+#: SyncGenerator.cpp:186 SyncMotor.cpp:152
+msgid " MVAr"
+msgstr ""
+
+#: ControlEditor.cpp:15
+msgid "In/Out"
+msgstr ""
+
+#: ControlEditor.cpp:21
+msgid "Transfer fcn"
+msgstr "Func Transferência"
+
+#: ControlEditor.cpp:25
+msgid "Sum"
+msgstr ""
+
+#: ControlEditor.cpp:31
+msgid "Constant"
+msgstr ""
+
+#: ControlEditor.cpp:36
+msgid "Limiter"
msgstr ""
-#: Element.cpp:306 Line.cpp:270 MainFrameBase.cpp:146
+#: ControlEditor.cpp:41
+msgid "Gain"
+msgstr ""
+
+#: ControlEditor.cpp:46
+msgid "Multiplier"
+msgstr ""
+
+#: ControlEditor.cpp:50
+msgid "Saturation"
+msgstr ""
+
+#: ControlEditor.cpp:56
+msgid "Rate limiter"
+msgstr ""
+
+#: ControlEditorBase.cpp:29 MainFrameBase.cpp:82
+msgid "New"
+msgstr "Novo"
+
+#: ControlEditorBase.cpp:31
+msgid "Import"
+msgstr ""
+
+#: ControlEditorBase.cpp:33
+msgid "Export"
+msgstr ""
+
+#: ControlEditorBase.cpp:37 MainFrameBase.cpp:123
+msgid "Copy"
+msgstr "Copiar"
+
+#: ControlEditorBase.cpp:39 MainFrameBase.cpp:125
+msgid "Paste"
+msgstr "Colar"
+
+#: ControlEditorBase.cpp:41 MainFrameBase.cpp:127
+msgid "Undo"
+msgstr "Desfazer"
+
+#: ControlEditorBase.cpp:43 MainFrameBase.cpp:129
+msgid "Redo"
+msgstr "Refazer"
+
+#: ControlEditorBase.cpp:47 MainFrameBase.cpp:140
+msgid "Drag"
+msgstr "Arrastar"
+
+#: ControlEditorBase.cpp:49 MainFrameBase.cpp:142
+msgid "Move"
+msgstr "Mover"
+
+#: ControlEditorBase.cpp:51 Element.cpp:234 Line.cpp:317 MainFrameBase.cpp:144
msgid "Delete"
msgstr "Excluir"
-#: Element.cpp:345 Element.cpp:359
+#: ControlEditorBase.cpp:62
+msgid "Control elements"
+msgstr ""
+
+#: Element.cpp:226 MainFrameBase.cpp:148
+msgid "Rotate clockwise"
+msgstr ""
+
+#: Element.cpp:230
+msgid "Rotate counter-clockwise"
+msgstr ""
+
+#: Element.cpp:273 Element.cpp:287 Line.cpp:149 Line.cpp:410 MainFrame.cpp:231
+#: TextForm.cpp:1207 Workspace.cpp:1146 Workspace.cpp:1201 Workspace.cpp:1309
+#: Workspace.cpp:1413 Workspace.cpp:1435
msgid "Error"
msgstr ""
-#: ElementForm.cpp:35 ElementForm.cpp:404
+#: ElementForm.cpp:35 ElementForm.cpp:404 ElementForm.cpp:1302
+#: ElementForm.cpp:1615 ElementForm.cpp:2015 ElementForm.cpp:2184
+#: ElementForm.cpp:2441 ElementForm.cpp:2598
msgid "General"
msgstr ""
-#: ElementForm.cpp:40 ElementForm.cpp:409
+#: ElementForm.cpp:40 ElementForm.cpp:409 ElementForm.cpp:1307
+#: ElementForm.cpp:1620 ElementForm.cpp:2020 ElementForm.cpp:2189
+#: ElementForm.cpp:2446 TextForm.cpp:854 TextForm.cpp:865 TextForm.cpp:874
+#: TextForm.cpp:885 TextForm.cpp:896 TextForm.cpp:904 TextForm.cpp:911
+#: TextForm.cpp:918 TextForm.cpp:926
msgid "Name"
msgstr "Nome"
-#: ElementForm.cpp:60
-msgid "Nominal voltage"
+#: ElementForm.cpp:60 ElementForm.cpp:1327 ElementForm.cpp:1640
+msgid "Rated voltage"
msgstr ""
#: ElementForm.cpp:87
@@ -124,7 +307,8 @@ msgstr ""
msgid "Slack Bus"
msgstr ""
-#: ElementForm.cpp:117 ElementForm.cpp:579 MainFrameBase.cpp:194
+#: ElementForm.cpp:117 ElementForm.cpp:579 ElementForm.cpp:1479
+#: ElementForm.cpp:1826 MainFrameBase.cpp:192
msgid "Fault"
msgstr "Falta"
@@ -148,7 +332,8 @@ msgstr ""
#: ElementForm.cpp:320 ElementForm.cpp:852 ElementForm.cpp:909
#: ElementForm.cpp:932 ElementForm.cpp:955 ElementForm.cpp:986
#: ElementForm.cpp:1009 ElementForm.cpp:1040 ElementForm.cpp:1063
-#: ElementForm.cpp:1140 ElementForm.cpp:1163
+#: ElementForm.cpp:1140 ElementForm.cpp:1163 TextForm.cpp:957 TextForm.cpp:967
+#: TextForm.cpp:972 TextForm.cpp:980 TextForm.cpp:988
msgid "p.u."
msgstr ""
@@ -156,7 +341,9 @@ msgstr ""
msgid "Fault reactance (Xl)"
msgstr ""
-#: ElementForm.cpp:213 ElementForm.cpp:725
+#: ElementForm.cpp:213 ElementForm.cpp:725 ElementForm.cpp:1541
+#: ElementForm.cpp:1941 ElementForm.cpp:2110 ElementForm.cpp:2238
+#: ElementForm.cpp:2524
msgid "Stability"
msgstr "Estabilidade"
@@ -179,22 +366,31 @@ msgid "Fault length"
msgstr ""
#: ElementForm.cpp:328 ElementForm.cpp:731 ElementForm.cpp:1235
+#: ElementForm.cpp:1547 ElementForm.cpp:1947 ElementForm.cpp:2116
+#: ElementForm.cpp:2244 ElementForm.cpp:2372 ElementForm.cpp:2530
+#: ElementForm.cpp:2728
msgid "OK"
msgstr ""
#: ElementForm.cpp:332 ElementForm.cpp:735 ElementForm.cpp:1239
+#: ElementForm.cpp:1551 ElementForm.cpp:1951 ElementForm.cpp:2120
+#: ElementForm.cpp:2248 ElementForm.cpp:2376 ElementForm.cpp:2534
+#: ElementForm.cpp:2732
msgid "Cancel"
msgstr ""
-#: ElementForm.cpp:429
-msgid "Nominal power"
+#: ElementForm.cpp:429 ElementForm.cpp:1342 ElementForm.cpp:1671
+msgid "Rated power"
msgstr ""
-#: ElementForm.cpp:459
+#: ElementForm.cpp:459 ElementForm.cpp:2040 ElementForm.cpp:2466
+#: TextForm.cpp:866 TextForm.cpp:897 TextForm.cpp:919 TextForm.cpp:927
msgid "Active power"
msgstr ""
-#: ElementForm.cpp:488
+#: ElementForm.cpp:488 ElementForm.cpp:2069 ElementForm.cpp:2209
+#: ElementForm.cpp:2495 TextForm.cpp:867 TextForm.cpp:898 TextForm.cpp:905
+#: TextForm.cpp:912 TextForm.cpp:920 TextForm.cpp:928
msgid "Reactive power"
msgstr ""
@@ -207,7 +403,7 @@ msgid "Min reactive power"
msgstr ""
#: ElementForm.cpp:573
-msgid "Use machine nominal power as base"
+msgid "Use machine rated power as base"
msgstr ""
#: ElementForm.cpp:584
@@ -303,7 +499,7 @@ msgid "Quadrature-axis reactance (Xq)"
msgstr ""
#: ElementForm.cpp:1013
-msgid "Transitory"
+msgid "Transient"
msgstr ""
#: ElementForm.cpp:1025
@@ -323,7 +519,7 @@ msgid "Quadrature-axis time constant (T'q0)"
msgstr ""
#: ElementForm.cpp:1113
-msgid "Subtransitory"
+msgid "Sub-transient"
msgstr ""
#: ElementForm.cpp:1125
@@ -342,275 +538,564 @@ msgstr ""
msgid "Quadrature-axis time constant (T''q0)"
msgstr ""
-#: ElementForm.cpp:1229
+#: ElementForm.cpp:1229 ElementForm.h:668
msgid "Switching"
msgstr ""
-#: GeneratorForm.cpp:177
-msgid "Value entered incorrectly in the field \"Nominal power\"."
+#: ElementForm.cpp:1331
+msgid "138 kV"
msgstr ""
-#: GeneratorForm.cpp:193
-msgid "Value entered incorrectly in the field \"Active power\"."
+#: ElementForm.cpp:1370 ElementForm.cpp:1701
+msgid "Resistance (R)"
msgstr ""
-#: GeneratorForm.cpp:212
-msgid "Value entered incorrectly in the field \"Reactive power\"."
+#: ElementForm.cpp:1398 ElementForm.cpp:1728
+msgid "Indutive reactance (XL)"
msgstr ""
-#: GeneratorForm.cpp:233
-msgid "Value entered incorrectly in the field \"Max reactive power\"."
+#: ElementForm.cpp:1426
+msgid "Capacitive susceptance (B)"
msgstr ""
-#: GeneratorForm.cpp:255
-msgid "Value entered incorrectly in the field \"Min reactive power\"."
+#: ElementForm.cpp:1454
+msgid "Line size"
msgstr ""
-#: GeneratorForm.cpp:277
-msgid "Value entered incorrectly in the field \"Positive resistance\"."
+#: ElementForm.cpp:1469
+msgid "km"
msgstr ""
-#: GeneratorForm.cpp:281
-msgid "Value entered incorrectly in the field \"Positive reactance\"."
+#: ElementForm.cpp:1473
+msgid "Use line rated power as base"
msgstr ""
-#: GeneratorForm.cpp:285
-msgid "Value entered incorrectly in the field \"Negative resistance\"."
+#: ElementForm.cpp:1484 ElementForm.cpp:1831
+msgid "Zero-sequence impedances (p.u.)"
msgstr ""
-#: GeneratorForm.cpp:289
-msgid "Value entered incorrectly in the field \"Negative reactance\"."
+#: ElementForm.cpp:1496 ElementForm.cpp:1843
+msgid "Resistance (R0)"
msgstr ""
-#: GeneratorForm.cpp:293
-msgid "Value entered incorrectly in the field \"Zero resistance\"."
+#: ElementForm.cpp:1511 ElementForm.cpp:1858
+msgid "Indutive reactance (X0)"
msgstr ""
-#: GeneratorForm.cpp:297
-msgid "Value entered incorrectly in the field \"Zero reactance\"."
+#: ElementForm.cpp:1526
+msgid "Capacitive susceptance (B0)"
msgstr ""
-#: GeneratorForm.cpp:301
-msgid "Value entered incorrectly in the field \"Ground resistance\"."
+#: ElementForm.cpp:1644
+msgid "138 kV / 138 kV"
msgstr ""
-#: GeneratorForm.cpp:305
-msgid "Value entered incorrectly in the field \"Ground reactance\"."
+#: ElementForm.cpp:1655
+msgid "Base voltage"
+msgstr ""
+
+#: ElementForm.cpp:1759
+msgid "Connection"
+msgstr ""
+
+#: ElementForm.cpp:1786
+msgid "Turns ratio"
+msgstr ""
+
+#: ElementForm.cpp:1801
+msgid "Phase shift"
+msgstr ""
+
+#: ElementForm.cpp:1816
+msgid "degrees"
+msgstr ""
+
+#: ElementForm.cpp:1820
+msgid "Use transformer rated power as base"
+msgstr ""
+
+#: ElementForm.cpp:1869
+msgid "Ground impedances (p.u.)"
+msgstr ""
+
+#: ElementForm.cpp:1881
+msgid "Primary resistance"
+msgstr ""
+
+#: ElementForm.cpp:1896
+msgid "Primary reactance"
+msgstr ""
+
+#: ElementForm.cpp:1911
+msgid "Secondary resistance"
+msgstr ""
+
+#: ElementForm.cpp:1926
+msgid "Secondary reactance"
+msgstr ""
+
+#: ElementForm.cpp:2094
+msgid "Load type"
+msgstr ""
+
+#: ElementForm.cpp:2322
+msgid "Switching properties"
+msgstr ""
+
+#: ElementForm.cpp:2327 SwitchingForm.cpp:23 SwitchingForm.cpp:36
+#: SwitchingForm.cpp:52
+msgid "Insert"
+msgstr ""
+
+#: ElementForm.cpp:2328 ElementForm.cpp:2344 SwitchingForm.cpp:23
+#: SwitchingForm.cpp:36
+msgid "Remove"
+msgstr ""
+
+#: ElementForm.cpp:2329 SwitchingForm.cpp:6 SwitchingForm.cpp:15
+msgid "Type"
msgstr ""
-#: GeneratorStabForm.cpp:57
+#: ElementForm.cpp:2332 SwitchingForm.cpp:7 SwitchingForm.cpp:16
+msgid "Time (s)"
+msgstr ""
+
+#: ElementForm.cpp:2340
+msgid "Add"
+msgstr ""
+
+#: ElementForm.cpp:2348
+msgid "Up"
+msgstr ""
+
+#: ElementForm.cpp:2352
+msgid "Down"
+msgstr ""
+
+#: ElementForm.cpp:2360
+msgid "Switching list"
+msgstr ""
+
+#: ElementForm.cpp:2611
+msgid "Element"
+msgstr ""
+
+#: ElementForm.cpp:2633
+msgid "Element name"
+msgstr ""
+
+#: ElementForm.cpp:2646
+msgid "Text type"
+msgstr ""
+
+#: ElementForm.cpp:2659
+msgid "From bus"
+msgstr ""
+
+#: ElementForm.cpp:2672
+msgid "To bus"
+msgstr ""
+
+#: ElementForm.cpp:2685
+msgid "Unit"
+msgstr ""
+
+#: ElementForm.cpp:2698
+msgid "Decimal places:"
+msgstr ""
+
+#: ElementForm.cpp:2711
+msgid "Preview:"
+msgstr ""
+
+#: Fault.cpp:16
+msgid "There is no buses in the system."
+msgstr ""
+
+#: Fault.cpp:30 Fault.cpp:383
+msgid "Fail to invert the positive sequence admittance matrix."
+msgstr ""
+
+#: Fault.cpp:34
+msgid "Fail to invert the negative sequence admittance matrix."
+msgstr ""
+
+#: Fault.cpp:38
+msgid "Fail to invert the zero sequence admittance matrix."
+msgstr ""
+
+#: Fault.cpp:63
+msgid "There is no fault in the system."
+msgstr ""
+
+#: GeneratorStabForm.cpp:54
+msgid "Synchronous generator: Switching"
+msgstr ""
+
+#: GeneratorStabForm.cpp:67
msgid "Value entered incorrectly in the field \"Inertia\"."
msgstr ""
-#: GeneratorStabForm.cpp:61
+#: GeneratorStabForm.cpp:71
msgid "Value entered incorrectly in the field \"Damping factor\"."
msgstr ""
-#: GeneratorStabForm.cpp:68
+#: GeneratorStabForm.cpp:78
msgid "Value entered incorrectly in the field \"Armature resistance\"."
msgstr ""
-#: GeneratorStabForm.cpp:72
+#: GeneratorStabForm.cpp:82
msgid "Value entered incorrectly in the field \"Potier reactance\"."
msgstr ""
-#: GeneratorStabForm.cpp:76
+#: GeneratorStabForm.cpp:86
msgid "Value entered incorrectly in the field \"Saturation factor\"."
msgstr ""
-#: GeneratorStabForm.cpp:81
+#: GeneratorStabForm.cpp:91
msgid ""
"Value entered incorrectly in the field \"Synchronous direct-axis reactance\"."
msgstr ""
-#: GeneratorStabForm.cpp:86
+#: GeneratorStabForm.cpp:96
msgid ""
"Value entered incorrectly in the field \"Synchronous quadrature-axis "
"reactance\"."
msgstr ""
-#: GeneratorStabForm.cpp:91
+#: GeneratorStabForm.cpp:101
msgid ""
"Value entered incorrectly in the field \"Transitory direct-axis reactance\"."
msgstr ""
-#: GeneratorStabForm.cpp:96
+#: GeneratorStabForm.cpp:106
msgid ""
"Value entered incorrectly in the field \"Transitory quadrature-axis reactance"
"\"."
msgstr ""
-#: GeneratorStabForm.cpp:101
+#: GeneratorStabForm.cpp:111
msgid ""
"Value entered incorrectly in the field \"Transitory direct-axis time constant"
"\"."
msgstr ""
-#: GeneratorStabForm.cpp:106
+#: GeneratorStabForm.cpp:116
msgid ""
"Value entered incorrectly in the field \"Transitory quadrature-axis time "
"constant\"."
msgstr ""
-#: GeneratorStabForm.cpp:111
+#: GeneratorStabForm.cpp:121
msgid ""
"Value entered incorrectly in the field \"Subtransitory direct-axis reactance"
"\"."
msgstr ""
-#: GeneratorStabForm.cpp:116
+#: GeneratorStabForm.cpp:126
msgid ""
"Value entered incorrectly in the field \"Subtransitory quadrature-axis "
"reactance\"."
msgstr ""
-#: GeneratorStabForm.cpp:121
+#: GeneratorStabForm.cpp:131
msgid ""
"Value entered incorrectly in the field \"Subtransitory direct-axis time "
"constant\"."
msgstr ""
-#: GeneratorStabForm.cpp:126
+#: GeneratorStabForm.cpp:136
msgid ""
"Value entered incorrectly in the field \"Subtransitory quadrature-axis time "
"constant\"."
msgstr ""
-#: IndMotor.cpp:24
+#: IndMotor.cpp:27
msgid "Edit induction motor"
msgstr ""
-#: Inductor.cpp:97
+#: IndMotor.cpp:96 Load.cpp:202 SyncGenerator.cpp:155 SyncMotor.cpp:121
+msgid ""
+"\n"
+"P = "
+msgstr ""
+
+#: IndMotor.cpp:102 Load.cpp:208 SyncGenerator.cpp:161 SyncMotor.cpp:127
+msgid " W"
+msgstr ""
+
+#: IndMotor.cpp:105 Load.cpp:211 SyncGenerator.cpp:164 SyncMotor.cpp:130
+msgid " kW"
+msgstr ""
+
+#: IndMotor.cpp:108 Load.cpp:214 SyncGenerator.cpp:167 SyncMotor.cpp:133
+msgid " MW"
+msgstr ""
+
+#: IndMotorForm.cpp:68 LoadForm.cpp:83 SyncMachineForm.cpp:306
+#: SyncMachineForm.cpp:440
+msgid "Value entered incorrectly in the field \"Active power\"."
+msgstr ""
+
+#: IndMotorForm.cpp:86 LoadForm.cpp:101 ReactiveShuntElementForm.cpp:95
+#: ReactiveShuntElementForm.cpp:119 SyncMachineForm.cpp:324
+#: SyncMachineForm.cpp:458
+msgid "Value entered incorrectly in the field \"Reactive power\"."
+msgstr ""
+
+#: Inductor.cpp:114
msgid "Edit Inductor"
msgstr ""
-#: Line.cpp:262
+#: Inductor.cpp:129
+msgid "Inductor"
+msgstr ""
+
+#: Line.cpp:147 Line.cpp:408
+msgid ""
+"Unable to connect two buses with different nominal voltages.\n"
+"Use a transformer or edit the bus properties."
+msgstr ""
+
+#: Line.cpp:307
msgid "Edit line"
msgstr ""
-#: Line.cpp:264
+#: Line.cpp:309
msgid "Insert node"
msgstr ""
-#: Line.cpp:268
+#: Line.cpp:313
msgid "Remove node"
msgstr ""
-#: Load.cpp:103
+#: Line.cpp:529 Line.cpp:533 Transformer.cpp:433 Transformer.cpp:437
+msgid ""
+"\n"
+"P"
+msgstr ""
+
+#: Line.cpp:531 Line.cpp:535 Transformer.cpp:435 Transformer.cpp:439
+msgid ""
+"\n"
+"Q"
+msgstr ""
+
+#: LineForm.cpp:122
+msgid "Line: Switching"
+msgstr ""
+
+#: LineForm.cpp:142 SyncMachineForm.cpp:291 SyncMachineForm.cpp:425
+#: TransformerForm.cpp:126
+msgid "Value entered incorrectly in the field \"Nominal power\"."
+msgstr ""
+
+#: LineForm.cpp:157 TransformerForm.cpp:141
+msgid "Value entered incorrectly in the field \"Resistance\"."
+msgstr ""
+
+#: LineForm.cpp:172
+msgid "Value entered incorrectly in the field \"Indutive Reactance\"."
+msgstr ""
+
+#: LineForm.cpp:187
+msgid "Value entered incorrectly in the field \"Capacitive Susceptance\"."
+msgstr ""
+
+#: LineForm.cpp:202
+msgid "Value entered incorrectly in the field \"Line size\"."
+msgstr ""
+
+#: LineForm.cpp:208
+msgid "Value entered incorrectly in the field \"Zero-sequence resistance\"."
+msgstr ""
+
+#: LineForm.cpp:211
+msgid ""
+"Value entered incorrectly in the field \"Zero-sequence indutive reactance\"."
+msgstr ""
+
+#: LineForm.cpp:214
+msgid ""
+"Value entered incorrectly in the field \"Zero-sequence capacitive susceptance"
+"\"."
+msgstr ""
+
+#: Load.cpp:123
msgid "Edit Load"
msgstr ""
-#: MainFrame.cpp:80
+#: LoadForm.cpp:70
+msgid "Load: Switching"
+msgstr ""
+
+#: MainFrame.cpp:85
msgid "&Bus\tB"
msgstr "&Barramento\tB"
-#: MainFrame.cpp:80
+#: MainFrame.cpp:85
msgid "Adds a bus at the circuit"
msgstr "Adiciona um barramento no circuito"
-#: MainFrame.cpp:83
+#: MainFrame.cpp:88
msgid "&Line\tL"
msgstr "&Linha\tL"
-#: MainFrame.cpp:83
+#: MainFrame.cpp:88
msgid "Adds a power line at the circuit"
msgstr "Adiciona uma linha no circuito"
-#: MainFrame.cpp:84
+#: MainFrame.cpp:90
msgid "&Transformer\tT"
msgstr "&Transformador\tT"
-#: MainFrame.cpp:85
+#: MainFrame.cpp:90
msgid "Adds a transformer at the circuit"
msgstr "Adiciona um transformador no circuito"
-#: MainFrame.cpp:86
+#: MainFrame.cpp:92
msgid "&Generator\tG"
msgstr "&Gerador\tG"
-#: MainFrame.cpp:87
+#: MainFrame.cpp:92
msgid "Adds a generator at the circuit"
msgstr "Adiciona um gerador no circuito"
-#: MainFrame.cpp:88
+#: MainFrame.cpp:94
msgid "&Induction motor\tI"
msgstr "&Motor de indução\tI"
-#: MainFrame.cpp:89 MainFrame.cpp:92
+#: MainFrame.cpp:94 MainFrame.cpp:96
msgid "Adds an induction motor at the circuit"
msgstr "Adiciona um motor de indução no circuito"
-#: MainFrame.cpp:91
+#: MainFrame.cpp:96
msgid "&Synchronous compensator \tK"
msgstr "&Compensador síncrono \tK"
-#: MainFrame.cpp:94
+#: MainFrame.cpp:98
msgid "&Load\tShift-L"
msgstr "&Carga\tShift-L"
-#: MainFrame.cpp:94
+#: MainFrame.cpp:98
msgid "Adds a load at the circuit"
msgstr "Adiciona uma carga no circuito"
-#: MainFrame.cpp:95
+#: MainFrame.cpp:100
msgid "&Capacitor\tShift-C"
msgstr "&Capacitor\tShift-C"
-#: MainFrame.cpp:96
+#: MainFrame.cpp:100
msgid "Adds a shunt capacitor at the circuit"
msgstr "Adiciona um capacitor shunt no circuito"
-#: MainFrame.cpp:97
+#: MainFrame.cpp:102
msgid "&Inductor\tShift-I"
msgstr "&Inductor\tShift-I"
-#: MainFrame.cpp:98
+#: MainFrame.cpp:102
msgid "Adds a shunt inductor at the circuit"
msgstr "Adiciona um indutor shunt no circuito"
-#: MainFrame.cpp:119
+#: MainFrame.cpp:122
#, c-format
msgid "New project %d"
msgstr ""
-#: MainFrame.cpp:223 MainFrame.cpp:249 Workspace.cpp:583
+#: MainFrame.cpp:207
+msgid "Open PSP file"
+msgstr ""
+
+#: MainFrame.cpp:213
+msgid "Open project"
+msgstr ""
+
+#: MainFrame.cpp:231
+msgid "It was not possible to open the selected file."
+msgstr ""
+
+#: MainFrame.cpp:265 MainFrame.cpp:286
+msgid "Save PSP file"
+msgstr ""
+
+#: MainFrame.cpp:314 Workspace.cpp:720
#, c-format
msgid "Bus %d"
msgstr "Barra %d"
-#: MainFrame.cpp:226 Workspace.cpp:587
+#: MainFrame.cpp:317 Workspace.cpp:724
msgid "Insert Bus: Click to insert, ESC to cancel."
msgstr ""
-#: MainFrame.cpp:234 Workspace.cpp:608
+#: MainFrame.cpp:321 Workspace.cpp:737
+#, c-format
+msgid "Line %d"
+msgstr ""
+
+#: MainFrame.cpp:324 Workspace.cpp:741
msgid "Insert Line: Click on two buses, ESC to cancel."
msgstr ""
-#: MainFrame.cpp:242 Workspace.cpp:621
+#: MainFrame.cpp:329 Workspace.cpp:755
+#, c-format
+msgid "Transformer %d"
+msgstr ""
+
+#: MainFrame.cpp:332 Workspace.cpp:759
msgid "Insert Transformer: Click on two buses, ESC to cancel."
msgstr ""
-#: MainFrame.cpp:252 Workspace.cpp:634
+#: MainFrame.cpp:337 Workspace.cpp:767
+#, c-format
+msgid "Generator %d"
+msgstr "Gerador %d"
+
+#: MainFrame.cpp:340 Workspace.cpp:771
msgid "Insert Generator: Click on a buses, ESC to cancel."
msgstr ""
-#: MainFrame.cpp:260 Workspace.cpp:600
+#: MainFrame.cpp:344 Workspace.cpp:731
+#, c-format
+msgid "Load %d"
+msgstr ""
+
+#: MainFrame.cpp:347 Workspace.cpp:735
msgid "Insert Load: Click on a buses, ESC to cancel."
msgstr ""
-#: MainFrame.cpp:268 Workspace.cpp:681
+#: MainFrame.cpp:352 Workspace.cpp:812
+#, c-format
+msgid "Capacitor %d"
+msgstr ""
+
+#: MainFrame.cpp:355 Workspace.cpp:816
msgid "Insert Capacitor: Click on a buses, ESC to cancel."
msgstr ""
-#: MainFrame.cpp:276 Workspace.cpp:647
+#: MainFrame.cpp:360 Workspace.cpp:779
+#, c-format
+msgid "Inductor %d"
+msgstr ""
+
+#: MainFrame.cpp:363 Workspace.cpp:783
msgid "Insert Inductor: Click on a buses, ESC to cancel."
msgstr ""
-#: MainFrame.cpp:284 Workspace.cpp:655
+#: MainFrame.cpp:368 Workspace.cpp:787
+#, c-format
+msgid "Induction motor %d"
+msgstr ""
+
+#: MainFrame.cpp:371 Workspace.cpp:791
msgid "Insert Induction Motor: Click on a buses, ESC to cancel."
msgstr ""
-#: MainFrame.cpp:292 Workspace.cpp:668
+#: MainFrame.cpp:376 Workspace.cpp:800
+#, c-format
+msgid "Synchronous condenser %d"
+msgstr ""
+
+#: MainFrame.cpp:379 Workspace.cpp:804
msgid "Insert Synchronous Condenser: Click on a buses, ESC to cancel."
msgstr ""
@@ -623,10 +1108,6 @@ msgid "Projects"
msgstr "Projetos"
#: MainFrameBase.cpp:82
-msgid "New"
-msgstr "Novo"
-
-#: MainFrameBase.cpp:82
msgid "Create new project"
msgstr "Criar novo projeto"
@@ -639,221 +1120,189 @@ msgid "Open saved project"
msgstr "Abrir projetos salvos"
#: MainFrameBase.cpp:86
-msgid "Export Import"
-msgstr "Exportar Importar"
-
-#: MainFrameBase.cpp:86
-msgid "Export or import projects"
-msgstr "Exporta ou importa projetos"
-
-#: MainFrameBase.cpp:88
msgid "General Settings"
msgstr ""
-#: MainFrameBase.cpp:88
+#: MainFrameBase.cpp:86
msgid "Opens a dialog to set the main settings of the program"
msgstr ""
-#: MainFrameBase.cpp:90
+#: MainFrameBase.cpp:88
msgid "Exit"
msgstr "Sair"
-#: MainFrameBase.cpp:90
+#: MainFrameBase.cpp:88
msgid "Closes the application"
msgstr "Fecha a aplicação"
-#: MainFrameBase.cpp:93 MainFrameBase.cpp:94
+#: MainFrameBase.cpp:91 MainFrameBase.cpp:92
msgid "Current project"
msgstr "Projeto atual"
-#: MainFrameBase.cpp:98
+#: MainFrameBase.cpp:96
msgid "Save"
msgstr "Salvar"
-#: MainFrameBase.cpp:98
+#: MainFrameBase.cpp:96
msgid "Save the current project"
msgstr "Salvar o projeto atual"
-#: MainFrameBase.cpp:100
+#: MainFrameBase.cpp:98
msgid "Save As..."
msgstr ""
-#: MainFrameBase.cpp:100
+#: MainFrameBase.cpp:98
msgid "Save as the current project"
msgstr "Salvar como o projeto atual"
-#: MainFrameBase.cpp:102
+#: MainFrameBase.cpp:100
msgid "Close"
msgstr "Fechar"
-#: MainFrameBase.cpp:102
+#: MainFrameBase.cpp:100
msgid "Close the current project"
msgstr "Fechar o projeto atual"
-#: MainFrameBase.cpp:105 MainFrameBase.cpp:106 MainFrameBase.cpp:109
+#: MainFrameBase.cpp:103 MainFrameBase.cpp:104 MainFrameBase.cpp:107
msgid "Help"
msgstr "Ajuda"
-#: MainFrameBase.cpp:111
+#: MainFrameBase.cpp:109
msgid "PSP-UFU Guide"
msgstr "Manual do PSP-UFU"
-#: MainFrameBase.cpp:111
+#: MainFrameBase.cpp:109
msgid "Open PSP-UFU Guide"
msgstr "Abrir o manual do PSP-UFU"
-#: MainFrameBase.cpp:113
+#: MainFrameBase.cpp:111
msgid "About..."
msgstr "Sobre..."
-#: MainFrameBase.cpp:113
+#: MainFrameBase.cpp:111
msgid "About PSP-UFU"
msgstr "Sobre o PSP-UFU"
-#: MainFrameBase.cpp:116 MainFrameBase.cpp:117
+#: MainFrameBase.cpp:114 MainFrameBase.cpp:115
msgid "Tools"
msgstr "Ferramentas"
-#: MainFrameBase.cpp:119 MainFrameBase.cpp:120 MainFrameBase.cpp:123
+#: MainFrameBase.cpp:117 MainFrameBase.cpp:118 MainFrameBase.cpp:121
msgid "Clipboard"
msgstr "Ãrea de transferência"
-#: MainFrameBase.cpp:125
-msgid "Copy"
-msgstr "Copiar"
-
-#: MainFrameBase.cpp:125
+#: MainFrameBase.cpp:123
msgid "Copies the selected elements"
msgstr "Copia os elementos selecionados"
-#: MainFrameBase.cpp:127
-msgid "Paste"
-msgstr "Colar"
-
-#: MainFrameBase.cpp:127
+#: MainFrameBase.cpp:125
msgid "Pastes the elements from clipboard"
msgstr "Cola os elementos da área de transferência"
-#: MainFrameBase.cpp:129
-msgid "Undo"
-msgstr "Desfazer"
-
-#: MainFrameBase.cpp:129
+#: MainFrameBase.cpp:127
msgid "Undoes the last action"
msgstr "Desfaz a última ação"
-#: MainFrameBase.cpp:131
-msgid "Redo"
-msgstr "Refazer"
-
-#: MainFrameBase.cpp:131
+#: MainFrameBase.cpp:129
msgid "Redoes the last undo action"
msgstr "Refaz a última ação desfeita"
-#: MainFrameBase.cpp:134 MainFrameBase.cpp:135 MainFrameBase.cpp:138
+#: MainFrameBase.cpp:132 MainFrameBase.cpp:133 MainFrameBase.cpp:136
msgid "Circuit"
msgstr "Circuito"
-#: MainFrameBase.cpp:140
+#: MainFrameBase.cpp:138
msgid "Add Element"
msgstr ""
-#: MainFrameBase.cpp:140
+#: MainFrameBase.cpp:138
msgid "Add a new element in the project"
msgstr "Adicionar um elemento novo no projeto"
-#: MainFrameBase.cpp:142
-msgid "Drag"
-msgstr "Arrastar"
-
-#: MainFrameBase.cpp:142
+#: MainFrameBase.cpp:140
msgid "Drag all the elements"
msgstr "Arrasta todos os elementos"
-#: MainFrameBase.cpp:144
-msgid "Move"
-msgstr "Mover"
-
-#: MainFrameBase.cpp:144
+#: MainFrameBase.cpp:142
msgid "Move the selected elements"
msgstr "Move os elementos selecionados"
-#: MainFrameBase.cpp:146
+#: MainFrameBase.cpp:144
msgid "Removes all selected elements"
msgstr "Remove todos os elementos selecionados"
-#: MainFrameBase.cpp:148
+#: MainFrameBase.cpp:146
msgid "Fit"
msgstr "Encaixar"
-#: MainFrameBase.cpp:148
+#: MainFrameBase.cpp:146
msgid "Applies the drag and zoom tools to show all elements in workspace"
msgstr ""
"Aplica as ferramentas de arrasto e ampliação para exibir todos os elementos "
"na área de trabalho"
-#: MainFrameBase.cpp:150
+#: MainFrameBase.cpp:148
msgid "Rotate Clockwise"
msgstr ""
-#: MainFrameBase.cpp:152
+#: MainFrameBase.cpp:150
msgid "Rotate Counter-clockwise"
msgstr ""
-#: MainFrameBase.cpp:152
+#: MainFrameBase.cpp:150
msgid "Rotate the selected elements counter-clockwise"
msgstr ""
-#: MainFrameBase.cpp:154
+#: MainFrameBase.cpp:152
msgid "Project Settings"
msgstr ""
-#: MainFrameBase.cpp:154
+#: MainFrameBase.cpp:152
msgid "Opens a dialog to set the main settings of the current project"
msgstr ""
"Abre uma janela para definir as principais configurações do projeto atual"
-#: MainFrameBase.cpp:157 MainFrameBase.cpp:158
+#: MainFrameBase.cpp:155 MainFrameBase.cpp:156
msgid "Reports"
msgstr "Relatórios"
-#: MainFrameBase.cpp:162
+#: MainFrameBase.cpp:160
msgid "Data Report"
msgstr ""
-#: MainFrameBase.cpp:162
+#: MainFrameBase.cpp:160
msgid "Opens a data report"
msgstr "Abre um relatório de dados"
-#: MainFrameBase.cpp:164
+#: MainFrameBase.cpp:162
msgid "Charts"
msgstr "Gráficos"
-#: MainFrameBase.cpp:164
+#: MainFrameBase.cpp:162
msgid "Open the charts"
msgstr "Abre os gráficos"
-#: MainFrameBase.cpp:166
+#: MainFrameBase.cpp:164
msgid "Snapshot"
msgstr "Instantâneo"
-#: MainFrameBase.cpp:166
+#: MainFrameBase.cpp:164
msgid "Capture a snapshot of the circuit"
msgstr "Captura uma imagem instantânea do circuito"
-#: MainFrameBase.cpp:169 MainFrameBase.cpp:170
+#: MainFrameBase.cpp:167 MainFrameBase.cpp:168
msgid "Simulation"
msgstr ""
-#: MainFrameBase.cpp:172 MainFrameBase.cpp:173
+#: MainFrameBase.cpp:170 MainFrameBase.cpp:171
msgid "Continuous"
msgstr ""
-#: MainFrameBase.cpp:177
+#: MainFrameBase.cpp:175
msgid "Enable Solution"
msgstr ""
-#: MainFrameBase.cpp:177
+#: MainFrameBase.cpp:175
msgid ""
"Enables the power flow and fault (if exists) calculations after any circuit "
"change"
@@ -861,115 +1310,372 @@ msgstr ""
"Habilita os cálculos de fluxo de carga e falta (se existir) após qualquer "
"mudança no circuito"
-#: MainFrameBase.cpp:179
+#: MainFrameBase.cpp:177
msgid "Disable Solution"
msgstr ""
-#: MainFrameBase.cpp:179
+#: MainFrameBase.cpp:177
msgid ""
"Disables the power flow and fault calculations after any circuit changes"
msgstr ""
"Desabilita os cálculos de fluxo de carga e falta após qualquer mudança no "
"circuito"
-#: MainFrameBase.cpp:181
+#: MainFrameBase.cpp:179
msgid "Reset Voltages"
msgstr ""
-#: MainFrameBase.cpp:181
+#: MainFrameBase.cpp:179
msgid "Reset all voltages to initial state"
msgstr "Reinicia todas as tensões para os valores iniciais"
-#: MainFrameBase.cpp:184 MainFrameBase.cpp:185 MainFrameBase.cpp:188
+#: MainFrameBase.cpp:182 MainFrameBase.cpp:183 MainFrameBase.cpp:186
msgid "Simulations"
msgstr ""
-#: MainFrameBase.cpp:190
+#: MainFrameBase.cpp:188
msgid "Power Flow"
msgstr ""
-#: MainFrameBase.cpp:190
+#: MainFrameBase.cpp:188
msgid "Calculate the circuit power flow"
msgstr "Calcula o fluxo de carga do circuito"
-#: MainFrameBase.cpp:192
+#: MainFrameBase.cpp:190
msgid "Run Stability"
msgstr ""
-#: MainFrameBase.cpp:192
+#: MainFrameBase.cpp:190
msgid "Run the stability calculations"
msgstr "Executa os cálculos de estabilidade"
-#: MainFrameBase.cpp:194
+#: MainFrameBase.cpp:192
msgid "Calculate the circuit fault (if exists)"
msgstr "Calcula a falta do circuito (se existir)"
-#: MainFrameBase.cpp:196
+#: MainFrameBase.cpp:194
msgid "Short-Circuit Power"
msgstr ""
-#: MainFrameBase.cpp:196
+#: MainFrameBase.cpp:194
msgid "Calculate the short-circuit power in all buses"
msgstr "Calcula o nível de curto-circuito em todas as barras"
-#: MainFrameBase.cpp:198
+#: MainFrameBase.cpp:196
msgid "Simulation Settings"
msgstr ""
-#: MainFrameBase.cpp:198
+#: MainFrameBase.cpp:196
msgid "Opens a dialog to set the settings of the simulations"
msgstr ""
-#: SyncGenerator.cpp:41
+#: PowerFlow.cpp:24
+msgid "No buses found on the system."
+msgstr ""
+
+#: PowerFlow.cpp:173
+msgid "There is no slack bus on the system."
+msgstr ""
+
+#: PowerFlow.cpp:177
+msgid "The slack bus don't have generation."
+msgstr ""
+
+#: PowerFlow.cpp:192
+msgid "The maximum number of iterations was reached."
+msgstr ""
+
+#: ReactiveShuntElementForm.cpp:75
+msgid "Capacitor: Switching"
+msgstr ""
+
+#: ReactiveShuntElementForm.cpp:79
+msgid "Inductor: Switching"
+msgstr ""
+
+#: SyncGenerator.cpp:44
msgid "Edit Generator"
msgstr ""
-#: SyncMotor.cpp:18
+#: SyncGenerator.cpp:52 ElementForm.h:242
+msgid "Generator"
+msgstr ""
+
+#: SyncMachineForm.cpp:344 SyncMachineForm.cpp:478
+msgid "Value entered incorrectly in the field \"Max reactive power\"."
+msgstr ""
+
+#: SyncMachineForm.cpp:365 SyncMachineForm.cpp:499
+msgid "Value entered incorrectly in the field \"Min reactive power\"."
+msgstr ""
+
+#: SyncMachineForm.cpp:386 SyncMachineForm.cpp:520
+msgid "Value entered incorrectly in the field \"Positive resistance\"."
+msgstr ""
+
+#: SyncMachineForm.cpp:390 SyncMachineForm.cpp:524
+msgid "Value entered incorrectly in the field \"Positive reactance\"."
+msgstr ""
+
+#: SyncMachineForm.cpp:394 SyncMachineForm.cpp:528
+msgid "Value entered incorrectly in the field \"Negative resistance\"."
+msgstr ""
+
+#: SyncMachineForm.cpp:398 SyncMachineForm.cpp:532
+msgid "Value entered incorrectly in the field \"Negative reactance\"."
+msgstr ""
+
+#: SyncMachineForm.cpp:402 SyncMachineForm.cpp:536
+msgid "Value entered incorrectly in the field \"Zero resistance\"."
+msgstr ""
+
+#: SyncMachineForm.cpp:406 SyncMachineForm.cpp:540
+msgid "Value entered incorrectly in the field \"Zero reactance\"."
+msgstr ""
+
+#: SyncMachineForm.cpp:410 SyncMachineForm.cpp:544
+msgid "Value entered incorrectly in the field \"Ground resistance\"."
+msgstr ""
+
+#: SyncMachineForm.cpp:414 SyncMachineForm.cpp:548
+msgid "Value entered incorrectly in the field \"Ground reactance\"."
+msgstr ""
+
+#: SyncMotor.cpp:17
msgid "Edit Synchronous Condenser"
msgstr ""
-#: Transformer.cpp:224
+#: SyncMotor.cpp:26
+msgid "Synchronous Condenser"
+msgstr ""
+
+#: TextForm.cpp:855
+msgid "Voltage"
+msgstr ""
+
+#: TextForm.cpp:856
+msgid "Angle"
+msgstr ""
+
+#: TextForm.cpp:857 TextForm.cpp:868 TextForm.cpp:879 TextForm.cpp:890
+msgid "Fault current"
+msgstr ""
+
+#: TextForm.cpp:858
+msgid "Fault voltage"
+msgstr ""
+
+#: TextForm.cpp:859
+msgid "Short-circuit power"
+msgstr "Nível de curto-circuito"
+
+#: TextForm.cpp:875 TextForm.cpp:886
+msgid "Active power flow"
+msgstr ""
+
+#: TextForm.cpp:876 TextForm.cpp:887
+msgid "Reactive power flow"
+msgstr ""
+
+#: TextForm.cpp:877 TextForm.cpp:888
+msgid "Losses"
+msgstr ""
+
+#: TextForm.cpp:878 TextForm.cpp:889
+msgid "Current"
+msgstr ""
+
+#: TextForm.cpp:962
+msgid "Degrees"
+msgstr ""
+
+#: TextForm.cpp:963
+msgid "Radians"
+msgstr ""
+
+#: TextForm.cpp:968
+msgid "A"
+msgstr ""
+
+#: TextForm.cpp:969
+msgid "kA"
+msgstr ""
+
+#: TextForm.cpp:973
+msgid "VA"
+msgstr ""
+
+#: TextForm.cpp:974
+msgid "kVA"
+msgstr ""
+
+#: TextForm.cpp:975
+msgid "MVA"
+msgstr ""
+
+#: TextForm.cpp:981
+msgid "W"
+msgstr ""
+
+#: TextForm.cpp:982
+msgid "kW"
+msgstr ""
+
+#: TextForm.cpp:983
+msgid "MW"
+msgstr ""
+
+#: TextForm.cpp:989
+msgid "VAr"
+msgstr ""
+
+#: TextForm.cpp:990
+msgid "kVAr"
+msgstr ""
+
+#: TextForm.cpp:991
+msgid "MVAr"
+msgstr ""
+
+#: TextForm.cpp:1206
+msgid "There are blank fields."
+msgstr ""
+
+#: Transformer.cpp:256
msgid "Edit tranformer"
msgstr ""
-#: Workspace.cpp:630
-#, c-format
-msgid "Generator %d"
-msgstr "Gerador %d"
+#: TransformerForm.cpp:112
+msgid "Transfomer: Switching"
+msgstr ""
+
+#: TransformerForm.cpp:153
+msgid "Value entered incorrectly in the field \"Indutive reactance\"."
+msgstr ""
+
+#: TransformerForm.cpp:195
+msgid "Value entered incorrectly in the field \"Turns ratio\"."
+msgstr ""
+
+#: TransformerForm.cpp:199
+msgid "Value entered incorrectly in the field \"Phase shift\"."
+msgstr ""
+
+#: TransformerForm.cpp:205
+msgid "Value entered incorrectly in the field \"Zero sequence resistance\"."
+msgstr ""
+
+#: TransformerForm.cpp:210
+msgid ""
+"Value entered incorrectly in the field \"Zero sequence indutive reactance\"."
+msgstr ""
+
+#: TransformerForm.cpp:214
+msgid "Value entered incorrectly in the field \"Primary ground resistance\"."
+msgstr ""
+
+#: TransformerForm.cpp:218
+msgid "Value entered incorrectly in the field \"Primary ground reactance\"."
+msgstr ""
+
+#: TransformerForm.cpp:222
+msgid "Value entered incorrectly in the field \"Secondary ground resistance\"."
+msgstr ""
-#: Workspace.cpp:702
+#: TransformerForm.cpp:226
+msgid "Value entered incorrectly in the field \"Secondary ground reactance\"."
+msgstr ""
+
+#: Workspace.cpp:307
+msgid "Do you want to change the rated voltage of the path?"
+msgstr ""
+
+#: Workspace.cpp:308
+msgid "Warning"
+msgstr ""
+
+#: Workspace.cpp:703
+msgid "Insert Text: Click to insert, ESC to cancel."
+msgstr ""
+
+#: Workspace.cpp:843
msgid "MODE: DRAG"
msgstr ""
-#: Workspace.cpp:709
+#: Workspace.cpp:848
+msgid "MODE: PASTE"
+msgstr ""
+
+#: Workspace.cpp:855
msgid "MODE: INSERT"
msgstr ""
-#: Workspace.cpp:720
+#: Workspace.cpp:864
msgid "MODE: EDIT"
msgstr ""
-#: Workspace.cpp:725
+#: Workspace.cpp:868
#, c-format
msgid "ZOOM: %d%%"
msgstr ""
-#: ElementForm.h:139
-msgid "Bus"
+#: Workspace.cpp:1201 Workspace.cpp:1309
+msgid "It was not possible to paste from clipboard."
msgstr ""
-#: ElementForm.h:238
-msgid "Generator"
+#: Workspace.cpp:1317
+msgid "Click to paste."
+msgstr ""
+
+#: ControlEditorBase.h:59
+msgid "Control editor"
+msgstr ""
+
+#: ElementForm.h:143
+msgid "Bus"
msgstr ""
-#: ElementForm.h:365
+#: ElementForm.h:369
msgid "Generator: Stability"
msgstr ""
-#: MainFrameBase.h:143
+#: ElementForm.h:448
+msgid "Line"
+msgstr ""
+
+#: ElementForm.h:547
+msgid "Transformer"
+msgstr ""
+
+#: ElementForm.h:592
+msgid "Load"
+msgstr ""
+
+#: ElementForm.h:627
+msgid "Reactive shunt element"
+msgstr ""
+
+#: ElementForm.h:709
+msgid "Motor"
+msgstr ""
+
+#: ElementForm.h:770 Text.h:87
+msgid "Text"
+msgstr ""
+
+#: MainFrameBase.h:141
msgid "PSP-UFU"
msgstr "PSP-UFU"
+#~ msgid "Transfer function"
+#~ msgstr "Função transferência"
+
+#~ msgid "Export Import"
+#~ msgstr "Exportar Importar"
+
+#~ msgid "Export or import projects"
+#~ msgstr "Exporta ou importa projetos"
+
#~ msgid "Project settings"
#~ msgstr "Opções do projeto"
@@ -997,9 +1703,6 @@ msgstr "PSP-UFU"
#~ msgid "Power flow"
#~ msgstr "Fluxo de carga"
-#~ msgid "Short-circuit power"
-#~ msgstr "Nível de curto-circuito"
-
#~ msgid "Data report"
#~ msgstr "Relatório de dados"
diff --git a/Project/wxMathPlot/mathplot.cpp b/Project/wxMathPlot/mathplot.cpp
new file mode 100644
index 0000000..8543ca7
--- /dev/null
+++ b/Project/wxMathPlot/mathplot.cpp
@@ -0,0 +1,3074 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: mathplot.cpp
+// Purpose: Framework for plotting in wxWindows
+// Original Author: David Schalig
+// Maintainer: Davide Rondini
+// Contributors: Jose Luis Blanco, Val Greene
+// Created: 21/07/2003
+// Last edit: 09/09/2007
+// Copyright: (c) David Schalig, Davide Rondini
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+// #pragma implementation "plot.h"
+#pragma implementation "mathplot.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include <wx/window.h>
+//#include <wx/wxprec.h>
+
+// Comment out for release operation:
+// (Added by J.L.Blanco, Aug 2007)
+// #define MATHPLOT_DO_LOGGING
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/object.h"
+#include "wx/font.h"
+#include "wx/colour.h"
+#include "wx/settings.h"
+#include "wx/sizer.h"
+//#include "wx/log.h"
+#include "wx/intl.h"
+#include "wx/dcclient.h"
+#include "wx/cursor.h"
+#endif
+
+#include "mathplot.h"
+#include <wx/bmpbuttn.h>
+#include <wx/module.h>
+#include <wx/msgdlg.h>
+#include <wx/image.h>
+#include <wx/tipwin.h>
+
+#include <cmath>
+#include <cstdio> // used only for debug
+#include <ctime> // used for representation of x axes involving date
+
+// #include "pixel.xpm"
+
+// Memory leak debugging
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+// Legend margins
+#define mpLEGEND_MARGIN 5
+#define mpLEGEND_LINEWIDTH 40
+
+// Minimum axis label separation
+#define mpMIN_X_AXIS_LABEL_SEPARATION 64
+#define mpMIN_Y_AXIS_LABEL_SEPARATION 32
+
+// Number of pixels to scroll when scrolling by a line
+#define mpSCROLL_NUM_PIXELS_PER_LINE 10
+
+// See doxygen comments.
+double mpWindow::zoomIncrementalFactor = 1.5;
+
+//-----------------------------------------------------------------------------
+// mpLayer
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(mpLayer, wxObject)
+
+mpLayer::mpLayer() : m_type(mpLAYER_UNDEF)
+{
+ SetPen((wxPen&) *wxBLACK_PEN);
+ SetFont((wxFont&) *wxNORMAL_FONT);
+ m_continuous = FALSE; // Default
+ m_showName = TRUE; // Default
+ m_drawOutsideMargins = TRUE;
+ m_visible = true;
+}
+
+wxBitmap mpLayer::GetColourSquare(int side)
+{
+ wxBitmap square(side, side, -1);
+ wxColour filler = m_pen.GetColour();
+ wxBrush brush(filler, wxSOLID);
+ wxMemoryDC dc;
+ dc.SelectObject(square);
+ dc.SetBackground(brush);
+ dc.Clear();
+ dc.SelectObject(wxNullBitmap);
+ return square;
+}
+
+//-----------------------------------------------------------------------------
+// mpInfoLayer
+//-----------------------------------------------------------------------------
+IMPLEMENT_DYNAMIC_CLASS(mpInfoLayer, mpLayer)
+
+mpInfoLayer::mpInfoLayer()
+{
+ m_dim = wxRect(0,0,1,1);
+ m_brush = *wxTRANSPARENT_BRUSH;
+ m_reference.x = 0; m_reference.y = 0;
+ m_winX = 1; //parent->GetScrX();
+ m_winY = 1; //parent->GetScrY();
+ m_type = mpLAYER_INFO;
+}
+
+mpInfoLayer::mpInfoLayer(wxRect rect, const wxBrush* brush) : m_dim(rect)
+{
+ m_brush = *brush;
+ m_reference.x = rect.x;
+ m_reference.y = rect.y;
+ m_winX = 1; //parent->GetScrX();
+ m_winY = 1; //parent->GetScrY();
+ m_type = mpLAYER_INFO;
+}
+
+mpInfoLayer::~mpInfoLayer()
+{
+
+}
+
+void mpInfoLayer::UpdateInfo(mpWindow& w, wxEvent& event)
+{
+
+}
+
+bool mpInfoLayer::Inside(wxPoint& point)
+{
+ return m_dim.Contains(point);
+}
+
+void mpInfoLayer::Move(wxPoint delta)
+{
+ m_dim.SetX(m_reference.x + delta.x);
+ m_dim.SetY(m_reference.y + delta.y);
+}
+
+void mpInfoLayer::UpdateReference()
+{
+ m_reference.x = m_dim.x;
+ m_reference.y = m_dim.y;
+}
+
+
+void mpInfoLayer::Plot(wxDC & dc, mpWindow & w)
+{
+ if (m_visible) {
+ // Adjust relative position inside the window
+ int scrx = w.GetScrX();
+ int scry = w.GetScrY();
+ // Avoid dividing by 0
+ if(scrx == 0) scrx=1;
+ if(scry == 0) scry=1;
+
+ if ((m_winX != scrx) || (m_winY != scry)) {
+#ifdef MATHPLOT_DO_LOGGING
+ // wxLogMessage(_("mpInfoLayer::Plot() screen size has changed from %d x %d to %d x %d"), m_winX, m_winY, scrx, scry);
+#endif
+ if (m_winX != 1) m_dim.x = (int) floor((double)(m_dim.x*scrx/m_winX));
+ if (m_winY != 1) {
+ m_dim.y = (int) floor((double)(m_dim.y*scry/m_winY));
+ UpdateReference();
+ }
+ // Finally update window size
+ m_winX = scrx;
+ m_winY = scry;
+ }
+ dc.SetPen(m_pen);
+// wxImage image0(wxT("pixel.png"), wxBITMAP_TYPE_PNG);
+// wxBitmap image1(image0);
+// wxBrush semiWhite(image1);
+ dc.SetBrush(m_brush);
+ dc.DrawRectangle(m_dim.x, m_dim.y, m_dim.width, m_dim.height);
+ }
+}
+
+wxPoint mpInfoLayer::GetPosition()
+{
+ return m_dim.GetPosition();
+}
+
+wxSize mpInfoLayer::GetSize()
+{
+ return m_dim.GetSize();
+}
+
+mpInfoCoords::mpInfoCoords() : mpInfoLayer()
+{
+
+}
+
+mpInfoCoords::mpInfoCoords(wxRect rect, const wxBrush* brush) : mpInfoLayer(rect, brush)
+{
+
+}
+
+mpInfoCoords::~mpInfoCoords()
+{
+
+}
+
+void mpInfoCoords::UpdateInfo(mpWindow& w, wxEvent& event)
+{
+ if (event.GetEventType() == wxEVT_MOTION) {
+ int mouseX = ((wxMouseEvent&)event).GetX();
+ int mouseY = ((wxMouseEvent&)event).GetY();
+/* It seems that Windows port of wxWidgets don't support multi-line test to be drawn in a wxDC.
+ wxGTK instead works perfectly with it.
+ Info on wxForum: http://wxforum.shadonet.com/viewtopic.php?t=3451&highlight=drawtext+eol */
+#ifdef _WINDOWS
+ m_content.Printf(wxT("x = %f y = %f"), w.p2x(mouseX), w.p2y(mouseY));
+#else
+ m_content.Printf(wxT("x = %f\ny = %f"), w.p2x(mouseX), w.p2y(mouseY));
+#endif
+ }
+}
+
+void mpInfoCoords::Plot(wxDC & dc, mpWindow & w)
+{
+ if (m_visible) {
+ // Adjust relative position inside the window
+ int scrx = w.GetScrX();
+ int scry = w.GetScrY();
+ if ((m_winX != scrx) || (m_winY != scry)) {
+#ifdef MATHPLOT_DO_LOGGING
+ // wxLogMessage(_("mpInfoLayer::Plot() screen size has changed from %d x %d to %d x %d"), m_winX, m_winY, scrx, scry);
+#endif
+ if (m_winX != 1) m_dim.x = (int) floor((double)(m_dim.x*scrx/m_winX));
+ if (m_winY != 1) {
+ m_dim.y = (int) floor((double)(m_dim.y*scry/m_winY));
+ UpdateReference();
+ }
+ // Finally update window size
+ m_winX = scrx;
+ m_winY = scry;
+ }
+ dc.SetPen(m_pen);
+// wxImage image0(wxT("pixel.png"), wxBITMAP_TYPE_PNG);
+// wxBitmap image1(image0);
+// wxBrush semiWhite(image1);
+ dc.SetBrush(m_brush);
+ dc.SetFont(m_font);
+ int textX, textY;
+ dc.GetMultiLineTextExtent(m_content, &textX, &textY);
+ if (m_dim.width < textX + 10) m_dim.width = textX + 10;
+ if (m_dim.height < textY + 10) m_dim.height = textY + 10;
+ dc.DrawRectangle(m_dim.x, m_dim.y, m_dim.width, m_dim.height);
+ dc.DrawText(m_content, m_dim.x + 5, m_dim.y + 5);
+ }
+}
+
+mpInfoLegend::mpInfoLegend() : mpInfoLayer()
+{
+
+}
+
+mpInfoLegend::mpInfoLegend(wxRect rect, const wxBrush* brush) : mpInfoLayer(rect, brush)
+{
+
+}
+
+mpInfoLegend::~mpInfoLegend()
+{
+
+}
+
+void mpInfoLegend::UpdateInfo(mpWindow& w, wxEvent& event)
+{
+
+}
+
+void mpInfoLegend::Plot(wxDC & dc, mpWindow & w)
+{
+ if (m_visible) {
+ // Adjust relative position inside the window
+ int scrx = w.GetScrX();
+ int scry = w.GetScrY();
+ if ((m_winX != scrx) || (m_winY != scry)) {
+#ifdef MATHPLOT_DO_LOGGING
+ // wxLogMessage(_("mpInfoLayer::Plot() screen size has changed from %d x %d to %d x %d"), m_winX, m_winY, scrx, scry);
+#endif
+ if (m_winX != 1) m_dim.x = (int) floor((double)(m_dim.x*scrx/m_winX));
+ if (m_winY != 1) {
+ m_dim.y = (int) floor((double)(m_dim.y*scry/m_winY));
+ UpdateReference();
+ }
+ // Finally update window size
+ m_winX = scrx;
+ m_winY = scry;
+ }
+// wxImage image0(wxT("pixel.png"), wxBITMAP_TYPE_PNG);
+// wxBitmap image1(image0);
+// wxBrush semiWhite(image1);
+ dc.SetBrush(m_brush);
+ dc.SetFont(m_font);
+ const int baseWidth = (mpLEGEND_MARGIN*2 + mpLEGEND_LINEWIDTH);
+ int textX = baseWidth, textY = mpLEGEND_MARGIN;
+ int plotCount = 0;
+ int posY = 0;
+ int tmpX = 0, tmpY = 0;
+ mpLayer* ly = NULL;
+ wxPen lpen;
+ wxString label;
+ for (unsigned int p = 0; p < w.CountAllLayers(); p++) {
+ ly = w.GetLayer(p);
+ if ((ly->GetLayerType() == mpLAYER_PLOT) && (ly->IsVisible())) {
+ label = ly->GetName();
+ dc.GetTextExtent(label, &tmpX, &tmpY);
+ textX = (textX > (tmpX + baseWidth)) ? textX : (tmpX + baseWidth + mpLEGEND_MARGIN);
+ textY += (tmpY);
+#ifdef MATHPLOT_DO_LOGGING
+ // wxLogMessage(_("mpInfoLegend::Plot() Adding layer %d: %s"), p, label.c_str());
+#endif
+ }
+ }
+ dc.SetPen(m_pen);
+ dc.SetBrush(m_brush);
+ m_dim.width = textX;
+ if (textY != mpLEGEND_MARGIN) { // Don't draw any thing if there are no visible layers
+ textY += mpLEGEND_MARGIN;
+ m_dim.height = textY;
+ dc.DrawRectangle(m_dim.x, m_dim.y, m_dim.width, m_dim.height);
+ for (unsigned int p2 = 0; p2 < w.CountAllLayers(); p2++) {
+ ly = w.GetLayer(p2);
+ if ((ly->GetLayerType() == mpLAYER_PLOT) && (ly->IsVisible())) {
+ label = ly->GetName();
+ lpen = ly->GetPen();
+ dc.GetTextExtent(label, &tmpX, &tmpY);
+ dc.SetPen(lpen);
+ //textX = (textX > (tmpX + baseWidth)) ? textX : (tmpX + baseWidth);
+ //textY += (tmpY + mpLEGEND_MARGIN);
+ posY = m_dim.y + mpLEGEND_MARGIN + plotCount*tmpY + (tmpY>>1);
+ dc.DrawLine(m_dim.x + mpLEGEND_MARGIN, // X start coord
+ posY, // Y start coord
+ m_dim.x + mpLEGEND_LINEWIDTH + mpLEGEND_MARGIN, // X end coord
+ posY);
+ //dc.DrawRectangle(m_dim.x + 5, m_dim.y + 5 + plotCount*tmpY, 5, 5);
+ dc.DrawText(label, m_dim.x + baseWidth, m_dim.y + mpLEGEND_MARGIN + plotCount*tmpY);
+ plotCount++;
+ }
+ }
+ }
+ }
+}
+
+
+
+//-----------------------------------------------------------------------------
+// mpLayer implementations - functions
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(mpFX, mpLayer)
+
+mpFX::mpFX(wxString name, int flags)
+{
+ SetName(name);
+ m_flags = flags;
+ m_type = mpLAYER_PLOT;
+}
+
+void mpFX::Plot(wxDC & dc, mpWindow & w)
+{
+ if (m_visible) {
+ dc.SetPen( m_pen);
+
+ wxCoord startPx = m_drawOutsideMargins ? 0 : w.GetMarginLeft();
+ wxCoord endPx = m_drawOutsideMargins ? w.GetScrX() : w.GetScrX() - w.GetMarginRight();
+ wxCoord minYpx = m_drawOutsideMargins ? 0 : w.GetMarginTop();
+ wxCoord maxYpx = m_drawOutsideMargins ? w.GetScrY() : w.GetScrY() - w.GetMarginBottom();
+
+ wxCoord iy = 0;
+ if (m_pen.GetWidth() <= 1)
+ {
+ for (wxCoord i = startPx; i < endPx; ++i)
+ {
+ iy = w.y2p( GetY(w.p2x(i)));
+ // Draw the point only if you can draw outside margins or if the point is inside margins
+ if (m_drawOutsideMargins || ((iy >= minYpx) && (iy <= maxYpx)))
+ dc.DrawPoint(i, iy );// (wxCoord) ((w.GetPosY() - GetY( (double)i / w.GetScaleX() + w.GetPosX()) ) * w.GetScaleY()));
+ }
+ }
+ else
+ {
+ for (wxCoord i = startPx; i < endPx; ++i)
+ {
+ iy = w.y2p( GetY(w.p2x(i)));
+ // Draw the point only if you can draw outside margins or if the point is inside margins
+ if (m_drawOutsideMargins || ((iy >= minYpx) && (iy <= maxYpx)))
+ dc.DrawLine( i, iy, i, iy);
+ // wxCoord c = w.y2p( GetY(w.p2x(i)) ); //(wxCoord) ((w.GetPosY() - GetY( (double)i / w.GetScaleX() + w.GetPosX()) ) * w.GetScaleY());
+
+ }
+ }
+
+ if (!m_name.IsEmpty() && m_showName)
+ {
+ dc.SetFont(m_font);
+
+ wxCoord tx, ty;
+ dc.GetTextExtent(m_name, &tx, &ty);
+
+ /*if ((m_flags & mpALIGNMASK) == mpALIGN_RIGHT)
+ tx = (w.GetScrX()>>1) - tx - 8;
+ else if ((m_flags & mpALIGNMASK) == mpALIGN_CENTER)
+ tx = -tx/2;
+ else
+ tx = -(w.GetScrX()>>1) + 8;
+ */
+ if ((m_flags & mpALIGNMASK) == mpALIGN_RIGHT)
+ tx = (w.GetScrX() - tx) - w.GetMarginRight() - 8;
+ else if ((m_flags & mpALIGNMASK) == mpALIGN_CENTER)
+ tx = ((w.GetScrX() - w.GetMarginRight() - w.GetMarginLeft() - tx) / 2) + w.GetMarginLeft();
+ else
+ tx = w.GetMarginLeft() + 8;
+ dc.DrawText( m_name, tx, w.y2p(GetY(w.p2x(tx))) ); // (wxCoord) ((w.GetPosY() - GetY( (double)tx / w.GetScaleX() + w.GetPosX())) * w.GetScaleY()) );
+ }
+ }
+}
+
+IMPLEMENT_ABSTRACT_CLASS(mpFY, mpLayer)
+
+mpFY::mpFY(wxString name, int flags)
+{
+ SetName(name);
+ m_flags = flags;
+ m_type = mpLAYER_PLOT;
+}
+
+void mpFY::Plot(wxDC & dc, mpWindow & w)
+{
+ if (m_visible) {
+ dc.SetPen( m_pen);
+
+ wxCoord i, ix;
+
+ wxCoord startPx = m_drawOutsideMargins ? 0 : w.GetMarginLeft();
+ wxCoord endPx = m_drawOutsideMargins ? w.GetScrX() : w.GetScrX() - w.GetMarginRight();
+ wxCoord minYpx = m_drawOutsideMargins ? 0 : w.GetMarginTop();
+ wxCoord maxYpx = m_drawOutsideMargins ? w.GetScrY() : w.GetScrY() - w.GetMarginBottom();
+
+ if (m_pen.GetWidth() <= 1)
+ {
+ for (i = minYpx; i < maxYpx; ++i)
+ {
+ ix = w.x2p(GetX(w.p2y(i)));
+ if (m_drawOutsideMargins || ((ix >= startPx) && (ix <= endPx)))
+ dc.DrawPoint(ix, i);
+ }
+ }
+ else
+ {
+ for (i=0;i< w.GetScrY(); ++i)
+ {
+ ix = w.x2p(GetX(w.p2y(i)));
+ if (m_drawOutsideMargins || ((ix >= startPx) && (ix <= endPx)))
+ dc.DrawLine(ix, i, ix, i);
+ // wxCoord c = w.x2p(GetX(w.p2y(i))); //(wxCoord) ((GetX( (double)i / w.GetScaleY() + w.GetPosY()) - w.GetPosX()) * w.GetScaleX());
+ // dc.DrawLine(c, i, c, i);
+ }
+ }
+
+ if (!m_name.IsEmpty() && m_showName)
+ {
+ dc.SetFont(m_font);
+
+ wxCoord tx, ty;
+ dc.GetTextExtent(m_name, &tx, &ty);
+
+ if ((m_flags & mpALIGNMASK) == mpALIGN_TOP)
+ ty = w.GetMarginTop() + 8;
+ else if ((m_flags & mpALIGNMASK) == mpALIGN_CENTER)
+ ty = ((w.GetScrY() - w.GetMarginTop() - w.GetMarginBottom() - ty) / 2) + w.GetMarginTop();
+ else
+ ty = w.GetScrY() - 8 - ty - w.GetMarginBottom();
+
+ dc.DrawText( m_name, w.x2p(GetX(w.p2y(ty))), ty ); // (wxCoord) ((GetX( (double)i / w.GetScaleY() + w.GetPosY()) - w.GetPosX()) * w.GetScaleX()), -ty);
+ }
+ }
+}
+
+IMPLEMENT_ABSTRACT_CLASS(mpFXY, mpLayer)
+
+mpFXY::mpFXY(wxString name, int flags)
+{
+ SetName(name);
+ m_flags = flags;
+ m_type = mpLAYER_PLOT;
+}
+
+void mpFXY::UpdateViewBoundary(wxCoord xnew, wxCoord ynew)
+{
+ // Keep track of how many points have been drawn and the bouding box
+ maxDrawX = (xnew > maxDrawX) ? xnew : maxDrawX;
+ minDrawX = (xnew < minDrawX) ? xnew : minDrawX;
+ maxDrawY = (maxDrawY > ynew) ? maxDrawY : ynew;
+ minDrawY = (minDrawY < ynew) ? minDrawY : ynew;
+ //drawnPoints++;
+}
+
+void mpFXY::Plot(wxDC & dc, mpWindow & w)
+{
+ if (m_visible) {
+ dc.SetPen( m_pen);
+
+ double x, y;
+ // Do this to reset the counters to evaluate bounding box for label positioning
+ Rewind(); GetNextXY(x, y);
+ maxDrawX = x; minDrawX = x; maxDrawY = y; minDrawY = y;
+ //drawnPoints = 0;
+ Rewind();
+
+ wxCoord startPx = m_drawOutsideMargins ? 0 : w.GetMarginLeft();
+ wxCoord endPx = m_drawOutsideMargins ? w.GetScrX() : w.GetScrX() - w.GetMarginRight();
+ wxCoord minYpx = m_drawOutsideMargins ? 0 : w.GetMarginTop();
+ wxCoord maxYpx = m_drawOutsideMargins ? w.GetScrY() : w.GetScrY() - w.GetMarginBottom();
+
+ wxCoord ix = 0, iy = 0;
+
+ if (!m_continuous)
+ {
+ // for some reason DrawPoint does not use the current pen,
+ // so we use DrawLine for fat pens
+ if (m_pen.GetWidth() <= 1)
+ {
+ while (GetNextXY(x, y))
+ {
+ ix = w.x2p(x);
+ iy = w.y2p(y);
+ if (m_drawOutsideMargins || ((ix >= startPx) && (ix <= endPx) && (iy >= minYpx) && (iy <= maxYpx))) {
+ dc.DrawPoint(ix, iy);
+ UpdateViewBoundary(ix, iy);
+ };
+ }
+ }
+ else
+ {
+ while (GetNextXY(x, y))
+ {
+ ix = w.x2p(x);
+ iy = w.y2p(y);
+ if (m_drawOutsideMargins || ((ix >= startPx) && (ix <= endPx) && (iy >= minYpx) && (iy <= maxYpx))) {
+ dc.DrawLine(ix, iy, ix, iy);
+ UpdateViewBoundary(ix, iy);
+ }
+ // dc.DrawLine(cx, cy, cx, cy);
+ }
+ }
+ }
+ else
+ {
+ // Old code
+ wxCoord x0=0,c0=0;
+ bool first = TRUE;
+ std::vector<wxPoint> ptVector;
+ bool outUp, outDown;
+ outUp = outDown = true;
+ while (GetNextXY(x, y))
+ {
+ wxCoord x1 = w.x2p(x); // (wxCoord) ((x - w.GetPosX()) * w.GetScaleX());
+ wxCoord c1 = w.y2p(y); // (wxCoord) ((w.GetPosY() - y) * w.GetScaleY());
+ if (first)
+ {
+ first=FALSE;
+ x0=x1;c0=c1;
+ }
+ if((x1 >= startPx)&&(x0 <= endPx)) {
+ outDown = (c0 > maxYpx) && (c1 > maxYpx);
+ outUp = (c0 < minYpx) && (c1 < minYpx);
+ if (!outUp && !outDown) {
+ //Thales Lima Oliveira 22/06/2015
+ //Comentado para desaparecer a reta limite da curva (porque usar aquele limite??)
+ /*if (c1 != c0) {
+ if (c0 < minYpx) {
+ x0 = (int)(((float)(minYpx - c0))/((float)(c1 - c0))*(x1-x0)) + x0;
+ c0 = minYpx;
+ }
+ if (c0 > maxYpx) {
+ x0 = (int)(((float)(maxYpx - c0))/((float)(c1 - c0))*(x1-x0)) + x0;
+ //wxLogDebug(wxT("old x0 = %d, new x0 = %d"), x0, newX0);
+ //x0 = newX0;
+ c0 = maxYpx;
+ }
+ if (c1 < minYpx) {
+ x1 = (int)(((float)(minYpx - c0))/((float)(c1 - c0))*(x1-x0)) + x0;
+ c1 = minYpx;
+ }
+ if (c1 > maxYpx) {
+ x1 = (int)(((float)(maxYpx - c0))/((float)(c1 - c0))*(x1-x0)) + x0;
+ //wxLogDebug(wxT("old x0 = %d, old x1 = %d, new x1 = %d, c0 = %d, c1 = %d, maxYpx = %d"), x0, x1, newX1, c0, c1, maxYpx);
+ //x1 = newX1;
+ c1 = maxYpx;
+ }
+ }
+ if (x1 != x0) {
+ if (x0 < startPx) {
+ c0 = (int)(((float)(startPx - x0))/((float)(x1 -x0))*(c1 -c0)) + c0;
+ x0 = startPx;
+ }
+ if (x1 > endPx) {
+ c1 = (int)(((float)(endPx - x0))/((float)(x1 -x0))*(c1 -c0)) + c0;
+ x1 = endPx;
+ }
+ }*/
+
+ //dc.DrawLine(x0, c0, x1, c1);
+ //ptVector.push_back(wxPoint(x1, c1));
+ UpdateViewBoundary(x1, c1);
+ }
+ }
+ ptVector.push_back(wxPoint(x1, c1));
+ x0=x1; c0=c1;
+ }
+
+ //modificado a forma de desenhar (desenha agora de forma contínua, permitindo usar diferentes tipos de traços)
+ wxPoint drawPts[ptVector.size()];
+ for(int i = 0; i < (int)ptVector.size(); i++) {
+ drawPts[i] = ptVector[i];
+ }
+ dc.DrawLines(ptVector.size(), drawPts);
+
+ }
+
+ if (!m_name.IsEmpty() && m_showName)
+ {
+ dc.SetFont(m_font);
+
+ wxCoord tx, ty;
+ dc.GetTextExtent(m_name, &tx, &ty);
+
+ // xxx implement else ... if (!HasBBox())
+ {
+ // const int sx = w.GetScrX();
+ // const int sy = w.GetScrY();
+
+ if ((m_flags & mpALIGNMASK) == mpALIGN_NW)
+ {
+ tx = minDrawX + 8;
+ ty = maxDrawY + 8;
+ }
+ else if ((m_flags & mpALIGNMASK) == mpALIGN_NE)
+ {
+ tx = maxDrawX - tx - 8;
+ ty = maxDrawY + 8;
+ }
+ else if ((m_flags & mpALIGNMASK) == mpALIGN_SE)
+ {
+ tx = maxDrawX - tx - 8;
+ ty = minDrawY - ty - 8;
+ }
+ else
+ { // mpALIGN_SW
+ tx = minDrawX + 8;
+ ty = minDrawY - ty - 8;
+ }
+ }
+
+ dc.DrawText( m_name, tx, ty);
+ }
+ }
+}
+
+//-----------------------------------------------------------------------------
+// mpProfile implementation
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(mpProfile, mpLayer)
+
+mpProfile::mpProfile(wxString name, int flags)
+{
+ SetName(name);
+ m_flags = flags;
+ m_type = mpLAYER_PLOT;
+}
+
+void mpProfile::Plot(wxDC & dc, mpWindow & w)
+{
+ if (m_visible) {
+ dc.SetPen( m_pen);
+
+ wxCoord startPx = m_drawOutsideMargins ? 0 : w.GetMarginLeft();
+ wxCoord endPx = m_drawOutsideMargins ? w.GetScrX() : w.GetScrX() - w.GetMarginRight();
+ wxCoord minYpx = m_drawOutsideMargins ? 0 : w.GetMarginTop();
+ wxCoord maxYpx = m_drawOutsideMargins ? w.GetScrY() : w.GetScrY() - w.GetMarginBottom();
+
+ // Plot profile linking subsequent point of the profile, instead of mpFY, which plots simple points.
+ for (wxCoord i = startPx; i < endPx; ++i) {
+ wxCoord c0 = w.y2p( GetY(w.p2x(i)) ); // (wxCoord) ((w.GetYpos() - GetY( (double)i / w.GetXscl() + w.GetXpos()) ) * w.GetYscl());
+ wxCoord c1 = w.y2p( GetY(w.p2x(i+1)) );//(wxCoord) ((w.GetYpos() - GetY( (double)(i+1) / w.GetXscl() + (w.GetXpos() ) ) ) * w.GetYscl());
+ // c0 = (c0 <= maxYpx) ? ((c0 >= minYpx) ? c0 : minYpx) : maxYpx;
+ // c1 = (c1 <= maxYpx) ? ((c1 >= minYpx) ? c1 : minYpx) : maxYpx;
+ if (!m_drawOutsideMargins) {
+ c0 = (c0 <= maxYpx) ? ((c0 >= minYpx) ? c0 : minYpx) : maxYpx;
+ c1 = (c1 <= maxYpx) ? ((c1 >= minYpx) ? c1 : minYpx) : maxYpx;
+ }
+ dc.DrawLine(i, c0, i+1, c1);
+ };
+ if (!m_name.IsEmpty()) {
+ dc.SetFont(m_font);
+
+ wxCoord tx, ty;
+ dc.GetTextExtent(m_name, &tx, &ty);
+
+ if ((m_flags & mpALIGNMASK) == mpALIGN_RIGHT)
+ tx = (w.GetScrX() - tx) - w.GetMarginRight() - 8;
+ else if ((m_flags & mpALIGNMASK) == mpALIGN_CENTER)
+ tx = ((w.GetScrX() - w.GetMarginRight() - w.GetMarginLeft() - tx) / 2) + w.GetMarginLeft();
+ else
+ tx = w.GetMarginLeft() + 8;
+
+ dc.DrawText( m_name, tx, w.y2p( GetY( w.p2x(tx) ) ) );//(wxCoord) ((w.GetPosY() - GetY( (double)tx / w.GetScaleX() + w.GetPosX())) * w.GetScaleY()) );
+ }
+ }
+}
+
+//-----------------------------------------------------------------------------
+// mpLayer implementations - furniture (scales, ...)
+//-----------------------------------------------------------------------------
+
+#define mpLN10 2.3025850929940456840179914546844
+
+IMPLEMENT_DYNAMIC_CLASS(mpScaleX, mpLayer)
+
+mpScaleX::mpScaleX(wxString name, int flags, bool ticks, unsigned int type)
+{
+ SetName(name);
+ SetFont( (wxFont&) *wxSMALL_FONT);
+ SetPen( (wxPen&) *wxGREY_PEN);
+ m_flags = flags;
+ m_ticks = ticks;
+ m_labelType = type;
+ m_type = mpLAYER_AXIS;
+ m_labelFormat = wxT("");
+}
+
+void mpScaleX::Plot(wxDC & dc, mpWindow & w)
+{
+ if (m_visible) {
+ dc.SetPen( m_pen);
+ dc.SetFont( m_font);
+ int orgy=0;
+
+ const int extend = w.GetScrX(); // /2;
+ if (m_flags == mpALIGN_CENTER)
+ orgy = w.y2p(0); //(int)(w.GetPosY() * w.GetScaleY());
+ if (m_flags == mpALIGN_TOP) {
+ if (m_drawOutsideMargins)
+ orgy = X_BORDER_SEPARATION;
+ else
+ orgy = w.GetMarginTop();
+ }
+ if (m_flags == mpALIGN_BOTTOM) {
+ if (m_drawOutsideMargins)
+ orgy = X_BORDER_SEPARATION;
+ else
+ orgy = w.GetScrY() - w.GetMarginBottom();
+ }
+ if (m_flags == mpALIGN_BORDER_BOTTOM )
+ orgy = w.GetScrY() - 1;//dc.LogicalToDeviceY(0) - 1;
+ if (m_flags == mpALIGN_BORDER_TOP )
+ orgy = 1;//-dc.LogicalToDeviceY(0);
+
+ //Thales Lima Oliveira - 23/06/2015
+ //Inserido retângulo para tapar a curva que fica fora do gráfico
+ dc.SetBrush( wxBrush(w.GetBackgroundColour()) );
+ dc.SetPen( *wxTRANSPARENT_PEN );
+ dc.DrawRectangle( 0, orgy, w.GetScrX(), orgy);
+ dc.DrawRectangle( 0, 0, w.GetScrX(), w.GetMarginTop());
+ dc.SetPen( m_pen);
+
+ dc.DrawLine( w.GetMarginLeft(), orgy, w.GetScrX() - w.GetMarginRight(), orgy);
+
+ // To cut the axis line when draw outside margin is false, use this code
+ /*if (m_drawOutsideMargins == true)
+ dc.DrawLine( 0, orgy, w.GetScrX(), orgy);
+ else
+ dc.DrawLine( w.GetMarginLeft(), orgy, w.GetScrX() - w.GetMarginRight(), orgy); */
+
+ const double dig = floor( log( 128.0 / w.GetScaleX() ) / mpLN10 );
+ const double step = exp( mpLN10 * dig);
+ const double end = w.GetPosX() + (double)extend / w.GetScaleX();
+
+ wxCoord tx, ty;
+ wxString s;
+ wxString fmt;
+ int tmp = (int)dig;
+ if (m_labelType == mpX_NORMAL) {
+ if (!m_labelFormat.IsEmpty()) {
+ fmt = m_labelFormat;
+ } else {
+ if (tmp>=1) {
+ fmt = wxT("%.f");
+ } else {
+ tmp=8-tmp;
+ fmt.Printf(wxT("%%.%df"), tmp >= -1 ? 2 : -tmp);
+ }
+ }
+ } else {
+ // Date and/or time axis representation
+ if (m_labelType == mpX_DATETIME) {
+ fmt = (wxT("%04.0f-%02.0f-%02.0fT%02.0f:%02.0f:%02.0f"));
+ } else if (m_labelType == mpX_DATE) {
+ fmt = (wxT("%04.0f-%02.0f-%02.0f"));
+ } else if ((m_labelType == mpX_TIME) && (end/60 < 2)) {
+ fmt = (wxT("%02.0f:%02.3f"));
+ } else {
+ fmt = (wxT("%02.0f:%02.0f:%02.0f"));
+ }
+ }
+
+ //double n = floor( (w.GetPosX() - (double)extend / w.GetScaleX()) / step ) * step ;
+ double n0 = floor( (w.GetPosX() /* - (double)(extend - w.GetMarginLeft() - w.GetMarginRight())/ w.GetScaleX() */) / step ) * step ;
+ double n = 0;
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(wxT("mpScaleX::Plot: dig: %f , step: %f, end: %f, n: %f"), dig, step, end, n0);
+#endif
+ wxCoord startPx = m_drawOutsideMargins ? 0 : w.GetMarginLeft();
+ wxCoord endPx = m_drawOutsideMargins ? w.GetScrX() : w.GetScrX() - w.GetMarginRight();
+ wxCoord minYpx = m_drawOutsideMargins ? 0 : w.GetMarginTop();
+ wxCoord maxYpx = m_drawOutsideMargins ? w.GetScrY() : w.GetScrY() - w.GetMarginBottom();
+
+ tmp=-65535;
+ int labelH = 0; // Control labels heigth to decide where to put axis name (below labels or on top of axis)
+ int maxExtent = 0;
+ for (n = n0; n < end; n += step) {
+ const int p = (int)((n - w.GetPosX()) * w.GetScaleX());
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(wxT("mpScaleX::Plot: n: %f -> p = %d"), n, p);
+#endif
+ if ((p >= startPx) && (p <= endPx)) {
+ if (m_ticks) { // draw axis ticks
+ if (m_flags == mpALIGN_BORDER_BOTTOM)
+ dc.DrawLine( p, orgy, p, orgy-4);
+ else
+ dc.DrawLine( p, orgy, p, orgy+4);
+ } else { // draw grid dotted lines
+ m_pen.SetStyle(wxDOT);
+ dc.SetPen(m_pen);
+ if ((m_flags == mpALIGN_BOTTOM) && !m_drawOutsideMargins) {
+ dc.DrawLine( p, orgy+4, p, minYpx );
+ } else {
+ if ((m_flags == mpALIGN_TOP) && !m_drawOutsideMargins) {
+ dc.DrawLine( p, orgy-4, p, maxYpx );
+ } else {
+ dc.DrawLine( p, 0/*-w.GetScrY()*/, p, w.GetScrY() );
+ }
+ }
+ m_pen.SetStyle(wxSOLID);
+ dc.SetPen(m_pen);
+ }
+ // Write ticks labels in s string
+ if (m_labelType == mpX_NORMAL)
+ s.Printf(fmt, n);
+ else if (m_labelType == mpX_DATETIME) {
+ time_t when = (time_t)n;
+ struct tm tm = *localtime(&when);
+ s.Printf(fmt, (double)tm.tm_year+1900, (double)tm.tm_mon+1, (double)tm.tm_mday, (double)tm.tm_hour, (double)tm.tm_min, (double)tm.tm_sec);
+ } else if (m_labelType == mpX_DATE) {
+ time_t when = (time_t)n;
+ struct tm tm = *localtime(&when);
+ s.Printf(fmt, (double)tm.tm_year+1900, (double)tm.tm_mon+1, (double)tm.tm_mday);
+ } else if ((m_labelType == mpX_TIME) || (m_labelType == mpX_HOURS)) {
+ double modulus = fabs(n);
+ double sign = n/modulus;
+ double hh = floor(modulus/3600);
+ double mm = floor((modulus - hh*3600)/60);
+ double ss = modulus - hh*3600 - mm*60;
+ #ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(wxT("%02.0f Hours, %02.0f minutes, %02.0f seconds"), sign*hh, mm, ss);
+ #endif // MATHPLOT_DO_LOGGING
+ if (fmt.Len() == 20) // Format with hours has 11 chars
+ s.Printf(fmt, sign*hh, mm, floor(ss));
+ else
+ s.Printf(fmt, sign*mm, ss);
+ }
+ dc.GetTextExtent(s, &tx, &ty);
+ labelH = (labelH <= ty) ? ty : labelH;
+/* if ((p-tx/2-tmp) > 64) { // Problem about non-regular axis labels
+ if ((m_flags == mpALIGN_BORDER_BOTTOM) || (m_flags == mpALIGN_TOP)) {
+ dc.DrawText( s, p-tx/2, orgy-4-ty);
+ } else {
+ dc.DrawText( s, p-tx/2, orgy+4);
+ }
+ tmp=p+tx/2;
+ }
+ */
+ maxExtent = (tx > maxExtent) ? tx : maxExtent; // Keep in mind max label width
+ }
+ }
+ // Actually draw labels, taking care of not overlapping them, and distributing them regularly
+ double labelStep = ceil((maxExtent + mpMIN_X_AXIS_LABEL_SEPARATION)/(w.GetScaleX()*step))*step;
+ for (n = n0; n < end; n += labelStep) {
+ const int p = (int)((n - w.GetPosX()) * w.GetScaleX());
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(wxT("mpScaleX::Plot: n_label = %f -> p_label = %d"), n, p);
+#endif
+ if ((p >= startPx) && (p <= endPx)) {
+ // Write ticks labels in s string
+ if (m_labelType == mpX_NORMAL)
+ s.Printf(fmt, n);
+ else if (m_labelType == mpX_DATETIME) {
+ time_t when = (time_t)n;
+ struct tm tm = *localtime(&when);
+ s.Printf(fmt, (double)tm.tm_year+1900, (double)tm.tm_mon+1, (double)tm.tm_mday, (double)tm.tm_hour, (double)tm.tm_min, (double)tm.tm_sec);
+ } else if (m_labelType == mpX_DATE) {
+ time_t when = (time_t)n;
+ struct tm tm = *localtime(&when);
+ s.Printf(fmt, (double)tm.tm_year+1900, (double)tm.tm_mon+1, (double)tm.tm_mday);
+ } else if ((m_labelType == mpX_TIME) || (m_labelType == mpX_HOURS)) {
+ double modulus = fabs(n);
+ double sign = n/modulus;
+ double hh = floor(modulus/3600);
+ double mm = floor((modulus - hh*3600)/60);
+ double ss = modulus - hh*3600 - mm*60;
+ #ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(wxT("%02.0f Hours, %02.0f minutes, %02.0f seconds"), sign*hh, mm, ss);
+ #endif // MATHPLOT_DO_LOGGING
+ if (fmt.Len() == 20) // Format with hours has 11 chars
+ s.Printf(fmt, sign*hh, mm, floor(ss));
+ else
+ s.Printf(fmt, sign*mm, ss);
+ }
+ dc.GetTextExtent(s, &tx, &ty);
+ if ((m_flags == mpALIGN_BORDER_BOTTOM) || (m_flags == mpALIGN_TOP)) {
+ dc.DrawText( s, p-tx/2, orgy-4-ty);
+ } else {
+ dc.DrawText( s, p-tx/2, orgy+4);
+ }
+ }
+ }
+
+ // Draw axis name
+ dc.GetTextExtent(m_name, &tx, &ty);
+ switch (m_flags) {
+ case mpALIGN_BORDER_BOTTOM:
+ dc.DrawText( m_name, extend - tx - 4, orgy - 8 - ty - labelH);
+ break;
+ case mpALIGN_BOTTOM: {
+ if ((!m_drawOutsideMargins) && (w.GetMarginBottom() > (ty + labelH + 8))) {
+ dc.DrawText( m_name, (endPx - startPx - tx)>>1, orgy + 6 + labelH);
+ } else {
+ dc.DrawText( m_name, extend - tx - 4, orgy - 4 - ty);
+ }
+ } break;
+ case mpALIGN_CENTER:
+ dc.DrawText( m_name, extend - tx - 4, orgy - 4 - ty);
+ break;
+ case mpALIGN_TOP: {
+ if ((!m_drawOutsideMargins) && (w.GetMarginTop() > (ty + labelH + 8))) {
+ dc.DrawText( m_name, (endPx - startPx - tx)>>1, orgy - 6 - ty - labelH);
+ } else {
+ dc.DrawText( m_name, extend - tx - 4, orgy + 4);
+ }
+ } break;
+ case mpALIGN_BORDER_TOP:
+ dc.DrawText( m_name, extend - tx - 4, orgy + 6 + labelH);
+ break;
+ default:
+ break;
+ }
+ }
+/* if (m_flags != mpALIGN_TOP) {
+
+ if ((m_flags == mpALIGN_BORDER_BOTTOM) || (m_flags == mpALIGN_TOP)) {
+ dc.DrawText( m_name, extend - tx - 4, orgy - 4 - (ty*2));
+ } else {
+ dc.DrawText( m_name, extend - tx - 4, orgy - 4 - ty); //orgy + 4 + ty);
+ }
+ }; */
+}
+
+IMPLEMENT_DYNAMIC_CLASS(mpScaleY, mpLayer)
+
+mpScaleY::mpScaleY(wxString name, int flags, bool ticks)
+{
+ SetName(name);
+ SetFont( (wxFont&) *wxSMALL_FONT);
+ SetPen( (wxPen&) *wxGREY_PEN);
+ m_flags = flags;
+ m_ticks = ticks;
+ m_type = mpLAYER_AXIS;
+ m_labelFormat = wxT("");
+}
+
+void mpScaleY::Plot(wxDC & dc, mpWindow & w)
+{
+ if (m_visible) {
+ dc.SetPen( m_pen);
+ dc.SetFont( m_font);
+
+ int orgx=0;
+ const int extend = w.GetScrY(); // /2;
+ if (m_flags == mpALIGN_CENTER)
+ orgx = w.x2p(0); //(int)(w.GetPosX() * w.GetScaleX());
+ if (m_flags == mpALIGN_LEFT) {
+ if (m_drawOutsideMargins)
+ orgx = Y_BORDER_SEPARATION;
+ else
+ orgx = w.GetMarginLeft();
+ }
+ if (m_flags == mpALIGN_RIGHT) {
+ if (m_drawOutsideMargins)
+ orgx = w.GetScrX() - Y_BORDER_SEPARATION;
+ else
+ orgx = w.GetScrX() - w.GetMarginRight();
+ }
+ if (m_flags == mpALIGN_BORDER_RIGHT )
+ orgx = w.GetScrX() - 1; //dc.LogicalToDeviceX(0) - 1;
+ if (m_flags == mpALIGN_BORDER_LEFT )
+ orgx = 1; //-dc.LogicalToDeviceX(0);
+
+ dc.SetBrush( wxBrush(w.GetBackgroundColour()) );
+ dc.SetPen( *wxTRANSPARENT_PEN );
+ dc.DrawRectangle( 0, 0, orgx, extend);
+ dc.DrawRectangle( w.GetScrX() - w.GetMarginRight(), 0, w.GetScrX() - w.GetMarginRight(), extend);
+ dc.SetPen( m_pen);
+
+ // Draw line
+ dc.DrawLine( orgx, w.GetMarginTop(), orgx, w.GetScrY() - w.GetMarginBottom());
+
+ // To cut the axis line when draw outside margin is false, use this code
+ /* if (m_drawOutsideMargins == true)
+ dc.DrawLine( orgx, 0, orgx, extend);
+ else
+ dc.DrawLine( orgx, w.GetMarginTop(), orgx, w.GetScrY() - w.GetMarginBottom()); */
+
+ const double dig = floor( log( 128.0 / w.GetScaleY() ) / mpLN10 );
+ const double step = exp( mpLN10 * dig);
+ const double end = w.GetPosY() + (double)extend / w.GetScaleY();
+
+ wxCoord tx, ty;
+ wxString s;
+ wxString fmt;
+ int tmp = (int)dig;
+ double maxScaleAbs = fabs(w.GetDesiredYmax());
+ double minScaleAbs = fabs(w.GetDesiredYmin());
+ double endscale = (maxScaleAbs > minScaleAbs) ? maxScaleAbs : minScaleAbs;
+ if (m_labelFormat.IsEmpty()) {
+ if ((endscale < 1e4) && (endscale > 1e-3))
+ fmt = wxT("%.2f");
+ else
+ fmt = wxT("%.1e");
+ } else {
+ fmt = m_labelFormat;
+ }
+ /* if (tmp>=1)
+ {*/
+ // fmt = wxT("%7.5g");
+ // }
+ // else
+ // {
+ // tmp=8-tmp;
+ // fmt.Printf(wxT("%%.%dg"), (tmp >= -1) ? 2 : -tmp);
+ // }
+
+ double n = floor( (w.GetPosY() - (double)(extend - w.GetMarginTop() - w.GetMarginBottom())/ w.GetScaleY()) / step ) * step ;
+
+ /* wxCoord startPx = m_drawOutsideMargins ? 0 : w.GetMarginLeft(); */
+ wxCoord endPx = m_drawOutsideMargins ? w.GetScrX() : w.GetScrX() - w.GetMarginRight();
+ wxCoord minYpx = m_drawOutsideMargins ? 0 : w.GetMarginTop();
+ wxCoord maxYpx = m_drawOutsideMargins ? w.GetScrY() : w.GetScrY() - w.GetMarginBottom();
+
+ tmp=65536;
+ int labelW = 0;
+ // Before staring cycle, calculate label height
+ int labelHeigth = 0;
+ s.Printf(fmt,n);
+ dc.GetTextExtent(s, &tx, &labelHeigth);
+ for (;n < end; n += step) {
+ const int p = (int)((w.GetPosY() - n) * w.GetScaleY());
+ if ((p >= minYpx) && (p <= maxYpx)) {
+ if (m_ticks) { // Draw axis ticks
+ if (m_flags == mpALIGN_BORDER_LEFT) {
+ dc.DrawLine( orgx, p, orgx+4, p);
+ } else {
+ dc.DrawLine( orgx-4, p, orgx, p); //( orgx, p, orgx+4, p);
+ }
+ } else {
+ m_pen.SetStyle(wxDOT);
+ dc.SetPen( m_pen);
+ if ((m_flags == mpALIGN_LEFT) && !m_drawOutsideMargins) {
+ dc.DrawLine( orgx-4, p, endPx, p);
+ } else {
+ if ((m_flags == mpALIGN_RIGHT) && !m_drawOutsideMargins) {
+ dc.DrawLine( minYpx, p, orgx+4, p);
+ } else {
+ dc.DrawLine( 0/*-w.GetScrX()*/, p, w.GetScrX(), p);
+ }
+ }
+ m_pen.SetStyle(wxSOLID);
+ dc.SetPen( m_pen);
+ }
+ // Print ticks labels
+ s.Printf(fmt, n);
+ dc.GetTextExtent(s, &tx, &ty);
+#ifdef MATHPLOT_DO_LOGGING
+ if (ty != labelHeigth) wxLogMessage(wxT("mpScaleY::Plot: ty(%f) and labelHeigth(%f) differ!"), ty, labelHeigth);
+#endif
+ labelW = (labelW <= tx) ? tx : labelW;
+ if ((tmp-p+labelHeigth/2) > mpMIN_Y_AXIS_LABEL_SEPARATION) {
+ if ((m_flags == mpALIGN_BORDER_LEFT) || (m_flags == mpALIGN_RIGHT))
+ dc.DrawText( s, orgx+4, p-ty/2);
+ else
+ dc.DrawText( s, orgx-4-tx, p-ty/2); //( s, orgx+4, p-ty/2);
+ tmp=p-labelHeigth/2;
+ }
+ }
+ }
+ // Draw axis name
+
+ dc.GetTextExtent(m_name, &tx, &ty);
+ switch (m_flags) {
+ case mpALIGN_BORDER_LEFT:
+ dc.DrawText( m_name, labelW + 8, 4);
+ break;
+ case mpALIGN_LEFT: {
+ if ((!m_drawOutsideMargins) && (w.GetMarginLeft() > (ty + labelW + 8))) {
+ dc.DrawRotatedText( m_name, orgx - 6 - labelW - ty, (maxYpx - minYpx + tx)>>1, 90);
+ } else {
+ dc.DrawText( m_name, orgx + 4, 4);
+ }
+ } break;
+ case mpALIGN_CENTER:
+ dc.DrawText( m_name, orgx + 4, 4);
+ break;
+ case mpALIGN_RIGHT: {
+ if ((!m_drawOutsideMargins) && (w.GetMarginRight() > (ty + labelW + 8))) {
+ dc.DrawRotatedText( m_name, orgx + 6 + labelW, (maxYpx - minYpx + tx)>>1, 90);
+ } else {
+ dc.DrawText( m_name, orgx - tx - 4, 4);
+ }
+ } break;
+ case mpALIGN_BORDER_RIGHT:
+ dc.DrawText( m_name, orgx - 6 - tx -labelW, 4);
+ break;
+ default:
+ break;
+ }
+ }
+
+/* if (m_flags != mpALIGN_RIGHT) {
+ dc.GetTextExtent(m_name, &tx, &ty);
+ if (m_flags == mpALIGN_BORDER_LEFT) {
+ dc.DrawText( m_name, orgx-tx-4, -extend + ty + 4);
+ } else {
+ if (m_flags == mpALIGN_BORDER_RIGHT )
+ dc.DrawText( m_name, orgx-(tx*2)-4, -extend + ty + 4);
+ else
+ dc.DrawText( m_name, orgx + 4, -extend + 4);
+ }
+ }; */
+}
+
+//-----------------------------------------------------------------------------
+// mpWindow
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(mpWindow, wxWindow)
+
+BEGIN_EVENT_TABLE(mpWindow, wxWindow)
+ EVT_PAINT ( mpWindow::OnPaint)
+ EVT_SIZE ( mpWindow::OnSize)
+ EVT_SCROLLWIN_THUMBTRACK(mpWindow::OnScrollThumbTrack)
+ EVT_SCROLLWIN_PAGEUP(mpWindow::OnScrollPageUp)
+ EVT_SCROLLWIN_PAGEDOWN(mpWindow::OnScrollPageDown)
+ EVT_SCROLLWIN_LINEUP(mpWindow::OnScrollLineUp)
+ EVT_SCROLLWIN_LINEDOWN(mpWindow::OnScrollLineDown)
+ EVT_SCROLLWIN_TOP(mpWindow::OnScrollTop)
+ EVT_SCROLLWIN_BOTTOM(mpWindow::OnScrollBottom)
+
+ EVT_MIDDLE_UP( mpWindow::OnShowPopupMenu)
+ EVT_RIGHT_DOWN( mpWindow::OnMouseRightDown) // JLB
+ EVT_RIGHT_UP ( mpWindow::OnShowPopupMenu)
+ EVT_MOUSEWHEEL( mpWindow::OnMouseWheel ) // JLB
+ EVT_MOTION( mpWindow::OnMouseMove ) // JLB
+ EVT_LEFT_DOWN( mpWindow::OnMouseLeftDown)
+ EVT_LEFT_UP( mpWindow::OnMouseLeftRelease)
+
+ EVT_MENU( mpID_CENTER, mpWindow::OnCenter)
+ EVT_MENU( mpID_FIT, mpWindow::OnFit)
+ EVT_MENU( mpID_ZOOM_IN, mpWindow::OnZoomIn)
+ EVT_MENU( mpID_ZOOM_OUT, mpWindow::OnZoomOut)
+ EVT_MENU( mpID_LOCKASPECT,mpWindow::OnLockAspect)
+ EVT_MENU( mpID_HELP_MOUSE,mpWindow::OnMouseHelp)
+END_EVENT_TABLE()
+
+mpWindow::mpWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long flag )
+ : wxWindow( parent, id, pos, size, flag, wxT("mathplot") )
+{
+ selectionRect = wxRect(0,0,0,0);
+ srColour = *wxBLACK;
+
+ m_scaleX = m_scaleY = 1.0;
+ m_posX = m_posY = 0;
+ m_desiredXmin=m_desiredYmin=0;
+ m_desiredXmax=m_desiredYmax=1;
+ m_scrX = m_scrY = 64; // Fixed from m_scrX = m_scrX = 64;
+ m_minX = m_minY = 0;
+ m_maxX = m_maxY = 0;
+ m_last_lx= m_last_ly= 0;
+ m_buff_bmp = NULL;
+ m_enableDoubleBuffer = FALSE;
+ m_enableMouseNavigation = TRUE;
+ m_mouseMovedAfterRightClick = FALSE;
+ m_movingInfoLayer = NULL;
+ // Set margins to 0
+ m_marginTop = 0; m_marginRight = 0; m_marginBottom = 0; m_marginLeft = 0;
+
+
+ m_lockaspect = FALSE;
+
+ m_popmenu.Append( mpID_CENTER, _("Centralizar"), _("Centraliza a vizualização gráfico nesta posição"));
+ m_popmenu.Append( mpID_FIT, _("Encaixar"), _("Ajusta a vizualização para exibição de todos os itens"));
+ m_popmenu.Append( mpID_ZOOM_IN, _("Mais Zoom"), _("Mais Zoom na vizualização do gráfico."));
+ m_popmenu.Append( mpID_ZOOM_OUT, _("Menos Zoom"), _("Menos Zoom na vizualização do gráfico."));
+ m_popmenu.AppendCheckItem( mpID_LOCKASPECT, _("Bloquear proporções"), _("Bloquear as proporções do zoom horizontal e vertical."));
+ m_popmenu.Append( mpID_HELP_MOUSE, _("Mostrar comandos do mouse..."), _("Exibe a ajuda sobre os comandos do mouse."));
+
+ m_layers.clear();
+ SetBackgroundColour( *wxWHITE );
+ m_bgColour = *wxWHITE;
+ m_fgColour = *wxBLACK;
+
+ m_enableScrollBars = false;
+ SetSizeHints(128, 128);
+
+ // J.L.Blanco: Eliminates the "flick" with the double buffer.
+ SetBackgroundStyle( wxBG_STYLE_CUSTOM );
+
+ UpdateAll();
+}
+
+mpWindow::~mpWindow()
+{
+ // Free all the layers:
+ DelAllLayers( true, false );
+
+ if (m_buff_bmp)
+ {
+ delete m_buff_bmp;
+ m_buff_bmp = NULL;
+ }
+}
+
+// Mouse handler, for detecting when the user drag with the right button or just "clicks" for the menu
+// JLB
+void mpWindow::OnMouseRightDown(wxMouseEvent &event)
+{
+ m_mouseMovedAfterRightClick = FALSE;
+ m_mouseRClick_X = event.GetX();
+ m_mouseRClick_Y = event.GetY();
+ if (m_enableMouseNavigation)
+ {
+ SetCursor( *wxCROSS_CURSOR );
+ }
+}
+
+// Process mouse wheel events
+// JLB
+void mpWindow::OnMouseWheel( wxMouseEvent &event )
+{
+ if (!m_enableMouseNavigation)
+ {
+ event.Skip();
+ return;
+ }
+
+// GetClientSize( &m_scrX,&m_scrY);
+
+ if (event.m_controlDown)
+ {
+ wxPoint clickPt( event.GetX(),event.GetY() );
+ // CTRL key hold: Zoom in/out:
+ if (event.GetWheelRotation()>0)
+ ZoomIn( clickPt );
+ else ZoomOut( clickPt );
+ }
+ else
+ {
+ // Scroll vertically or horizontally (this is SHIFT is hold down).
+ int change = - event.GetWheelRotation(); // Opposite direction (More intuitive)!
+ double changeUnitsX = change / m_scaleX;
+ double changeUnitsY = change / m_scaleY;
+
+ if (event.m_shiftDown)
+ {
+ m_posX += changeUnitsX;
+ m_desiredXmax += changeUnitsX;
+ m_desiredXmin += changeUnitsX;
+ }
+ else
+ {
+ m_posY -= changeUnitsY;
+ m_desiredYmax -= changeUnitsY;
+ m_desiredYmax -= changeUnitsY;
+ }
+
+ UpdateAll();
+ }
+}
+
+// If the user "drags" with the right buttom pressed, do "pan"
+// JLB
+void mpWindow::OnMouseMove(wxMouseEvent &event)
+{
+ if (!m_enableMouseNavigation)
+ {
+ event.Skip();
+ return;
+ }
+
+ if (event.m_rightDown)
+ {
+ m_mouseMovedAfterRightClick = TRUE; // Hides the popup menu after releasing the button!
+
+ // The change:
+ int Ax= m_mouseRClick_X - event.GetX();
+ int Ay= m_mouseRClick_Y - event.GetY();
+
+ // For the next event, use relative to this coordinates.
+ m_mouseRClick_X = event.GetX();
+ m_mouseRClick_Y = event.GetY();
+
+ double Ax_units = Ax / m_scaleX;
+ double Ay_units = -Ay / m_scaleY;
+
+ m_posX += Ax_units;
+ m_posY += Ay_units;
+ m_desiredXmax += Ax_units;
+ m_desiredXmin += Ax_units;
+ m_desiredYmax += Ay_units;
+ m_desiredYmin += Ay_units;
+
+ UpdateAll();
+
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("[mpWindow::OnMouseMove] Ax:%i Ay:%i m_posX:%f m_posY:%f"),Ax,Ay,m_posX,m_posY);
+#endif
+ } else {
+ if (event.m_leftDown) {
+ if (m_movingInfoLayer == NULL) {
+ /*wxClientDC dc(this);
+ wxPen pen(*wxBLACK, 1, wxDOT);
+ dc.SetPen(pen);
+ dc.SetBrush(*wxTRANSPARENT_BRUSH);
+ dc.DrawRectangle(m_mouseLClick_X, m_mouseLClick_Y, event.GetX() - m_mouseLClick_X, event.GetY() - m_mouseLClick_Y);*/
+ selectionRect = wxRect(m_mouseLClick_X, m_mouseLClick_Y, event.GetX() - m_mouseLClick_X, event.GetY() - m_mouseLClick_Y);
+ } else {
+ wxPoint moveVector(event.GetX() - m_mouseLClick_X, event.GetY() - m_mouseLClick_Y);
+ m_movingInfoLayer->Move(moveVector);
+ }
+ UpdateAll();
+ } else {
+ wxLayerList::iterator li;
+ for (li = m_layers.begin(); li != m_layers.end(); li++) {
+ if ((*li)->IsInfo() && (*li)->IsVisible()) {
+ mpInfoLayer* tmpLyr = (mpInfoLayer*) (*li);
+ tmpLyr->UpdateInfo(*this, event);
+ // UpdateAll();
+ RefreshRect(tmpLyr->GetRectangle());
+ }
+ }
+ /* if (m_coordTooltip) {
+ wxString toolTipContent;
+ toolTipContent.Printf(_("X = %f\nY = %f"), p2x(event.GetX()), p2y(event.GetY()));
+ wxTipWindow** ptr = NULL;
+ wxRect rectBounds(event.GetX(), event.GetY(), 5, 5);
+ wxTipWindow* tip = new wxTipWindow(this, toolTipContent, 100, ptr, &rectBounds);
+
+ } */
+ }
+ }
+ event.Skip();
+}
+
+void mpWindow::OnMouseLeftDown (wxMouseEvent &event)
+{
+ m_mouseLClick_X = event.GetX();
+ m_mouseLClick_Y = event.GetY();
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("mpWindow::OnMouseLeftDown() X = %d , Y = %d"), event.GetX(), event.GetY());/*m_mouseLClick_X, m_mouseLClick_Y);*/
+#endif
+ wxPoint pointClicked = event.GetPosition();
+ m_movingInfoLayer = IsInsideInfoLayer(pointClicked);
+ if (m_movingInfoLayer != NULL) {
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("mpWindow::OnMouseLeftDown() started moving layer %lx"), (long int) m_movingInfoLayer);/*m_mouseLClick_X, m_mouseLClick_Y);*/
+#endif
+ }
+ /*/Modificação - Thales 22/06/2015
+ if(event.Dragging() && m_movingInfoLayer == NULL)
+ {
+ wxClientDC dc(this);
+ wxPen pen(*wxBLACK, 1, wxDOT);
+ dc.SetPen(pen);
+ dc.SetBrush(*wxTRANSPARENT_BRUSH);
+ dc.DrawRectangle(m_mouseLClick_X, m_mouseLClick_Y, event.GetX() - m_mouseLClick_X, event.GetY() - m_mouseLClick_Y);
+ }*/
+ event.Skip();
+}
+
+void mpWindow::OnMouseLeftRelease (wxMouseEvent &event)
+{
+ wxPoint release(event.GetX(), event.GetY());
+ wxPoint press(m_mouseLClick_X, m_mouseLClick_Y);
+ if (m_movingInfoLayer != NULL) {
+ m_movingInfoLayer->UpdateReference();
+ m_movingInfoLayer = NULL;
+ } else {
+ if (release != press) {
+ ZoomRect(press, release);
+ } /*else {
+ if (m_coordTooltip) {
+ wxString toolTipContent;
+ toolTipContent.Printf(_("X = %f\nY = %f"), p2x(event.GetX()), p2y(event.GetY()));
+ SetToolTip(toolTipContent);
+ }
+ } */
+ }
+ selectionRect = wxRect(0,0,0,0);
+ event.Skip();
+}
+
+void mpWindow::Fit()
+{
+ if (UpdateBBox())
+ Fit(m_minX ,m_maxX ,m_minY ,m_maxY );
+}
+
+
+// JL
+void mpWindow::Fit(double xMin, double xMax, double yMin, double yMax, wxCoord *printSizeX,wxCoord *printSizeY)
+{
+ // Save desired borders:
+ m_desiredXmin=xMin; m_desiredXmax=xMax;
+ m_desiredYmin=yMin; m_desiredYmax=yMax;
+
+ if (printSizeX!=NULL && printSizeY!=NULL)
+ {
+ // Printer:
+ m_scrX = *printSizeX;
+ m_scrY = *printSizeY;
+ }
+ else
+ {
+ // Normal case (screen):
+ GetClientSize( &m_scrX,&m_scrY);
+ }
+
+ double Ax,Ay;
+
+ Ax = xMax - xMin;
+ Ay = yMax - yMin;
+
+ m_scaleX = (Ax!=0) ? (m_scrX - m_marginLeft - m_marginRight)/Ax : 1; //m_scaleX = (Ax!=0) ? m_scrX/Ax : 1;
+ m_scaleY = (Ay!=0) ? (m_scrY - m_marginTop - m_marginBottom)/Ay : 1; //m_scaleY = (Ay!=0) ? m_scrY/Ay : 1;
+
+ if (m_lockaspect)
+ {
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("mpWindow::Fit()(lock) m_scaleX=%f,m_scaleY=%f"), m_scaleX,m_scaleY);
+#endif
+ // Keep the lowest "scale" to fit the whole range required by that axis (to actually "fit"!):
+ double s = m_scaleX < m_scaleY ? m_scaleX : m_scaleY;
+ m_scaleX = s;
+ m_scaleY = s;
+ }
+
+ // Adjusts corner coordinates: This should be simply:
+ // m_posX = m_minX;
+ // m_posY = m_maxY;
+ // But account for centering if we have lock aspect:
+ m_posX = (xMin+xMax)/2 - ((m_scrX - m_marginLeft - m_marginRight)/2 + m_marginLeft)/m_scaleX ; // m_posX = (xMin+xMax)/2 - (m_scrX/2)/m_scaleX;
+// m_posY = (yMin+yMax)/2 + ((m_scrY - m_marginTop - m_marginBottom)/2 - m_marginTop)/m_scaleY; // m_posY = (yMin+yMax)/2 + (m_scrY/2)/m_scaleY;
+ m_posY = (yMin+yMax)/2 + ((m_scrY - m_marginTop - m_marginBottom)/2 + m_marginTop)/m_scaleY; // m_posY = (yMin+yMax)/2 + (m_scrY/2)/m_scaleY;
+
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("mpWindow::Fit() m_desiredXmin=%f m_desiredXmax=%f m_desiredYmin=%f m_desiredYmax=%f"), xMin,xMax,yMin,yMax);
+ wxLogMessage(_("mpWindow::Fit() m_scaleX = %f , m_scrX = %d,m_scrY=%d, Ax=%f, Ay=%f, m_posX=%f, m_posY=%f"), m_scaleX, m_scrX,m_scrY, Ax,Ay,m_posX,m_posY);
+#endif
+
+ // It is VERY IMPORTANT to DO NOT call Refresh if we are drawing to the printer!!
+ // Otherwise, the DC dimensions will be those of the window instead of the printer device
+ if (printSizeX==NULL || printSizeY==NULL)
+ UpdateAll();
+}
+
+// Patch ngpaton
+void mpWindow::DoZoomInXCalc (const int staticXpixel)
+{
+ // Preserve the position of the clicked point:
+ double staticX = p2x( staticXpixel );
+ // Zoom in:
+ m_scaleX = m_scaleX * zoomIncrementalFactor;
+ // Adjust the new m_posx
+ m_posX = staticX - (staticXpixel / m_scaleX);
+ // Adjust desired
+ m_desiredXmin = m_posX;
+ m_desiredXmax = m_posX + (m_scrX - (m_marginLeft + m_marginRight)) / m_scaleX;
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("mpWindow::DoZoomInXCalc() prior X coord: (%f), new X coord: (%f) SHOULD BE EQUAL!!"), staticX, p2x(staticXpixel));
+#endif
+}
+
+void mpWindow::DoZoomInYCalc (const int staticYpixel)
+{
+ // Preserve the position of the clicked point:
+ double staticY = p2y( staticYpixel );
+ // Zoom in:
+ m_scaleY = m_scaleY * zoomIncrementalFactor;
+ // Adjust the new m_posy:
+ m_posY = staticY + (staticYpixel / m_scaleY);
+ // Adjust desired
+ m_desiredYmax = m_posY;
+ m_desiredYmin = m_posY - (m_scrY - (m_marginTop + m_marginBottom)) / m_scaleY;
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("mpWindow::DoZoomInYCalc() prior Y coord: (%f), new Y coord: (%f) SHOULD BE EQUAL!!"), staticY, p2y(staticYpixel));
+#endif
+}
+
+void mpWindow::DoZoomOutXCalc (const int staticXpixel)
+{
+ // Preserve the position of the clicked point:
+ double staticX = p2x( staticXpixel );
+ // Zoom out:
+ m_scaleX = m_scaleX / zoomIncrementalFactor;
+ // Adjust the new m_posx/y:
+ m_posX = staticX - (staticXpixel / m_scaleX);
+ // Adjust desired
+ m_desiredXmin = m_posX;
+ m_desiredXmax = m_posX + (m_scrX - (m_marginLeft + m_marginRight)) / m_scaleX;
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("mpWindow::DoZoomOutXCalc() prior X coord: (%f), new X coord: (%f) SHOULD BE EQUAL!!"), staticX, p2x(staticXpixel));
+#endif
+}
+
+void mpWindow::DoZoomOutYCalc (const int staticYpixel)
+{
+ // Preserve the position of the clicked point:
+ double staticY = p2y( staticYpixel );
+ // Zoom out:
+ m_scaleY = m_scaleY / zoomIncrementalFactor;
+ // Adjust the new m_posx/y:
+ m_posY = staticY + (staticYpixel / m_scaleY);
+ // Adjust desired
+ m_desiredYmax = m_posY;
+ m_desiredYmin = m_posY - (m_scrY - (m_marginTop + m_marginBottom)) / m_scaleY;
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("mpWindow::DoZoomOutYCalc() prior Y coord: (%f), new Y coord: (%f) SHOULD BE EQUAL!!"), staticY, p2y(staticYpixel));
+#endif
+}
+
+
+void mpWindow::ZoomIn(const wxPoint& centerPoint )
+{
+ wxPoint c(centerPoint);
+ if (c == wxDefaultPosition)
+ {
+ GetClientSize(&m_scrX, &m_scrY);
+ c.x = (m_scrX - m_marginLeft - m_marginRight)/2 + m_marginLeft; // c.x = m_scrX/2;
+ c.y = (m_scrY - m_marginTop - m_marginBottom)/2 - m_marginTop; // c.y = m_scrY/2;
+}
+
+ // Preserve the position of the clicked point:
+ double prior_layer_x = p2x( c.x );
+ double prior_layer_y = p2y( c.y );
+
+ // Zoom in:
+ m_scaleX = m_scaleX * zoomIncrementalFactor;
+ m_scaleY = m_scaleY * zoomIncrementalFactor;
+
+ // Adjust the new m_posx/y:
+ m_posX = prior_layer_x - c.x / m_scaleX;
+ m_posY = prior_layer_y + c.y / m_scaleY;
+
+ m_desiredXmin = m_posX;
+ m_desiredXmax = m_posX + (m_scrX - m_marginLeft - m_marginRight) / m_scaleX; // m_desiredXmax = m_posX + m_scrX / m_scaleX;
+ m_desiredYmax = m_posY;
+ m_desiredYmin = m_posY - (m_scrY - m_marginTop - m_marginBottom) / m_scaleY; // m_desiredYmin = m_posY - m_scrY / m_scaleY;
+
+
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("mpWindow::ZoomIn() prior coords: (%f,%f), new coords: (%f,%f) SHOULD BE EQUAL!!"), prior_layer_x,prior_layer_y, p2x(c.x),p2y(c.y));
+#endif
+
+ UpdateAll();
+}
+
+void mpWindow::ZoomOut(const wxPoint& centerPoint )
+{
+ wxPoint c(centerPoint);
+ if (c == wxDefaultPosition)
+ {
+ GetClientSize(&m_scrX, &m_scrY);
+ c.x = (m_scrX - m_marginLeft - m_marginRight)/2 + m_marginLeft; // c.x = m_scrX/2;
+ c.y = (m_scrY - m_marginTop - m_marginBottom)/2 - m_marginTop; // c.y = m_scrY/2;
+ }
+
+ // Preserve the position of the clicked point:
+ double prior_layer_x = p2x( c.x );
+ double prior_layer_y = p2y( c.y );
+
+ // Zoom out:
+ m_scaleX = m_scaleX / zoomIncrementalFactor;
+ m_scaleY = m_scaleY / zoomIncrementalFactor;
+
+ // Adjust the new m_posx/y:
+ m_posX = prior_layer_x - c.x / m_scaleX;
+ m_posY = prior_layer_y + c.y / m_scaleY;
+
+ m_desiredXmin = m_posX;
+ m_desiredXmax = m_posX + (m_scrX - m_marginLeft - m_marginRight) / m_scaleX; // m_desiredXmax = m_posX + m_scrX / m_scaleX;
+ m_desiredYmax = m_posY;
+ m_desiredYmin = m_posY - (m_scrY - m_marginTop - m_marginBottom) / m_scaleY; // m_desiredYmin = m_posY - m_scrY / m_scaleY;
+
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("mpWindow::ZoomOut() prior coords: (%f,%f), new coords: (%f,%f) SHOULD BE EQUAL!!"), prior_layer_x,prior_layer_y, p2x(c.x),p2y(c.y));
+#endif
+ UpdateAll();
+}
+
+void mpWindow::ZoomInX()
+{
+ m_scaleX = m_scaleX * zoomIncrementalFactor;
+ UpdateAll();
+}
+
+void mpWindow::ZoomOutX()
+{
+ m_scaleX = m_scaleX / zoomIncrementalFactor;
+ UpdateAll();
+}
+
+void mpWindow::ZoomInY()
+{
+ m_scaleY = m_scaleY * zoomIncrementalFactor;
+ UpdateAll();
+}
+
+void mpWindow::ZoomOutY()
+{
+ m_scaleY = m_scaleY / zoomIncrementalFactor;
+ UpdateAll();
+}
+
+void mpWindow::ZoomRect(wxPoint p0, wxPoint p1)
+{
+ // Compute the 2 corners in graph coordinates:
+ double p0x = p2x(p0.x);
+ double p0y = p2y(p0.y);
+ double p1x = p2x(p1.x);
+ double p1y = p2y(p1.y);
+
+ // Order them:
+ double zoom_x_min = p0x<p1x ? p0x:p1x;
+ double zoom_x_max = p0x>p1x ? p0x:p1x;
+ double zoom_y_min = p0y<p1y ? p0y:p1y;
+ double zoom_y_max = p0y>p1y ? p0y:p1y;
+
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("Zoom: (%f,%f)-(%f,%f)"),zoom_x_min,zoom_y_min,zoom_x_max,zoom_y_max);
+#endif
+
+ Fit(zoom_x_min,zoom_x_max,zoom_y_min,zoom_y_max);
+}
+
+void mpWindow::LockAspect(bool enable)
+{
+ m_lockaspect = enable;
+ m_popmenu.Check(mpID_LOCKASPECT, enable);
+
+ // Try to fit again with the new config:
+ Fit( m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax );
+}
+
+void mpWindow::OnShowPopupMenu(wxMouseEvent &event)
+{
+ // Only display menu if the user has not "dragged" the figure
+ if (m_enableMouseNavigation)
+ {
+ SetCursor( *wxSTANDARD_CURSOR );
+ }
+
+ if (!m_mouseMovedAfterRightClick) // JLB
+ {
+ m_clickedX = event.GetX();
+ m_clickedY = event.GetY();
+ PopupMenu( &m_popmenu, event.GetX(), event.GetY());
+ }
+}
+
+void mpWindow::OnLockAspect(wxCommandEvent& WXUNUSED(event))
+{
+ LockAspect( !m_lockaspect );
+}
+
+void mpWindow::OnMouseHelp(wxCommandEvent& WXUNUSED(event))
+{
+ wxMessageBox(_("Comandos suportados:\n \
+ - Botão esquerdo e arrastar: Zoom no retângulo\n \
+ - Botão direito e arrastar: Arrasta o gráfico\n \
+ - Wheel: Deslocamento vertical\n \
+ - Wheel + SHIFT: Deslocamento horizontal\n \
+ - Wheel + CTRL: Mais Zoom/Menos Zoom"),_("Ajuda"),wxOK,this);
+}
+
+void mpWindow::OnFit(wxCommandEvent& WXUNUSED(event))
+{
+ Fit();
+}
+
+void mpWindow::OnCenter(wxCommandEvent& WXUNUSED(event))
+{
+ GetClientSize(&m_scrX, &m_scrY);
+ int centerX = (m_scrX - m_marginLeft - m_marginRight)/2; // + m_marginLeft; // c.x = m_scrX/2;
+ int centerY = (m_scrY - m_marginTop - m_marginBottom)/2; // - m_marginTop; // c.y = m_scrY/2;
+ SetPos( p2x(m_clickedX - centerX), p2y(m_clickedY - centerY) );
+ //SetPos( p2x(m_clickedX-m_scrX/2), p2y(m_clickedY-m_scrY/2) ); //SetPos( (double)(m_clickedX-m_scrX/2) / m_scaleX + m_posX, (double)(m_scrY/2-m_clickedY) / m_scaleY + m_posY);
+}
+
+void mpWindow::OnZoomIn(wxCommandEvent& WXUNUSED(event))
+{
+ ZoomIn( wxPoint(m_mouseRClick_X,m_mouseRClick_Y) );
+}
+
+void mpWindow::OnZoomOut(wxCommandEvent& WXUNUSED(event))
+{
+ ZoomOut();
+}
+
+void mpWindow::OnSize( wxSizeEvent& WXUNUSED(event) )
+{
+ // Try to fit again with the new window size:
+ Fit( m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax );
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("mpWindow::OnSize() m_scrX = %d, m_scrY = %d"), m_scrX, m_scrY);
+#endif // MATHPLOT_DO_LOGGING
+}
+
+bool mpWindow::AddLayer( mpLayer* layer, bool refreshDisplay )
+{
+ if (layer != NULL) {
+ m_layers.push_back( layer );
+ if (refreshDisplay) UpdateAll();
+ return true;
+ };
+ return false;
+}
+
+bool mpWindow::DelLayer(
+ mpLayer* layer,
+ bool alsoDeleteObject,
+ bool refreshDisplay )
+{
+ wxLayerList::iterator layIt;
+ for (layIt = m_layers.begin(); layIt != m_layers.end(); layIt++)
+ {
+ if (*layIt == layer)
+ {
+ // Also delete the object?
+ if (alsoDeleteObject)
+ delete *layIt;
+ m_layers.erase(layIt); // this deleted the reference only
+ if (refreshDisplay)
+ UpdateAll();
+ return true;
+ }
+ }
+ return false;
+}
+
+void mpWindow::DelAllLayers( bool alsoDeleteObject, bool refreshDisplay)
+{
+ while ( m_layers.size()>0 )
+ {
+ // Also delete the object?
+ if (alsoDeleteObject) delete m_layers[0];
+ m_layers.erase( m_layers.begin() ); // this deleted the reference only
+ }
+ if (refreshDisplay) UpdateAll();
+}
+
+// void mpWindow::DoPrepareDC(wxDC& dc)
+// {
+// dc.SetDeviceOrigin(x2p(m_minX), y2p(m_maxY));
+// }
+
+void mpWindow::OnPaint( wxPaintEvent& WXUNUSED(event) )
+{
+ wxPaintDC dc(this);
+ dc.GetSize(&m_scrX, &m_scrY); // This is the size of the visible area only!
+// DoPrepareDC(dc);
+
+#ifdef MATHPLOT_DO_LOGGING
+ {
+ int px, py;
+ GetViewStart( &px, &py );
+ wxLogMessage(_("[mpWindow::OnPaint] vis.area:%ix%i px=%i py=%i"),m_scrX,m_scrY,px,py);
+ }
+#endif
+
+ // Selects direct or buffered draw:
+ wxDC *trgDc;
+
+ // J.L.Blanco @ Aug 2007: Added double buffer support
+ if (m_enableDoubleBuffer)
+ {
+ if (m_last_lx!=m_scrX || m_last_ly!=m_scrY)
+ {
+ if (m_buff_bmp) delete m_buff_bmp;
+ m_buff_bmp = new wxBitmap(m_scrX,m_scrY);
+ m_buff_dc.SelectObject(*m_buff_bmp);
+ m_last_lx=m_scrX;
+ m_last_ly=m_scrY;
+ }
+ trgDc = &m_buff_dc;
+ }
+ else
+ {
+ trgDc = &dc;
+ }
+
+ // Draw background:
+ //trgDc->SetDeviceOrigin(0,0);
+ trgDc->SetPen( *wxTRANSPARENT_PEN );
+ wxBrush brush( GetBackgroundColour() );
+ trgDc->SetBrush( brush );
+ trgDc->SetTextForeground(m_fgColour);
+ trgDc->DrawRectangle(0,0,m_scrX,m_scrY);
+
+ // Draw all the layers:
+ //trgDc->SetDeviceOrigin( m_scrX>>1, m_scrY>>1); // Origin at the center
+ wxLayerList::iterator li;
+ for (li = m_layers.begin(); li != m_layers.end(); li++)
+ {
+ (*li)->Plot(*trgDc, *this);
+ };
+
+ // If doublebuffer, draw now to the window:
+ if (m_enableDoubleBuffer)
+ {
+ //trgDc->SetDeviceOrigin(0,0);
+ //dc.SetDeviceOrigin(0,0); // Origin at the center
+ dc.Blit(0,0,m_scrX,m_scrY,trgDc,0,0);
+ }
+
+/* if (m_coordTooltip) {
+ wxString toolTipContent;
+ wxPoint mousePoint = wxGetMousePosition();
+ toolTipContent.Printf(_("X = %f\nY = %f"), p2x(mousePoint.x), p2y(mousePoint.y));
+ SetToolTip(toolTipContent);
+ }*/
+ // If scrollbars are enabled, refresh them
+ if (m_enableScrollBars) {
+/* m_scrollX = (int) floor((m_posX - m_minX)*m_scaleX);
+ m_scrollY = (int) floor((m_maxY - m_posY )*m_scaleY);
+ Scroll(m_scrollX, m_scrollY);*/
+ // Scroll(x2p(m_posX), y2p(m_posY));
+// SetVirtualSize((int) ((m_maxX - m_minX)*m_scaleX), (int) ((m_maxY - m_minY)*m_scaleY));
+// int centerX = (m_scrX - m_marginLeft - m_marginRight)/2; // + m_marginLeft; // c.x = m_scrX/2;
+// int centerY = (m_scrY - m_marginTop - m_marginBottom)/2; // - m_marginTop; // c.y = m_scrY/2;
+ /*SetScrollbars(1, 1, (int) ((m_maxX - m_minX)*m_scaleX), (int) ((m_maxY - m_minY)*m_scaleY));*/ //, x2p(m_posX + centerX/m_scaleX), y2p(m_posY - centerY/m_scaleY), true);
+}
+ wxPen pen(srColour, 1, wxDOT);
+ dc.SetPen(pen);
+ dc.SetBrush(*wxTRANSPARENT_BRUSH);
+ dc.DrawRectangle(selectionRect);
+}
+
+// void mpWindow::OnScroll2(wxScrollWinEvent &event)
+// {
+// #ifdef MATHPLOT_DO_LOGGING
+// wxLogMessage(_("[mpWindow::OnScroll2] Init: m_posX=%f m_posY=%f, sc_pos = %d"),m_posX,m_posY, event.GetPosition());
+// #endif
+// // If scrollbars are not enabled, Skip operation
+// if (!m_enableScrollBars) {
+// event.Skip();
+// return;
+// }
+// // m_scrollX = (int) floor((m_posX - m_minX)*m_scaleX);
+// // m_scrollY = (int) floor((m_maxY - m_posY /*- m_minY*/)*m_scaleY);
+// // Scroll(m_scrollX, m_scrollY);
+//
+// // GetClientSize( &m_scrX, &m_scrY);
+// //Scroll(x2p(m_desiredXmin), y2p(m_desiredYmin));
+// int pixelStep = 1;
+// if (event.GetOrientation() == wxHORIZONTAL) {
+// //m_desiredXmin -= (m_scrollX - event.GetPosition())/m_scaleX;
+// //m_desiredXmax -= (m_scrollX - event.GetPosition())/m_scaleX;
+// m_posX -= (m_scrollX - event.GetPosition())/m_scaleX;
+// m_scrollX = event.GetPosition();
+// }
+// Fit(m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax);
+// // /* int pixelStep = 1;
+// // if (event.GetOrientation() == wxHORIZONTAL) {
+// // m_posX -= (px - event.GetPosition())/m_scaleX;//(pixelStep/m_scaleX);
+// // m_desiredXmax -= (px - event.GetPosition())/m_scaleX;//(pixelStep/m_scaleX);
+// // m_desiredXmin -= (px - event.GetPosition())/m_scaleX;//(pixelStep/m_scaleX);
+// // //SetPosX( (double)px / GetScaleX() + m_minX + (double)(width>>1)/GetScaleX());
+// // // m_posX = p2x(px); //m_minX + (double)(px /*+ (m_scrX)*/)/GetScaleX();
+// // } else {
+// // m_posY += (py - event.GetPosition())/m_scaleY;//(pixelStep/m_scaleY);
+// // m_desiredYmax += (py - event.GetPosition())/m_scaleY;//(pixelStep/m_scaleY);
+// // m_desiredYmax += (py - event.GetPosition())/m_scaleY;//(pixelStep/m_scaleY);
+// // //SetPosY( m_maxY - (double)py / GetScaleY() - (double)(height>>1)/GetScaleY());
+// // //m_posY = m_maxY - (double)py / GetScaleY() - (double)(height>>1)/GetScaleY();
+// // // m_posY = p2y(py);//m_maxY - (double)(py /*+ (m_scrY)*/)/GetScaleY();
+// // }*/
+// #ifdef MATHPLOT_DO_LOGGING
+// int px, py;
+// GetViewStart( &px, &py);
+// wxLogMessage(_("[mpWindow::OnScroll2] End: m_posX = %f, m_posY = %f, px = %f, py = %f"),m_posX, m_posY, px, py);
+// #endif
+//
+// UpdateAll();
+// // event.Skip();
+// }
+
+void mpWindow::SetMPScrollbars(bool status)
+{
+ // Temporary behaviour: always disable scrollbars
+ m_enableScrollBars = status; //false;
+ if (status == false)
+ {
+ SetScrollbar(wxHORIZONTAL, 0, 0, 0);
+ SetScrollbar(wxVERTICAL, 0, 0, 0);
+ }
+ // else the scroll bars will be updated in UpdateAll();
+ UpdateAll();
+
+// EnableScrolling(false, false);
+// m_enableScrollBars = status;
+// EnableScrolling(status, status);
+/* m_scrollX = (int) floor((m_posX - m_minX)*m_scaleX);
+ m_scrollY = (int) floor((m_posY - m_minY)*m_scaleY);*/
+// int scrollWidth = (int) floor((m_maxX - m_minX)*m_scaleX) - m_scrX;
+// int scrollHeight = (int) floor((m_minY - m_maxY)*m_scaleY) - m_scrY;
+
+// /* m_scrollX = (int) floor((m_posX - m_minX)*m_scaleX);
+// m_scrollY = (int) floor((m_maxY - m_posY /*- m_minY*/)*m_scaleY);
+// int scrollWidth = (int) floor(((m_maxX - m_minX) - (m_desiredXmax - m_desiredXmin))*m_scaleX);
+// int scrollHeight = (int) floor(((m_maxY - m_minY) - (m_desiredYmax - m_desiredYmin))*m_scaleY);
+// #ifdef MATHPLOT_DO_LOGGING
+// wxLogMessage(_("mpWindow::SetMPScrollbars() scrollWidth = %d, scrollHeight = %d"), scrollWidth, scrollHeight);
+// #endif
+// if(status) {
+// SetScrollbars(1,
+// 1,
+// scrollWidth,
+// scrollHeight,
+// m_scrollX,
+// m_scrollY);
+// // SetVirtualSize((int) (m_maxX - m_minX), (int) (m_maxY - m_minY));
+// }
+// Refresh(false);*/
+};
+
+bool mpWindow::UpdateBBox()
+{
+ bool first = TRUE;
+
+ for (wxLayerList::iterator li = m_layers.begin(); li != m_layers.end(); li++)
+ {
+ mpLayer* f = *li;
+
+ if (f->HasBBox())
+ {
+ if (first)
+ {
+ first = FALSE;
+ m_minX = f->GetMinX(); m_maxX=f->GetMaxX();
+ m_minY = f->GetMinY(); m_maxY=f->GetMaxY();
+ }
+ else
+ {
+ if (f->GetMinX()<m_minX) m_minX=f->GetMinX(); if (f->GetMaxX()>m_maxX) m_maxX=f->GetMaxX();
+ if (f->GetMinY()<m_minY) m_minY=f->GetMinY(); if (f->GetMaxY()>m_maxY) m_maxY=f->GetMaxY();
+ }
+ }
+ //node = node->GetNext();
+ }
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogDebug(wxT("[mpWindow::UpdateBBox] Bounding box: Xmin = %f, Xmax = %f, Ymin = %f, YMax = %f"), m_minX, m_maxX, m_minY, m_maxY);
+#endif // MATHPLOT_DO_LOGGING
+ return first == FALSE;
+}
+
+// void mpWindow::UpdateAll()
+// {
+ // GetClientSize( &m_scrX,&m_scrY);
+/* if (m_enableScrollBars) {
+ // The "virtual size" of the scrolled window:
+ const int sx = (int)((m_maxX - m_minX) * GetScaleX());
+ const int sy = (int)((m_maxY - m_minY) * GetScaleY());
+ SetVirtualSize(sx, sy);
+ SetScrollRate(1, 1);*/
+// const int px = (int)((GetPosX() - m_minX) * GetScaleX());// - m_scrX); //(cx>>1));
+
+ // J.L.Blanco, Aug 2007: Formula fixed:
+// const int py = (int)((m_maxY - GetPosY()) * GetScaleY());// - m_scrY); //(cy>>1));
+// int px, py;
+// GetViewStart(&px0, &py0);
+// px = (int)((m_posX - m_minX)*m_scaleX);
+// py = (int)((m_maxY - m_posY)*m_scaleY);
+
+// SetScrollbars( 1, 1, sx - m_scrX, sy - m_scrY, px, py, TRUE);
+// }
+
+// Working code
+// UpdateBBox();
+// Refresh( FALSE );
+// end working code
+
+// Old version
+/* bool box = UpdateBBox();
+ if (box)
+{
+ int cx, cy;
+ GetClientSize( &cx, &cy);
+
+ // The "virtual size" of the scrolled window:
+ const int sx = (int)((m_maxX - m_minX) * GetScaleX());
+ const int sy = (int)((m_maxY - m_minY) * GetScaleY());
+
+ const int px = (int)((GetPosX() - m_minX) * GetScaleX() - (cx>>1));
+
+ // J.L.Blanco, Aug 2007: Formula fixed:
+ const int py = (int)((m_maxY - GetPosY()) * GetScaleY() - (cy>>1));
+
+ SetScrollbars( 1, 1, sx, sy, px, py, TRUE);
+
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("[mpWindow::UpdateAll] Size:%ix%i ScrollBars:%i,%i"),sx,sy,px,py);
+#endif
+}
+
+ FitInside();
+ Refresh( FALSE );
+*/
+// }
+
+void mpWindow::UpdateAll()
+{
+ if (UpdateBBox())
+ {
+ if (m_enableScrollBars)
+ {
+ int cx, cy;
+ GetClientSize( &cx, &cy);
+ // Do x scroll bar
+ {
+ // Convert margin sizes from pixels to coordinates
+ double leftMargin = m_marginLeft / m_scaleX;
+ // Calculate the range in coords that we want to scroll over
+ double maxX = (m_desiredXmax > m_maxX) ? m_desiredXmax : m_maxX;
+ double minX = (m_desiredXmin < m_minX) ? m_desiredXmin : m_minX;
+ if ((m_posX + leftMargin) < minX)
+ minX = m_posX + leftMargin;
+ // Calculate scroll bar size and thumb position
+ int sizeX = (int) ((maxX - minX) * m_scaleX);
+ int thumbX = (int)(((m_posX + leftMargin) - minX) * m_scaleX);
+ SetScrollbar(wxHORIZONTAL, thumbX, cx - (m_marginRight + m_marginLeft), sizeX);
+ }
+ // Do y scroll bar
+ {
+ // Convert margin sizes from pixels to coordinates
+ double topMargin = m_marginTop / m_scaleY;
+ // Calculate the range in coords that we want to scroll over
+ double maxY = (m_desiredYmax > m_maxY) ? m_desiredYmax : m_maxY;
+ if ((m_posY - topMargin) > maxY)
+ maxY = m_posY - topMargin;
+ double minY = (m_desiredYmin < m_minY) ? m_desiredYmin : m_minY;
+ // Calculate scroll bar size and thumb position
+ int sizeY = (int)((maxY - minY) * m_scaleY);
+ int thumbY = (int)((maxY - (m_posY - topMargin)) * m_scaleY);
+ SetScrollbar(wxVERTICAL, thumbY, cy - (m_marginTop + m_marginBottom), sizeY);
+ }
+ }
+ }
+
+ Refresh( FALSE );
+}
+
+void mpWindow::DoScrollCalc (const int position, const int orientation)
+{
+ if (orientation == wxVERTICAL)
+ {
+ // Y axis
+ // Get top margin in coord units
+ double topMargin = m_marginTop / m_scaleY;
+ // Calculate maximum Y coord to be shown in the graph
+ double maxY = m_desiredYmax > m_maxY ? m_desiredYmax : m_maxY;
+ // Set new position
+ SetPosY((maxY - (position / m_scaleY)) + topMargin);
+ }
+ else
+ {
+ // X Axis
+ // Get left margin in coord units
+ double leftMargin = m_marginLeft / m_scaleX;
+ // Calculate minimum X coord to be shown in the graph
+ double minX = (m_desiredXmin < m_minX) ? m_desiredXmin : m_minX;
+ // Set new position
+ SetPosX((minX + (position / m_scaleX)) - leftMargin);
+ }
+}
+
+void mpWindow::OnScrollThumbTrack (wxScrollWinEvent &event)
+{
+ DoScrollCalc(event.GetPosition(), event.GetOrientation());
+}
+
+void mpWindow::OnScrollPageUp (wxScrollWinEvent &event)
+{
+ int scrollOrientation = event.GetOrientation();
+ // Get position before page up
+ int position = GetScrollPos(scrollOrientation);
+ // Get thumb size
+ int thumbSize = GetScrollThumb(scrollOrientation);
+ // Need to adjust position by a page
+ position -= thumbSize;
+ if (position < 0)
+ position = 0;
+
+ DoScrollCalc(position, scrollOrientation);
+}
+void mpWindow::OnScrollPageDown (wxScrollWinEvent &event)
+{
+ int scrollOrientation = event.GetOrientation();
+ // Get position before page up
+ int position = GetScrollPos(scrollOrientation);
+ // Get thumb size
+ int thumbSize = GetScrollThumb(scrollOrientation);
+ // Get scroll range
+ int scrollRange = GetScrollRange(scrollOrientation);
+ // Need to adjust position by a page
+ position += thumbSize;
+ if (position > (scrollRange - thumbSize))
+ position = scrollRange - thumbSize;
+
+ DoScrollCalc(position, scrollOrientation);
+}
+
+void mpWindow::OnScrollLineUp (wxScrollWinEvent &event)
+{
+ int scrollOrientation = event.GetOrientation();
+ // Get position before page up
+ int position = GetScrollPos(scrollOrientation);
+ // Need to adjust position by a line
+ position -= mpSCROLL_NUM_PIXELS_PER_LINE;
+ if (position < 0)
+ position = 0;
+
+ DoScrollCalc(position, scrollOrientation);
+}
+
+void mpWindow::OnScrollLineDown (wxScrollWinEvent &event)
+{
+ int scrollOrientation = event.GetOrientation();
+ // Get position before page up
+ int position = GetScrollPos(scrollOrientation);
+ // Get thumb size
+ int thumbSize = GetScrollThumb(scrollOrientation);
+ // Get scroll range
+ int scrollRange = GetScrollRange(scrollOrientation);
+ // Need to adjust position by a page
+ position += mpSCROLL_NUM_PIXELS_PER_LINE;
+ if (position > (scrollRange - thumbSize))
+ position = scrollRange - thumbSize;
+
+ DoScrollCalc(position, scrollOrientation);
+}
+
+void mpWindow::OnScrollTop(wxScrollWinEvent &event)
+{
+ DoScrollCalc(0, event.GetOrientation());
+}
+
+void mpWindow::OnScrollBottom(wxScrollWinEvent &event)
+{
+ int scrollOrientation = event.GetOrientation();
+ // Get thumb size
+ int thumbSize = GetScrollThumb(scrollOrientation);
+ // Get scroll range
+ int scrollRange = GetScrollRange(scrollOrientation);
+
+ DoScrollCalc(scrollRange - thumbSize, scrollOrientation);
+}
+// End patch ngpaton
+
+void mpWindow::SetScaleX(double scaleX)
+{
+ if (scaleX!=0) m_scaleX=scaleX;
+ UpdateAll();
+}
+
+// New methods implemented by Davide Rondini
+
+unsigned int mpWindow::CountLayers()
+{
+ //wxNode *node = m_layers.GetFirst();
+ unsigned int layerNo = 0;
+ for(wxLayerList::iterator li = m_layers.begin(); li != m_layers.end(); li++)//while(node)
+ {
+ if ((*li)->HasBBox()) layerNo++;
+ // node = node->GetNext();
+ };
+ return layerNo;
+}
+
+mpLayer* mpWindow::GetLayer(int position)
+{
+ if ((position >= (int) m_layers.size()) || position < 0) return NULL;
+ return m_layers[position];
+}
+
+mpLayer* mpWindow::GetLayerByName( const wxString &name)
+{
+ for (wxLayerList::iterator it=m_layers.begin();it!=m_layers.end();it++)
+ if (! (*it)->GetName().Cmp( name ) )
+ return *it;
+ return NULL; // Not found
+}
+
+void mpWindow::GetBoundingBox(double* bbox)
+{
+ bbox[0] = m_minX;
+ bbox[1] = m_maxX;
+ bbox[2] = m_minY;
+ bbox[3] = m_maxY;
+}
+
+bool mpWindow::SaveScreenshot(const wxString& filename, wxBitmapType type, wxSize imageSize, bool fit)
+{
+ int sizeX, sizeY;
+ int bk_scrX, bk_scrY;
+ if (imageSize == wxDefaultSize) {
+ sizeX = m_scrX;
+ sizeY = m_scrY;
+ } else {
+ sizeX = imageSize.x;
+ sizeY = imageSize.y;
+ bk_scrX = m_scrX;
+ bk_scrY = m_scrY;
+ SetScr(sizeX, sizeY);
+ }
+
+ wxBitmap screenBuffer(sizeX,sizeY);
+ wxMemoryDC screenDC;
+ screenDC.SelectObject(screenBuffer);
+ screenDC.SetPen( *wxTRANSPARENT_PEN );
+ wxBrush brush( GetBackgroundColour() );
+ screenDC.SetBrush( brush );
+ screenDC.DrawRectangle(0,0,sizeX,sizeY);
+
+ if (fit) {
+ Fit(m_minX, m_maxX, m_minY, m_maxY, &sizeX, &sizeY);
+ } else {
+ Fit(m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax, &sizeX, &sizeY);
+ }
+ // Draw all the layers:
+ wxLayerList::iterator li;
+ for (li = m_layers.begin(); li != m_layers.end(); li++)
+ (*li)->Plot(screenDC, *this);
+
+ if (imageSize != wxDefaultSize) {
+ // Restore dimensions
+ SetScr(bk_scrX, bk_scrY);
+ Fit(m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax, &bk_scrX, &bk_scrY);
+ UpdateAll();
+ }
+ // Once drawing is complete, actually save screen shot
+ wxImage screenImage = screenBuffer.ConvertToImage();
+ return screenImage.SaveFile(filename, type);
+}
+
+void mpWindow::SetMargins(int top, int right, int bottom, int left)
+{
+ m_marginTop = top;
+ m_marginRight = right;
+ m_marginBottom = bottom;
+ m_marginLeft = left;
+}
+
+mpInfoLayer* mpWindow::IsInsideInfoLayer(wxPoint& point)
+{
+ wxLayerList::iterator li;
+ for (li = m_layers.begin(); li != m_layers.end(); li++) {
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("mpWindow::IsInsideInfoLayer() examinining layer = %p"), (*li));
+#endif // MATHPLOT_DO_LOGGING
+ if ((*li)->IsInfo()) {
+ mpInfoLayer* tmpLyr = (mpInfoLayer*) (*li);
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("mpWindow::IsInsideInfoLayer() layer = %p"), (*li));
+#endif // MATHPLOT_DO_LOGGING
+ if (tmpLyr->Inside(point)) {
+ return tmpLyr;
+ }
+ }
+ }
+ return NULL;
+}
+
+void mpWindow::SetLayerVisible(const wxString &name, bool viewable)
+{
+ mpLayer* lx = GetLayerByName(name);
+ if ( lx ) {
+ lx->SetVisible(viewable);
+ UpdateAll();
+ }
+}
+
+bool mpWindow::IsLayerVisible(const wxString &name )
+{
+ mpLayer* lx = GetLayerByName(name);
+ return (lx) ? lx->IsVisible() : false;
+}
+
+void mpWindow::SetLayerVisible(const unsigned int position, bool viewable)
+{
+ mpLayer* lx = GetLayer(position);
+ if ( lx ) {
+ lx->SetVisible(viewable);
+ UpdateAll();
+ }
+}
+
+bool mpWindow::IsLayerVisible(const unsigned int position )
+{
+ mpLayer* lx = GetLayer(position);
+ return (lx) ? lx->IsVisible() : false;
+}
+
+void mpWindow::SetColourTheme(const wxColour& bgColour, const wxColour& drawColour, const wxColour& axesColour)
+{
+ SetBackgroundColour(bgColour);
+ SetForegroundColour(drawColour);
+ m_bgColour = bgColour;
+ m_fgColour = drawColour;
+ m_axColour = axesColour;
+ // cycle between layers to set colours and properties to them
+ wxLayerList::iterator li;
+ for (li = m_layers.begin(); li != m_layers.end(); li++) {
+ if ((*li)->GetLayerType() == mpLAYER_AXIS) {
+ wxPen axisPen = (*li)->GetPen(); // Get the old pen to modify only colour, not style or width
+ axisPen.SetColour(axesColour);
+ (*li)->SetPen(axisPen);
+ }
+ if ((*li)->GetLayerType() == mpLAYER_INFO) {
+ wxPen infoPen = (*li)->GetPen(); // Get the old pen to modify only colour, not style or width
+ infoPen.SetColour(drawColour);
+ (*li)->SetPen(infoPen);
+ }
+ }
+
+ srColour = drawColour;
+}
+
+// void mpWindow::EnableCoordTooltip(bool value)
+// {
+// m_coordTooltip = value;
+// // if (value) GetToolTip()->SetDelay(100);
+// }
+
+/*
+double mpWindow::p2x(wxCoord pixelCoordX, bool drawOutside )
+{
+ if (drawOutside) {
+ return m_posX + pixelCoordX/m_scaleX;
+ }
+ // Draw inside margins
+ double marginScaleX = ((double)(m_scrX - m_marginLeft - m_marginRight))/m_scrX;
+ return m_marginLeft + (m_posX + pixelCoordX/m_scaleX)/marginScaleX;
+}
+
+double mpWindow::p2y(wxCoord pixelCoordY, bool drawOutside )
+{
+ if (drawOutside) {
+ return m_posY - pixelCoordY/m_scaleY;
+ }
+ // Draw inside margins
+ double marginScaleY = ((double)(m_scrY - m_marginTop - m_marginBottom))/m_scrY;
+ return m_marginTop + (m_posY - pixelCoordY/m_scaleY)/marginScaleY;
+}
+
+wxCoord mpWindow::x2p(double x, bool drawOutside)
+{
+ if (drawOutside) {
+ return (wxCoord) ((x-m_posX) * m_scaleX);
+ }
+ // Draw inside margins
+ double marginScaleX = ((double)(m_scrX - m_marginLeft - m_marginRight))/m_scrX;
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(wxT("x2p ScrX = %d, marginRight = %d, marginLeft = %d, marginScaleX = %f"), m_scrX, m_marginRight, m_marginLeft, marginScaleX);
+#endif // MATHPLOT_DO_LOGGING
+ return (wxCoord) (int)(((x-m_posX) * m_scaleX)*marginScaleX) - m_marginLeft;
+}
+
+wxCoord mpWindow::y2p(double y, bool drawOutside)
+{
+ if (drawOutside) {
+ return (wxCoord) ( (m_posY-y) * m_scaleY);
+ }
+ // Draw inside margins
+ double marginScaleY = ((double)(m_scrY - m_marginTop - m_marginBottom))/m_scrY;
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(wxT("y2p ScrY = %d, marginTop = %d, marginBottom = %d, marginScaleY = %f"), m_scrY, m_marginTop, m_marginBottom, marginScaleY);
+#endif // MATHPLOT_DO_LOGGING
+ return (wxCoord) ((int)((m_posY-y) * m_scaleY)*marginScaleY) - m_marginTop;
+}
+*/
+
+
+//-----------------------------------------------------------------------------
+// mpFXYVector implementation - by Jose Luis Blanco (AGO-2007)
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(mpFXYVector, mpFXY)
+
+// Constructor
+mpFXYVector::mpFXYVector(wxString name, int flags ) : mpFXY(name,flags)
+{
+ m_index = 0;
+ m_minX = -1;
+ m_maxX = 1;
+ m_minY = -1;
+ m_maxY = 1;
+ m_type = mpLAYER_PLOT;
+}
+
+void mpFXYVector::Rewind()
+{
+ m_index = 0;
+}
+
+bool mpFXYVector::GetNextXY(double & x, double & y)
+{
+ if (m_index>=m_xs.size())
+ return FALSE;
+ else
+ {
+ x = m_xs[m_index];
+ y = m_ys[m_index++];
+ return m_index<=m_xs.size();
+ }
+}
+
+void mpFXYVector::Clear()
+{
+ m_xs.clear();
+ m_ys.clear();
+}
+
+void mpFXYVector::SetData( const std::vector<double> &xs,const std::vector<double> &ys)
+{
+ // Check if the data vectora are of the same size
+ if (xs.size() != ys.size()) {
+ //wxLogError(_("wxMathPlot error: X and Y vector are not of the same length!"));
+ return;
+ }
+ // Copy the data:
+ m_xs = xs;
+ m_ys = ys;
+
+
+ // Update internal variables for the bounding box.
+ if (xs.size()>0)
+ {
+ m_minX = xs[0];
+ m_maxX = xs[0];
+ m_minY = ys[0];
+ m_maxY = ys[0];
+
+ std::vector<double>::const_iterator it;
+
+ for (it=xs.begin();it!=xs.end();it++)
+ {
+ if (*it<m_minX) m_minX=*it;
+ if (*it>m_maxX) m_maxX=*it;
+ }
+ for (it=ys.begin();it!=ys.end();it++)
+ {
+ if (*it<m_minY) m_minY=*it;
+ if (*it>m_maxY) m_maxY=*it;
+ }
+ //Thales Lima - 03/07/2015 -> diminuindo offset de y e retirando de x
+ /*m_minX-=0.5f;
+ m_minY-=0.5f;
+ m_maxX+=0.5f;
+ m_maxY+=0.5f;*/
+ m_minY -= m_minY > 0.0 ? 0.005f*m_minY : -0.005f*m_minY;//0,5% de offset
+ m_maxY += m_maxY > 0.0 ? 0.005f*m_maxY : -0.005f*m_maxY;
+ }
+ else
+ {
+ m_minX = -1;
+ m_maxX = 1;
+ m_minY = -1;
+ m_maxY = 1;
+ }
+}
+
+//-----------------------------------------------------------------------------
+// mpText - provided by Val Greene
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(mpText, mpLayer)
+
+
+/** @param name text to be displayed
+@param offsetx x position in percentage (0-100)
+@param offsetx y position in percentage (0-100)
+*/
+mpText::mpText( wxString name, int offsetx, int offsety )
+{
+ SetName(name);
+
+ if (offsetx >= 0 && offsetx <= 100)
+ m_offsetx = offsetx;
+ else
+ m_offsetx = 5;
+
+ if (offsety >= 0 && offsety <= 100)
+ m_offsety = offsety;
+ else
+ m_offsetx = 50;
+ m_type = mpLAYER_INFO;
+}
+
+/** mpText Layer plot handler.
+This implementation will plot the text adjusted to the visible area.
+*/
+
+void mpText::Plot(wxDC & dc, mpWindow & w)
+{
+ if (m_visible) {
+ dc.SetPen(m_pen);
+ dc.SetFont(m_font);
+
+ wxCoord tw=0, th=0;
+ dc.GetTextExtent( GetName(), &tw, &th);
+
+ // int left = -dc.LogicalToDeviceX(0);
+ // int width = dc.LogicalToDeviceX(0) - left;
+ // int bottom = dc.LogicalToDeviceY(0);
+ // int height = bottom - -dc.LogicalToDeviceY(0);
+
+ /* dc.DrawText( GetName(),
+ (int)((((float)width/100.0) * m_offsety) + left - (tw/2)),
+ (int)((((float)height/100.0) * m_offsetx) - bottom) );*/
+ int px = m_offsetx*(w.GetScrX() - w.GetMarginLeft() - w.GetMarginRight())/100;
+ int py = m_offsety*(w.GetScrY() - w.GetMarginTop() - w.GetMarginBottom())/100;
+ dc.DrawText( GetName(), px, py);
+ }
+}
+
+//-----------------------------------------------------------------------------
+// mpPrintout - provided by Davide Rondini
+//-----------------------------------------------------------------------------
+
+mpPrintout::mpPrintout(mpWindow *drawWindow, const wxChar *title) : wxPrintout(title)
+{
+ drawn = false;
+ plotWindow = drawWindow;
+}
+
+bool mpPrintout::OnPrintPage(int page)
+{
+
+ wxDC *trgDc = GetDC();
+ if ((trgDc) && (page == 1)) {
+ wxCoord m_prnX, m_prnY;
+ int marginX = 50;
+ int marginY = 50;
+ trgDc->GetSize(&m_prnX, &m_prnY);
+
+ m_prnX -= (2*marginX);
+ m_prnY -= (2*marginY);
+ trgDc->SetDeviceOrigin(marginX, marginY);
+
+#ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(wxT("Print Size: %d x %d\n"), m_prnX, m_prnY);
+ wxLogMessage(wxT("Screen Size: %d x %d\n"), plotWindow->GetScrX(), plotWindow->GetScrY());
+#endif
+
+ // Set the scale according to the page:
+ plotWindow->Fit(
+ plotWindow->GetDesiredXmin(),
+ plotWindow->GetDesiredXmax(),
+ plotWindow->GetDesiredYmin(),
+ plotWindow->GetDesiredYmax(),
+ &m_prnX,
+ &m_prnY );
+
+ // Get the colours of the plotWindow to restore them ath the end
+ wxColour oldBgColour = plotWindow->GetBackgroundColour();
+ wxColour oldFgColour = plotWindow->GetForegroundColour();
+ wxColour oldAxColour = plotWindow->GetAxesColour();
+
+ // Draw background, ensuring to use white background for printing.
+ trgDc->SetPen( *wxTRANSPARENT_PEN );
+ // wxBrush brush( plotWindow->GetBackgroundColour() );
+ wxBrush brush = *wxWHITE_BRUSH;
+ trgDc->SetBrush( brush );
+ trgDc->DrawRectangle(0,0,m_prnX,m_prnY);
+
+ // Draw all the layers:
+ //trgDc->SetDeviceOrigin( m_prnX>>1, m_prnY>>1); // Origin at the center
+ mpLayer *layer;
+ for (unsigned int li = 0; li < plotWindow->CountAllLayers(); li++) {
+ layer = plotWindow->GetLayer(li);
+ layer->Plot(*trgDc, *plotWindow);
+ };
+ // Restore device origin
+ // trgDc->SetDeviceOrigin(0, 0);
+ // Restore colours
+ plotWindow->SetColourTheme(oldBgColour, oldFgColour, oldAxColour);
+ // Restore drawing
+ plotWindow->Fit(plotWindow->GetDesiredXmin(), plotWindow->GetDesiredXmax(), plotWindow->GetDesiredYmin(), plotWindow->GetDesiredYmax(), NULL, NULL);
+ plotWindow->UpdateAll();
+ }
+ return true;
+}
+
+bool mpPrintout::HasPage(int page)
+{
+ return (page == 1);
+}
+
+
+//-----------------------------------------------------------------------------
+// mpMovableObject - provided by Jose Luis Blanco
+//-----------------------------------------------------------------------------
+void mpMovableObject::TranslatePoint( double x,double y, double &out_x, double &out_y )
+{
+ double ccos = cos( m_reference_phi ); // Avoid computing cos/sin twice.
+ double csin = sin( m_reference_phi );
+
+ out_x = m_reference_x + ccos * x - csin * y;
+ out_y = m_reference_y + csin * x + ccos * y;
+}
+
+// This method updates the buffers m_trans_shape_xs/ys, and the precomputed bounding box.
+void mpMovableObject::ShapeUpdated()
+{
+ // Just in case...
+ if (m_shape_xs.size()!=m_shape_ys.size())
+ {
+ //::wxLogError(wxT("[mpMovableObject::ShapeUpdated] Error, m_shape_xs and m_shape_ys have different lengths!"));
+ }
+ else
+ {
+ double ccos = cos( m_reference_phi ); // Avoid computing cos/sin twice.
+ double csin = sin( m_reference_phi );
+
+ m_trans_shape_xs.resize(m_shape_xs.size());
+ m_trans_shape_ys.resize(m_shape_xs.size());
+
+ std::vector<double>::iterator itXi, itXo;
+ std::vector<double>::iterator itYi, itYo;
+
+ m_bbox_min_x=1e300;
+ m_bbox_max_x=-1e300;
+ m_bbox_min_y=1e300;
+ m_bbox_max_y=-1e300;
+
+ for (itXo=m_trans_shape_xs.begin(),itYo=m_trans_shape_ys.begin(),itXi=m_shape_xs.begin(),itYi=m_shape_ys.begin();
+ itXo!=m_trans_shape_xs.end(); itXo++,itYo++,itXi++,itYi++)
+ {
+ *itXo = m_reference_x + ccos * (*itXi) - csin * (*itYi);
+ *itYo = m_reference_y + csin * (*itXi) + ccos * (*itYi);
+
+ // Keep BBox:
+ if (*itXo < m_bbox_min_x) m_bbox_min_x = *itXo;
+ if (*itXo > m_bbox_max_x) m_bbox_max_x = *itXo;
+ if (*itYo < m_bbox_min_y) m_bbox_min_y = *itYo;
+ if (*itYo > m_bbox_max_y) m_bbox_max_y = *itYo;
+ }
+ }
+}
+
+void mpMovableObject::Plot(wxDC & dc, mpWindow & w)
+{
+ if (m_visible) {
+ dc.SetPen( m_pen);
+
+
+ std::vector<double>::iterator itX=m_trans_shape_xs.begin();
+ std::vector<double>::iterator itY=m_trans_shape_ys.begin();
+
+ if (!m_continuous)
+ {
+ // for some reason DrawPoint does not use the current pen,
+ // so we use DrawLine for fat pens
+ if (m_pen.GetWidth() <= 1)
+ {
+ while (itX!=m_trans_shape_xs.end())
+ {
+ dc.DrawPoint( w.x2p(*(itX++)), w.y2p( *(itY++) ) );
+ }
+ }
+ else
+ {
+ while (itX!=m_trans_shape_xs.end())
+ {
+ wxCoord cx = w.x2p(*(itX++));
+ wxCoord cy = w.y2p(*(itY++));
+ dc.DrawLine(cx, cy, cx, cy);
+ }
+ }
+ }
+ else
+ {
+ wxCoord cx0=0,cy0=0;
+ bool first = TRUE;
+ while (itX!=m_trans_shape_xs.end())
+ {
+ wxCoord cx = w.x2p(*(itX++));
+ wxCoord cy = w.y2p(*(itY++));
+ if (first)
+ {
+ first=FALSE;
+ cx0=cx;cy0=cy;
+ }
+ dc.DrawLine(cx0, cy0, cx, cy);
+ cx0=cx; cy0=cy;
+ }
+ }
+
+ if (!m_name.IsEmpty() && m_showName)
+ {
+ dc.SetFont(m_font);
+
+ wxCoord tx, ty;
+ dc.GetTextExtent(m_name, &tx, &ty);
+
+ if (HasBBox())
+ {
+ wxCoord sx = (wxCoord) (( m_bbox_max_x - w.GetPosX()) * w.GetScaleX());
+ wxCoord sy = (wxCoord) ((w.GetPosY() - m_bbox_max_y ) * w.GetScaleY());
+
+ tx = sx - tx - 8;
+ ty = sy - 8 - ty;
+ }
+ else
+ {
+ const int sx = w.GetScrX()>>1;
+ const int sy = w.GetScrY()>>1;
+
+ if ((m_flags & mpALIGNMASK) == mpALIGN_NE)
+ {
+ tx = sx - tx - 8;
+ ty = -sy + 8;
+ }
+ else if ((m_flags & mpALIGNMASK) == mpALIGN_NW)
+ {
+ tx = -sx + 8;
+ ty = -sy + 8;
+ }
+ else if ((m_flags & mpALIGNMASK) == mpALIGN_SW)
+ {
+ tx = -sx + 8;
+ ty = sy - 8 - ty;
+ }
+ else
+ {
+ tx = sx - tx - 8;
+ ty = sy - 8 - ty;
+ }
+ }
+
+ dc.DrawText( m_name, tx, ty);
+ }
+ }
+}
+
+//-----------------------------------------------------------------------------
+// mpCovarianceEllipse - provided by Jose Luis Blanco
+//-----------------------------------------------------------------------------
+
+// Called to update the m_shape_xs, m_shape_ys vectors, whenever a parameter changes.
+void mpCovarianceEllipse::RecalculateShape()
+{
+ m_shape_xs.clear();
+ m_shape_ys.clear();
+
+ // Preliminar checks:
+ if (m_quantiles<0) { /*::wxLogError(wxT("[mpCovarianceEllipse] Error: quantiles must be non-negative"));*/ return; }
+ if (m_cov_00<0) { /*::wxLogError(wxT("[mpCovarianceEllipse] Error: cov(0,0) must be non-negative"));*/ return; }
+ if (m_cov_11<0) { /*::wxLogError(wxT("[mpCovarianceEllipse] Error: cov(1,1) must be non-negative"));*/ return; }
+
+ m_shape_xs.resize( m_segments,0 );
+ m_shape_ys.resize( m_segments,0 );
+
+ // Compute the two eigenvalues of the covariance:
+ // -------------------------------------------------
+ double b = -m_cov_00 - m_cov_11;
+ double c = m_cov_00*m_cov_11 - m_cov_01*m_cov_01;
+
+ double D = b*b - 4*c;
+
+ if (D<0) { /*::wxLogError(wxT("[mpCovarianceEllipse] Error: cov is not positive definite"));*/ return; }
+
+ double eigenVal0 =0.5*( -b + sqrt(D) );
+ double eigenVal1 =0.5*( -b - sqrt(D) );
+
+ // Compute the two corresponding eigenvectors:
+ // -------------------------------------------------
+ double eigenVec0_x,eigenVec0_y;
+ double eigenVec1_x,eigenVec1_y;
+
+ if (fabs(eigenVal0 - m_cov_00)>1e-6)
+ {
+ double k1x = m_cov_01 / ( eigenVal0 - m_cov_00 );
+ eigenVec0_y = 1;
+ eigenVec0_x = eigenVec0_y * k1x;
+ }
+ else
+ {
+ double k1y = m_cov_01 / ( eigenVal0 - m_cov_11 );
+ eigenVec0_x = 1;
+ eigenVec0_y = eigenVec0_x * k1y;
+ }
+
+ if (fabs(eigenVal1 - m_cov_00)>1e-6)
+ {
+ double k2x = m_cov_01 / ( eigenVal1 - m_cov_00 );
+ eigenVec1_y = 1;
+ eigenVec1_x = eigenVec1_y * k2x;
+ }
+ else
+ {
+ double k2y = m_cov_01 / ( eigenVal1 - m_cov_11 );
+ eigenVec1_x = 1;
+ eigenVec1_y = eigenVec1_x * k2y;
+ }
+
+ // Normalize the eigenvectors:
+ double len = sqrt( eigenVec0_x*eigenVec0_x + eigenVec0_y*eigenVec0_y );
+ eigenVec0_x /= len; // It *CANNOT* be zero
+ eigenVec0_y /= len;
+
+ len = sqrt( eigenVec1_x*eigenVec1_x + eigenVec1_y*eigenVec1_y );
+ eigenVec1_x /= len; // It *CANNOT* be zero
+ eigenVec1_y /= len;
+
+
+ // Take the sqrt of the eigenvalues (required for the ellipse scale):
+ eigenVal0 = sqrt(eigenVal0);
+ eigenVal1 = sqrt(eigenVal1);
+
+ // Compute the 2x2 matrix M = diag(eigVal) * (~eigVec) (each eigen vector is a row):
+ double M_00 = eigenVec0_x * eigenVal0;
+ double M_01 = eigenVec0_y * eigenVal0;
+
+ double M_10 = eigenVec1_x * eigenVal1;
+ double M_11 = eigenVec1_y * eigenVal1;
+
+ // The points of the 2D ellipse:
+ double ang;
+ double Aang = 6.283185308/(m_segments-1);
+ int i;
+ for (i=0,ang=0;i<m_segments;i++,ang+= Aang )
+ {
+ double ccos = cos(ang);
+ double csin = sin(ang);
+
+ m_shape_xs[i] = m_quantiles * (ccos * M_00 + csin * M_10 );
+ m_shape_ys[i] = m_quantiles * (ccos * M_01 + csin * M_11 );
+ } // end for points on ellipse
+
+
+ ShapeUpdated();
+}
+
+//-----------------------------------------------------------------------------
+// mpPolygon - provided by Jose Luis Blanco
+//-----------------------------------------------------------------------------
+void mpPolygon::setPoints(
+ const std::vector<double>& points_xs,
+ const std::vector<double>& points_ys,
+ bool closedShape )
+{
+ if ( points_xs.size()!=points_ys.size() )
+ {
+ //::wxLogError(wxT("[mpPolygon] Error: points_xs and points_ys must have the same number of elements"));
+ }
+ else
+ {
+ m_shape_xs = points_xs;
+ m_shape_ys = points_ys;
+
+ if ( closedShape && points_xs.size())
+ {
+ m_shape_xs.push_back( points_xs[0] );
+ m_shape_ys.push_back( points_ys[0] );
+ }
+
+ ShapeUpdated();
+ }
+}
+
+//-----------------------------------------------------------------------------
+// mpBitmapLayer - provided by Jose Luis Blanco
+//-----------------------------------------------------------------------------
+void mpBitmapLayer::GetBitmapCopy( wxImage &outBmp ) const
+{
+ if (m_validImg)
+ outBmp = m_bitmap;
+}
+
+void mpBitmapLayer::SetBitmap( const wxImage &inBmp, double x, double y, double lx, double ly )
+{
+ if (!inBmp.Ok())
+ {
+ //::wxLogError(wxT("[mpBitmapLayer] Assigned bitmap is not Ok()!"));
+ }
+ else
+ {
+ m_bitmap = inBmp; //.GetSubBitmap( wxRect(0, 0, inBmp.GetWidth(), inBmp.GetHeight()));
+ m_min_x = x;
+ m_min_y = y;
+ m_max_x = x+lx;
+ m_max_y = y+ly;
+ m_validImg = true;
+ }
+}
+
+
+void mpBitmapLayer::Plot(wxDC & dc, mpWindow & w)
+{
+ if (m_visible && m_validImg)
+ {
+ /* 1st: We compute (x0,y0)-(x1,y1), the pixel coordinates of the real outer limits
+ of the image rectangle within the (screen) mpWindow. Note that these coordinates
+ might fall well far away from the real view limits when the user zoom in.
+
+ 2nd: We compute (dx0,dy0)-(dx1,dy1), the pixel coordinates the rectangle that will
+ be actually drawn into the mpWindow, i.e. the clipped real rectangle that
+ avoids the non-visible parts. (offset_x,offset_y) are the pixel coordinates
+ that correspond to the window point (dx0,dy0) within the image "m_bitmap", and
+ (b_width,b_height) is the size of the bitmap patch that will be drawn.
+
+ (x0,y0) ................. (x1,y0)
+ . .
+ . .
+ (x0,y1) ................ (x1,y1)
+ (In pixels!!)
+ */
+
+ // 1st step -------------------------------
+ wxCoord x0 = w.x2p(m_min_x);
+ wxCoord y0 = w.y2p(m_max_y);
+ wxCoord x1 = w.x2p(m_max_x);
+ wxCoord y1 = w.y2p(m_min_y);
+
+ // 2nd step -------------------------------
+ // Precompute the size of the actual bitmap pixel on the screen (e.g. will be >1 if zoomed in)
+ double screenPixelX = ( x1-x0 ) / (double)m_bitmap.GetWidth();
+ double screenPixelY = ( y1-y0 ) / (double)m_bitmap.GetHeight();
+
+ // The minimum number of pixels that the streched image will overpass the actual mpWindow borders:
+ wxCoord borderMarginX = (wxCoord)(screenPixelX+1); // ceil
+ wxCoord borderMarginY = (wxCoord)(screenPixelY+1); // ceil
+
+ // The actual drawn rectangle (dx0,dy0)-(dx1,dy1) is (x0,y0)-(x1,y1) clipped:
+ wxCoord dx0=x0,dx1=x1,dy0=y0,dy1=y1;
+ if (dx0<0) dx0=-borderMarginX;
+ if (dy0<0) dy0=-borderMarginY;
+ if (dx1>w.GetScrX()) dx1=w.GetScrX()+borderMarginX;
+ if (dy1>w.GetScrY()) dy1=w.GetScrY()+borderMarginY;
+
+ // For convenience, compute the width/height of the rectangle to be actually drawn:
+ wxCoord d_width = dx1-dx0+1;
+ wxCoord d_height = dy1-dy0+1;
+
+ // Compute the pixel offsets in the internally stored bitmap:
+ wxCoord offset_x= (wxCoord) ( (dx0-x0)/screenPixelX );
+ wxCoord offset_y= (wxCoord) ( (dy0-y0)/screenPixelY );
+
+ // and the size in pixel of the area to be actually drawn from the internally stored bitmap:
+ wxCoord b_width = (wxCoord) ( (dx1-dx0+1)/screenPixelX );
+ wxCoord b_height = (wxCoord) ( (dy1-dy0+1)/screenPixelY );
+
+ #ifdef MATHPLOT_DO_LOGGING
+ wxLogMessage(_("[mpBitmapLayer::Plot] screenPixel: x=%f y=%f d_width=%ix%i"),screenPixelX,screenPixelY,d_width,d_height);
+ wxLogMessage(_("[mpBitmapLayer::Plot] offset: x=%i y=%i bmpWidth=%ix%i"),offset_x,offset_y,b_width,b_height);
+ #endif
+
+ // Is there any visible region?
+ if (d_width>0 && d_height>0)
+ {
+ // Build the scaled bitmap from the image, only if it has changed:
+ if (m_scaledBitmap.GetWidth()!=d_width ||
+ m_scaledBitmap.GetHeight()!=d_height ||
+ m_scaledBitmap_offset_x != offset_x ||
+ m_scaledBitmap_offset_y != offset_y )
+ {
+ wxRect r(wxRect(offset_x,offset_y,b_width,b_height));
+ // Just for the case....
+ if (r.x<0) r.x=0;
+ if (r.y<0) r.y=0;
+ if (r.width>m_bitmap.GetWidth()) r.width=m_bitmap.GetWidth();
+ if (r.height>m_bitmap.GetHeight()) r.height=m_bitmap.GetHeight();
+
+ m_scaledBitmap = wxBitmap(
+ wxBitmap(m_bitmap).GetSubBitmap( r ).ConvertToImage()
+ .Scale(d_width,d_height) );
+ m_scaledBitmap_offset_x = offset_x;
+ m_scaledBitmap_offset_y = offset_y;
+ }
+
+ // Draw it:
+ dc.DrawBitmap( m_scaledBitmap, dx0,dy0, true );
+ }
+ }
+
+ // Draw the name label
+ if (!m_name.IsEmpty() && m_showName)
+ {
+ dc.SetFont(m_font);
+
+ wxCoord tx, ty;
+ dc.GetTextExtent(m_name, &tx, &ty);
+
+ if (HasBBox())
+ {
+ wxCoord sx = (wxCoord) (( m_max_x - w.GetPosX()) * w.GetScaleX());
+ wxCoord sy = (wxCoord) ((w.GetPosY() - m_max_y ) * w.GetScaleY());
+
+ tx = sx - tx - 8;
+ ty = sy - 8 - ty;
+ }
+ else
+ {
+ const int sx = w.GetScrX()>>1;
+ const int sy = w.GetScrY()>>1;
+
+ if ((m_flags & mpALIGNMASK) == mpALIGN_NE)
+ {
+ tx = sx - tx - 8;
+ ty = -sy + 8;
+ }
+ else if ((m_flags & mpALIGNMASK) == mpALIGN_NW)
+ {
+ tx = -sx + 8;
+ ty = -sy + 8;
+ }
+ else if ((m_flags & mpALIGNMASK) == mpALIGN_SW)
+ {
+ tx = -sx + 8;
+ ty = sy - 8 - ty;
+ }
+ else
+ {
+ tx = sx - tx - 8;
+ ty = sy - 8 - ty;
+ }
+ }
+
+ dc.DrawText( m_name, tx, ty);
+ }
+}
diff --git a/Project/wxMathPlot/mathplot.h b/Project/wxMathPlot/mathplot.h
new file mode 100644
index 0000000..345dd3c
--- /dev/null
+++ b/Project/wxMathPlot/mathplot.h
@@ -0,0 +1,1701 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: mathplot.cpp
+// Purpose: Framework for plotting in wxWindows
+// Original Author: David Schalig
+// Maintainer: Davide Rondini
+// Contributors: Jose Luis Blanco, Val Greene
+// Created: 21/07/2003
+// Last edit: 22/02/2009
+// Copyright: (c) David Schalig, Davide Rondini
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _MP_MATHPLOT_H_
+#define _MP_MATHPLOT_H_
+
+/** @file mathplot.h */
+/** @mainpage wxMathPlot
+ wxMathPlot is a framework for mathematical graph plotting in wxWindows.
+
+ The framework is designed for convenience and ease of use.
+
+ @section screenshots Screenshots
+ <a href="http://wxmathplot.sourceforge.net/screenshot.shtml">Go to the screenshots page.</a>
+
+ @section overview Overview
+ The heart of wxMathPlot is mpWindow, which is a 2D canvas for plot layers.
+ mpWindow can be embedded as subwindow in a wxPane, a wxFrame, or any other wxWindow.
+ mpWindow provides a zoomable and moveable view of the layers. The current view can
+ be controlled with the mouse, the scrollbars, and a context menu.
+
+ Plot layers are implementations of the abstract base class mpLayer. Those can
+ be function plots, scale rulers, or any other vector data visualisation. wxMathPlot provides two mpLayer implementations for plotting horizontal and vertical rulers: mpScaleX and mpScaleY.
+ For convenient function plotting a series of classes derived from mpLayer are provided, like mpFX, mpProfile, mpLegend and so on. These base classes already come with plot code, user's own functions can be implemented by overriding just one member for retrieving a function value.
+
+ mpWindow has built-in support for mouse-based pan and zoom through intuitive combinations of buttons and the mouse wheel. It also incorporates an optional double buffering mechanism to avoid flicker. Plots can be easily sent to printer evices or exported in bitmap formats like PNG, BMP or JPEG.
+
+ @section coding Coding conventions
+ wxMathPlot sticks to wxWindow's coding conventions. All entities defined by wxMathPlot have the prefix <i>mp</i>.
+
+ @section author Author and license
+ wxMathPlot is published under the terms of the wxWindow license.<br>
+ The original author is David Schalig <mrhill@users.sourceforge.net>.<br>
+ From June 2007 the project is maintained by Davide Rondini <cdron77@users.sourceforge.net>.<br>
+ Authors can be contacted via the wxMathPlot's homepage at
+ https://sourceforge.net/projects/wxmathplot<br>
+ Contributors:<br>
+ Jose Luis Blanco, Val Greene.<br>
+*/
+
+//this definition uses windows dll to export function.
+//WXDLLIMPEXP_MATHPLOT definition definition changed to WXDLLIMPEXP_MATHPLOT
+//mathplot_EXPORTS will be defined by cmake
+#ifdef mathplot_EXPORTS
+ #define WXDLLIMPEXP_MATHPLOT WXEXPORT
+ #define WXDLLIMPEXP_DATA_MATHPLOT(type) WXEXPORT type
+#else // not making DLL
+ #define WXDLLIMPEXP_MATHPLOT
+ #define WXDLLIMPEXP_DATA_MATHPLOT(type) type
+#endif
+
+#if defined(__GNUG__) && !defined(__APPLE__)
+#pragma interface "mathplot.h"
+#endif
+
+#include <vector>
+
+// #include <wx/wx.h>
+#include <wx/defs.h>
+#include <wx/menu.h>
+#include <wx/scrolwin.h>
+#include <wx/event.h>
+#include <wx/dynarray.h>
+#include <wx/pen.h>
+#include <wx/dcmemory.h>
+#include <wx/string.h>
+#include <wx/print.h>
+#include <wx/image.h>
+//#include <wx/graphics.h>
+
+
+#include <deque>
+
+// For memory leak debug
+#ifdef _WINDOWS
+#ifdef _DEBUG
+#include <crtdbg.h>
+#define DEBUG_NEW new(_NORMAL_BLOCK ,__FILE__, __LINE__)
+#else
+#define DEBUG_NEW new
+#endif // _DEBUG
+#endif // _WINDOWS
+
+// Separation for axes when set close to border
+#define X_BORDER_SEPARATION 40
+#define Y_BORDER_SEPARATION 60
+
+//-----------------------------------------------------------------------------
+// classes
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_MATHPLOT mpLayer;
+class WXDLLIMPEXP_MATHPLOT mpFX;
+class WXDLLIMPEXP_MATHPLOT mpFY;
+class WXDLLIMPEXP_MATHPLOT mpFXY;
+class WXDLLIMPEXP_MATHPLOT mpFXYVector;
+class WXDLLIMPEXP_MATHPLOT mpScaleX;
+class WXDLLIMPEXP_MATHPLOT mpScaleY;
+class WXDLLIMPEXP_MATHPLOT mpWindow;
+class WXDLLIMPEXP_MATHPLOT mpText;
+class WXDLLIMPEXP_MATHPLOT mpPrintout;
+
+/** Command IDs used by mpWindow */
+enum
+{
+ mpID_FIT = 2000, //!< Fit view to match bounding box of all layers
+ mpID_ZOOM_IN, //!< Zoom into view at clickposition / window center
+ mpID_ZOOM_OUT, //!< Zoom out
+ mpID_CENTER, //!< Center view on click position
+ mpID_LOCKASPECT, //!< Lock x/y scaling aspect
+ mpID_HELP_MOUSE //!< Shows information about the mouse commands
+};
+
+//-----------------------------------------------------------------------------
+// mpLayer
+//-----------------------------------------------------------------------------
+
+typedef enum __mp_Layer_Type {
+ mpLAYER_UNDEF, //!< Layer type undefined
+ mpLAYER_AXIS, //!< Axis type layer
+ mpLAYER_PLOT, //!< Plot type layer
+ mpLAYER_INFO, //!< Info box type layer
+ mpLAYER_BITMAP //!< Bitmap type layer
+} mpLayerType;
+
+/** Plot layer, abstract base class.
+ Any number of mpLayer implementations can be attached to mpWindow.
+ Examples for mpLayer implementations are function graphs, or scale rulers.
+
+ For convenience mpLayer defines a name, a font (wxFont), a pen (wxPen),
+ and a continuity property (bool) as class members.
+ The default values at constructor are the default font, a black pen, and
+ continuity set to false (draw separate points).
+ These may or may not be used by implementations.
+*/
+class WXDLLIMPEXP_MATHPLOT mpLayer : public wxObject
+{
+public:
+ mpLayer();
+
+ virtual ~mpLayer() {};
+
+ /** Check whether this layer has a bounding box.
+ The default implementation returns \a TRUE. Override and return
+ FALSE if your mpLayer implementation should be ignored by the calculation
+ of the global bounding box for all layers in a mpWindow.
+ @retval TRUE Has bounding box
+ @retval FALSE Has not bounding box
+ */
+ virtual bool HasBBox() { return TRUE; }
+
+ /** Check whether the layer is an info box.
+ The default implementation returns \a FALSE. It is overrided to \a TRUE for mpInfoLayer
+ class and its derivative. It is necessary to define mouse actions behaviour over
+ info boxes.
+ @return whether the layer is an info boxes
+ @sa mpInfoLayer::IsInfo */
+ virtual bool IsInfo() { return false; };
+
+ /** Get inclusive left border of bounding box.
+ @return Value
+ */
+ virtual double GetMinX() { return -1.0; }
+
+ /** Get inclusive right border of bounding box.
+ @return Value
+ */
+ virtual double GetMaxX() { return 1.0; }
+
+ /** Get inclusive bottom border of bounding box.
+ @return Value
+ */
+ virtual double GetMinY() { return -1.0; }
+
+ /** Get inclusive top border of bounding box.
+ @return Value
+ */
+ virtual double GetMaxY() { return 1.0; }
+
+ /** Plot given view of layer to the given device context.
+ An implementation of this function has to transform layer coordinates to
+ wxDC coordinates based on the view parameters retrievable from the mpWindow
+ passed in \a w.
+ Note that the public methods of mpWindow: x2p,y2p and p2x,p2y are already provided
+ which transform layer coordinates to DC pixel coordinates, and <b>user code should rely
+ on them</b> for portability and future changes to be applied transparently, instead of
+ implementing the following formulas manually.
+
+ The passed device context \a dc has its coordinate origin set to the top-left corner
+ of the visible area (the default). The coordinate orientation is as shown in the
+ following picture:
+ <pre>
+ (wxDC origin 0,0)
+ x-------------> ascending X ----------------+
+ | |
+ | |
+ V ascending Y |
+ | |
+ | |
+ | |
+ +-------------------------------------------+ <-- right-bottom corner of the mpWindow visible area.
+ </pre>
+ Note that Y ascends in downward direction, whereas the usual vertical orientation
+ for mathematical plots is vice versa. Thus Y-orientation will be swapped usually,
+ when transforming between wxDC and mpLayer coordinates. This change of coordinates
+ is taken into account in the methods p2x,p2y,x2p,y2p.
+
+ <b> Rules for transformation between mpLayer and wxDC coordinates </b>
+ @code
+ dc_X = (layer_X - mpWindow::GetPosX()) * mpWindow::GetScaleX()
+ dc_Y = (mpWindow::GetPosY() - layer_Y) * mpWindow::GetScaleY() // swapping Y-orientation
+
+ layer_X = (dc_X / mpWindow::GetScaleX()) + mpWindow::GetPosX() // scale guaranteed to be not 0
+ layer_Y = mpWindow::GetPosY() - (dc_Y / mpWindow::GetScaleY()) // swapping Y-orientation
+ @endcode
+
+ @param dc Device context to plot to.
+ @param w View to plot. The visible area can be retrieved from this object.
+ @sa mpWindow::p2x,mpWindow::p2y,mpWindow::x2p,mpWindow::y2p
+ */
+ virtual void Plot(wxDC & dc, mpWindow & w) = 0;
+
+ /** Get layer name.
+ @return Name
+ */
+ wxString GetName() const { return m_name; }
+
+ /** Get font set for this layer.
+ @return Font
+ */
+ const wxFont& GetFont() const { return m_font; }
+
+ /** Get pen set for this layer.
+ @return Pen
+ */
+ const wxPen& GetPen() const { return m_pen; }
+
+ /** Set the 'continuity' property of the layer (true:draws a continuous line, false:draws separate points).
+ * @sa GetContinuity
+ */
+ void SetContinuity(bool continuity) {m_continuous = continuity;}
+
+ /** Gets the 'continuity' property of the layer.
+ * @sa SetContinuity
+ */
+ bool GetContinuity() const {return m_continuous;}
+
+ /** Shows or hides the text label with the name of the layer (default is visible).
+ */
+ void ShowName(bool show) { m_showName = show; };
+
+ /** Set layer name
+ @param name Name, will be copied to internal class member
+ */
+ void SetName(wxString name) { m_name = name; }
+
+ /** Set layer font
+ @param font Font, will be copied to internal class member
+ */
+ void SetFont(wxFont& font) { m_font = font; }
+
+ /** Set layer pen
+ @param pen Pen, will be copied to internal class member
+ */
+ void SetPen(wxPen pen) { m_pen = pen; }
+
+ /** Set Draw mode: inside or outside margins. Default is outside, which allows the layer to draw up to the mpWindow border.
+ @param drawModeOutside The draw mode to be set */
+ void SetDrawOutsideMargins(bool drawModeOutside) { m_drawOutsideMargins = drawModeOutside; };
+
+ /** Get Draw mode: inside or outside margins.
+ @return The draw mode */
+ bool GetDrawOutsideMargins() { return m_drawOutsideMargins; };
+
+ /** Get a small square bitmap filled with the colour of the pen used in the layer. Useful to create legends or similar reference to the layers.
+ @param side side length in pixels
+ @return a wxBitmap filled with layer's colour */
+ wxBitmap GetColourSquare(int side = 16);
+
+ /** Get layer type: a Layer can be of different types: plot lines, axis, info boxes, etc, this method returns the right value.
+ @return An integer indicating layer type */
+ mpLayerType GetLayerType() { return m_type; };
+
+ /** Checks whether the layer is visible or not.
+ @return \a true if visible */
+ bool IsVisible() {return m_visible; };
+
+ /** Sets layer visibility.
+ @param show visibility bool. */
+ void SetVisible(bool show) { m_visible = show; };
+
+ /** Get brush set for this layer.
+ @return brush. */
+ const wxBrush& GetBrush() const { return m_brush; };
+
+ /** Set layer brush
+ @param brush brush, will be copied to internal class member */
+ void SetBrush(wxBrush brush) { m_brush = brush; };
+
+protected:
+ wxFont m_font; //!< Layer's font
+ wxPen m_pen; //!< Layer's pen
+ wxBrush m_brush; //!< Layer's brush
+ wxString m_name; //!< Layer's name
+ bool m_continuous; //!< Specify if the layer will be plotted as a continuous line or a set of points.
+ bool m_showName; //!< States whether the name of the layer must be shown (default is true).
+ bool m_drawOutsideMargins; //!< select if the layer should draw only inside margins or over all DC
+ mpLayerType m_type; //!< Define layer type, which is assigned by constructor
+ bool m_visible; //!< Toggles layer visibility
+ DECLARE_DYNAMIC_CLASS(mpLayer)
+};
+
+
+//-----------------------------------------------------------------------------
+// mpInfoLayer
+//-----------------------------------------------------------------------------
+
+/** @class mpInfoLayer
+ @brief Base class to create small rectangular info boxes
+ mpInfoLayer is the base class to create a small rectangular info box in transparent overlay over plot layers. It is used to implement objects like legends.
+*/
+class WXDLLIMPEXP_MATHPLOT mpInfoLayer : public mpLayer
+{
+public:
+ /** Default constructor. */
+ mpInfoLayer();
+
+ /** Complete constructor.
+ @param rect Sets the initial size rectangle of the layer.
+ @param brush pointer to a fill brush. Default is transparent */
+ mpInfoLayer(wxRect rect, const wxBrush* brush = wxTRANSPARENT_BRUSH);
+
+ /** Destructor */
+ virtual ~mpInfoLayer();
+
+ /** Updates the content of the info box. Should be overidden by derived classes.
+ Update may behave in different ways according to the type of event which called it.
+ @param w parent mpWindow from which to obtain informations
+ @param event The event which called the update. */
+ virtual void UpdateInfo(mpWindow& w, wxEvent& event);
+
+ /** mpInfoLayer has not bounding box. @sa mpLayer::HasBBox
+ @return always \a FALSE */
+ virtual bool HasBBox() { return false; };
+
+ /** Plot method. Can be overidden by derived classes.
+ @param dc the device content where to plot
+ @param w the window to plot
+ @sa mpLayer::Plot */
+ virtual void Plot(wxDC & dc, mpWindow & w);
+
+ /** Specifies that this is an Info box layer.
+ @return always \a TRUE
+ @sa mpLayer::IsInfo */
+ virtual bool IsInfo() { return true; };
+
+ /** Checks whether a point is inside the info box rectangle.
+ @param point The point to be checked
+ @return \a true if the point is inside the bounding box */
+ virtual bool Inside(wxPoint& point);
+
+ /** Moves the layer rectangle of given pixel deltas.
+ @param delta The wxPoint container for delta coordinates along x and y. Units are in pixels. */
+ virtual void Move(wxPoint delta);
+
+ /** Updates the rectangle reference point. Used by internal methods of mpWindow to correctly move mpInfoLayers. */
+ virtual void UpdateReference();
+
+ /** Returns the position of the upper left corner of the box (in pixels)
+ @return The rectangle position */
+ wxPoint GetPosition();
+
+ /** Returns the size of the box (in pixels)
+ @return The rectangle size */
+ wxSize GetSize();
+
+ /** Returns the current rectangle coordinates.
+ @return The info layer rectangle */
+ const wxRect& GetRectangle() { return m_dim; };
+
+ void SetBrush(wxBrush brush) { m_brush = brush; };
+
+protected:
+ wxRect m_dim; //!< The bounding rectangle of the box. It may be resized dynamically by the Plot method.
+ wxPoint m_reference; //!< Holds the reference point for movements
+ wxBrush m_brush; //!< The brush to be used for the background
+ int m_winX, m_winY; //!< Holds the mpWindow size. Used to rescale position when window is resized.
+
+ DECLARE_DYNAMIC_CLASS(mpInfoLayer)
+};
+
+/** @class mpInfoCoords
+ @brief Implements an overlay box which shows the mouse coordinates in plot units.
+ When an mpInfoCoords layer is activated, when mouse is moved over the mpWindow, its coordinates (in mpWindow units, not pixels) are continuously reported inside the layer box. */
+class WXDLLIMPEXP_MATHPLOT mpInfoCoords : public mpInfoLayer
+{
+public:
+ /** Default constructor */
+ mpInfoCoords();
+ /** Complete constructor, setting initial rectangle and background brush.
+ @param rect The initial bounding rectangle.
+ @param brush The wxBrush to be used for box background: default is transparent */
+ mpInfoCoords(wxRect rect, const wxBrush* brush = wxTRANSPARENT_BRUSH);
+
+ /** Default destructor */
+ ~mpInfoCoords();
+
+ /** Updates the content of the info box. It is used to update coordinates.
+ @param w parent mpWindow from which to obtain information
+ @param event The event which called the update. */
+ virtual void UpdateInfo(mpWindow& w, wxEvent& event);
+
+ /** Plot method.
+ @param dc the device content where to plot
+ @param w the window to plot
+ @sa mpLayer::Plot */
+ virtual void Plot(wxDC & dc, mpWindow & w);
+
+protected:
+ wxString m_content; //!< string holding the coordinates to be drawn.
+};
+
+/** @class mpInfoLegend
+ @brief Implements the legend to be added to the plot
+ This layer allows you to add a legend to describe the plots in the window. The legend uses the layer name as a label, and displays only layers of type mpLAYER_PLOT. */
+class WXDLLIMPEXP_MATHPLOT mpInfoLegend : public mpInfoLayer
+{
+public:
+ /** Default constructor */
+ mpInfoLegend();
+
+ /** Complete constructor, setting initial rectangle and background brush.
+ @param rect The initial bounding rectangle.
+ @param brush The wxBrush to be used for box background: default is transparent
+ @sa mpInfoLayer::mpInfoLayer */
+ mpInfoLegend(wxRect rect, const wxBrush* brush = wxTRANSPARENT_BRUSH);
+
+ /** Default destructor */
+ ~mpInfoLegend();
+
+ /** Updates the content of the info box. Unused in this class.
+ @param w parent mpWindow from which to obtain information
+ @param event The event which called the update. */
+ virtual void UpdateInfo(mpWindow& w, wxEvent& event);
+
+ /** Plot method.
+ @param dc the device content where to plot
+ @param w the window to plot
+ @sa mpLayer::Plot */
+ virtual void Plot(wxDC & dc, mpWindow & w);
+
+protected:
+
+};
+
+
+//-----------------------------------------------------------------------------
+// mpLayer implementations - functions
+//-----------------------------------------------------------------------------
+
+/** @name Label alignment constants
+@{*/
+
+/** @internal */
+#define mpALIGNMASK 0x03
+/** Aligns label to the right. For use with mpFX. */
+#define mpALIGN_RIGHT 0x00
+/** Aligns label to the center. For use with mpFX and mpFY. */
+#define mpALIGN_CENTER 0x01
+/** Aligns label to the left. For use with mpFX. */
+#define mpALIGN_LEFT 0x02
+/** Aligns label to the top. For use with mpFY. */
+#define mpALIGN_TOP mpALIGN_RIGHT
+/** Aligns label to the bottom. For use with mpFY. */
+#define mpALIGN_BOTTOM mpALIGN_LEFT
+/** Aligns X axis to bottom border. For mpScaleX */
+#define mpALIGN_BORDER_BOTTOM 0x04
+/** Aligns X axis to top border. For mpScaleX */
+#define mpALIGN_BORDER_TOP 0x05
+/** Set label for X axis in normal mode */
+#define mpX_NORMAL 0x00
+/** Set label for X axis in time mode: the value is represented as minutes:seconds.milliseconds if time is less than 2 minutes, hours:minutes:seconds otherwise. */
+#define mpX_TIME 0x01
+/** Set label for X axis in hours mode: the value is always represented as hours:minutes:seconds. */
+#define mpX_HOURS 0x02
+/** Set label for X axis in date mode: the value is always represented as yyyy-mm-dd. */
+#define mpX_DATE 0x03
+/** Set label for X axis in datetime mode: the value is always represented as yyyy-mm-ddThh:mm:ss. */
+#define mpX_DATETIME 0x04
+/** Aligns Y axis to left border. For mpScaleY */
+#define mpALIGN_BORDER_LEFT mpALIGN_BORDER_BOTTOM
+/** Aligns Y axis to right border. For mpScaleY */
+#define mpALIGN_BORDER_RIGHT mpALIGN_BORDER_TOP
+/** Aligns label to north-east. For use with mpFXY. */
+#define mpALIGN_NE 0x00
+/** Aligns label to north-west. For use with mpFXY. */
+#define mpALIGN_NW 0x01
+/** Aligns label to south-west. For use with mpFXY. */
+#define mpALIGN_SW 0x02
+/** Aligns label to south-east. For use with mpFXY. */
+#define mpALIGN_SE 0x03
+
+/*@}*/
+
+/** @name mpLayer implementations - functions
+@{*/
+
+/** Abstract base class providing plot and labeling functionality for functions F:X->Y.
+ Override mpFX::GetY to implement a function.
+ Optionally implement a constructor and pass a name (label) and a label alignment
+ to the constructor mpFX::mpFX. If the layer name is empty, no label will be plotted.
+*/
+class WXDLLIMPEXP_MATHPLOT mpFX : public mpLayer
+{
+public:
+ /** @param name Label
+ @param flags Label alignment, pass one of #mpALIGN_RIGHT, #mpALIGN_CENTER, #mpALIGN_LEFT.
+ */
+ mpFX(wxString name = wxEmptyString, int flags = mpALIGN_RIGHT);
+
+ /** Get function value for argument.
+ Override this function in your implementation.
+ @param x Argument
+ @return Function value
+ */
+ virtual double GetY( double x ) = 0;
+
+ /** Layer plot handler.
+ This implementation will plot the function in the visible area and
+ put a label according to the aligment specified.
+ */
+ virtual void Plot(wxDC & dc, mpWindow & w);
+
+protected:
+ int m_flags; //!< Holds label alignment
+
+ DECLARE_DYNAMIC_CLASS(mpFX)
+};
+
+/** Abstract base class providing plot and labeling functionality for functions F:Y->X.
+ Override mpFY::GetX to implement a function.
+ Optionally implement a constructor and pass a name (label) and a label alignment
+ to the constructor mpFY::mpFY. If the layer name is empty, no label will be plotted.
+*/
+class WXDLLIMPEXP_MATHPLOT mpFY : public mpLayer
+{
+public:
+ /** @param name Label
+ @param flags Label alignment, pass one of #mpALIGN_BOTTOM, #mpALIGN_CENTER, #mpALIGN_TOP.
+ */
+ mpFY(wxString name = wxEmptyString, int flags = mpALIGN_TOP);
+
+ /** Get function value for argument.
+ Override this function in your implementation.
+ @param y Argument
+ @return Function value
+ */
+ virtual double GetX( double y ) = 0;
+
+ /** Layer plot handler.
+ This implementation will plot the function in the visible area and
+ put a label according to the aligment specified.
+ */
+ virtual void Plot(wxDC & dc, mpWindow & w);
+
+protected:
+ int m_flags; //!< Holds label alignment
+
+ DECLARE_DYNAMIC_CLASS(mpFY)
+};
+
+/** Abstract base class providing plot and labeling functionality for a locus plot F:N->X,Y.
+ Locus argument N is assumed to be in range 0 .. MAX_N, and implicitly derived by enumerating
+ all locus values. Override mpFXY::Rewind and mpFXY::GetNextXY to implement a locus.
+ Optionally implement a constructor and pass a name (label) and a label alignment
+ to the constructor mpFXY::mpFXY. If the layer name is empty, no label will be plotted.
+*/
+class WXDLLIMPEXP_MATHPLOT mpFXY : public mpLayer
+{
+public:
+ /** @param name Label
+ @param flags Label alignment, pass one of #mpALIGN_NE, #mpALIGN_NW, #mpALIGN_SW, #mpALIGN_SE.
+ */
+ mpFXY(wxString name = wxEmptyString, int flags = mpALIGN_NE);
+
+ /** Rewind value enumeration with mpFXY::GetNextXY.
+ Override this function in your implementation.
+ */
+ virtual void Rewind() = 0;
+
+ /** Get locus value for next N.
+ Override this function in your implementation.
+ @param x Returns X value
+ @param y Returns Y value
+ */
+ virtual bool GetNextXY(double & x, double & y) = 0;
+
+ /** Layer plot handler.
+ This implementation will plot the locus in the visible area and
+ put a label according to the alignment specified.
+ */
+ virtual void Plot(wxDC & dc, mpWindow & w);
+
+
+protected:
+ int m_flags; //!< Holds label alignment
+
+ // Data to calculate label positioning
+ wxCoord maxDrawX, minDrawX, maxDrawY, minDrawY;
+ //int drawnPoints;
+
+ /** Update label positioning data
+ @param xnew New x coordinate
+ @param ynew New y coordinate
+ */
+ void UpdateViewBoundary(wxCoord xnew, wxCoord ynew);
+
+ DECLARE_DYNAMIC_CLASS(mpFXY)
+};
+
+/** Abstract base class providing plot and labeling functionality for functions F:Y->X.
+ Override mpProfile::GetX to implement a function.
+ This class is similar to mpFY, but the Plot method is different. The plot is in fact represented by lines instead of points, which gives best rendering of rapidly-varying functions, and in general, data which are not so close one to another.
+ Optionally implement a constructor and pass a name (label) and a label alignment
+ to the constructor mpProfile::mpProfile. If the layer name is empty, no label will be plotted.
+*/
+class WXDLLIMPEXP_MATHPLOT mpProfile : public mpLayer
+{
+public:
+ /** @param name Label
+ @param flags Label alignment, pass one of #mpALIGN_BOTTOM, #mpALIGN_CENTER, #mpALIGN_TOP.
+ */
+ mpProfile(wxString name = wxEmptyString, int flags = mpALIGN_TOP);
+
+ /** Get function value for argument.
+ Override this function in your implementation.
+ @param x Argument
+ @return Function value
+ */
+ virtual double GetY( double x ) = 0;
+
+ /** Layer plot handler.
+ This implementation will plot the function in the visible area and
+ put a label according to the aligment specified.
+ */
+ virtual void Plot(wxDC & dc, mpWindow & w);
+
+protected:
+ int m_flags; //!< Holds label alignment
+
+ DECLARE_DYNAMIC_CLASS(mpProfile)
+};
+
+/*@}*/
+
+//-----------------------------------------------------------------------------
+// mpLayer implementations - furniture (scales, ...)
+//-----------------------------------------------------------------------------
+
+/** @name mpLayer implementations - furniture (scales, ...)
+@{*/
+
+/** Plot layer implementing a x-scale ruler.
+ The ruler is fixed at Y=0 in the coordinate system. A label is plotted at
+ the bottom-right hand of the ruler. The scale numbering automatically
+ adjusts to view and zoom factor.
+*/
+class WXDLLIMPEXP_MATHPLOT mpScaleX : public mpLayer
+{
+public:
+ /** Full constructor.
+ @param name Label to plot by the ruler
+ @param flags Set the position of the scale with respect to the window.
+ @param ticks Select ticks or grid. Give TRUE (default) for drawing axis ticks, FALSE for drawing the grid.
+ @param type mpX_NORMAL for normal labels, mpX_TIME for time axis in hours, minutes, seconds. */
+ mpScaleX(wxString name = wxT("X"), int flags = mpALIGN_CENTER, bool ticks = true, unsigned int type = mpX_NORMAL);
+
+ /** Layer plot handler.
+ This implementation will plot the ruler adjusted to the visible area. */
+ virtual void Plot(wxDC & dc, mpWindow & w);
+
+ /** Check whether this layer has a bounding box.
+ This implementation returns \a FALSE thus making the ruler invisible
+ to the plot layer bounding box calculation by mpWindow. */
+ virtual bool HasBBox() { return FALSE; }
+
+ /** Set X axis alignment.
+ @param align alignment (choose between mpALIGN_BORDER_BOTTOM, mpALIGN_BOTTOM, mpALIGN_CENTER, mpALIGN_TOP, mpALIGN_BORDER_TOP */
+ void SetAlign(int align) { m_flags = align; };
+
+ /** Set X axis ticks or grid
+ @param ticks TRUE to plot axis ticks, FALSE to plot grid. */
+ void SetTicks(bool ticks) { m_ticks = ticks; };
+
+ /** Get X axis ticks or grid
+ @return TRUE if plot is drawing axis ticks, FALSE if the grid is active. */
+ bool GetTicks() { return m_ticks; };
+
+ /** Get X axis label view mode.
+ @return mpX_NORMAL for normal labels, mpX_TIME for time axis in hours, minutes, seconds. */
+ unsigned int GetLabelMode() { return m_labelType; };
+
+ /** Set X axis label view mode.
+ @param mode mpX_NORMAL for normal labels, mpX_TIME for time axis in hours, minutes, seconds. */
+ void SetLabelMode(unsigned int mode) { m_labelType = mode; };
+
+ /** Set X axis Label format (used for mpX_NORMAL draw mode).
+ @param format The format string */
+ void SetLabelFormat(const wxString& format) { m_labelFormat = format; };
+
+ /** Get X axis Label format (used for mpX_NORMAL draw mode).
+ @return The format string */
+ const wxString& SetLabelFormat() { return m_labelFormat; };
+
+protected:
+ int m_flags; //!< Flag for axis alignment
+ bool m_ticks; //!< Flag to toggle between ticks or grid
+ unsigned int m_labelType; //!< Select labels mode: mpX_NORMAL for normal labels, mpX_TIME for time axis in hours, minutes, seconds
+ wxString m_labelFormat; //!< Format string used to print labels
+
+ DECLARE_DYNAMIC_CLASS(mpScaleX)
+};
+
+/** Plot layer implementing a y-scale ruler.
+ If align is set to mpALIGN_CENTER, the ruler is fixed at X=0 in the coordinate system. If the align is set to mpALIGN_TOP or mpALIGN_BOTTOM, the axis is always drawn respectively at top or bottom of the window. A label is plotted at
+ the top-right hand of the ruler. The scale numbering automatically
+ adjusts to view and zoom factor.
+*/
+class WXDLLIMPEXP_MATHPLOT mpScaleY : public mpLayer
+{
+public:
+ /** @param name Label to plot by the ruler
+ @param flags Set position of the scale respect to the window.
+ @param ticks Select ticks or grid. Give TRUE (default) for drawing axis ticks, FALSE for drawing the grid */
+ mpScaleY(wxString name = wxT("Y"), int flags = mpALIGN_CENTER, bool ticks = true);
+
+ /** Layer plot handler.
+ This implementation will plot the ruler adjusted to the visible area.
+ */
+ virtual void Plot(wxDC & dc, mpWindow & w);
+
+ /** Check whether this layer has a bounding box.
+ This implementation returns \a FALSE thus making the ruler invisible
+ to the plot layer bounding box calculation by mpWindow.
+ */
+ virtual bool HasBBox() { return FALSE; }
+
+ /** Set Y axis alignment.
+ @param align alignment (choose between mpALIGN_BORDER_LEFT, mpALIGN_LEFT, mpALIGN_CENTER, mpALIGN_RIGHT, mpALIGN_BORDER_RIGHT) */
+ void SetAlign(int align) { m_flags = align; };
+
+ /** Set Y axis ticks or grid
+ @param ticks TRUE to plot axis ticks, FALSE to plot grid. */
+ void SetTicks(bool ticks) { m_ticks = ticks; };
+
+ /** Get Y axis ticks or grid
+ @return TRUE if plot is drawing axis ticks, FALSE if the grid is active. */
+ bool GetTicks() { return m_ticks; };
+
+ /** Set Y axis Label format.
+ @param format The format string */
+ void SetLabelFormat(const wxString& format) { m_labelFormat = format; };
+
+ /** Get Y axis Label format.
+ @return The format string */
+ const wxString& SetLabelFormat() { return m_labelFormat; };
+
+protected:
+ int m_flags; //!< Flag for axis alignment
+ bool m_ticks; //!< Flag to toggle between ticks or grid
+ wxString m_labelFormat; //!< Format string used to print labels
+
+ DECLARE_DYNAMIC_CLASS(mpScaleY)
+};
+
+//-----------------------------------------------------------------------------
+// mpWindow
+//-----------------------------------------------------------------------------
+
+/** @name Constants defining mouse modes for mpWindow
+@{*/
+
+/** Mouse panning drags the view. Mouse mode for mpWindow. */
+#define mpMOUSEMODE_DRAG 0
+/** Mouse panning creates a zoom box. Mouse mode for mpWindow. */
+#define mpMOUSEMODE_ZOOMBOX 1
+
+/*@}*/
+/** Define the type for the list of layers inside mpWindow */
+//WX_DECLARE_HASH_MAP( int, mpLayer*, wxIntegerHash, wxIntegerEqual, wxLayerList );
+typedef std::deque<mpLayer*> wxLayerList;
+
+/** Canvas for plotting mpLayer implementations.
+
+ This class defines a zoomable and moveable 2D plot canvas. Any number
+ of mpLayer implementations (scale rulers, function plots, ...) can be
+ attached using mpWindow::AddLayer.
+
+ The canvas window provides a context menu with actions for navigating the view.
+ The context menu can be retrieved with mpWindow::GetPopupMenu, e.g. for extending it
+ externally.
+
+ Since wxMathPlot version 0.03, the mpWindow incorporates the following features:
+ - DoubleBuffering (Default=disabled): Can be set with EnableDoubleBuffer
+ - Mouse based pan/zoom (Default=enabled): Can be set with EnableMousePanZoom.
+
+ The mouse commands can be visualized by the user through the popup menu, and are:
+ - Mouse Move+CTRL: Pan (Move)
+ - Mouse Wheel: Vertical scroll
+ - Mouse Wheel+SHIFT: Horizontal scroll
+ - Mouse Wheel UP+CTRL: Zoom in
+ - Mouse Wheel DOWN+CTRL: Zoom out
+
+*/
+class WXDLLIMPEXP_MATHPLOT mpWindow : public wxWindow
+{
+public:
+ mpWindow() {}
+ mpWindow( wxWindow *parent, wxWindowID id,
+ const wxPoint &pos = wxDefaultPosition,
+ const wxSize &size = wxDefaultSize,
+ long flags = 0);
+ ~mpWindow();
+
+ /** Get reference to context menu of the plot canvas.
+ @return Pointer to menu. The menu can be modified.
+ */
+ wxMenu* GetPopupMenu() { return &m_popmenu; }
+
+ /** Add a plot layer to the canvas.
+ @param layer Pointer to layer. The mpLayer object will get under control of mpWindow,
+ i.e. it will be delete'd on mpWindow destruction
+ @param refreshDisplay States whether to refresh the display (UpdateAll) after adding the layer.
+ @retval TRUE Success
+ @retval FALSE Failure due to out of memory.
+ */
+ bool AddLayer( mpLayer* layer, bool refreshDisplay = true);
+
+ /** Remove a plot layer from the canvas.
+ @param layer Pointer to layer. The mpLayer object will be destructed using delete.
+ @param alsoDeleteObject If set to true, the mpLayer object will be also "deleted", not just removed from the internal list.
+ @param refreshDisplay States whether to refresh the display (UpdateAll) after removing the layer.
+ @return true if layer is deleted correctly
+
+ N.B. Only the layer reference in the mpWindow is deleted, the layer object still exists!
+ */
+ bool DelLayer( mpLayer* layer, bool alsoDeleteObject = false, bool refreshDisplay = true);
+
+ /** Remove all layers from the plot.
+ @param alsoDeleteObject If set to true, the mpLayer objects will be also "deleted", not just removed from the internal list.
+ @param refreshDisplay States whether to refresh the display (UpdateAll) after removing the layers.
+ */
+ void DelAllLayers( bool alsoDeleteObject, bool refreshDisplay = true);
+
+
+ /*! Get the layer in list position indicated.
+ N.B. You <i>must</i> know the index of the layer inside the list!
+ @param position position of the layer in the layers list
+ @return pointer to mpLayer
+ */
+ mpLayer* GetLayer(int position);
+
+ /*! Get the layer by its name (case sensitive).
+ @param name The name of the layer to retrieve
+ @return A pointer to the mpLayer object, or NULL if not found.
+ */
+ mpLayer* GetLayerByName( const wxString &name);
+
+ /** Get current view's X scale.
+ See @ref mpLayer::Plot "rules for coordinate transformation"
+ @return Scale
+ */
+ double GetXscl() { return m_scaleX; }
+ double GetScaleX(void) const{ return m_scaleX; }; // Schaling's method: maybe another method esists with the same name
+
+ /** Get current view's Y scale.
+ See @ref mpLayer::Plot "rules for coordinate transformation"
+ @return Scale
+ */
+ double GetYscl() const { return m_scaleY; }
+ double GetScaleY(void) const { return m_scaleY; } // Schaling's method: maybe another method exists with the same name
+
+ /** Get current view's X position.
+ See @ref mpLayer::Plot "rules for coordinate transformation"
+ @return X Position in layer coordinate system, that corresponds to the center point of the view.
+ */
+ double GetXpos() const { return m_posX; }
+ double GetPosX(void) const { return m_posX; }
+
+ /** Get current view's Y position.
+ See @ref mpLayer::Plot "rules for coordinate transformation"
+ @return Y Position in layer coordinate system, that corresponds to the center point of the view.
+ */
+ double GetYpos() const { return m_posY; }
+ double GetPosY(void) const { return m_posY; }
+
+ /** Get current view's X dimension in device context units.
+ Usually this is equal to wxDC::GetSize, but it might differ thus mpLayer
+ implementations should rely on the value returned by the function.
+ See @ref mpLayer::Plot "rules for coordinate transformation"
+ @return X dimension.
+ */
+ int GetScrX(void) const { return m_scrX; }
+ int GetXScreen(void) const { return m_scrX; }
+
+ /** Get current view's Y dimension in device context units.
+ Usually this is equal to wxDC::GetSize, but it might differ thus mpLayer
+ implementations should rely on the value returned by the function.
+ See @ref mpLayer::Plot "rules for coordinate transformation"
+ @return Y dimension.
+ */
+ int GetScrY(void) const { return m_scrY; }
+ int GetYScreen(void) const { return m_scrY; }
+
+ /** Set current view's X scale and refresh display.
+ @param scaleX New scale, must not be 0.
+ */
+ void SetScaleX(double scaleX);
+
+ /** Set current view's Y scale and refresh display.
+ @param scaleY New scale, must not be 0.
+ */
+ void SetScaleY(double scaleY) { if (scaleY!=0) m_scaleY=scaleY; UpdateAll(); }
+
+ /** Set current view's X position and refresh display.
+ @param posX New position that corresponds to the center point of the view.
+ */
+ void SetPosX(double posX) { m_posX=posX; UpdateAll(); }
+
+ /** Set current view's Y position and refresh display.
+ @param posY New position that corresponds to the center point of the view.
+ */
+ void SetPosY(double posY) { m_posY=posY; UpdateAll(); }
+
+ /** Set current view's X and Y position and refresh display.
+ @param posX New position that corresponds to the center point of the view.
+ @param posY New position that corresponds to the center point of the view.
+ */
+ void SetPos( double posX, double posY) { m_posX=posX; m_posY=posY; UpdateAll(); }
+
+ /** Set current view's dimensions in device context units.
+ Needed by plotting functions. It doesn't refresh display.
+ @param scrX New position that corresponds to the center point of the view.
+ @param scrY New position that corresponds to the center point of the view.
+ */
+ void SetScr( int scrX, int scrY) { m_scrX=scrX; m_scrY=scrY; }
+
+ /** Converts mpWindow (screen) pixel coordinates into graph (floating point) coordinates, using current mpWindow position and scale.
+ * @sa p2y,x2p,y2p */
+// double p2x(wxCoord pixelCoordX, bool drawOutside = true ); // { return m_posX + pixelCoordX/m_scaleX; }
+ inline double p2x(wxCoord pixelCoordX ) { return m_posX + pixelCoordX/m_scaleX; }
+
+ /** Converts mpWindow (screen) pixel coordinates into graph (floating point) coordinates, using current mpWindow position and scale.
+ * @sa p2x,x2p,y2p */
+// double p2y(wxCoord pixelCoordY, bool drawOutside = true ); //{ return m_posY - pixelCoordY/m_scaleY; }
+ inline double p2y(wxCoord pixelCoordY ) { return m_posY - pixelCoordY/m_scaleY; }
+
+ /** Converts graph (floating point) coordinates into mpWindow (screen) pixel coordinates, using current mpWindow position and scale.
+ * @sa p2x,p2y,y2p */
+// wxCoord x2p(double x, bool drawOutside = true); // { return (wxCoord) ( (x-m_posX) * m_scaleX); }
+ inline wxCoord x2p(double x) { return (wxCoord) ( (x-m_posX) * m_scaleX); }
+
+ /** Converts graph (floating point) coordinates into mpWindow (screen) pixel coordinates, using current mpWindow position and scale.
+ * @sa p2x,p2y,x2p */
+// wxCoord y2p(double y, bool drawOutside = true); // { return (wxCoord) ( (m_posY-y) * m_scaleY); }
+ inline wxCoord y2p(double y) { return (wxCoord) ( (m_posY-y) * m_scaleY); }
+
+
+ /** Enable/disable the double-buffering of the window, eliminating the flicker (default=disabled).
+ */
+ void EnableDoubleBuffer( bool enabled ) { m_enableDoubleBuffer = enabled; }
+
+ /** Enable/disable the feature of pan/zoom with the mouse (default=enabled)
+ */
+ void EnableMousePanZoom( bool enabled ) { m_enableMouseNavigation = enabled; }
+
+ /** Enable or disable X/Y scale aspect locking for the view.
+ @note Explicit calls to mpWindow::SetScaleX and mpWindow::SetScaleY will set
+ an unlocked aspect, but any other action changing the view scale will
+ lock the aspect again.
+ */
+ void LockAspect(bool enable = TRUE);
+
+ /** Checks whether the X/Y scale aspect is locked.
+ @retval TRUE Locked
+ @retval FALSE Unlocked
+ */
+ inline bool IsAspectLocked() { return m_lockaspect; }
+
+ /** Set view to fit global bounding box of all plot layers and refresh display.
+ Scale and position will be set to show all attached mpLayers.
+ The X/Y scale aspect lock is taken into account.
+ */
+ void Fit();
+
+ /** Set view to fit a given bounding box and refresh display.
+ The X/Y scale aspect lock is taken into account.
+ If provided, the parameters printSizeX and printSizeY are taken as the DC size, and the
+ pixel scales are computed accordingly. Also, in this case the passed borders are not saved
+ as the "desired borders", since this use will be invoked only when printing.
+ */
+ void Fit(double xMin, double xMax, double yMin, double yMax,wxCoord *printSizeX=NULL,wxCoord *printSizeY=NULL);
+
+ /** Zoom into current view and refresh display
+ * @param centerPoint The point (pixel coordinates) that will stay in the same position on the screen after the zoom (by default, the center of the mpWindow).
+ */
+ void ZoomIn( const wxPoint& centerPoint = wxDefaultPosition );
+
+ /** Zoom out current view and refresh display
+ * @param centerPoint The point (pixel coordinates) that will stay in the same position on the screen after the zoom (by default, the center of the mpWindow).
+ */
+ void ZoomOut( const wxPoint& centerPoint = wxDefaultPosition );
+
+ /** Zoom in current view along X and refresh display */
+ void ZoomInX();
+ /** Zoom out current view along X and refresh display */
+ void ZoomOutX();
+ /** Zoom in current view along Y and refresh display */
+ void ZoomInY();
+ /** Zoom out current view along Y and refresh display */
+ void ZoomOutY();
+
+ /** Zoom view fitting given coordinates to the window (p0 and p1 do not need to be in any specific order) */
+ void ZoomRect(wxPoint p0, wxPoint p1);
+
+ /** Refresh display */
+ void UpdateAll();
+
+ // Added methods by Davide Rondini
+
+ /** Counts the number of plot layers, excluding axes or text: this is to count only the layers which have a bounding box.
+ \return The number of profiles plotted.
+ */
+ unsigned int CountLayers();
+
+ /** Counts the number of plot layers, whether or not they have a bounding box.
+ \return The number of layers in the mpWindow. */
+ unsigned int CountAllLayers() { return m_layers.size(); };
+
+ /** Draws the mpWindow on a page for printing
+ \param print the mpPrintout where to print the graph */
+ //void PrintGraph(mpPrintout *print);
+
+
+ /** Returns the left-border layer coordinate that the user wants the mpWindow to show (it may be not exactly the actual shown coordinate in the case of locked aspect ratio).
+ * @sa Fit
+ */
+ double GetDesiredXmin() {return m_desiredXmin; }
+
+ /** Returns the right-border layer coordinate that the user wants the mpWindow to show (it may be not exactly the actual shown coordinate in the case of locked aspect ratio).
+ * @sa Fit
+ */
+ double GetDesiredXmax() {return m_desiredXmax; }
+
+ /** Returns the bottom-border layer coordinate that the user wants the mpWindow to show (it may be not exactly the actual shown coordinate in the case of locked aspect ratio).
+ * @sa Fit
+ */
+ double GetDesiredYmin() {return m_desiredYmin; }
+
+ /** Returns the top layer-border coordinate that the user wants the mpWindow to show (it may be not exactly the actual shown coordinate in the case of locked aspect ratio).
+ * @sa Fit
+ */
+ double GetDesiredYmax() {return m_desiredYmax; }
+
+ /** Returns the bounding box coordinates
+ @param bbox Pointer to a 6-element double array where to store bounding box coordinates. */
+ void GetBoundingBox(double* bbox);
+
+ /** Enable/disable scrollbars
+ @param status Set to true to show scrollbars */
+ void SetMPScrollbars(bool status);
+
+ /** Get scrollbars status.
+ @return true if scrollbars are visible */
+ bool GetMPScrollbars() {return m_enableScrollBars; };
+
+ /** Draw the window on a wxBitmap, then save it to a file.
+ @param filename File name where to save the screenshot
+ @param type image type to be saved: see wxImage output file types for flags
+ @param imageSize Set a size for the output image. Default is the same as the screen size
+ @param fit Decide whether to fit the plot into the size*/
+ bool SaveScreenshot(const wxString& filename, wxBitmapType type = wxBITMAP_TYPE_BMP, wxSize imageSize = wxDefaultSize, bool fit = false);
+
+ /** This value sets the zoom steps whenever the user clicks "Zoom in/out" or performs zoom with the mouse wheel.
+ * It must be a number above unity. This number is used for zoom in, and its inverse for zoom out. Set to 1.5 by default. */
+ static double zoomIncrementalFactor;
+
+ /** Set window margins, creating a blank area where some kinds of layers cannot draw. This is useful for example to draw axes outside the area where the plots are drawn.
+ @param top Top border
+ @param right Right border
+ @param bottom Bottom border
+ @param left Left border */
+ void SetMargins(int top, int right, int bottom, int left);
+
+ /** Set the top margin. @param top Top Margin */
+ void SetMarginTop(int top) { m_marginTop = top; };
+ /** Set the right margin. @param right Right Margin */
+ void SetMarginRight(int right) { m_marginRight = right; };
+ /** Set the bottom margin. @param bottom Bottom Margin */
+ void SetMarginBottom(int bottom) { m_marginBottom = bottom; };
+ /** Set the left margin. @param left Left Margin */
+ void SetMarginLeft(int left) { m_marginLeft = left; };
+
+ /** Get the top margin. @param top Top Margin */
+ int GetMarginTop() { return m_marginTop; };
+ /** Get the right margin. @param right Right Margin */
+ int GetMarginRight() { return m_marginRight; };
+ /** Get the bottom margin. @param bottom Bottom Margin */
+ int GetMarginBottom() { return m_marginBottom; };
+ /** Get the left margin. @param left Left Margin */
+ int GetMarginLeft() { return m_marginLeft; };
+
+ /** Sets whether to show coordinate tooltip when mouse passes over the plot. \param value true for enable, false for disable */
+ // void EnableCoordTooltip(bool value = true);
+ /** Gets coordinate tooltip status. \return true for enable, false for disable */
+ // bool GetCoordTooltip() { return m_coordTooltip; };
+
+ /** Check if a given point is inside the area of a mpInfoLayer and eventually returns its pointer.
+ @param point The position to be checked
+ @return If an info layer is found, returns its pointer, NULL otherwise */
+ mpInfoLayer* IsInsideInfoLayer(wxPoint& point);
+
+ /** Sets the visibility of a layer by its name.
+ @param name The layer name to set visibility
+ @param viewable the view status to be set */
+ void SetLayerVisible(const wxString &name, bool viewable);
+
+ /** Check whether a layer with given name is visible
+ @param name The layer name
+ @return layer visibility status */
+ bool IsLayerVisible(const wxString &name );
+
+ /** Sets the visibility of a layer by its position in layer list.
+ @param position The layer position in layer list
+ @param viewable the view status to be set */
+ void SetLayerVisible(const unsigned int position, bool viewable);
+
+ /** Check whether the layer at given position is visible
+ @param position The layer position in layer list
+ @return layer visibility status */
+ bool IsLayerVisible(const unsigned int position );
+
+ /** Set Color theme. Provide colours to set a new colour theme.
+ @param bgColour Background colour
+ @param drawColour The colour used to draw all elements in foreground, axes excluded
+ @param axesColour The colour used to draw axes (but not their labels) */
+ void SetColourTheme(const wxColour& bgColour, const wxColour& drawColour, const wxColour& axesColour);
+
+ /** Get axes draw colour
+ @return reference to axis colour used in theme */
+ const wxColour& GetAxesColour() { return m_axColour; };
+
+protected:
+ void OnPaint (wxPaintEvent &event); //!< Paint handler, will plot all attached layers
+ void OnSize (wxSizeEvent &event); //!< Size handler, will update scroll bar sizes
+ // void OnScroll2 (wxScrollWinEvent &event); //!< Scroll handler, will move canvas
+ void OnShowPopupMenu (wxMouseEvent &event); //!< Mouse handler, will show context menu
+ void OnMouseRightDown(wxMouseEvent &event); //!< Mouse handler, for detecting when the user drags with the right button or just "clicks" for the menu
+ void OnCenter (wxCommandEvent &event); //!< Context menu handler
+ void OnFit (wxCommandEvent &event); //!< Context menu handler
+ void OnZoomIn (wxCommandEvent &event); //!< Context menu handler
+ void OnZoomOut (wxCommandEvent &event); //!< Context menu handler
+ void OnLockAspect (wxCommandEvent &event); //!< Context menu handler
+ void OnMouseHelp (wxCommandEvent &event); //!< Context menu handler
+ void OnMouseWheel (wxMouseEvent &event); //!< Mouse handler for the wheel
+ void OnMouseMove (wxMouseEvent &event); //!< Mouse handler for mouse motion (for pan)
+ void OnMouseLeftDown (wxMouseEvent &event); //!< Mouse left click (for rect zoom)
+ void OnMouseLeftRelease (wxMouseEvent &event); //!< Mouse left click (for rect zoom)
+ void OnScrollThumbTrack (wxScrollWinEvent &event); //!< Scroll thumb on scroll bar moving
+ void OnScrollPageUp (wxScrollWinEvent &event); //!< Scroll page up
+ void OnScrollPageDown (wxScrollWinEvent &event); //!< Scroll page down
+ void OnScrollLineUp (wxScrollWinEvent &event); //!< Scroll line up
+ void OnScrollLineDown (wxScrollWinEvent &event); //!< Scroll line down
+ void OnScrollTop (wxScrollWinEvent &event); //!< Scroll to top
+ void OnScrollBottom (wxScrollWinEvent &event); //!< Scroll to bottom
+
+ void DoScrollCalc (const int position, const int orientation);
+
+ void DoZoomInXCalc (const int staticXpixel);
+ void DoZoomInYCalc (const int staticYpixel);
+ void DoZoomOutXCalc (const int staticXpixel);
+ void DoZoomOutYCalc (const int staticYpixel);
+
+ /** Recalculate global layer bounding box, and save it in m_minX,...
+ * \return true if there is any valid BBox information.
+ */
+ virtual bool UpdateBBox();
+
+ //wxList m_layers; //!< List of attached plot layers
+ wxLayerList m_layers; //!< List of attached plot layers
+ wxMenu m_popmenu; //!< Canvas' context menu
+ bool m_lockaspect;//!< Scale aspect is locked or not
+ // bool m_coordTooltip; //!< Selects whether to show coordinate tooltip
+ wxColour m_bgColour; //!< Background Colour
+ wxColour m_fgColour; //!< Foreground Colour
+ wxColour m_axColour; //!< Axes Colour
+
+ double m_minX; //!< Global layer bounding box, left border incl.
+ double m_maxX; //!< Global layer bounding box, right border incl.
+ double m_minY; //!< Global layer bounding box, bottom border incl.
+ double m_maxY; //!< Global layer bounding box, top border incl.
+ double m_scaleX; //!< Current view's X scale
+ double m_scaleY; //!< Current view's Y scale
+ double m_posX; //!< Current view's X position
+ double m_posY; //!< Current view's Y position
+ int m_scrX; //!< Current view's X dimension
+ int m_scrY; //!< Current view's Y dimension
+ int m_clickedX; //!< Last mouse click X position, for centering and zooming the view
+ int m_clickedY; //!< Last mouse click Y position, for centering and zooming the view
+
+ /** These are updated in Fit() only, and may be different from the real borders (layer coordinates) only if lock aspect ratio is true.
+ */
+ double m_desiredXmin,m_desiredXmax,m_desiredYmin,m_desiredYmax;
+
+ int m_marginTop, m_marginRight, m_marginBottom, m_marginLeft;
+
+ int m_last_lx,m_last_ly; //!< For double buffering
+ wxMemoryDC m_buff_dc; //!< For double buffering
+ wxBitmap *m_buff_bmp; //!< For double buffering
+ bool m_enableDoubleBuffer; //!< For double buffering
+ bool m_enableMouseNavigation; //!< For pan/zoom with the mouse.
+ bool m_mouseMovedAfterRightClick;
+ long m_mouseRClick_X,m_mouseRClick_Y; //!< For the right button "drag" feature
+ int m_mouseLClick_X, m_mouseLClick_Y; //!< Starting coords for rectangular zoom selection
+ bool m_enableScrollBars;
+ int m_scrollX, m_scrollY;
+ mpInfoLayer* m_movingInfoLayer; //!< For moving info layers over the window area
+
+ wxRect selectionRect;
+ wxColour srColour;
+
+ DECLARE_DYNAMIC_CLASS(mpWindow)
+ DECLARE_EVENT_TABLE()
+};
+
+//-----------------------------------------------------------------------------
+// mpFXYVector - provided by Jose Luis Blanco
+//-----------------------------------------------------------------------------
+
+/** A class providing graphs functionality for a 2D plot (either continuous or a set of points), from vectors of data.
+ This class can be used directly, the user does not need to derive any new class. Simply pass the data as two vectors
+ with the same length containing the X and Y coordinates to the method SetData.
+
+ To generate a graph with a set of points, call
+ \code
+ layerVar->SetContinuity(false)
+ \endcode
+
+ or
+
+ \code
+ layerVar->SetContinuity(true)
+ \endcode
+
+ to render the sequence of coordinates as a continuous line.
+
+ (Added: Jose Luis Blanco, AGO-2007)
+*/
+class WXDLLIMPEXP_MATHPLOT mpFXYVector : public mpFXY
+{
+public:
+ /** @param name Label
+ @param flags Label alignment, pass one of #mpALIGN_NE, #mpALIGN_NW, #mpALIGN_SW, #mpALIGN_SE.
+ */
+ mpFXYVector(wxString name = wxEmptyString, int flags = mpALIGN_NE);
+
+ /** Changes the internal data: the set of points to draw.
+ Both vectors MUST be of the same length. This method DOES NOT refresh the mpWindow; do it manually.
+ * @sa Clear
+ */
+ void SetData( const std::vector<double> &xs,const std::vector<double> &ys);
+
+ /** Clears all the data, leaving the layer empty.
+ * @sa SetData
+ */
+ void Clear();
+
+protected:
+ /** The internal copy of the set of data to draw.
+ */
+ std::vector<double> m_xs,m_ys;
+
+ /** The internal counter for the "GetNextXY" interface
+ */
+ size_t m_index;
+
+ /** Loaded at SetData
+ */
+ double m_minX,m_maxX,m_minY,m_maxY;
+
+ /** Rewind value enumeration with mpFXY::GetNextXY.
+ Overridden in this implementation.
+ */
+ void Rewind();
+
+ /** Get locus value for next N.
+ Overridden in this implementation.
+ @param x Returns X value
+ @param y Returns Y value
+ */
+ bool GetNextXY(double & x, double & y);
+
+ /** Returns the actual minimum X data (loaded in SetData).
+ */
+ double GetMinX() { return m_minX; }
+
+ /** Returns the actual minimum Y data (loaded in SetData).
+ */
+ double GetMinY() { return m_minY; }
+
+ /** Returns the actual maximum X data (loaded in SetData).
+ */
+ double GetMaxX() { return m_maxX; }
+
+ /** Returns the actual maximum Y data (loaded in SetData).
+ */
+ double GetMaxY() { return m_maxY; }
+
+ int m_flags; //!< Holds label alignment
+
+ DECLARE_DYNAMIC_CLASS(mpFXYVector)
+};
+
+//-----------------------------------------------------------------------------
+// mpText - provided by Val Greene
+//-----------------------------------------------------------------------------
+
+/** Plot layer implementing a text string.
+The text is plotted using a percentage system 0-100%, so the actual
+coordinates for the location are not required, and the text stays
+on the plot reguardless of the other layers location and scaling
+factors.
+*/
+class WXDLLIMPEXP_MATHPLOT mpText : public mpLayer
+{
+public:
+ /** @param name text to be drawn in the plot
+ @param offsetx holds offset for the X location in percentage (0-100)
+ @param offsety holds offset for the Y location in percentage (0-100) */
+ mpText(wxString name = wxT("Title"), int offsetx = 5, int offsety = 50);
+
+ /** Text Layer plot handler.
+ This implementation will plot text adjusted to the visible area. */
+ virtual void Plot(wxDC & dc, mpWindow & w);
+
+ /** mpText should not be used for scaling decisions. */
+ virtual bool HasBBox() { return FALSE; }
+
+protected:
+ int m_offsetx; //!< Holds offset for X in percentage
+ int m_offsety; //!< Holds offset for Y in percentage
+
+ DECLARE_DYNAMIC_CLASS(mpText)
+};
+
+
+//-----------------------------------------------------------------------------
+// mpPrintout - provided by Davide Rondini
+//-----------------------------------------------------------------------------
+
+/** Printout class used by mpWindow to draw in the objects to be printed.
+ The object itself can then used by the default wxWidgets printing system
+ to print mppWindow objects.
+*/
+class WXDLLIMPEXP_MATHPLOT mpPrintout : public wxPrintout
+{
+public:
+ mpPrintout(mpWindow* drawWindow, const wxChar *title = _T("wxMathPlot print output"));
+ virtual ~mpPrintout() {};
+
+ void SetDrawState(bool drawState) {drawn = drawState;};
+ bool OnPrintPage(int page);
+ bool HasPage(int page);
+
+private:
+ bool drawn;
+ mpWindow *plotWindow;
+};
+
+
+//-----------------------------------------------------------------------------
+// mpMovableObject - provided by Jose Luis Blanco
+//-----------------------------------------------------------------------------
+/** This virtual class represents objects that can be moved to an arbitrary 2D location+rotation.
+ * The current transformation is set through SetCoordinateBase.
+ * To ease the implementation of descendent classes, mpMovableObject will
+ * be in charge of Bounding Box computation and layer rendering, assuming that
+ * the object updates its shape in m_shape_xs & m_shape_ys.
+ */
+class WXDLLIMPEXP_MATHPLOT mpMovableObject : public mpLayer
+{
+public:
+ /** Default constructor (sets location and rotation to (0,0,0))
+ */
+ mpMovableObject( ) :
+ m_reference_x(0),
+ m_reference_y(0),
+ m_reference_phi(0),
+ m_shape_xs(0),
+ m_shape_ys(0)
+ {
+ m_type = mpLAYER_PLOT;
+ }
+
+ virtual ~mpMovableObject() {};
+
+ /** Get the current coordinate transformation.
+ */
+ void GetCoordinateBase( double &x, double &y, double &phi ) const
+ {
+ x = m_reference_x;
+ y = m_reference_y;
+ phi = m_reference_phi;
+ }
+
+ /** Set the coordinate transformation (phi in radians, 0 means no rotation).
+ */
+ void SetCoordinateBase( double x, double y, double phi = 0 )
+ {
+ m_reference_x = x;
+ m_reference_y = y;
+ m_reference_phi = phi;
+ m_flags = mpALIGN_NE;
+ ShapeUpdated();
+ }
+
+ virtual bool HasBBox() { return m_trans_shape_xs.size()!=0; }
+
+ /** Get inclusive left border of bounding box.
+ */
+ virtual double GetMinX() { return m_bbox_min_x; }
+
+ /** Get inclusive right border of bounding box.
+ */
+ virtual double GetMaxX() { return m_bbox_max_x; }
+
+ /** Get inclusive bottom border of bounding box.
+ */
+ virtual double GetMinY() { return m_bbox_min_y; }
+
+ /** Get inclusive top border of bounding box.
+ */
+ virtual double GetMaxY() { return m_bbox_max_y; }
+
+ virtual void Plot(wxDC & dc, mpWindow & w);
+
+ /** Set label axis alignment.
+ * @param align alignment (choose between mpALIGN_NE, mpALIGN_NW, mpALIGN_SW, mpALIGN_SE
+ */
+ void SetAlign(int align) { m_flags = align; };
+
+protected:
+ int m_flags; //!< Holds label alignment
+
+ /** The coordinates of the object (orientation "phi" is in radians).
+ */
+ double m_reference_x,m_reference_y,m_reference_phi;
+
+ /** A method for 2D translation and rotation, using the current transformation stored in m_reference_x,m_reference_y,m_reference_phi.
+ */
+ void TranslatePoint( double x,double y, double &out_x, double &out_y );
+
+ /** This contains the object points, in local coordinates (to be transformed by the current transformation).
+ */
+ std::vector<double> m_shape_xs,m_shape_ys;
+
+ /** The buffer for the translated & rotated points (to avoid recomputing them with each mpWindow refresh).
+ *
+ */
+ std::vector<double> m_trans_shape_xs,m_trans_shape_ys;
+
+ /** The precomputed bounding box:
+ * @sa ShapeUpdated
+ */
+ double m_bbox_min_x,m_bbox_max_x,m_bbox_min_y,m_bbox_max_y;
+
+ /** Must be called by the descendent class after updating the shape (m_shape_xs/ys), or when the transformation changes.
+ * This method updates the buffers m_trans_shape_xs/ys, and the precomputed bounding box.
+ */
+ void ShapeUpdated();
+
+};
+
+//-----------------------------------------------------------------------------
+// mpCovarianceEllipse - provided by Jose Luis Blanco
+//-----------------------------------------------------------------------------
+/** A 2D ellipse, described by a 2x2 covariance matrix.
+ * The relation between the multivariate Gaussian confidence interval and
+ * the "quantiles" in this class is:
+ * - 1 : 68.27% confidence interval
+ * - 2 : 95.45%
+ * - 3 : 99.73%
+ * - 4 : 99.994%
+ * For example, see http://en.wikipedia.org/wiki/Normal_distribution#Standard_deviation_and_confidence_intervals
+ *
+ * The ellipse will be always centered at the origin. Use mpMovableObject::SetCoordinateBase to move it.
+ */
+class WXDLLIMPEXP_MATHPLOT mpCovarianceEllipse : public mpMovableObject
+{
+public:
+ /** Default constructor.
+ * Initializes to a unity diagonal covariance matrix, a 95% confidence interval (2 sigmas), 32 segments, and a continuous plot (m_continuous=true).
+ */
+ mpCovarianceEllipse(
+ double cov_00 = 1,
+ double cov_11 = 1,
+ double cov_01 = 0,
+ double quantiles = 2,
+ int segments = 32,
+ const wxString & layerName = wxT("") ) :
+ m_cov_00(cov_00),
+ m_cov_11(cov_11),
+ m_cov_01(cov_01),
+ m_quantiles(quantiles),
+ m_segments(segments)
+ {
+ m_continuous = true;
+ m_name = layerName;
+ RecalculateShape();
+ m_type = mpLAYER_PLOT;
+ }
+
+ virtual ~mpCovarianceEllipse() {}
+
+ double GetQuantiles() const { return m_quantiles; }
+
+ /** Set how many "quantiles" to draw, that is, the confidence interval of the ellipse (see above).
+ */
+ void SetQuantiles(double q)
+ {
+ m_quantiles=q;
+ RecalculateShape();
+ }
+
+ void SetSegments( int segments ) { m_segments = segments; }
+ int GetSegments( ) const { return m_segments; }
+
+ /** Returns the elements of the current covariance matrix:
+ */
+ void GetCovarianceMatrix( double &cov_00,double &cov_01,double &cov_11 ) const
+ {
+ cov_00 = m_cov_00;
+ cov_01 = m_cov_01;
+ cov_11 = m_cov_11;
+ }
+
+ /** Changes the covariance matrix:
+ */
+ void SetCovarianceMatrix( double cov_00,double cov_01,double cov_11 )
+ {
+ m_cov_00 = cov_00;
+ m_cov_01 = cov_01;
+ m_cov_11 = cov_11;
+ RecalculateShape();
+ }
+
+protected:
+ /** The elements of the matrix (only 3 since cov(0,1)=cov(1,0) in any positive definite matrix).
+ */
+ double m_cov_00,m_cov_11,m_cov_01;
+ double m_quantiles;
+
+ /** The number of line segments that build up the ellipse.
+ */
+ int m_segments;
+
+ /** Called to update the m_shape_xs, m_shape_ys vectors, whenever a parameter changes.
+ */
+ void RecalculateShape();
+};
+
+//-----------------------------------------------------------------------------
+// mpPolygon - provided by Jose Luis Blanco
+//-----------------------------------------------------------------------------
+/** An arbitrary polygon, descendant of mpMovableObject.
+ * Use "setPoints" to set the list of N points. This class also can draw non-closed polygons by
+ * passing the appropriate parameters to "setPoints". To draw a point-cloud, call "SetContinuity(false)".
+ */
+class WXDLLIMPEXP_MATHPLOT mpPolygon : public mpMovableObject
+{
+public:
+ /** Default constructor.
+ */
+ mpPolygon( const wxString & layerName = wxT("") )
+ {
+ m_continuous = true;
+ m_name = layerName;
+ }
+
+ virtual ~mpPolygon() {}
+
+ /** Set the points in the polygon.
+ * @param points_xs The X coordinates of the points.
+ * @param points_ys The Y coordinates of the points.
+ * @param closedShape If set to true, an additional segment will be added from the last to the first point.
+ */
+ void setPoints(
+ const std::vector<double>& points_xs,
+ const std::vector<double>& points_ys,
+ bool closedShape=true );
+
+
+
+};
+
+//-----------------------------------------------------------------------------
+// mpMovableObject - provided by Jose Luis Blanco
+//-----------------------------------------------------------------------------
+/** This virtual class represents objects that can be moved to an arbitrary 2D location+rotation.
+ * The current transformation is set through SetCoordinateBase.
+ * To ease the implementation of descendent classes, mpMovableObject will
+ * be in charge of Bounding Box computation and layer render, assuming that
+ * the object updates its shape in m_shape_xs & m_shape_ys.
+ */
+class WXDLLIMPEXP_MATHPLOT mpBitmapLayer : public mpLayer
+{
+public:
+ /** Default constructor.
+ */
+ mpBitmapLayer( )
+ {
+ m_min_x = m_max_x =
+ m_min_y = m_max_y = 0;
+ m_validImg = false;
+ m_type = mpLAYER_BITMAP;
+ }
+
+ virtual ~mpBitmapLayer() {};
+
+ /** Returns a copy of the current bitmap assigned to the layer.
+ */
+ void GetBitmapCopy( wxImage &outBmp ) const;
+
+ /** Change the bitmap associated with the layer (to update the screen, refresh the mpWindow).
+ * @param inBmp The bitmap to associate. A copy is made, thus it can be released after calling this.
+ * @param x The left corner X coordinate (in plot units).
+ * @param y The top corner Y coordinate (in plot units).
+ * @param lx The width in plot units.
+ * @param ly The height in plot units.
+ */
+ void SetBitmap( const wxImage &inBmp, double x, double y, double lx, double ly );
+
+ virtual bool HasBBox() { return true; }
+
+ /** Get inclusive left border of bounding box.
+ */
+ virtual double GetMinX() { return m_min_x; }
+
+ /** Get inclusive right border of bounding box.
+ */
+ virtual double GetMaxX() { return m_max_x; }
+
+ /** Get inclusive bottom border of bounding box.
+ */
+ virtual double GetMinY() { return m_min_y; }
+
+ /** Get inclusive top border of bounding box.
+ */
+ virtual double GetMaxY() { return m_max_y; }
+
+ virtual void Plot(wxDC & dc, mpWindow & w);
+
+ /** Set label axis alignment.
+ * @param align alignment (choose between mpALIGN_NE, mpALIGN_NW, mpALIGN_SW, mpALIGN_SE
+ */
+ void SetAlign(int align) { m_flags = align; };
+
+protected:
+ int m_flags; //!< Holds label alignment
+
+ /** The internal copy of the Bitmap:
+ */
+ wxImage m_bitmap;
+ wxBitmap m_scaledBitmap;
+ wxCoord m_scaledBitmap_offset_x,m_scaledBitmap_offset_y;
+
+
+ bool m_validImg;
+
+
+ /** The shape of the bitmap:
+ */
+ double m_min_x,m_max_x,m_min_y,m_max_y;
+
+
+};
+
+
+
+/*@}*/
+
+#endif // _MP_MATHPLOT_H_