KiCad PCB EDA Suite
Loading...
Searching...
No Matches
simulator_frame_ui_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
8#include "widgets/wx_grid.h"
9
11
13
14SIMULATOR_FRAME_UI_BASE::SIMULATOR_FRAME_UI_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
15{
16 wxBoxSizer* sizerMain;
17 sizerMain = new wxBoxSizer( wxVERTICAL );
18
19 m_splitterLeftRight = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE|wxBORDER_NONE );
20 m_splitterLeftRight->SetSashGravity( 0.7 );
21 m_splitterLeftRight->Connect( wxEVT_IDLE, wxIdleEventHandler( SIMULATOR_FRAME_UI_BASE::m_splitterLeftRightOnIdle ), NULL, this );
22 m_splitterLeftRight->SetMinimumPaneSize( 50 );
23
24 m_panelLeft = new wxPanel( m_splitterLeftRight, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
25 m_panelLeft->SetMinSize( wxSize( 300,-1 ) );
26
27 m_sizer11 = new wxBoxSizer( wxVERTICAL );
28
29 m_splitterPlotAndConsole = new wxSplitterWindow( m_panelLeft, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE );
30 m_splitterPlotAndConsole->SetSashGravity( 0.8 );
31 m_splitterPlotAndConsole->Connect( wxEVT_IDLE, wxIdleEventHandler( SIMULATOR_FRAME_UI_BASE::m_splitterPlotAndConsoleOnIdle ), NULL, this );
32 m_splitterPlotAndConsole->SetMinimumPaneSize( 50 );
33
34 m_plotPanel = new wxPanel( m_splitterPlotAndConsole, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
35 m_plotPanel->SetMinSize( wxSize( -1,200 ) );
36
37 m_sizerPlot = new wxBoxSizer( wxHORIZONTAL );
38
39 m_plotNotebook = new wxAuiNotebook( m_plotPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_CLOSE_ON_ALL_TABS|wxAUI_NB_MIDDLE_CLICK_CLOSE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TOP );
40 m_plotNotebook->SetMinSize( wxSize( 200,200 ) );
41
42
43 m_sizerPlot->Add( m_plotNotebook, 1, wxEXPAND, 5 );
44
45
46 m_plotPanel->SetSizer( m_sizerPlot );
47 m_plotPanel->Layout();
49 m_panelConsole = new wxPanel( m_splitterPlotAndConsole, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
50 m_panelConsole->SetMinSize( wxSize( -1,100 ) );
51
52 m_sizerConsole = new wxBoxSizer( wxVERTICAL );
53
54 m_simConsole = new wxTextCtrl( m_panelConsole, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY );
55 m_simConsole->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
56 m_simConsole->SetMinSize( wxSize( -1,100 ) );
57
58 m_sizerConsole->Add( m_simConsole, 1, wxEXPAND, 5 );
59
60
61 m_panelConsole->SetSizer( m_sizerConsole );
62 m_panelConsole->Layout();
64 m_splitterPlotAndConsole->SplitHorizontally( m_plotPanel, m_panelConsole, 500 );
65 m_sizer11->Add( m_splitterPlotAndConsole, 1, wxEXPAND, 5 );
66
67
68 m_panelLeft->SetSizer( m_sizer11 );
69 m_panelLeft->Layout();
70 m_sizer11->Fit( m_panelLeft );
71 m_sidePanel = new wxPanel( m_splitterLeftRight, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
72 m_sidePanel->SetMinSize( wxSize( 200,-1 ) );
73
74 m_sideSizer = new wxBoxSizer( wxVERTICAL );
75
76 m_splitterSignals = new wxSplitterWindow( m_sidePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE );
77 m_splitterSignals->SetSashGravity( 0.5 );
78 m_splitterSignals->Connect( wxEVT_IDLE, wxIdleEventHandler( SIMULATOR_FRAME_UI_BASE::m_splitterSignalsOnIdle ), NULL, this );
79 m_splitterSignals->SetMinimumPaneSize( 20 );
80
81 m_panelSignals = new wxPanel( m_splitterSignals, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
82 m_panelSignals->SetMinSize( wxSize( -1,100 ) );
83
84 wxBoxSizer* bSizerSignals;
85 bSizerSignals = new wxBoxSizer( wxVERTICAL );
86
87 m_filter = new wxSearchCtrl( m_panelSignals, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
88 #ifndef __WXMAC__
89 m_filter->ShowSearchButton( true );
90 #endif
91 m_filter->ShowCancelButton( true );
92 bSizerSignals->Add( m_filter, 0, wxEXPAND, 5 );
93
94 m_signalsGrid = new WX_GRID( m_panelSignals, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
95
96 // Grid
97 m_signalsGrid->CreateGrid( 0, 5 );
98 m_signalsGrid->EnableEditing( true );
99 m_signalsGrid->EnableGridLines( true );
100 m_signalsGrid->EnableDragGridSize( false );
101 m_signalsGrid->SetMargins( 0, 0 );
102
103 // Columns
104 m_signalsGrid->SetColSize( 0, 207 );
105 m_signalsGrid->SetColSize( 1, 33 );
106 m_signalsGrid->SetColSize( 2, 38 );
107 m_signalsGrid->SetColSize( 3, 55 );
108 m_signalsGrid->SetColSize( 4, 55 );
109 m_signalsGrid->EnableDragColMove( false );
110 m_signalsGrid->EnableDragColSize( true );
111 m_signalsGrid->SetColLabelValue( 0, _("Signal") );
112 m_signalsGrid->SetColLabelValue( 1, _("Plot") );
113 m_signalsGrid->SetColLabelValue( 2, _("Color") );
114 m_signalsGrid->SetColLabelValue( 3, _("Cursor 1") );
115 m_signalsGrid->SetColLabelValue( 4, _("Cursor 2") );
117 m_signalsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
118
119 // Rows
120 m_signalsGrid->EnableDragRowSize( true );
121 m_signalsGrid->SetRowLabelSize( 0 );
122 m_signalsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
123
124 // Label Appearance
125
126 // Cell Defaults
127 m_signalsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
128 bSizerSignals->Add( m_signalsGrid, 1, wxEXPAND, 5 );
129
130
131 m_panelSignals->SetSizer( bSizerSignals );
132 m_panelSignals->Layout();
133 bSizerSignals->Fit( m_panelSignals );
134 m_panelCMT = new wxPanel( m_splitterSignals, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
135 m_panelCMT->SetMinSize( wxSize( -1,300 ) );
136
137 wxBoxSizer* bSizerCMT;
138 bSizerCMT = new wxBoxSizer( wxVERTICAL );
139
140 m_splitterCursors = new wxSplitterWindow( m_panelCMT, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE|wxBORDER_NONE );
141 m_splitterCursors->SetSashGravity( 0.2 );
142 m_splitterCursors->Connect( wxEVT_IDLE, wxIdleEventHandler( SIMULATOR_FRAME_UI_BASE::m_splitterCursorsOnIdle ), NULL, this );
143 m_splitterCursors->SetMinimumPaneSize( 20 );
144
145 m_panelCursors = new wxPanel( m_splitterCursors, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
146 m_panelCursors->SetMinSize( wxSize( -1,60 ) );
147
148 wxBoxSizer* bSizerCursors;
149 bSizerCursors = new wxBoxSizer( wxVERTICAL );
150
151 m_cursorsGrid = new WX_GRID( m_panelCursors, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
152
153 // Grid
154 m_cursorsGrid->CreateGrid( 0, 4 );
155 m_cursorsGrid->EnableEditing( true );
156 m_cursorsGrid->EnableGridLines( true );
157 m_cursorsGrid->EnableDragGridSize( false );
158 m_cursorsGrid->SetMargins( 0, 0 );
159
160 // Columns
161 m_cursorsGrid->SetColSize( 0, 45 );
162 m_cursorsGrid->SetColSize( 1, 162 );
163 m_cursorsGrid->SetColSize( 2, 90 );
164 m_cursorsGrid->SetColSize( 3, 90 );
165 m_cursorsGrid->EnableDragColMove( false );
166 m_cursorsGrid->EnableDragColSize( true );
167 m_cursorsGrid->SetColLabelValue( 0, _("Cursor") );
168 m_cursorsGrid->SetColLabelValue( 1, _("Signal") );
169 m_cursorsGrid->SetColLabelValue( 2, _("Time") );
170 m_cursorsGrid->SetColLabelValue( 3, _("Value") );
172 m_cursorsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
173
174 // Rows
175 m_cursorsGrid->EnableDragRowSize( true );
176 m_cursorsGrid->SetRowLabelSize( 0 );
177 m_cursorsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
178
179 // Label Appearance
180
181 // Cell Defaults
182 m_cursorsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
183 bSizerCursors->Add( m_cursorsGrid, 1, wxEXPAND, 5 );
184
185
186 m_panelCursors->SetSizer( bSizerCursors );
187 m_panelCursors->Layout();
188 bSizerCursors->Fit( m_panelCursors );
189 m_panelMT = new wxPanel( m_splitterCursors, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
190 m_panelMT->SetMinSize( wxSize( -1,100 ) );
191
192 wxBoxSizer* bSizerMT;
193 bSizerMT = new wxBoxSizer( wxVERTICAL );
194
195 m_splitterMeasurements = new wxSplitterWindow( m_panelMT, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE|wxBORDER_NONE );
196 m_splitterMeasurements->SetSashGravity( 0.2 );
197 m_splitterMeasurements->Connect( wxEVT_IDLE, wxIdleEventHandler( SIMULATOR_FRAME_UI_BASE::m_splitterMeasurementsOnIdle ), NULL, this );
198 m_splitterMeasurements->SetMinimumPaneSize( 20 );
199
200 m_panelMeasurements = new wxPanel( m_splitterMeasurements, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
201 m_panelMeasurements->SetMinSize( wxSize( -1,20 ) );
202
203 wxBoxSizer* bSizerMeasurements;
204 bSizerMeasurements = new wxBoxSizer( wxVERTICAL );
205
206 m_measurementsGrid = new WX_GRID( m_panelMeasurements, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
207
208 // Grid
209 m_measurementsGrid->CreateGrid( 1, 3 );
210 m_measurementsGrid->EnableEditing( true );
211 m_measurementsGrid->EnableGridLines( true );
212 m_measurementsGrid->EnableDragGridSize( false );
213 m_measurementsGrid->SetMargins( 0, 0 );
214
215 // Columns
216 m_measurementsGrid->SetColSize( 0, 297 );
217 m_measurementsGrid->SetColSize( 1, 90 );
218 m_measurementsGrid->SetColSize( 2, 0 );
219 m_measurementsGrid->EnableDragColMove( false );
220 m_measurementsGrid->EnableDragColSize( true );
221 m_measurementsGrid->SetColLabelValue( 0, _("Measurement") );
222 m_measurementsGrid->SetColLabelValue( 1, _("Value") );
223 m_measurementsGrid->SetColLabelValue( 2, _("Format") );
225 m_measurementsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
226
227 // Rows
228 m_measurementsGrid->EnableDragRowSize( true );
229 m_measurementsGrid->SetRowLabelSize( 0 );
230 m_measurementsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
231
232 // Label Appearance
233
234 // Cell Defaults
235 m_measurementsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
236 bSizerMeasurements->Add( m_measurementsGrid, 1, wxEXPAND, 5 );
237
238
239 m_panelMeasurements->SetSizer( bSizerMeasurements );
240 m_panelMeasurements->Layout();
241 bSizerMeasurements->Fit( m_panelMeasurements );
242 m_panelTuners = new wxPanel( m_splitterMeasurements, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
243 m_panelTuners->SetMinSize( wxSize( -1,100 ) );
244
245 m_sizerTuners = new wxBoxSizer( wxHORIZONTAL );
246
247
248 m_panelTuners->SetSizer( m_sizerTuners );
249 m_panelTuners->Layout();
252 bSizerMT->Add( m_splitterMeasurements, 1, wxEXPAND, 5 );
253
254
255 m_panelMT->SetSizer( bSizerMT );
256 m_panelMT->Layout();
257 bSizerMT->Fit( m_panelMT );
258 m_splitterCursors->SplitHorizontally( m_panelCursors, m_panelMT, 0 );
259 bSizerCMT->Add( m_splitterCursors, 1, wxEXPAND, 5 );
260
261
262 m_panelCMT->SetSizer( bSizerCMT );
263 m_panelCMT->Layout();
264 bSizerCMT->Fit( m_panelCMT );
265 m_splitterSignals->SplitHorizontally( m_panelSignals, m_panelCMT, 0 );
266 m_sideSizer->Add( m_splitterSignals, 1, wxEXPAND, 5 );
267
268
269 m_sidePanel->SetSizer( m_sideSizer );
270 m_sidePanel->Layout();
271 m_sideSizer->Fit( m_sidePanel );
272 m_splitterLeftRight->SplitVertically( m_panelLeft, m_sidePanel, 700 );
273 sizerMain->Add( m_splitterLeftRight, 1, wxEXPAND, 5 );
274
275
276 this->SetSizer( sizerMain );
277 this->Layout();
278 sizerMain->Fit( this );
279
280 // Connect Events
281 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIMULATOR_FRAME_UI_BASE::OnUpdateUI ) );
282 m_plotNotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, wxAuiNotebookEventHandler( SIMULATOR_FRAME_UI_BASE::onPlotDragged ), NULL, this );
283 m_plotNotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( SIMULATOR_FRAME_UI_BASE::onPlotChanged ), NULL, this );
284 m_plotNotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEventHandler( SIMULATOR_FRAME_UI_BASE::onPlotChanging ), NULL, this );
285 m_plotNotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler( SIMULATOR_FRAME_UI_BASE::onPlotClose ), NULL, this );
286 m_plotNotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEventHandler( SIMULATOR_FRAME_UI_BASE::onPlotClosed ), NULL, this );
287 m_filter->Connect( wxEVT_MOTION, wxMouseEventHandler( SIMULATOR_FRAME_UI_BASE::OnFilterMouseMoved ), NULL, this );
288 m_filter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SIMULATOR_FRAME_UI_BASE::OnFilterText ), NULL, this );
289 m_signalsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( SIMULATOR_FRAME_UI_BASE::onSignalsGridCellChanged ), NULL, this );
290 m_cursorsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( SIMULATOR_FRAME_UI_BASE::onCursorsGridCellChanged ), NULL, this );
291 m_measurementsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( SIMULATOR_FRAME_UI_BASE::onMeasurementsGridCellChanged ), NULL, this );
292}
293
295{
296 // Disconnect Events
297 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIMULATOR_FRAME_UI_BASE::OnUpdateUI ) );
298 m_plotNotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, wxAuiNotebookEventHandler( SIMULATOR_FRAME_UI_BASE::onPlotDragged ), NULL, this );
299 m_plotNotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( SIMULATOR_FRAME_UI_BASE::onPlotChanged ), NULL, this );
300 m_plotNotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEventHandler( SIMULATOR_FRAME_UI_BASE::onPlotChanging ), NULL, this );
301 m_plotNotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler( SIMULATOR_FRAME_UI_BASE::onPlotClose ), NULL, this );
302 m_plotNotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEventHandler( SIMULATOR_FRAME_UI_BASE::onPlotClosed ), NULL, this );
303 m_filter->Disconnect( wxEVT_MOTION, wxMouseEventHandler( SIMULATOR_FRAME_UI_BASE::OnFilterMouseMoved ), NULL, this );
304 m_filter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SIMULATOR_FRAME_UI_BASE::OnFilterText ), NULL, this );
305 m_signalsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( SIMULATOR_FRAME_UI_BASE::onSignalsGridCellChanged ), NULL, this );
306 m_cursorsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( SIMULATOR_FRAME_UI_BASE::onCursorsGridCellChanged ), NULL, this );
307 m_measurementsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( SIMULATOR_FRAME_UI_BASE::onMeasurementsGridCellChanged ), NULL, this );
308
309}
const char * name
Definition: DXF_plotter.cpp:57
virtual void onPlotDragged(wxAuiNotebookEvent &event)
virtual void onPlotClosed(wxAuiNotebookEvent &event)
virtual void onPlotChanging(wxAuiNotebookEvent &event)
wxSplitterWindow * m_splitterLeftRight
virtual void onPlotClose(wxAuiNotebookEvent &event)
wxSplitterWindow * m_splitterMeasurements
void m_splitterLeftRightOnIdle(wxIdleEvent &)
virtual void OnFilterText(wxCommandEvent &event)
void m_splitterMeasurementsOnIdle(wxIdleEvent &)
wxSplitterWindow * m_splitterCursors
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void onMeasurementsGridCellChanged(wxGridEvent &event)
virtual void onPlotChanged(wxAuiNotebookEvent &event)
virtual void onCursorsGridCellChanged(wxGridEvent &event)
void m_splitterPlotAndConsoleOnIdle(wxIdleEvent &)
void m_splitterCursorsOnIdle(wxIdleEvent &)
virtual void onSignalsGridCellChanged(wxGridEvent &event)
wxSplitterWindow * m_splitterPlotAndConsole
SIMULATOR_FRAME_UI_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
void m_splitterSignalsOnIdle(wxIdleEvent &)
wxSplitterWindow * m_splitterSignals
virtual void OnFilterMouseMoved(wxMouseEvent &event)
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:249
#define _(s)