summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.codelite/.tern-port2
-rw-r--r--.codelite/.tern-project2
-rw-r--r--.codelite/PSP.session35
-rw-r--r--.codelite/PSP.tagsbin80454656 -> 80476160 bytes
-rw-r--r--.codelite/compilation.dbbin24576 -> 24576 bytes
-rw-r--r--.codelite/compile_commands.json8
-rw-r--r--.codelite/refactoring.dbbin465920 -> 504832 bytes
-rw-r--r--Project/Element.h8
-rw-r--r--Project/Line.cpp130
-rw-r--r--Project/Line.h2
-rw-r--r--Project/MainFrame.cpp40
-rw-r--r--Project/MainFrame.wxcp1146
-rw-r--r--Project/MainFrameBase.cpp141
-rw-r--r--Project/MainFrameBase.h67
-rw-r--r--Project/Project.mk7
-rw-r--r--Project/Release/Bus.cpp.obin25034 -> 26831 bytes
-rw-r--r--Project/Release/Element.cpp.obin11710 -> 13507 bytes
-rw-r--r--Project/Release/Element.cpp.o.d155
-rw-r--r--Project/Release/Line.cpp.obin35021 -> 37471 bytes
-rw-r--r--Project/Release/MainFrame.cpp.obin117620 -> 117620 bytes
-rw-r--r--Project/Release/MainFrameBase.cpp.obin236429 -> 236215 bytes
-rw-r--r--Project/Release/PSP-UFU.exebin3281466 -> 3286235 bytes
-rw-r--r--Project/Release/Workspace.cpp.obin110488 -> 113659 bytes
-rw-r--r--Project/Release/main.cpp.obin29146 -> 29146 bytes
-rw-r--r--Project/Workspace.cpp109
-rw-r--r--Project/Workspace.h1
26 files changed, 987 insertions, 866 deletions
diff --git a/.codelite/.tern-port b/.codelite/.tern-port
index 08eb751..11a2942 100644
--- a/.codelite/.tern-port
+++ b/.codelite/.tern-port
@@ -1 +1 @@
-62299 \ No newline at end of file
+61371 \ No newline at end of file
diff --git a/.codelite/.tern-project b/.codelite/.tern-project
index 09b6465..d5969c6 100644
--- a/.codelite/.tern-project
+++ b/.codelite/.tern-project
@@ -8,6 +8,8 @@
"node_resolve": {
},
"node": {
+ },
+ "complete_strings": {
}
}
} \ No newline at end of file
diff --git a/.codelite/PSP.session b/.codelite/PSP.session
index 9f7b334..4f7cc59 100644
--- a/.codelite/PSP.session
+++ b/.codelite/PSP.session
@@ -5,15 +5,15 @@
<TabInfoArray Name="TabInfoArray">
<TabInfo>
<wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\Workspace.cpp" Name="FileName"/>
- <int Value="532" Name="FirstVisibleLine"/>
- <int Value="530" Name="CurrentLine"/>
+ <int Value="364" Name="FirstVisibleLine"/>
+ <int Value="400" Name="CurrentLine"/>
<wxArrayString Name="Bookmarks"/>
<IntVector Name="CollapsedFolds"/>
</TabInfo>
<TabInfo>
<wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\Workspace.h" Name="FileName"/>
- <int Value="66" Name="FirstVisibleLine"/>
- <int Value="88" Name="CurrentLine"/>
+ <int Value="24" Name="FirstVisibleLine"/>
+ <int Value="21" Name="CurrentLine"/>
<wxArrayString Name="Bookmarks"/>
<IntVector Name="CollapsedFolds"/>
</TabInfo>
@@ -33,36 +33,43 @@
</TabInfo>
<TabInfo>
<wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\Element.cpp" Name="FileName"/>
- <int Value="85" Name="FirstVisibleLine"/>
- <int Value="105" Name="CurrentLine"/>
+ <int Value="55" Name="FirstVisibleLine"/>
+ <int Value="76" Name="CurrentLine"/>
<wxArrayString Name="Bookmarks"/>
<IntVector Name="CollapsedFolds"/>
</TabInfo>
<TabInfo>
<wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\Element.h" Name="FileName"/>
- <int Value="55" Name="FirstVisibleLine"/>
- <int Value="74" Name="CurrentLine"/>
+ <int Value="56" Name="FirstVisibleLine"/>
+ <int Value="68" Name="CurrentLine"/>
<wxArrayString Name="Bookmarks"/>
<IntVector Name="CollapsedFolds"/>
</TabInfo>
<TabInfo>
<wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\Line.h" Name="FileName"/>
- <int Value="11" Name="FirstVisibleLine"/>
- <int Value="31" Name="CurrentLine"/>
+ <int Value="3" Name="FirstVisibleLine"/>
+ <int Value="18" Name="CurrentLine"/>
<wxArrayString Name="Bookmarks"/>
<IntVector Name="CollapsedFolds"/>
</TabInfo>
<TabInfo>
<wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\Line.cpp" Name="FileName"/>
- <int Value="242" Name="FirstVisibleLine"/>
- <int Value="264" Name="CurrentLine"/>
+ <int Value="154" Name="FirstVisibleLine"/>
+ <int Value="172" Name="CurrentLine"/>
<wxArrayString Name="Bookmarks"/>
<IntVector Name="CollapsedFolds"/>
</TabInfo>
<TabInfo>
<wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\MainFrame.cpp" Name="FileName"/>
- <int Value="141" Name="FirstVisibleLine"/>
- <int Value="177" Name="CurrentLine"/>
+ <int Value="170" Name="FirstVisibleLine"/>
+ <int Value="0" Name="CurrentLine"/>
+ <wxArrayString Name="Bookmarks"/>
+ <IntVector Name="CollapsedFolds"/>
+ </TabInfo>
+ <TabInfo>
+ <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\MainFrame.h" Name="FileName"/>
+ <int Value="0" Name="FirstVisibleLine"/>
+ <int Value="0" Name="CurrentLine"/>
<wxArrayString Name="Bookmarks"/>
<IntVector Name="CollapsedFolds"/>
</TabInfo>
diff --git a/.codelite/PSP.tags b/.codelite/PSP.tags
index 933f32f..d2567a1 100644
--- a/.codelite/PSP.tags
+++ b/.codelite/PSP.tags
Binary files differ
diff --git a/.codelite/compilation.db b/.codelite/compilation.db
index 1a9ef43..f81d5fe 100644
--- a/.codelite/compilation.db
+++ b/.codelite/compilation.db
Binary files differ
diff --git a/.codelite/compile_commands.json b/.codelite/compile_commands.json
index 6269964..c182189 100644
--- a/.codelite/compile_commands.json
+++ b/.codelite/compile_commands.json
@@ -1,9 +1,17 @@
[{
"directory": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project",
+ "command": "C:/TDM-GCC-64/bin/g++.exe -O2 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/wxWidgets-3.1.0/lib/gcc_dll/mswu -IC:/wxWidgets-3.1.0/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -std=c++11 -DNDEBUG -DUNICODE -I. -I. -MG -MP -MT./Release/Workspace.cpp.o -MF./Release/Workspace.cpp.o.d -MM Workspace.cpp",
+ "file": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project\\Workspace.cpp"
+ }, {
+ "directory": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project",
"command": "C:/TDM-GCC-64/bin/g++.exe -O2 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/wxWidgets-3.1.0/lib/gcc_dll/mswu -IC:/wxWidgets-3.1.0/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -std=c++11 -DNDEBUG -DUNICODE -I. -I. -MG -MP -MT./Release/Line.cpp.o -MF./Release/Line.cpp.o.d -MM Line.cpp",
"file": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project\\Line.cpp"
}, {
"directory": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project",
"command": "C:/TDM-GCC-64/bin/g++.exe -c C:/Users/Thales/Documents/GitHub/PSP/Project/Line.cpp -O2 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/wxWidgets-3.1.0/lib/gcc_dll/mswu -IC:/wxWidgets-3.1.0/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -std=c++11 -DNDEBUG -DUNICODE -o ./Release/Line.cpp.o -I. -I.",
"file": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project\\Line.cpp"
+ }, {
+ "directory": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project",
+ "command": "C:/TDM-GCC-64/bin/g++.exe -c C:/Users/Thales/Documents/GitHub/PSP/Project/Workspace.cpp -O2 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/wxWidgets-3.1.0/lib/gcc_dll/mswu -IC:/wxWidgets-3.1.0/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -std=c++11 -DNDEBUG -DUNICODE -o ./Release/Workspace.cpp.o -I. -I.",
+ "file": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project\\Workspace.cpp"
}] \ No newline at end of file
diff --git a/.codelite/refactoring.db b/.codelite/refactoring.db
index a9cc56b..8102fd9 100644
--- a/.codelite/refactoring.db
+++ b/.codelite/refactoring.db
Binary files differ
diff --git a/Project/Element.h b/Project/Element.h
index eb89640..0b2d4be 100644
--- a/Project/Element.h
+++ b/Project/Element.h
@@ -24,8 +24,8 @@ enum ContextMenuID
ID_LINE_ADD_NODE,
ID_LINE_REMOVE_NODE,
-
- ID_ROTATE
+
+ ID_ROTATE
};
class Element
@@ -68,11 +68,14 @@ class Element
virtual void StartMove(wxPoint2DDouble position);
virtual void Move(wxPoint2DDouble position);
virtual void MoveNode(Element* parent, wxPoint2DDouble position){};
+ virtual bool NodeContains(wxPoint2DDouble position) { return false; };
+ virtual bool SetNodeParent(Element* parent) { return false; };
virtual void RotateNode(Element* parent) {}
virtual wxPoint2DDouble GetSwitchPoint(Element* parent,
wxPoint2DDouble parentPoint,
wxPoint2DDouble secondPoint) const;
virtual void ResetPickboxes() { m_activePickboxID = ID_PB_NONE; }
+ virtual void ResetNodes() { m_activeNodeID= 0; }
virtual wxPoint2DDouble WorldToScreen(wxPoint2DDouble translation,
double scale,
double offsetX = 0.0,
@@ -108,6 +111,7 @@ class Element
bool m_showPickbox = false;
int m_activePickboxID = ID_PB_NONE;
+ int m_activeNodeID = 0;
wxPoint2DDouble m_moveStartPt;
wxPoint2DDouble m_movePos;
diff --git a/Project/Line.cpp b/Project/Line.cpp
index 6710fbe..7f4605f 100644
--- a/Project/Line.cpp
+++ b/Project/Line.cpp
@@ -163,20 +163,35 @@ void Line::StartMove(wxPoint2DDouble position)
void Line::MoveNode(Element* parent, wxPoint2DDouble position)
{
- // First bus.
- if(parent == m_parentList[0]) {
- m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
+ if(parent) {
+ //wxMessageBox("OK");
+ // First bus.
+ if(parent == m_parentList[0]) {
+ m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
+ }
+ // Second bus.
+ else if(parent == m_parentList[1])
+ {
+ m_pointList[m_pointList.size() - 1] = m_movePts[m_pointList.size() - 1] + position - m_moveStartPt;
+ }
+
+ // If the line is selected, move all the points, except the switches and buses points.
+ if(m_selected) {
+ for(int i = 2; i < (int)m_pointList.size() - 2; i++) {
+ m_pointList[i] = m_movePts[i] + position - m_moveStartPt;
+ }
+ }
}
- // Second bus.
- else if(parent == m_parentList[1])
+ else
{
- m_pointList[m_pointList.size() - 1] = m_movePts[m_pointList.size() - 1] + position - m_moveStartPt;
- }
-
- // If the line is selected, move all the points, except the switches and buses points.
- if(m_selected) {
- for(int i = 2; i < (int)m_pointList.size() - 2; i++) {
- m_pointList[i] = m_movePts[i] + position - m_moveStartPt;
+ if(m_activeNodeID == 1) {
+ m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
+ m_parentList[0] = NULL;
+ }
+ else if(m_activeNodeID == 2)
+ {
+ m_pointList[m_pointList.size() - 1] = m_movePts[m_pointList.size() - 1] + position - m_moveStartPt;
+ m_parentList[1] = NULL;
}
}
@@ -186,9 +201,21 @@ void Line::MoveNode(Element* parent, wxPoint2DDouble position)
void Line::UpdateSwitchesPosition()
{
- m_pointList[1] = GetSwitchPoint(m_parentList[0], m_pointList[0], m_pointList[2]);
- m_pointList[m_pointList.size() - 2] =
- GetSwitchPoint(m_parentList[1], m_pointList[m_pointList.size() - 1], m_pointList[m_pointList.size() - 3]);
+ if(m_parentList[0]) {
+ m_pointList[1] = GetSwitchPoint(m_parentList[0], m_pointList[0], m_pointList[2]);
+ }
+ else
+ {
+ m_pointList[1] = m_pointList[0];
+ }
+ if(m_parentList[1]) {
+ m_pointList[m_pointList.size() - 2] = GetSwitchPoint(m_parentList[1], m_pointList[m_pointList.size() - 1],
+ m_pointList[m_pointList.size() - 3]);
+ }
+ else
+ {
+ m_pointList[m_pointList.size() - 2] = m_pointList[m_pointList.size() - 1];
+ }
}
double Line::PointToLineDistance(wxPoint2DDouble point, int* segmentNumber) const
@@ -254,6 +281,7 @@ void Line::RemoveNode(wxPoint2DDouble point)
}
}
}
+ UpdateSwitchesPosition();
}
void Line::AddNode(wxPoint2DDouble point)
@@ -263,4 +291,76 @@ void Line::AddNode(wxPoint2DDouble point)
if(segmentNumber > 0 && segmentNumber < (int)m_pointList.size() - 2) {
m_pointList.insert(m_pointList.begin() + segmentNumber + 1, point);
}
+ UpdateSwitchesPosition();
+}
+
+bool Line::NodeContains(wxPoint2DDouble position)
+{
+ wxRect2DDouble nodeRect1(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize,
+ 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
+ wxRect2DDouble nodeRect2(m_pointList[m_pointList.size() - 1].m_x - 5.0 - m_borderSize,
+ m_pointList[m_pointList.size() - 1].m_y - 5.0 - m_borderSize, 10 + 2.0 * m_borderSize,
+ 10 + 2.0 * m_borderSize);
+
+ if(nodeRect1.Contains(position)) {
+ m_activeNodeID = 1;
+ return true;
+ }
+ if(nodeRect2.Contains(position)) {
+ m_activeNodeID = 2;
+ return true;
+ }
+
+ m_activeNodeID = 0;
+ return false;
+}
+
+bool Line::SetNodeParent(Element* parent)
+{
+ if(m_activeNodeID == 1 && parent == m_parentList[0]) return false;
+ if(m_activeNodeID == 2 && parent == m_parentList[1]) return false;
+
+ if(parent && m_activeNodeID != 0) {
+ wxRect2DDouble nodeRect(0, 0, 0, 0);
+ if(m_activeNodeID == 1) {
+ nodeRect =
+ wxRect2DDouble(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize,
+ 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
+ }
+ if(m_activeNodeID == 2) {
+ nodeRect = wxRect2DDouble(m_pointList[m_pointList.size() - 1].m_x - 5.0 - m_borderSize,
+ m_pointList[m_pointList.size() - 1].m_y - 5.0 - m_borderSize,
+ 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
+ }
+
+ if(parent->Intersects(nodeRect)) {
+ if(m_activeNodeID == 1) {
+ // if(m_parentList[1] == parent){
+ // m_activeNodeID = 0;
+ // return false;
+ //}
+
+ m_parentList[0] = parent;
+ UpdateSwitchesPosition();
+ return true;
+ }
+ if(m_activeNodeID == 2) {
+ // if(m_parentList[0] == parent) {
+ // m_activeNodeID = 0;
+ // return false;
+ //}
+
+ m_parentList[1] = parent;
+ UpdateSwitchesPosition();
+ return true;
+ }
+ }
+ else
+ {
+ if(m_activeNodeID == 1) m_parentList[0] = NULL;
+ if(m_activeNodeID == 2) m_parentList[1] = NULL;
+ }
+ }
+ // m_activeNodeID = 0;
+ return false;
}
diff --git a/Project/Line.h b/Project/Line.h
index 9293baa..7374e29 100644
--- a/Project/Line.h
+++ b/Project/Line.h
@@ -15,6 +15,8 @@ class Line : public Element
virtual void Move(wxPoint2DDouble position) {}
virtual void StartMove(wxPoint2DDouble position);
virtual void MoveNode(Element* parent, wxPoint2DDouble position);
+ virtual bool NodeContains(wxPoint2DDouble position);
+ virtual bool SetNodeParent(Element* parent);
virtual wxCursor GetBestPickboxCursor() const;
virtual bool AddParent(Element* parent, wxPoint2DDouble position);
virtual bool Intersects(wxRect2DDouble rect) const;
diff --git a/Project/MainFrame.cpp b/Project/MainFrame.cpp
index 1ba9887..cb64736 100644
--- a/Project/MainFrame.cpp
+++ b/Project/MainFrame.cpp
@@ -39,28 +39,28 @@ void MainFrame::Init()
void MainFrame::EnableCurrentProjectRibbon(bool enable)
{
m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_ADDELEMENT, enable);
- m_ribbonButtonBarStabData->EnableButton(ID_RIBBON_CHARTS, enable);
+ m_ribbonButtonBarReports->EnableButton(ID_RIBBON_CHARTS, enable);
m_ribbonButtonBarCProject->EnableButton(ID_RIBBON_CLOSE, enable);
m_ribbonButtonBarClipboard->EnableButton(ID_RIBBON_COPY, enable);
m_ribbonButtonBarReports->EnableButton(ID_RIBBON_DATAREPORT, enable);
- m_ribbonButtonBarHandling->EnableButton(ID_RIBBON_DELETE, enable);
- m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_DISABLESOL, enable);
- m_ribbonButtonBarHandling->EnableButton(ID_RIBBON_DRAG, enable);
- m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_ENABLESOL, enable);
- m_ribbonButtonBarCalculations->EnableButton(ID_RIBBON_FAULT, enable);
- m_ribbonButtonBarHandling->EnableButton(ID_RIBBON_FIT, enable);
- m_ribbonButtonBarHandling->EnableButton(ID_RIBBON_MOVE, enable);
+ m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_DELETE, enable);
+ m_ribbonButtonBarContinuous->EnableButton(ID_RIBBON_DISABLESOL, enable);
+ m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_DRAG, enable);
+ m_ribbonButtonBarContinuous->EnableButton(ID_RIBBON_ENABLESOL, enable);
+ m_ribbonButtonBarSimulations->EnableButton(ID_RIBBON_FAULT, enable);
+ m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_FIT, enable);
+ m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_MOVE, enable);
m_ribbonButtonBarClipboard->EnableButton(ID_RIBBON_PASTE, enable);
- m_ribbonButtonBarCalculations->EnableButton(ID_RIBBON_POWERFLOW, enable);
+ m_ribbonButtonBarSimulations->EnableButton(ID_RIBBON_POWERFLOW, enable);
m_ribbonButtonBarClipboard->EnableButton(ID_RIBBON_REDO, enable);
- m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_RESETVOLT, enable);
- m_ribbonButtonBarStability->EnableButton(ID_RIBBON_RUNSTAB, enable);
+ m_ribbonButtonBarContinuous->EnableButton(ID_RIBBON_RESETVOLT, enable);
+ m_ribbonButtonBarSimulations->EnableButton(ID_RIBBON_RUNSTAB, enable);
m_ribbonButtonBarCProject->EnableButton(ID_RIBBON_SAVE, enable);
m_ribbonButtonBarCProject->EnableButton(ID_RIBBON_SAVEAS, enable);
- m_ribbonButtonBarCalculations->EnableButton(ID_RIBBON_SCPOWER, enable);
- m_ribbonButtonBarCProject->EnableButton(ID_RIBBON_SETTINGS, enable);
+ m_ribbonButtonBarSimulations->EnableButton(ID_RIBBON_SCPOWER, enable);
+ m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_PROJSETTINGS, enable);
m_ribbonButtonBarReports->EnableButton(ID_RIBBON_SNAPSHOT, enable);
- m_ribbonButtonBarStability->EnableButton(ID_RIBBON_STABSETTINGS, enable);
+ m_ribbonButtonBarSimulations->EnableButton(ID_RIBBON_SIMULSETTINGS, enable);
m_ribbonButtonBarClipboard->EnableButton(ID_RIBBON_UNDO, enable);
}
@@ -111,8 +111,8 @@ void MainFrame::OnNewClick(wxRibbonButtonBarEvent& event)
new Workspace(this, wxString::Format(_("New project %d"), m_projectNumber), this->GetStatusBar());
m_workspaceList.push_back(newWorkspace);
- m_ribbonButtonBarCircuit->ToggleButton(ID_RIBBON_DISABLESOL, true);
- m_ribbonButtonBarCircuit->ToggleButton(ID_RIBBON_ENABLESOL, false);
+ m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, true);
+ m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, false);
m_auiNotebook->AddPage(newWorkspace, newWorkspace->GetName(), true);
newWorkspace->Layout();
@@ -129,15 +129,15 @@ void MainFrame::OnDataReportClick(wxRibbonButtonBarEvent& event) {}
void MainFrame::OnDeleteClick(wxRibbonButtonBarEvent& event) {}
void MainFrame::OnDisableSolutionClick(wxRibbonButtonBarEvent& event)
{
- m_ribbonButtonBarCircuit->ToggleButton(ID_RIBBON_DISABLESOL, true);
- m_ribbonButtonBarCircuit->ToggleButton(ID_RIBBON_ENABLESOL, false);
+ m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, true);
+ m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, false);
}
void MainFrame::OnDragClick(wxRibbonButtonBarEvent& event) {}
void MainFrame::OnEnableSolutionClick(wxRibbonButtonBarEvent& event)
{
- m_ribbonButtonBarCircuit->ToggleButton(ID_RIBBON_ENABLESOL, true);
- m_ribbonButtonBarCircuit->ToggleButton(ID_RIBBON_DISABLESOL, false);
+ m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, true);
+ m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, false);
}
void MainFrame::OnExpImpClick(wxRibbonButtonBarEvent& event) {}
diff --git a/Project/MainFrame.wxcp b/Project/MainFrame.wxcp
index 1b863dd..d905715 100644
--- a/Project/MainFrame.wxcp
+++ b/Project/MainFrame.wxcp
@@ -1,7 +1,7 @@
{
"metadata": {
"m_generatedFilesDir": ".",
- "m_objCounter": 138,
+ "m_objCounter": 146,
"m_includeFiles": [],
"m_bitmapFunction": "wxC9ED9InitBitmapResources",
"m_bitmapsFile": "MainFrameBitmaps.cpp",
@@ -756,6 +756,97 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
+ "m_winid": "ID_RIBBON_GENSETTINGS"
+ }, {
+ "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_ribbonButtonGenSettings"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": "General Settings"
+ }, {
+ "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 Settings"
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": "data/images/ribbon/settings32.png"
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": "Opens a dialog to set the main settings of the program"
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["wxRIBBON_BUTTON_NORMAL", "wxRIBBON_BUTTON_DROPDOWN", "wxRIBBON_BUTTON_HYBRID", "wxRIBBON_BUTTON_TOGGLE"]
+ }],
+ "m_events": [{
+ "m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
+ "m_eventClass": "wxRibbonButtonBarEvent",
+ "m_eventHandler": "wxRibbonButtonBarEventHandler",
+ "m_functionNameAndSignature": "OnStabilitySettingsClick(wxRibbonButtonBarEvent& event)",
+ "m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
+ "m_noBody": false
+ }],
+ "m_children": []
+ }, {
+ "m_type": 4492,
+ "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": "ID_RIBBON_EXIT"
}, {
"type": "string",
@@ -989,97 +1080,6 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_SETTINGS"
- }, {
- "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_ribbonButtonProjSettings"
- }, {
- "type": "multi-string",
- "m_label": "Tooltip:",
- "m_value": "Project Settings"
- }, {
- "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": true
- }, {
- "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": "Project settings"
- }, {
- "type": "bitmapPicker",
- "m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/settings32.png"
- }, {
- "type": "string",
- "m_label": "Help String:",
- "m_value": "Opens a dialog to set the main settings of the current project"
- }, {
- "type": "choice",
- "m_label": "Kind:",
- "m_selection": 0,
- "m_options": ["wxRIBBON_BUTTON_NORMAL", "wxRIBBON_BUTTON_DROPDOWN", "wxRIBBON_BUTTON_HYBRID", "wxRIBBON_BUTTON_TOGGLE"]
- }],
- "m_events": [{
- "m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
- "m_eventClass": "wxRibbonButtonBarEvent",
- "m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnProjectSettingsClick(wxRibbonButtonBarEvent& event)",
- "m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
- "m_noBody": false
- }],
- "m_children": []
- }, {
- "m_type": 4492,
- "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": "ID_RIBBON_SAVE"
}, {
"type": "string",
@@ -1187,7 +1187,7 @@
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Save as"
+ "m_value": "Save As"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -1227,7 +1227,7 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Save as..."
+ "m_value": "Save As..."
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
@@ -2420,7 +2420,7 @@
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Add element"
+ "m_value": "Add Element"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -2460,7 +2460,7 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Add element"
+ "m_value": "Add Element"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
@@ -2485,7 +2485,7 @@
}],
"m_children": []
}, {
- "m_type": 4495,
+ "m_type": 4492,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
@@ -2495,7 +2495,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_ENABLESOL"
+ "m_winid": "ID_RIBBON_DRAG"
}, {
"type": "string",
"m_label": "Size:",
@@ -2507,11 +2507,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonEnableSol"
+ "m_value": "m_ribbonButtonDrag"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Enable solution"
+ "m_value": "Drag"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -2551,32 +2551,32 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Enable solution"
+ "m_value": "Drag"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/playStopped32.png"
+ "m_path": "data/images/ribbon/drag32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Enables the power flow and fault (if exists) calculations after any circuit change"
+ "m_value": "Drag all the elements"
}, {
"type": "choice",
"m_label": "Kind:",
- "m_selection": 3,
+ "m_selection": 0,
"m_options": ["wxRIBBON_BUTTON_NORMAL", "wxRIBBON_BUTTON_DROPDOWN", "wxRIBBON_BUTTON_HYBRID", "wxRIBBON_BUTTON_TOGGLE"]
}],
"m_events": [{
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnEnableSolutionClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnDragClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
"m_children": []
}, {
- "m_type": 4495,
+ "m_type": 4492,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
@@ -2586,7 +2586,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_DISABLESOL"
+ "m_winid": "ID_RIBBON_MOVE"
}, {
"type": "string",
"m_label": "Size:",
@@ -2598,11 +2598,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonDisableSol"
+ "m_value": "m_ribbonButtoMove"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Disable solution"
+ "m_value": "Move"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -2642,26 +2642,26 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Disable solution"
+ "m_value": "Move"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/pauseStopped32.png"
+ "m_path": "data/images/ribbon/move32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Disables the power flow and fault calculations after any circuit changes"
+ "m_value": "Move the selected elements"
}, {
"type": "choice",
"m_label": "Kind:",
- "m_selection": 3,
+ "m_selection": 0,
"m_options": ["wxRIBBON_BUTTON_NORMAL", "wxRIBBON_BUTTON_DROPDOWN", "wxRIBBON_BUTTON_HYBRID", "wxRIBBON_BUTTON_TOGGLE"]
}],
"m_events": [{
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnDisableSolutionClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnMoveClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
@@ -2677,7 +2677,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_RESETVOLT"
+ "m_winid": "ID_RIBBON_DELETE"
}, {
"type": "string",
"m_label": "Size:",
@@ -2689,11 +2689,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonResetVoltages"
+ "m_value": "m_ribbonButtonDelete"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Reset voltages"
+ "m_value": ""
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -2733,15 +2733,15 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Reset voltages"
+ "m_value": "Delete"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/reset32.png"
+ "m_path": "data/images/ribbon/delete32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Reset all voltages to initial state"
+ "m_value": "Removes all selected elements"
}, {
"type": "choice",
"m_label": "Kind:",
@@ -2752,11 +2752,186 @@
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnResetVoltagesClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnDeleteClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
"m_children": []
+ }, {
+ "m_type": 4492,
+ "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": "ID_RIBBON_FIT"
+ }, {
+ "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_ribbonButtonFit"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": "Fit"
+ }, {
+ "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": "Fit"
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": "data/images/ribbon/fit32.png"
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": "Applies the drag and zoom tools to show all elements in workspace"
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["wxRIBBON_BUTTON_NORMAL", "wxRIBBON_BUTTON_DROPDOWN", "wxRIBBON_BUTTON_HYBRID", "wxRIBBON_BUTTON_TOGGLE"]
+ }],
+ "m_events": [{
+ "m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
+ "m_eventClass": "wxRibbonButtonBarEvent",
+ "m_eventHandler": "wxRibbonButtonBarEventHandler",
+ "m_functionNameAndSignature": "OnFitClick(wxRibbonButtonBarEvent& event)",
+ "m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
+ "m_noBody": false
+ }],
+ "m_children": []
+ }, {
+ "m_type": 4492,
+ "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": "ID_RIBBON_PROJSETTINGS"
+ }, {
+ "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_ribbonButtonProjSettings"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": "Project Settings"
+ }, {
+ "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": "Project Settings"
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": "data/images/ribbon/settings32.png"
+ }, {
+ "type": "string",
+ "m_label": "Help String:",
+ "m_value": "Opens a dialog to set the main settings of the current project"
+ }, {
+ "type": "choice",
+ "m_label": "Kind:",
+ "m_selection": 0,
+ "m_options": ["wxRIBBON_BUTTON_NORMAL", "wxRIBBON_BUTTON_DROPDOWN", "wxRIBBON_BUTTON_HYBRID", "wxRIBBON_BUTTON_TOGGLE"]
+ }],
+ "m_events": [],
+ "m_children": []
}]
}]
}, {
@@ -2782,11 +2957,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonPanelHandling"
+ "m_value": "m_ribbonPanelReports"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Handling"
+ "m_value": "Reports"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -2826,7 +3001,7 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Handling"
+ "m_value": "Reports"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
@@ -2856,11 +3031,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonBarHandling"
+ "m_value": "m_ribbonButtonBarReports"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Handling"
+ "m_value": ""
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -2910,98 +3085,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_DRAG"
- }, {
- "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_ribbonButtonDrag"
- }, {
- "type": "multi-string",
- "m_label": "Tooltip:",
- "m_value": "Drag"
- }, {
- "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": "Drag"
- }, {
- "type": "bitmapPicker",
- "m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/drag32.png"
- }, {
- "type": "string",
- "m_label": "Help String:",
- "m_value": "Drag all the elements"
- }, {
- "type": "choice",
- "m_label": "Kind:",
- "m_selection": 0,
- "m_options": ["wxRIBBON_BUTTON_NORMAL", "wxRIBBON_BUTTON_DROPDOWN", "wxRIBBON_BUTTON_HYBRID", "wxRIBBON_BUTTON_TOGGLE"]
- }],
- "m_events": [{
- "m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
- "m_eventClass": "wxRibbonButtonBarEvent",
- "m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnDragClick(wxRibbonButtonBarEvent& event)",
- "m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
- "m_noBody": false
- }],
- "m_children": []
- }, {
- "m_type": 4492,
- "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": "ID_RIBBON_MOVE"
+ "m_winid": "ID_RIBBON_DATAREPORT"
}, {
"type": "string",
"m_label": "Size:",
@@ -3013,11 +3097,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtoMove"
+ "m_value": "m_ribbonButtonDataReport"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Move"
+ "m_value": "Data Report"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -3057,15 +3141,15 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Move"
+ "m_value": "Data Report"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/move32.png"
+ "m_path": "data/images/ribbon/dataReport32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Move the selected elements"
+ "m_value": "Opens a data report"
}, {
"type": "choice",
"m_label": "Kind:",
@@ -3076,7 +3160,7 @@
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnMoveClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnDataReportClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
@@ -3092,7 +3176,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_FIT"
+ "m_winid": "ID_RIBBON_CHARTS"
}, {
"type": "string",
"m_label": "Size:",
@@ -3104,11 +3188,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonFit"
+ "m_value": "m_ribbonButtonCharts"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Fit"
+ "m_value": "Charts"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -3148,15 +3232,15 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Fit"
+ "m_value": "Charts"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/fit32.png"
+ "m_path": "data/images/ribbon/chart32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Applies the drag and zoom tools to show all elements in workspace"
+ "m_value": "Open the charts"
}, {
"type": "choice",
"m_label": "Kind:",
@@ -3167,7 +3251,7 @@
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnFitClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnChartsClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
@@ -3183,7 +3267,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_DELETE"
+ "m_winid": "ID_RIBBON_SNAPSHOT"
}, {
"type": "string",
"m_label": "Size:",
@@ -3195,11 +3279,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonDelete"
+ "m_value": "m_ribbonButtonSnapshot"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": ""
+ "m_value": "Snapshot"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -3239,15 +3323,15 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Delete"
+ "m_value": "Snapshot"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/delete32.png"
+ "m_path": "data/images/ribbon/snap32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Removes all selected elements"
+ "m_value": "Capture a snapshot of the circuit"
}, {
"type": "choice",
"m_label": "Kind:",
@@ -3258,20 +3342,99 @@
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnDeleteClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnSnapshotClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
"m_children": []
}]
}]
+ }]
+ }, {
+ "m_type": 4489,
+ "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_ribbonPageSimulation"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": "Simulation"
+ }, {
+ "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": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Simulation"
}, {
+ "type": "bool",
+ "m_label": "Selected",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": [{
"m_type": 4490,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
- "m_styles": ["wxRIBBON_PANEL_NO_AUTO_MINIMISE", "wxRIBBON_PANEL_DEFAULT_STYLE"],
+ "m_styles": ["wxRIBBON_PANEL_DEFAULT_STYLE"],
"m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"],
"m_properties": [{
"type": "winid",
@@ -3288,11 +3451,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonPanelCalculations"
+ "m_value": "m_ribbonPanelContinuous"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Calculations"
+ "m_value": "Continuous"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -3332,7 +3495,7 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Calculations"
+ "m_value": "Continuous"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
@@ -3362,11 +3525,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonBarCalculations"
+ "m_value": "m_ribbonButtonBarContinuous"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Calculations"
+ "m_value": ""
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -3406,7 +3569,7 @@
}],
"m_events": [],
"m_children": [{
- "m_type": 4492,
+ "m_type": 4495,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
@@ -3416,7 +3579,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_POWERFLOW"
+ "m_winid": "ID_RIBBON_ENABLESOL"
}, {
"type": "string",
"m_label": "Size:",
@@ -3428,11 +3591,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonPowerFlow"
+ "m_value": "m_ribbonButtonEnableSol"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Power flow"
+ "m_value": "Enable Solution"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -3472,32 +3635,32 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Power flow"
+ "m_value": "Enable Solution"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/powerFLow32.png"
+ "m_path": "data/images/ribbon/playStopped32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Calculate the circuit power flow"
+ "m_value": "Enables the power flow and fault (if exists) calculations after any circuit change"
}, {
"type": "choice",
"m_label": "Kind:",
- "m_selection": 0,
+ "m_selection": 3,
"m_options": ["wxRIBBON_BUTTON_NORMAL", "wxRIBBON_BUTTON_DROPDOWN", "wxRIBBON_BUTTON_HYBRID", "wxRIBBON_BUTTON_TOGGLE"]
}],
"m_events": [{
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnPowerFlowClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnEnableSolutionClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
"m_children": []
}, {
- "m_type": 4492,
+ "m_type": 4495,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
@@ -3507,7 +3670,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_FAULT"
+ "m_winid": "ID_RIBBON_DISABLESOL"
}, {
"type": "string",
"m_label": "Size:",
@@ -3519,11 +3682,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonFault"
+ "m_value": "m_ribbonButtonDisableSol"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Fault"
+ "m_value": "Disable Solution"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -3563,26 +3726,26 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Fault"
+ "m_value": "Disable Solution"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/fault32.png"
+ "m_path": "data/images/ribbon/pauseStopped32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Calculate the circuit fault (if exists)"
+ "m_value": "Disables the power flow and fault calculations after any circuit changes"
}, {
"type": "choice",
"m_label": "Kind:",
- "m_selection": 0,
+ "m_selection": 3,
"m_options": ["wxRIBBON_BUTTON_NORMAL", "wxRIBBON_BUTTON_DROPDOWN", "wxRIBBON_BUTTON_HYBRID", "wxRIBBON_BUTTON_TOGGLE"]
}],
"m_events": [{
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnFaultClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnDisableSolutionClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
@@ -3598,7 +3761,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_SCPOWER"
+ "m_winid": "ID_RIBBON_RESETVOLT"
}, {
"type": "string",
"m_label": "Size:",
@@ -3610,11 +3773,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonSCPower"
+ "m_value": "m_ribbonButtonResetVoltages"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Short-circuit power"
+ "m_value": "Reset Voltages"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -3654,15 +3817,15 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Short-circuit power"
+ "m_value": "Reset Voltages"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/faultPower32.png"
+ "m_path": "data/images/ribbon/reset32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Calculate the short-circuit power in all buses"
+ "m_value": "Reset all voltages to initial state"
}, {
"type": "choice",
"m_label": "Kind:",
@@ -3673,7 +3836,7 @@
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnSCPowerClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnResetVoltagesClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
@@ -3703,11 +3866,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonPanelReports"
+ "m_value": "m_ribbonPanelSimulations"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Reports"
+ "m_value": "Simulations"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -3747,7 +3910,7 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Reports"
+ "m_value": "Simulations"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
@@ -3777,11 +3940,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonBarReports"
+ "m_value": "m_ribbonButtonBarSimulations"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": ""
+ "m_value": "Simulations"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -3831,7 +3994,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_DATAREPORT"
+ "m_winid": "ID_RIBBON_POWERFLOW"
}, {
"type": "string",
"m_label": "Size:",
@@ -3843,11 +4006,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonDataReport"
+ "m_value": "m_ribbonButtonPowerFlow"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Data report"
+ "m_value": "Power flow"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -3887,15 +4050,15 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Data report"
+ "m_value": "Power Flow"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/dataReport32.png"
+ "m_path": "data/images/ribbon/powerFLow32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Opens a data report"
+ "m_value": "Calculate the circuit power flow"
}, {
"type": "choice",
"m_label": "Kind:",
@@ -3906,7 +4069,7 @@
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnDataReportClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnPowerFlowClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
@@ -3922,7 +4085,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_SNAPSHOT"
+ "m_winid": "ID_RIBBON_RUNSTAB"
}, {
"type": "string",
"m_label": "Size:",
@@ -3934,11 +4097,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonSnapshot"
+ "m_value": "m_ribbonButtonStabRun"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Snapshot"
+ "m_value": "Run stability"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -3978,15 +4141,15 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Snapshot"
+ "m_value": "Run Stability"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/snap32.png"
+ "m_path": "data/images/ribbon/playStopped32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Capture a snapshot of the circuit"
+ "m_value": "Run the stability calculations"
}, {
"type": "choice",
"m_label": "Kind:",
@@ -3997,233 +4160,12 @@
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnSnapshotClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnRunStabilityClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
"m_children": []
- }]
- }]
- }]
- }, {
- "m_type": 4489,
- "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_ribbonPageStability"
- }, {
- "type": "multi-string",
- "m_label": "Tooltip:",
- "m_value": "Stability"
- }, {
- "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": "bitmapPicker",
- "m_label": "Bitmap File:",
- "m_path": ""
- }, {
- "type": "string",
- "m_label": "Label:",
- "m_value": "Stability"
- }, {
- "type": "bool",
- "m_label": "Selected",
- "m_value": false
- }],
- "m_events": [],
- "m_children": [{
- "m_type": 4490,
- "proportion": 0,
- "border": 5,
- "gbSpan": "1,1",
- "gbPosition": "0,0",
- "m_styles": ["wxRIBBON_PANEL_NO_AUTO_MINIMISE", "wxRIBBON_PANEL_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_ribbonPanelStability"
- }, {
- "type": "multi-string",
- "m_label": "Tooltip:",
- "m_value": "Stability"
- }, {
- "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": "Stability"
- }, {
- "type": "bitmapPicker",
- "m_label": "Bitmap File:",
- "m_path": ""
- }],
- "m_events": [],
- "m_children": [{
- "m_type": 4491,
- "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_ribbonButtonBarStability"
- }, {
- "type": "multi-string",
- "m_label": "Tooltip:",
- "m_value": "Stability"
- }, {
- "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": 4492,
"proportion": 0,
"border": 5,
@@ -4234,7 +4176,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_STABSETTINGS"
+ "m_winid": "ID_RIBBON_FAULT"
}, {
"type": "string",
"m_label": "Size:",
@@ -4246,11 +4188,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonStabSettings"
+ "m_value": "m_ribbonButtonFault"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Stability settings"
+ "m_value": "Fault"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -4290,15 +4232,15 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Settings"
+ "m_value": "Fault"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/settings32.png"
+ "m_path": "data/images/ribbon/fault32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Opens the stability settings"
+ "m_value": "Calculate the circuit fault (if exists)"
}, {
"type": "choice",
"m_label": "Kind:",
@@ -4309,7 +4251,7 @@
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnStabilitySettingsClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnFaultClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
@@ -4325,7 +4267,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_RUNSTAB"
+ "m_winid": "ID_RIBBON_SCPOWER"
}, {
"type": "string",
"m_label": "Size:",
@@ -4337,11 +4279,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonStabRun"
+ "m_value": "m_ribbonButtonSCPower"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Run stability"
+ "m_value": "Short-circuit power"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -4381,15 +4323,15 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Run"
+ "m_value": "Short-Circuit Power"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/playStopped32.png"
+ "m_path": "data/images/ribbon/faultPower32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Run the stability calculations"
+ "m_value": "Calculate the short-circuit power in all buses"
}, {
"type": "choice",
"m_label": "Kind:",
@@ -4400,154 +4342,12 @@
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnRunStabilityClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnSCPowerClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
"m_children": []
- }]
- }]
- }, {
- "m_type": 4490,
- "proportion": 0,
- "border": 5,
- "gbSpan": "1,1",
- "gbPosition": "0,0",
- "m_styles": ["wxRIBBON_PANEL_NO_AUTO_MINIMISE", "wxRIBBON_PANEL_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_ribbonPanelData"
- }, {
- "type": "multi-string",
- "m_label": "Tooltip:",
- "m_value": "Data"
- }, {
- "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": "Data"
- }, {
- "type": "bitmapPicker",
- "m_label": "Bitmap File:",
- "m_path": ""
- }],
- "m_events": [],
- "m_children": [{
- "m_type": 4491,
- "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_ribbonButtonBarStabData"
- }, {
- "type": "multi-string",
- "m_label": "Tooltip:",
- "m_value": "Stability data"
- }, {
- "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": 4492,
"proportion": 0,
"border": 5,
@@ -4558,7 +4358,7 @@
"m_properties": [{
"type": "winid",
"m_label": "ID:",
- "m_winid": "ID_RIBBON_CHARTS"
+ "m_winid": "ID_RIBBON_SIMULSETTINGS"
}, {
"type": "string",
"m_label": "Size:",
@@ -4570,11 +4370,11 @@
}, {
"type": "string",
"m_label": "Name:",
- "m_value": "m_ribbonButtonCharts"
+ "m_value": "m_ribbonButtonSimulSettings"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
- "m_value": "Charts"
+ "m_value": "Simulation Settings"
}, {
"type": "colour",
"m_label": "Bg Colour:",
@@ -4594,7 +4394,7 @@
}, {
"type": "bool",
"m_label": "Disabled",
- "m_value": false
+ "m_value": true
}, {
"type": "bool",
"m_label": "Focused",
@@ -4614,15 +4414,15 @@
}, {
"type": "string",
"m_label": "Label:",
- "m_value": "Charts"
+ "m_value": "Simulation Settings"
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
- "m_path": "data/images/ribbon/chart32.png"
+ "m_path": "data/images/ribbon/settings32.png"
}, {
"type": "string",
"m_label": "Help String:",
- "m_value": "Open the charts"
+ "m_value": "Opens a dialog to set the settings of the simulations"
}, {
"type": "choice",
"m_label": "Kind:",
@@ -4633,7 +4433,7 @@
"m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED",
"m_eventClass": "wxRibbonButtonBarEvent",
"m_eventHandler": "wxRibbonButtonBarEventHandler",
- "m_functionNameAndSignature": "OnChartsClick(wxRibbonButtonBarEvent& event)",
+ "m_functionNameAndSignature": "OnProjectSettingsClick(wxRibbonButtonBarEvent& event)",
"m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.",
"m_noBody": false
}],
diff --git a/Project/MainFrameBase.cpp b/Project/MainFrameBase.cpp
index 3778e7e..4662d5a 100644
--- a/Project/MainFrameBase.cpp
+++ b/Project/MainFrameBase.cpp
@@ -85,6 +85,8 @@ MainFrameBase::MainFrameBase(wxWindow* parent, wxWindowID id, const wxString& ti
m_ribbonButtonBarProjects->AddButton(ID_RIBBON_EXPIMP, _("Export Import"), wxXmlResource::Get()->LoadBitmap(wxT("impExp32")), _("Export or import projects"), wxRIBBON_BUTTON_NORMAL);
+ m_ribbonButtonBarProjects->AddButton(ID_RIBBON_GENSETTINGS, _("General Settings"), wxXmlResource::Get()->LoadBitmap(wxT("settings32")), _("Opens a dialog to set the main settings of the program"), wxRIBBON_BUTTON_NORMAL);
+
m_ribbonButtonBarProjects->AddButton(ID_RIBBON_EXIT, _("Exit"), wxXmlResource::Get()->LoadBitmap(wxT("exit32")), _("Closes the application"), wxRIBBON_BUTTON_NORMAL);
m_ribbonButtonBarProjects->Realize();
@@ -93,11 +95,9 @@ MainFrameBase::MainFrameBase(wxWindow* parent, wxWindowID id, const wxString& ti
m_ribbonButtonBarCProject = new wxRibbonButtonBar(m_ribbonPanelCProject, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelCProject, wxSize(-1,-1)), 0);
- m_ribbonButtonBarCProject->AddButton(ID_RIBBON_SETTINGS, _("Project settings"), wxXmlResource::Get()->LoadBitmap(wxT("settings32")), _("Opens a dialog to set the main settings of the current project"), wxRIBBON_BUTTON_NORMAL);
-
m_ribbonButtonBarCProject->AddButton(ID_RIBBON_SAVE, _("Save"), wxXmlResource::Get()->LoadBitmap(wxT("save32")), _("Save the current project"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarCProject->AddButton(ID_RIBBON_SAVEAS, _("Save as..."), wxXmlResource::Get()->LoadBitmap(wxT("saveAs32")), _("Save as the current project"), wxRIBBON_BUTTON_NORMAL);
+ m_ribbonButtonBarCProject->AddButton(ID_RIBBON_SAVEAS, _("Save As..."), wxXmlResource::Get()->LoadBitmap(wxT("saveAs32")), _("Save as the current project"), wxRIBBON_BUTTON_NORMAL);
m_ribbonButtonBarCProject->AddButton(ID_RIBBON_CLOSE, _("Close"), wxXmlResource::Get()->LoadBitmap(wxT("close32")), _("Close the current project"), wxRIBBON_BUTTON_NORMAL);
m_ribbonButtonBarCProject->Realize();
@@ -137,75 +137,62 @@ MainFrameBase::MainFrameBase(wxWindow* parent, wxWindowID id, const wxString& ti
m_ribbonButtonBarCircuit = new wxRibbonButtonBar(m_ribbonPanelCircuit, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelCircuit, wxSize(-1,-1)), 0);
m_ribbonButtonBarCircuit->SetToolTip(_("Circuit"));
- m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_ADDELEMENT, _("Add element"), wxXmlResource::Get()->LoadBitmap(wxT("add32")), _("Add a new element in the project"), wxRIBBON_BUTTON_DROPDOWN);
-
- m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_ENABLESOL, _("Enable solution"), wxXmlResource::Get()->LoadBitmap(wxT("playStopped32")), _("Enables the power flow and fault (if exists) calculations after any circuit change"), wxRIBBON_BUTTON_TOGGLE);
+ m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_ADDELEMENT, _("Add Element"), wxXmlResource::Get()->LoadBitmap(wxT("add32")), _("Add a new element in the project"), wxRIBBON_BUTTON_DROPDOWN);
- m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_DISABLESOL, _("Disable solution"), wxXmlResource::Get()->LoadBitmap(wxT("pauseStopped32")), _("Disables the power flow and fault calculations after any circuit changes"), wxRIBBON_BUTTON_TOGGLE);
-
- m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_RESETVOLT, _("Reset voltages"), wxXmlResource::Get()->LoadBitmap(wxT("reset32")), _("Reset all voltages to initial state"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarCircuit->Realize();
+ m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_DRAG, _("Drag"), wxXmlResource::Get()->LoadBitmap(wxT("drag32")), _("Drag all the elements"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonPanelHandling = new wxRibbonPanel(m_ribbonPageTools, wxID_ANY, _("Handling"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageTools, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
- m_ribbonPanelHandling->SetToolTip(_("Handling"));
+ m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_MOVE, _("Move"), wxXmlResource::Get()->LoadBitmap(wxT("move32")), _("Move the selected elements"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarHandling = new wxRibbonButtonBar(m_ribbonPanelHandling, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelHandling, wxSize(-1,-1)), 0);
- m_ribbonButtonBarHandling->SetToolTip(_("Handling"));
+ m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_DELETE, _("Delete"), wxXmlResource::Get()->LoadBitmap(wxT("delete32")), _("Removes all selected elements"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarHandling->AddButton(ID_RIBBON_DRAG, _("Drag"), wxXmlResource::Get()->LoadBitmap(wxT("drag32")), _("Drag all the elements"), wxRIBBON_BUTTON_NORMAL);
+ m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_FIT, _("Fit"), wxXmlResource::Get()->LoadBitmap(wxT("fit32")), _("Applies the drag and zoom tools to show all elements in workspace"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarHandling->AddButton(ID_RIBBON_MOVE, _("Move"), wxXmlResource::Get()->LoadBitmap(wxT("move32")), _("Move the selected elements"), wxRIBBON_BUTTON_NORMAL);
-
- m_ribbonButtonBarHandling->AddButton(ID_RIBBON_FIT, _("Fit"), wxXmlResource::Get()->LoadBitmap(wxT("fit32")), _("Applies the drag and zoom tools to show all elements in workspace"), wxRIBBON_BUTTON_NORMAL);
+ m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_PROJSETTINGS, _("Project Settings"), wxXmlResource::Get()->LoadBitmap(wxT("settings32")), _("Opens a dialog to set the main settings of the current project"), wxRIBBON_BUTTON_NORMAL);
+ m_ribbonButtonBarCircuit->Realize();
- m_ribbonButtonBarHandling->AddButton(ID_RIBBON_DELETE, _("Delete"), wxXmlResource::Get()->LoadBitmap(wxT("delete32")), _("Removes all selected elements"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarHandling->Realize();
+ m_ribbonPanelReports = new wxRibbonPanel(m_ribbonPageTools, wxID_ANY, _("Reports"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageTools, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
+ m_ribbonPanelReports->SetToolTip(_("Reports"));
- m_ribbonPanelCalculations = new wxRibbonPanel(m_ribbonPageTools, wxID_ANY, _("Calculations"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageTools, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
- m_ribbonPanelCalculations->SetToolTip(_("Calculations"));
+ m_ribbonButtonBarReports = new wxRibbonButtonBar(m_ribbonPanelReports, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelReports, wxSize(-1,-1)), 0);
- m_ribbonButtonBarCalculations = new wxRibbonButtonBar(m_ribbonPanelCalculations, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelCalculations, wxSize(-1,-1)), 0);
- m_ribbonButtonBarCalculations->SetToolTip(_("Calculations"));
+ m_ribbonButtonBarReports->AddButton(ID_RIBBON_DATAREPORT, _("Data Report"), wxXmlResource::Get()->LoadBitmap(wxT("dataReport32")), _("Opens a data report"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarCalculations->AddButton(ID_RIBBON_POWERFLOW, _("Power flow"), wxXmlResource::Get()->LoadBitmap(wxT("powerFLow32")), _("Calculate the circuit power flow"), wxRIBBON_BUTTON_NORMAL);
+ m_ribbonButtonBarReports->AddButton(ID_RIBBON_CHARTS, _("Charts"), wxXmlResource::Get()->LoadBitmap(wxT("chart32")), _("Open the charts"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarCalculations->AddButton(ID_RIBBON_FAULT, _("Fault"), wxXmlResource::Get()->LoadBitmap(wxT("fault32")), _("Calculate the circuit fault (if exists)"), wxRIBBON_BUTTON_NORMAL);
+ m_ribbonButtonBarReports->AddButton(ID_RIBBON_SNAPSHOT, _("Snapshot"), wxXmlResource::Get()->LoadBitmap(wxT("snap32")), _("Capture a snapshot of the circuit"), wxRIBBON_BUTTON_NORMAL);
+ m_ribbonButtonBarReports->Realize();
- m_ribbonButtonBarCalculations->AddButton(ID_RIBBON_SCPOWER, _("Short-circuit power"), wxXmlResource::Get()->LoadBitmap(wxT("faultPower32")), _("Calculate the short-circuit power in all buses"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarCalculations->Realize();
+ m_ribbonPageSimulation = new wxRibbonPage(m_ribbonBar, wxID_ANY, _("Simulation"), wxNullBitmap, 0);
+ m_ribbonPageSimulation->SetToolTip(_("Simulation"));
- m_ribbonPanelReports = new wxRibbonPanel(m_ribbonPageTools, wxID_ANY, _("Reports"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageTools, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
- m_ribbonPanelReports->SetToolTip(_("Reports"));
+ m_ribbonPanelContinuous = new wxRibbonPanel(m_ribbonPageSimulation, wxID_ANY, _("Continuous"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageSimulation, wxSize(-1,-1)), wxRIBBON_PANEL_DEFAULT_STYLE);
+ m_ribbonPanelContinuous->SetToolTip(_("Continuous"));
- m_ribbonButtonBarReports = new wxRibbonButtonBar(m_ribbonPanelReports, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelReports, wxSize(-1,-1)), 0);
+ m_ribbonButtonBarContinuous = new wxRibbonButtonBar(m_ribbonPanelContinuous, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelContinuous, wxSize(-1,-1)), 0);
- m_ribbonButtonBarReports->AddButton(ID_RIBBON_DATAREPORT, _("Data report"), wxXmlResource::Get()->LoadBitmap(wxT("dataReport32")), _("Opens a data report"), wxRIBBON_BUTTON_NORMAL);
+ m_ribbonButtonBarContinuous->AddButton(ID_RIBBON_ENABLESOL, _("Enable Solution"), wxXmlResource::Get()->LoadBitmap(wxT("playStopped32")), _("Enables the power flow and fault (if exists) calculations after any circuit change"), wxRIBBON_BUTTON_TOGGLE);
- m_ribbonButtonBarReports->AddButton(ID_RIBBON_SNAPSHOT, _("Snapshot"), wxXmlResource::Get()->LoadBitmap(wxT("snap32")), _("Capture a snapshot of the circuit"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarReports->Realize();
+ m_ribbonButtonBarContinuous->AddButton(ID_RIBBON_DISABLESOL, _("Disable Solution"), wxXmlResource::Get()->LoadBitmap(wxT("pauseStopped32")), _("Disables the power flow and fault calculations after any circuit changes"), wxRIBBON_BUTTON_TOGGLE);
- m_ribbonPageStability = new wxRibbonPage(m_ribbonBar, wxID_ANY, _("Stability"), wxNullBitmap, 0);
- m_ribbonPageStability->SetToolTip(_("Stability"));
+ m_ribbonButtonBarContinuous->AddButton(ID_RIBBON_RESETVOLT, _("Reset Voltages"), wxXmlResource::Get()->LoadBitmap(wxT("reset32")), _("Reset all voltages to initial state"), wxRIBBON_BUTTON_NORMAL);
+ m_ribbonButtonBarContinuous->Realize();
- m_ribbonPanelStability = new wxRibbonPanel(m_ribbonPageStability, wxID_ANY, _("Stability"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageStability, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
- m_ribbonPanelStability->SetToolTip(_("Stability"));
+ m_ribbonPanelSimulations = new wxRibbonPanel(m_ribbonPageSimulation, wxID_ANY, _("Simulations"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageSimulation, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
+ m_ribbonPanelSimulations->SetToolTip(_("Simulations"));
- m_ribbonButtonBarStability = new wxRibbonButtonBar(m_ribbonPanelStability, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelStability, wxSize(-1,-1)), 0);
- m_ribbonButtonBarStability->SetToolTip(_("Stability"));
+ m_ribbonButtonBarSimulations = new wxRibbonButtonBar(m_ribbonPanelSimulations, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelSimulations, wxSize(-1,-1)), 0);
+ m_ribbonButtonBarSimulations->SetToolTip(_("Simulations"));
- m_ribbonButtonBarStability->AddButton(ID_RIBBON_STABSETTINGS, _("Settings"), wxXmlResource::Get()->LoadBitmap(wxT("settings32")), _("Opens the stability settings"), wxRIBBON_BUTTON_NORMAL);
+ m_ribbonButtonBarSimulations->AddButton(ID_RIBBON_POWERFLOW, _("Power Flow"), wxXmlResource::Get()->LoadBitmap(wxT("powerFLow32")), _("Calculate the circuit power flow"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarStability->AddButton(ID_RIBBON_RUNSTAB, _("Run"), wxXmlResource::Get()->LoadBitmap(wxT("playStopped32")), _("Run the stability calculations"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarStability->Realize();
+ m_ribbonButtonBarSimulations->AddButton(ID_RIBBON_RUNSTAB, _("Run Stability"), wxXmlResource::Get()->LoadBitmap(wxT("playStopped32")), _("Run the stability calculations"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonPanelData = new wxRibbonPanel(m_ribbonPageStability, wxID_ANY, _("Data"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageStability, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
- m_ribbonPanelData->SetToolTip(_("Data"));
+ m_ribbonButtonBarSimulations->AddButton(ID_RIBBON_FAULT, _("Fault"), wxXmlResource::Get()->LoadBitmap(wxT("fault32")), _("Calculate the circuit fault (if exists)"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarStabData = new wxRibbonButtonBar(m_ribbonPanelData, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelData, wxSize(-1,-1)), 0);
- m_ribbonButtonBarStabData->SetToolTip(_("Stability data"));
+ m_ribbonButtonBarSimulations->AddButton(ID_RIBBON_SCPOWER, _("Short-Circuit Power"), wxXmlResource::Get()->LoadBitmap(wxT("faultPower32")), _("Calculate the short-circuit power in all buses"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarStabData->AddButton(ID_RIBBON_CHARTS, _("Charts"), wxXmlResource::Get()->LoadBitmap(wxT("chart32")), _("Open the charts"), wxRIBBON_BUTTON_NORMAL);
- m_ribbonButtonBarStabData->Realize();
+ m_ribbonButtonBarSimulations->AddButton(ID_RIBBON_SIMULSETTINGS, _("Simulation Settings"), wxXmlResource::Get()->LoadBitmap(wxT("settings32")), _("Opens a dialog to set the settings of the simulations"), wxRIBBON_BUTTON_NORMAL);
+ m_ribbonButtonBarSimulations->Realize();
m_ribbonBar->Realize();
wxBoxSizer* boxSizer_lvl_2_2 = new wxBoxSizer(wxVERTICAL);
@@ -250,8 +237,8 @@ MainFrameBase::MainFrameBase(wxWindow* parent, wxWindowID id, const wxString& ti
m_ribbonButtonBarProjects->Connect(ID_RIBBON_NEW, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnNewClick), NULL, this);
m_ribbonButtonBarProjects->Connect(ID_RIBBON_OPEN, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnOpenClick), NULL, this);
m_ribbonButtonBarProjects->Connect(ID_RIBBON_EXPIMP, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnExpImpClick), NULL, this);
+ m_ribbonButtonBarProjects->Connect(ID_RIBBON_GENSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnStabilitySettingsClick), NULL, this);
m_ribbonButtonBarProjects->Connect(ID_RIBBON_EXIT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnExitClick), NULL, this);
- m_ribbonButtonBarCProject->Connect(ID_RIBBON_SETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnProjectSettingsClick), NULL, this);
m_ribbonButtonBarCProject->Connect(ID_RIBBON_SAVE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSaveClick), NULL, this);
m_ribbonButtonBarCProject->Connect(ID_RIBBON_SAVEAS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSaveAsClick), NULL, this);
m_ribbonButtonBarCProject->Connect(ID_RIBBON_CLOSE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnCloseClick), NULL, this);
@@ -262,21 +249,21 @@ MainFrameBase::MainFrameBase(wxWindow* parent, wxWindowID id, const wxString& ti
m_ribbonButtonBarClipboard->Connect(ID_RIBBON_UNDO, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnUndoClick), NULL, this);
m_ribbonButtonBarClipboard->Connect(ID_RIBBON_REDO, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRedoClick), NULL, this);
m_ribbonButtonBarCircuit->Connect(ID_RIBBON_ADDELEMENT, wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnAddElementDropdown), NULL, this);
- m_ribbonButtonBarCircuit->Connect(ID_RIBBON_ENABLESOL, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnEnableSolutionClick), NULL, this);
- m_ribbonButtonBarCircuit->Connect(ID_RIBBON_DISABLESOL, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDisableSolutionClick), NULL, this);
- m_ribbonButtonBarCircuit->Connect(ID_RIBBON_RESETVOLT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnResetVoltagesClick), NULL, this);
- m_ribbonButtonBarHandling->Connect(ID_RIBBON_DRAG, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDragClick), NULL, this);
- m_ribbonButtonBarHandling->Connect(ID_RIBBON_MOVE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnMoveClick), NULL, this);
- m_ribbonButtonBarHandling->Connect(ID_RIBBON_FIT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFitClick), NULL, this);
- m_ribbonButtonBarHandling->Connect(ID_RIBBON_DELETE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDeleteClick), NULL, this);
- m_ribbonButtonBarCalculations->Connect(ID_RIBBON_POWERFLOW, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnPowerFlowClick), NULL, this);
- m_ribbonButtonBarCalculations->Connect(ID_RIBBON_FAULT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFaultClick), NULL, this);
- m_ribbonButtonBarCalculations->Connect(ID_RIBBON_SCPOWER, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSCPowerClick), NULL, this);
+ m_ribbonButtonBarCircuit->Connect(ID_RIBBON_DRAG, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDragClick), NULL, this);
+ m_ribbonButtonBarCircuit->Connect(ID_RIBBON_MOVE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnMoveClick), NULL, this);
+ m_ribbonButtonBarCircuit->Connect(ID_RIBBON_DELETE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDeleteClick), NULL, this);
+ m_ribbonButtonBarCircuit->Connect(ID_RIBBON_FIT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFitClick), NULL, this);
m_ribbonButtonBarReports->Connect(ID_RIBBON_DATAREPORT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDataReportClick), NULL, this);
+ m_ribbonButtonBarReports->Connect(ID_RIBBON_CHARTS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnChartsClick), NULL, this);
m_ribbonButtonBarReports->Connect(ID_RIBBON_SNAPSHOT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSnapshotClick), NULL, this);
- m_ribbonButtonBarStability->Connect(ID_RIBBON_STABSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnStabilitySettingsClick), NULL, this);
- m_ribbonButtonBarStability->Connect(ID_RIBBON_RUNSTAB, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRunStabilityClick), NULL, this);
- m_ribbonButtonBarStabData->Connect(ID_RIBBON_CHARTS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnChartsClick), NULL, this);
+ m_ribbonButtonBarContinuous->Connect(ID_RIBBON_ENABLESOL, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnEnableSolutionClick), NULL, this);
+ m_ribbonButtonBarContinuous->Connect(ID_RIBBON_DISABLESOL, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDisableSolutionClick), NULL, this);
+ m_ribbonButtonBarContinuous->Connect(ID_RIBBON_RESETVOLT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnResetVoltagesClick), NULL, this);
+ m_ribbonButtonBarSimulations->Connect(ID_RIBBON_POWERFLOW, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnPowerFlowClick), NULL, this);
+ m_ribbonButtonBarSimulations->Connect(ID_RIBBON_RUNSTAB, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRunStabilityClick), NULL, this);
+ m_ribbonButtonBarSimulations->Connect(ID_RIBBON_FAULT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFaultClick), NULL, this);
+ m_ribbonButtonBarSimulations->Connect(ID_RIBBON_SCPOWER, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSCPowerClick), NULL, this);
+ m_ribbonButtonBarSimulations->Connect(ID_RIBBON_SIMULSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnProjectSettingsClick), NULL, this);
m_auiNotebook->Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(MainFrameBase::NotebookPageClosing), NULL, this);
m_auiNotebook->Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEventHandler(MainFrameBase::NotebookPageClosed), NULL, this);
@@ -287,8 +274,8 @@ MainFrameBase::~MainFrameBase()
m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_NEW, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnNewClick), NULL, this);
m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_OPEN, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnOpenClick), NULL, this);
m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_EXPIMP, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnExpImpClick), NULL, this);
+ m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_GENSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnStabilitySettingsClick), NULL, this);
m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_EXIT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnExitClick), NULL, this);
- m_ribbonButtonBarCProject->Disconnect(ID_RIBBON_SETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnProjectSettingsClick), NULL, this);
m_ribbonButtonBarCProject->Disconnect(ID_RIBBON_SAVE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSaveClick), NULL, this);
m_ribbonButtonBarCProject->Disconnect(ID_RIBBON_SAVEAS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSaveAsClick), NULL, this);
m_ribbonButtonBarCProject->Disconnect(ID_RIBBON_CLOSE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnCloseClick), NULL, this);
@@ -299,21 +286,21 @@ MainFrameBase::~MainFrameBase()
m_ribbonButtonBarClipboard->Disconnect(ID_RIBBON_UNDO, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnUndoClick), NULL, this);
m_ribbonButtonBarClipboard->Disconnect(ID_RIBBON_REDO, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRedoClick), NULL, this);
m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_ADDELEMENT, wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnAddElementDropdown), NULL, this);
- m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_ENABLESOL, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnEnableSolutionClick), NULL, this);
- m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_DISABLESOL, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDisableSolutionClick), NULL, this);
- m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_RESETVOLT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnResetVoltagesClick), NULL, this);
- m_ribbonButtonBarHandling->Disconnect(ID_RIBBON_DRAG, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDragClick), NULL, this);
- m_ribbonButtonBarHandling->Disconnect(ID_RIBBON_MOVE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnMoveClick), NULL, this);
- m_ribbonButtonBarHandling->Disconnect(ID_RIBBON_FIT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFitClick), NULL, this);
- m_ribbonButtonBarHandling->Disconnect(ID_RIBBON_DELETE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDeleteClick), NULL, this);
- m_ribbonButtonBarCalculations->Disconnect(ID_RIBBON_POWERFLOW, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnPowerFlowClick), NULL, this);
- m_ribbonButtonBarCalculations->Disconnect(ID_RIBBON_FAULT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFaultClick), NULL, this);
- m_ribbonButtonBarCalculations->Disconnect(ID_RIBBON_SCPOWER, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSCPowerClick), NULL, this);
+ m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_DRAG, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDragClick), NULL, this);
+ m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_MOVE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnMoveClick), NULL, this);
+ m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_DELETE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDeleteClick), NULL, this);
+ m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_FIT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFitClick), NULL, this);
m_ribbonButtonBarReports->Disconnect(ID_RIBBON_DATAREPORT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDataReportClick), NULL, this);
+ m_ribbonButtonBarReports->Disconnect(ID_RIBBON_CHARTS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnChartsClick), NULL, this);
m_ribbonButtonBarReports->Disconnect(ID_RIBBON_SNAPSHOT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSnapshotClick), NULL, this);
- m_ribbonButtonBarStability->Disconnect(ID_RIBBON_STABSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnStabilitySettingsClick), NULL, this);
- m_ribbonButtonBarStability->Disconnect(ID_RIBBON_RUNSTAB, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRunStabilityClick), NULL, this);
- m_ribbonButtonBarStabData->Disconnect(ID_RIBBON_CHARTS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnChartsClick), NULL, this);
+ m_ribbonButtonBarContinuous->Disconnect(ID_RIBBON_ENABLESOL, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnEnableSolutionClick), NULL, this);
+ m_ribbonButtonBarContinuous->Disconnect(ID_RIBBON_DISABLESOL, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDisableSolutionClick), NULL, this);
+ m_ribbonButtonBarContinuous->Disconnect(ID_RIBBON_RESETVOLT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnResetVoltagesClick), NULL, this);
+ m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_POWERFLOW, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnPowerFlowClick), NULL, this);
+ m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_RUNSTAB, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRunStabilityClick), NULL, this);
+ m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_FAULT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFaultClick), NULL, this);
+ m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_SCPOWER, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSCPowerClick), NULL, this);
+ m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_SIMULSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnProjectSettingsClick), NULL, this);
m_auiNotebook->Disconnect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(MainFrameBase::NotebookPageClosing), NULL, this);
m_auiNotebook->Disconnect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEventHandler(MainFrameBase::NotebookPageClosed), NULL, this);
diff --git a/Project/MainFrameBase.h b/Project/MainFrameBase.h
index f339d35..5bba2c4 100644
--- a/Project/MainFrameBase.h
+++ b/Project/MainFrameBase.h
@@ -56,22 +56,23 @@ public:
ID_RIBBON_EXPIMP = 10012,
ID_RIBBON_FAULT = 10013,
ID_RIBBON_FIT = 10014,
- ID_RIBBON_GUIDE = 10015,
- ID_RIBBON_MOVE = 10016,
- ID_RIBBON_NEW = 10017,
- ID_RIBBON_OPEN = 10018,
- ID_RIBBON_PASTE = 10019,
- ID_RIBBON_POWERFLOW = 10020,
- ID_RIBBON_REDO = 10021,
- ID_RIBBON_RESETVOLT = 10022,
- ID_RIBBON_RUNSTAB = 10023,
- ID_RIBBON_SAVE = 10024,
- ID_RIBBON_SAVEAS = 10025,
- ID_RIBBON_SCPOWER = 10026,
- ID_RIBBON_SETTINGS = 10027,
- ID_RIBBON_SNAPSHOT = 10028,
- ID_RIBBON_STABSETTINGS = 10029,
- ID_RIBBON_UNDO = 10030,
+ ID_RIBBON_GENSETTINGS = 10015,
+ ID_RIBBON_GUIDE = 10016,
+ ID_RIBBON_MOVE = 10017,
+ ID_RIBBON_NEW = 10018,
+ ID_RIBBON_OPEN = 10019,
+ ID_RIBBON_PASTE = 10020,
+ ID_RIBBON_POWERFLOW = 10021,
+ ID_RIBBON_PROJSETTINGS = 10022,
+ ID_RIBBON_REDO = 10023,
+ ID_RIBBON_RESETVOLT = 10024,
+ ID_RIBBON_RUNSTAB = 10025,
+ ID_RIBBON_SAVE = 10026,
+ ID_RIBBON_SAVEAS = 10027,
+ ID_RIBBON_SCPOWER = 10028,
+ ID_RIBBON_SIMULSETTINGS = 10029,
+ ID_RIBBON_SNAPSHOT = 10030,
+ ID_RIBBON_UNDO = 10031,
};
protected:
wxRibbonBar* m_ribbonBar;
@@ -87,17 +88,13 @@ protected:
wxRibbonButtonBar* m_ribbonButtonBarClipboard;
wxRibbonPanel* m_ribbonPanelCircuit;
wxRibbonButtonBar* m_ribbonButtonBarCircuit;
- wxRibbonPanel* m_ribbonPanelHandling;
- wxRibbonButtonBar* m_ribbonButtonBarHandling;
- wxRibbonPanel* m_ribbonPanelCalculations;
- wxRibbonButtonBar* m_ribbonButtonBarCalculations;
wxRibbonPanel* m_ribbonPanelReports;
wxRibbonButtonBar* m_ribbonButtonBarReports;
- wxRibbonPage* m_ribbonPageStability;
- wxRibbonPanel* m_ribbonPanelStability;
- wxRibbonButtonBar* m_ribbonButtonBarStability;
- wxRibbonPanel* m_ribbonPanelData;
- wxRibbonButtonBar* m_ribbonButtonBarStabData;
+ wxRibbonPage* m_ribbonPageSimulation;
+ wxRibbonPanel* m_ribbonPanelContinuous;
+ wxRibbonButtonBar* m_ribbonButtonBarContinuous;
+ wxRibbonPanel* m_ribbonPanelSimulations;
+ wxRibbonButtonBar* m_ribbonButtonBarSimulations;
wxAuiNotebook* m_auiNotebook;
wxStatusBar* m_statusBar;
@@ -105,8 +102,8 @@ protected:
virtual void OnNewClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnOpenClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnExpImpClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
+ virtual void OnStabilitySettingsClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnExitClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
- virtual void OnProjectSettingsClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnSaveClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnSaveAsClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnCloseClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
@@ -117,21 +114,21 @@ protected:
virtual void OnUndoClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnRedoClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnAddElementDropdown(wxRibbonButtonBarEvent& event) { event.Skip(); }
- virtual void OnEnableSolutionClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
- virtual void OnDisableSolutionClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
- virtual void OnResetVoltagesClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnDragClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnMoveClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
- virtual void OnFitClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnDeleteClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
- virtual void OnPowerFlowClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
- virtual void OnFaultClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
- virtual void OnSCPowerClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
+ virtual void OnFitClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnDataReportClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
+ virtual void OnChartsClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnSnapshotClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
- virtual void OnStabilitySettingsClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
+ virtual void OnEnableSolutionClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
+ virtual void OnDisableSolutionClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
+ virtual void OnResetVoltagesClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
+ virtual void OnPowerFlowClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void OnRunStabilityClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
- virtual void OnChartsClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
+ virtual void OnFaultClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
+ virtual void OnSCPowerClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
+ virtual void OnProjectSettingsClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
virtual void NotebookPageClosing(wxAuiNotebookEvent& event) { event.Skip(); }
virtual void NotebookPageClosed(wxAuiNotebookEvent& event) { event.Skip(); }
diff --git a/Project/Project.mk b/Project/Project.mk
index 5c5c3b1..09ecb89 100644
--- a/Project/Project.mk
+++ b/Project/Project.mk
@@ -13,8 +13,8 @@ CurrentFileName :=
CurrentFilePath :=
CurrentFileFullPath :=
User :=Thales
-Date :=19/08/2016
-CodeLitePath :="C:/Program Files/CodeLite"
+Date :=21/08/2016
+CodeLitePath :="C:/Program Files (x86)/CodeLite"
LinkerName :=C:/TDM-GCC-64/bin/g++.exe
SharedObjectLinkerName :=C:/TDM-GCC-64/bin/g++.exe -shared -fPIC
ObjectSuffix :=.o
@@ -61,7 +61,8 @@ AS := C:/TDM-GCC-64/bin/as.exe
##
## User defined environment variables
##
-CodeLiteDir:=C:\Program Files\CodeLite
+CodeLiteDir:=C:\Program Files (x86)\CodeLite
+UNIT_TEST_PP_SRC_DIR:=C:\UnitTest++-1.3
WXWIN:=C:\wxWidgets-3.1.0
WXCFG:=gcc_dll\mswu
Objects0=$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IntermediateDirectory)/ArtMetro.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrameBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/WorkspaceBitmaps.cpp$(ObjectSuffix) \
diff --git a/Project/Release/Bus.cpp.o b/Project/Release/Bus.cpp.o
index a5f2ad8..886f064 100644
--- a/Project/Release/Bus.cpp.o
+++ b/Project/Release/Bus.cpp.o
Binary files differ
diff --git a/Project/Release/Element.cpp.o b/Project/Release/Element.cpp.o
index 507b116..5c4b04c 100644
--- a/Project/Release/Element.cpp.o
+++ b/Project/Release/Element.cpp.o
Binary files differ
diff --git a/Project/Release/Element.cpp.o.d b/Project/Release/Element.cpp.o.d
index 8376a13..2651cbe 100644
--- a/Project/Release/Element.cpp.o.d
+++ b/Project/Release/Element.cpp.o.d
@@ -57,7 +57,58 @@ Release/Element.cpp.o: Element.cpp Element.h \
C:/wxWidgets-3.1.0/include/wx/cursor.h \
C:/wxWidgets-3.1.0/include/wx/gdiobj.h \
C:/wxWidgets-3.1.0/include/wx/msw/gdiimage.h \
- C:/wxWidgets-3.1.0/include/wx/msw/cursor.h
+ C:/wxWidgets-3.1.0/include/wx/msw/cursor.h \
+ C:/wxWidgets-3.1.0/include/wx/menu.h \
+ C:/wxWidgets-3.1.0/include/wx/window.h \
+ C:/wxWidgets-3.1.0/include/wx/event.h \
+ C:/wxWidgets-3.1.0/include/wx/clntdata.h \
+ C:/wxWidgets-3.1.0/include/wx/dynarray.h \
+ C:/wxWidgets-3.1.0/include/wx/thread.h \
+ C:/wxWidgets-3.1.0/include/wx/tracker.h \
+ C:/wxWidgets-3.1.0/include/wx/typeinfo.h \
+ C:/wxWidgets-3.1.0/include/wx/any.h \
+ C:/wxWidgets-3.1.0/include/wx/datetime.h \
+ C:/wxWidgets-3.1.0/include/wx/anystr.h \
+ C:/wxWidgets-3.1.0/include/wx/variant.h \
+ C:/wxWidgets-3.1.0/include/wx/meta/convertible.h \
+ C:/wxWidgets-3.1.0/include/wx/meta/removeref.h \
+ C:/wxWidgets-3.1.0/include/wx/font.h \
+ C:/wxWidgets-3.1.0/include/wx/msw/font.h \
+ C:/wxWidgets-3.1.0/include/wx/colour.h \
+ C:/wxWidgets-3.1.0/include/wx/msw/colour.h \
+ C:/wxWidgets-3.1.0/include/wx/region.h \
+ C:/wxWidgets-3.1.0/include/wx/msw/region.h \
+ C:/wxWidgets-3.1.0/include/wx/intl.h \
+ C:/wxWidgets-3.1.0/include/wx/translation.h \
+ C:/wxWidgets-3.1.0/include/wx/language.h \
+ C:/wxWidgets-3.1.0/include/wx/scopedptr.h \
+ C:/wxWidgets-3.1.0/include/wx/checkeddelete.h \
+ C:/wxWidgets-3.1.0/include/wx/validate.h \
+ C:/wxWidgets-3.1.0/include/wx/palette.h \
+ C:/wxWidgets-3.1.0/include/wx/msw/palette.h \
+ C:/wxWidgets-3.1.0/include/wx/accel.h \
+ C:/wxWidgets-3.1.0/include/wx/msw/accel.h \
+ C:/wxWidgets-3.1.0/include/wx/msw/window.h \
+ C:/wxWidgets-3.1.0/include/wx/settings.h \
+ C:/wxWidgets-3.1.0/include/wx/menuitem.h \
+ C:/wxWidgets-3.1.0/include/wx/msw/menuitem.h \
+ C:/wxWidgets-3.1.0/include/wx/bitmap.h \
+ C:/wxWidgets-3.1.0/include/wx/image.h \
+ C:/wxWidgets-3.1.0/include/wx/stream.h \
+ C:/wxWidgets-3.1.0/include/wx/imagbmp.h \
+ C:/wxWidgets-3.1.0/include/wx/imagpng.h \
+ C:/wxWidgets-3.1.0/include/wx/imaggif.h \
+ C:/wxWidgets-3.1.0/include/wx/imagpcx.h \
+ C:/wxWidgets-3.1.0/include/wx/imagjpeg.h \
+ C:/wxWidgets-3.1.0/include/wx/imagtga.h \
+ C:/wxWidgets-3.1.0/include/wx/imagtiff.h \
+ C:/wxWidgets-3.1.0/include/wx/imagpnm.h \
+ C:/wxWidgets-3.1.0/include/wx/imagxpm.h \
+ C:/wxWidgets-3.1.0/include/wx/imagiff.h \
+ C:/wxWidgets-3.1.0/include/wx/msw/bitmap.h \
+ C:/wxWidgets-3.1.0/include/wx/ownerdrw.h \
+ C:/wxWidgets-3.1.0/include/wx/msw/ownerdrw.h \
+ C:/wxWidgets-3.1.0/include/wx/msw/menu.h
Element.h:
@@ -180,3 +231,105 @@ C:/wxWidgets-3.1.0/include/wx/gdiobj.h:
C:/wxWidgets-3.1.0/include/wx/msw/gdiimage.h:
C:/wxWidgets-3.1.0/include/wx/msw/cursor.h:
+
+C:/wxWidgets-3.1.0/include/wx/menu.h:
+
+C:/wxWidgets-3.1.0/include/wx/window.h:
+
+C:/wxWidgets-3.1.0/include/wx/event.h:
+
+C:/wxWidgets-3.1.0/include/wx/clntdata.h:
+
+C:/wxWidgets-3.1.0/include/wx/dynarray.h:
+
+C:/wxWidgets-3.1.0/include/wx/thread.h:
+
+C:/wxWidgets-3.1.0/include/wx/tracker.h:
+
+C:/wxWidgets-3.1.0/include/wx/typeinfo.h:
+
+C:/wxWidgets-3.1.0/include/wx/any.h:
+
+C:/wxWidgets-3.1.0/include/wx/datetime.h:
+
+C:/wxWidgets-3.1.0/include/wx/anystr.h:
+
+C:/wxWidgets-3.1.0/include/wx/variant.h:
+
+C:/wxWidgets-3.1.0/include/wx/meta/convertible.h:
+
+C:/wxWidgets-3.1.0/include/wx/meta/removeref.h:
+
+C:/wxWidgets-3.1.0/include/wx/font.h:
+
+C:/wxWidgets-3.1.0/include/wx/msw/font.h:
+
+C:/wxWidgets-3.1.0/include/wx/colour.h:
+
+C:/wxWidgets-3.1.0/include/wx/msw/colour.h:
+
+C:/wxWidgets-3.1.0/include/wx/region.h:
+
+C:/wxWidgets-3.1.0/include/wx/msw/region.h:
+
+C:/wxWidgets-3.1.0/include/wx/intl.h:
+
+C:/wxWidgets-3.1.0/include/wx/translation.h:
+
+C:/wxWidgets-3.1.0/include/wx/language.h:
+
+C:/wxWidgets-3.1.0/include/wx/scopedptr.h:
+
+C:/wxWidgets-3.1.0/include/wx/checkeddelete.h:
+
+C:/wxWidgets-3.1.0/include/wx/validate.h:
+
+C:/wxWidgets-3.1.0/include/wx/palette.h:
+
+C:/wxWidgets-3.1.0/include/wx/msw/palette.h:
+
+C:/wxWidgets-3.1.0/include/wx/accel.h:
+
+C:/wxWidgets-3.1.0/include/wx/msw/accel.h:
+
+C:/wxWidgets-3.1.0/include/wx/msw/window.h:
+
+C:/wxWidgets-3.1.0/include/wx/settings.h:
+
+C:/wxWidgets-3.1.0/include/wx/menuitem.h:
+
+C:/wxWidgets-3.1.0/include/wx/msw/menuitem.h:
+
+C:/wxWidgets-3.1.0/include/wx/bitmap.h:
+
+C:/wxWidgets-3.1.0/include/wx/image.h:
+
+C:/wxWidgets-3.1.0/include/wx/stream.h:
+
+C:/wxWidgets-3.1.0/include/wx/imagbmp.h:
+
+C:/wxWidgets-3.1.0/include/wx/imagpng.h:
+
+C:/wxWidgets-3.1.0/include/wx/imaggif.h:
+
+C:/wxWidgets-3.1.0/include/wx/imagpcx.h:
+
+C:/wxWidgets-3.1.0/include/wx/imagjpeg.h:
+
+C:/wxWidgets-3.1.0/include/wx/imagtga.h:
+
+C:/wxWidgets-3.1.0/include/wx/imagtiff.h:
+
+C:/wxWidgets-3.1.0/include/wx/imagpnm.h:
+
+C:/wxWidgets-3.1.0/include/wx/imagxpm.h:
+
+C:/wxWidgets-3.1.0/include/wx/imagiff.h:
+
+C:/wxWidgets-3.1.0/include/wx/msw/bitmap.h:
+
+C:/wxWidgets-3.1.0/include/wx/ownerdrw.h:
+
+C:/wxWidgets-3.1.0/include/wx/msw/ownerdrw.h:
+
+C:/wxWidgets-3.1.0/include/wx/msw/menu.h:
diff --git a/Project/Release/Line.cpp.o b/Project/Release/Line.cpp.o
index 6717cee..327c980 100644
--- a/Project/Release/Line.cpp.o
+++ b/Project/Release/Line.cpp.o
Binary files differ
diff --git a/Project/Release/MainFrame.cpp.o b/Project/Release/MainFrame.cpp.o
index 6701a43..df1fcf4 100644
--- a/Project/Release/MainFrame.cpp.o
+++ b/Project/Release/MainFrame.cpp.o
Binary files differ
diff --git a/Project/Release/MainFrameBase.cpp.o b/Project/Release/MainFrameBase.cpp.o
index a05fded..28b364c 100644
--- a/Project/Release/MainFrameBase.cpp.o
+++ b/Project/Release/MainFrameBase.cpp.o
Binary files differ
diff --git a/Project/Release/PSP-UFU.exe b/Project/Release/PSP-UFU.exe
index 604327e..c436fd9 100644
--- a/Project/Release/PSP-UFU.exe
+++ b/Project/Release/PSP-UFU.exe
Binary files differ
diff --git a/Project/Release/Workspace.cpp.o b/Project/Release/Workspace.cpp.o
index a3a3cfa..3c52ac0 100644
--- a/Project/Release/Workspace.cpp.o
+++ b/Project/Release/Workspace.cpp.o
Binary files differ
diff --git a/Project/Release/main.cpp.o b/Project/Release/main.cpp.o
index 336174e..e27c6a6 100644
--- a/Project/Release/main.cpp.o
+++ b/Project/Release/main.cpp.o
Binary files differ
diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp
index d180b2b..d4b6fa6 100644
--- a/Project/Workspace.cpp
+++ b/Project/Workspace.cpp
@@ -106,7 +106,7 @@ void Workspace::OnPaint(wxPaintEvent& event)
void Workspace::SetViewport()
{
- glClearColor(1.0, 1.0, 1.0, 1.0);
+ glClearColor(1.0, 1.0, 1.0, 1.0); // White background.
glClear(GL_COLOR_BUFFER_BIT);
glDisable(GL_DEPTH_TEST);
glEnable(GL_TEXTURE_2D);
@@ -144,8 +144,8 @@ void Workspace::OnLeftClickDown(wxMouseEvent& event)
// Select the bus.
element->SetSelected();
foundElement = true; // Element found.
- // Add the new element's parent. If the element being inserted return true, return
- // to edit mode.
+ // Add the new element's parent. If the element being inserted returns true, back to
+ // edit mode.
if(newElement->AddParent(element, m_camera->ScreenToWorld(event.GetPosition()))) {
m_mode = MODE_EDIT;
}
@@ -166,11 +166,21 @@ void Workspace::OnLeftClickDown(wxMouseEvent& event)
for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
Element* element = *it;
element->ResetPickboxes(); // Reset pickbox state.
- element->StartMove(m_camera->ScreenToWorld(
- event.GetPosition())); // Set movement initial position (not necessarily will be moved).
- // Click at an element
- if(element->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
+ // Set movement initial position (not necessarily will be moved).
+ element->StartMove(m_camera->ScreenToWorld(event.GetPosition()));
+
+ // Click in selected element node.
+ if(element->NodeContains(m_camera->ScreenToWorld(event.GetPosition())) != 0 &&
+ element->IsSelected())
+ {
+ m_mode = MODE_MOVE_NODE;
+ foundElement = true;
+ }
+
+ // Click in an element
+ else if(element->Contains(m_camera->ScreenToWorld(event.GetPosition())))
+ {
if(!foundElement) {
// Select and show pickbox.
element->SetSelected();
@@ -182,7 +192,7 @@ void Workspace::OnLeftClickDown(wxMouseEvent& event)
m_mode = MODE_MOVE_PICKBOX;
clickPickbox = true;
}
- // If didn't foud a pickbox, move the element
+ // If didn't found a pickbox, move the element
if(!clickPickbox) {
m_mode = MODE_MOVE_ELEMENT;
}
@@ -207,6 +217,7 @@ void Workspace::OnRightClickDown(wxMouseEvent& event)
for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
Element* element = *it;
if(element->IsSelected()) {
+ // Show context menu.
if(element->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
element->ShowPickbox(false);
wxMenu menu;
@@ -227,7 +238,12 @@ void Workspace::OnRightClickDown(wxMouseEvent& event)
void Workspace::OnLeftClickUp(wxMouseEvent& event)
{
+ // This event (under certain conditions) deselects the elements and back to edit mode or select the elements using
+ // the selection rectangle.
bool foundPickbox = false;
+ bool findNewParent = false;
+ auto itnp = m_elementList.begin();
+
for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
Element* element = *it;
@@ -240,6 +256,23 @@ void Workspace::OnLeftClickUp(wxMouseEvent& event)
element->SetSelected(false);
}
}
+ else if(m_mode == MODE_MOVE_NODE)
+ {
+ if(element->IsSelected()) {
+ for(int i = 0; i < (int)m_elementList.size(); i++) {
+ Element* parent = m_elementList[i];
+ if(typeid(*parent) == typeid(Bus)) {
+ if(element->SetNodeParent(parent)) {
+ findNewParent = true;
+ itnp = it;
+ element->ResetNodes();
+ break;
+ }
+ }
+ }
+ // element->ResetNodes();
+ }
+ }
else
{
// Deselect
@@ -255,9 +288,13 @@ void Workspace::OnLeftClickUp(wxMouseEvent& event)
else
{
element->ShowPickbox(false);
+ element->ResetPickboxes();
}
}
}
+ if(findNewParent) {
+ std::rotate(itnp, itnp + 1, m_elementList.end());
+ }
if(!foundPickbox) {
SetCursor(wxCURSOR_ARROW);
}
@@ -272,34 +309,36 @@ void Workspace::OnLeftClickUp(wxMouseEvent& event)
void Workspace::OnMouseMotion(wxMouseEvent& event)
{
+ bool redraw = false;
switch(m_mode)
{
case MODE_INSERT:
{
- Element* newElement = *(m_elementList.end() - 1);
+ Element* newElement = *(m_elementList.end() - 1); // Get the last element in the list.
newElement->SetPosition(m_camera->ScreenToWorld(event.GetPosition()));
- Redraw();
+ redraw = true;
}
break;
case MODE_DRAG:
{
m_camera->SetTranslation(event.GetPosition());
- Redraw();
+ redraw = true;
}
break;
case MODE_EDIT:
{
bool foundPickbox = false;
- bool redraw = false;
for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
Element* element = *it;
if(element->IsSelected()) {
+ // Show element pickbox (when it has) if the mouse is over the selected object.
if(element->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
element->ShowPickbox();
redraw = true;
+ // If the mouse is over a pickbox set correct mouse cursor.
if(element->PickboxContains(m_camera->ScreenToWorld(event.GetPosition()))) {
foundPickbox = true;
SetCursor(element->GetBestPickboxCursor());
@@ -307,6 +346,7 @@ void Workspace::OnMouseMotion(wxMouseEvent& event)
else if(!foundPickbox)
{
SetCursor(wxCURSOR_ARROW);
+ element->ResetPickboxes();
}
}
else if(!foundPickbox)
@@ -314,11 +354,23 @@ void Workspace::OnMouseMotion(wxMouseEvent& event)
if(element->IsPickboxShown()) redraw = true;
element->ShowPickbox(false);
+ element->ResetPickboxes();
SetCursor(wxCURSOR_ARROW);
}
}
}
- if(redraw) Redraw();
+ }
+ break;
+
+ case MODE_MOVE_NODE:
+ {
+ for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
+ Element* element = *it;
+ if(element->IsSelected()) {
+ element->MoveNode(NULL, m_camera->ScreenToWorld(event.GetPosition()));
+ redraw = true;
+ }
+ }
}
break;
@@ -328,7 +380,7 @@ void Workspace::OnMouseMotion(wxMouseEvent& event)
Element* element = *it;
if(element->IsSelected()) {
element->MovePickbox(m_camera->ScreenToWorld(event.GetPosition()));
- Redraw();
+ redraw = true;
}
}
}
@@ -341,13 +393,15 @@ void Workspace::OnMouseMotion(wxMouseEvent& event)
// Parent's element moving...
for(int i = 0; i < (int)element->GetParentList().size(); i++) {
Element* parent = element->GetParentList()[i];
- if(parent->IsSelected()) {
- element->MoveNode(parent, m_camera->ScreenToWorld(event.GetPosition()));
+ if(parent) {
+ if(parent->IsSelected()) {
+ element->MoveNode(parent, m_camera->ScreenToWorld(event.GetPosition()));
+ }
}
}
if(element->IsSelected()) {
element->Move(m_camera->ScreenToWorld(event.GetPosition()));
- Redraw();
+ redraw = true;
}
}
}
@@ -377,10 +431,12 @@ void Workspace::OnMouseMotion(wxMouseEvent& event)
}
m_selectionRect = wxRect2DDouble(x, y, w, h);
- Redraw();
+ redraw = true;
}
break;
}
+
+ if(redraw) Redraw();
m_camera->UpdateMousePosition(event.GetPosition());
UpdateStatusBar();
event.Skip();
@@ -389,6 +445,7 @@ void Workspace::OnMouseMotion(wxMouseEvent& event)
void Workspace::OnMiddleDown(wxMouseEvent& event)
{
if(m_mode != MODE_INSERT) {
+ // Set to drag mode.
m_mode = MODE_DRAG;
m_camera->StartTranslation(m_camera->ScreenToWorld(event.GetPosition()));
}
@@ -397,6 +454,7 @@ void Workspace::OnMiddleDown(wxMouseEvent& event)
void Workspace::OnMiddleUp(wxMouseEvent& event)
{
if(m_mode != MODE_INSERT) {
+ // Set to edit mode back.
m_mode = MODE_EDIT;
}
UpdateStatusBar();
@@ -462,7 +520,7 @@ void Workspace::OnKeyDown(wxKeyEvent& event)
Line* newLine = new Line();
m_elementList.push_back(newLine);
m_mode = MODE_INSERT;
- m_statusBar->SetStatusText(_("Insert Line: Click on a bus, ESC to cancel."));
+ m_statusBar->SetStatusText(_("Insert Line: Click on two buses, ESC to cancel."));
Redraw();
}
}
@@ -494,6 +552,7 @@ void Workspace::UpdateStatusBar()
case MODE_MOVE_ELEMENT:
case MODE_MOVE_PICKBOX:
+ case MODE_MOVE_NODE:
case MODE_SELECTION_RECT:
case MODE_EDIT:
{
@@ -527,16 +586,16 @@ void Workspace::OnPopupClick(wxCommandEvent& event)
break;
case ID_LINE_ADD_NODE:
{
- Line* line = (Line*)element;
- line->AddNode(m_camera->GetMousePosition());
- Redraw();
+ Line* line = (Line*)element;
+ line->AddNode(m_camera->GetMousePosition());
+ Redraw();
}
break;
case ID_LINE_REMOVE_NODE:
{
- Line* line = (Line*)element;
- line->RemoveNode(m_camera->GetMousePosition());
- Redraw();
+ Line* line = (Line*)element;
+ line->RemoveNode(m_camera->GetMousePosition());
+ Redraw();
}
break;
case ID_ROTATE:
diff --git a/Project/Workspace.h b/Project/Workspace.h
index e240206..3f25130 100644
--- a/Project/Workspace.h
+++ b/Project/Workspace.h
@@ -19,6 +19,7 @@ enum WorkspaceMode
MODE_EDIT = 0,
MODE_MOVE_ELEMENT,
MODE_MOVE_PICKBOX,
+ MODE_MOVE_NODE,
MODE_DRAG,
MODE_INSERT,
MODE_SELECTION_RECT