KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_jobset_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
11#include "panel_jobset_base.h"
12
14
15PANEL_JOBSET_BASE::PANEL_JOBSET_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : PANEL_NOTEBOOK_BASE( parent, id, pos, size, style, name )
16{
17 wxBoxSizer* bSizerMain;
18 bSizerMain = new wxBoxSizer( wxVERTICAL );
19
20 wxBoxSizer* bSizerUpper;
21 bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
22
23 wxStaticBoxSizer* sbJobs;
24 sbJobs = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Jobs") ), wxVERTICAL );
25
26 m_jobsGrid = new WX_GRID( sbJobs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
27
28 // Grid
29 m_jobsGrid->CreateGrid( 5, 2 );
30 m_jobsGrid->EnableEditing( true );
31 m_jobsGrid->EnableGridLines( true );
32 m_jobsGrid->EnableDragGridSize( false );
33 m_jobsGrid->SetMargins( 0, 0 );
34
35 // Columns
36 m_jobsGrid->SetColSize( 0, 30 );
37 m_jobsGrid->SetColSize( 1, 260 );
38 m_jobsGrid->EnableDragColMove( false );
39 m_jobsGrid->EnableDragColSize( false );
41 m_jobsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
42
43 // Rows
44 m_jobsGrid->EnableDragRowSize( true );
45 m_jobsGrid->SetRowLabelSize( 0 );
46 m_jobsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
47
48 // Label Appearance
49
50 // Cell Defaults
51 m_jobsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
52 sbJobs->Add( m_jobsGrid, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 3 );
53
54 wxBoxSizer* bJobsButtons;
55 bJobsButtons = new wxBoxSizer( wxHORIZONTAL );
56
57 m_buttonAddJob = new STD_BITMAP_BUTTON( sbJobs->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
58 bJobsButtons->Add( m_buttonAddJob, 0, wxALIGN_CENTER|wxBOTTOM|wxTOP, 5 );
59
60 m_buttonUp = new STD_BITMAP_BUTTON( sbJobs->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
61 bJobsButtons->Add( m_buttonUp, 0, wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxTOP, 5 );
62
63 m_buttonDown = new STD_BITMAP_BUTTON( sbJobs->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
64 bJobsButtons->Add( m_buttonDown, 0, wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxTOP, 5 );
65
66
67 bJobsButtons->Add( 20, 0, 0, wxEXPAND, 5 );
68
69 m_buttonDelete = new STD_BITMAP_BUTTON( sbJobs->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
70 bJobsButtons->Add( m_buttonDelete, 0, wxALL, 5 );
71
72
73 bJobsButtons->Add( 0, 0, 1, wxEXPAND, 5 );
74
75
76 sbJobs->Add( bJobsButtons, 0, wxEXPAND|wxLEFT|wxRIGHT, 3 );
77
78
79 bSizerUpper->Add( sbJobs, 7, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
80
81 wxStaticBoxSizer* sbOutputs;
82 sbOutputs = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Outputs") ), wxVERTICAL );
83
84 m_outputList = new wxScrolledWindow( sbOutputs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
85 m_outputList->SetScrollRate( 5, 5 );
86 m_outputListSizer = new wxBoxSizer( wxVERTICAL );
87
88
90 m_outputList->Layout();
92 sbOutputs->Add( m_outputList, 1, wxEXPAND|wxALL, 0 );
93
94 wxBoxSizer* bOutputButtons;
95 bOutputButtons = new wxBoxSizer( wxHORIZONTAL );
96
97 m_buttonOutputAdd = new STD_BITMAP_BUTTON( sbOutputs->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
98 bOutputButtons->Add( m_buttonOutputAdd, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxTOP, 5 );
99
100
101 sbOutputs->Add( bOutputButtons, 0, wxEXPAND|wxLEFT, 3 );
102
103
104 bSizerUpper->Add( sbOutputs, 4, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
105
106
107 bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
108
109 wxBoxSizer* bSizerButtons;
110 bSizerButtons = new wxBoxSizer( wxHORIZONTAL );
111
112
113 bSizerButtons->Add( 0, 0, 1, wxEXPAND, 5 );
114
115 m_buttonSave = new wxButton( this, wxID_ANY, _("Save Jobset"), wxDefaultPosition, wxDefaultSize, 0 );
116 bSizerButtons->Add( m_buttonSave, 0, wxALL, 5 );
117
118
119 bSizerButtons->Add( 10, 0, 0, wxEXPAND, 5 );
120
121 m_buttonRunAllOutputs = new wxButton( this, wxID_ANY, _("Generate All Outputs"), wxDefaultPosition, wxDefaultSize, 0 );
122 bSizerButtons->Add( m_buttonRunAllOutputs, 0, wxALL, 5 );
123
124
125 bSizerMain->Add( bSizerButtons, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
126
127
128 this->SetSizer( bSizerMain );
129 this->Layout();
130
131 // Connect Events
132 m_jobsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_JOBSET_BASE::OnGridCellChange ), NULL, this );
133 m_jobsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_JOBSET_BASE::OnSizeGrid ), NULL, this );
134 m_buttonAddJob->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnAddJobClick ), NULL, this );
135 m_buttonUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnJobButtonUp ), NULL, this );
136 m_buttonDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnJobButtonDown ), NULL, this );
137 m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnJobButtonDelete ), NULL, this );
138 m_buttonOutputAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnAddOutputClick ), NULL, this );
139 m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnSaveButtonClick ), NULL, this );
140 m_buttonRunAllOutputs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnGenerateAllOutputsClick ), NULL, this );
141}
142
144{
145 // Disconnect Events
146 m_jobsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_JOBSET_BASE::OnGridCellChange ), NULL, this );
147 m_jobsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_JOBSET_BASE::OnSizeGrid ), NULL, this );
148 m_buttonAddJob->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnAddJobClick ), NULL, this );
149 m_buttonUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnJobButtonUp ), NULL, this );
150 m_buttonDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnJobButtonDown ), NULL, this );
151 m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnJobButtonDelete ), NULL, this );
152 m_buttonOutputAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnAddOutputClick ), NULL, this );
153 m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnSaveButtonClick ), NULL, this );
154 m_buttonRunAllOutputs->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnGenerateAllOutputsClick ), NULL, this );
155
156}
157
158PANEL_JOBSET_OUTPUT_BASE::PANEL_JOBSET_OUTPUT_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
159{
160 this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
161
162 wxBoxSizer* bSizerMain;
163 bSizerMain = new wxBoxSizer( wxVERTICAL );
164
165 wxFlexGridSizer* fgSizer3;
166 fgSizer3 = new wxFlexGridSizer( 1, 3, 5, 5 );
167 fgSizer3->AddGrowableCol( 1 );
168 fgSizer3->SetFlexibleDirection( wxBOTH );
169 fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
170
171 m_bitmapOutputType = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
172 fgSizer3->Add( m_bitmapOutputType, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
173
174 m_textOutputType = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
175 m_textOutputType->Wrap( -1 );
176 m_textOutputType->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
177
178 fgSizer3->Add( m_textOutputType, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 1 );
179
180 m_statusBitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
181 fgSizer3->Add( m_statusBitmap, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
182
183
184 bSizerMain->Add( fgSizer3, 0, wxEXPAND|wxALL, 5 );
185
186 wxBoxSizer* bSizerButtons;
187 bSizerButtons = new wxBoxSizer( wxHORIZONTAL );
188
189 m_buttonProperties = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
190 bSizerButtons->Add( m_buttonProperties, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
191
192 m_buttonDelete = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
193 bSizerButtons->Add( m_buttonDelete, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
194
195
196 bSizerButtons->Add( 0, 0, 1, wxEXPAND, 5 );
197
198 m_buttonGenerate = new wxButton( this, wxID_ANY, _("Generate"), wxDefaultPosition, wxDefaultSize, 0 );
199 bSizerButtons->Add( m_buttonGenerate, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
200
201
202 bSizerMain->Add( bSizerButtons, 0, wxEXPAND, 5 );
203
204
205 this->SetSizer( bSizerMain );
206 this->Layout();
207 bSizerMain->Fit( this );
208
209 // Connect Events
210 this->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnRightDown ) );
211 m_statusBitmap->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnLastStatusClick ), NULL, this );
212 m_buttonProperties->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnProperties ), NULL, this );
213 m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnDelete ), NULL, this );
214 m_buttonGenerate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnGenerate ), NULL, this );
215}
216
218{
219 // Disconnect Events
220 this->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnRightDown ) );
221 m_statusBitmap->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnLastStatusClick ), NULL, this );
222 m_buttonProperties->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnProperties ), NULL, this );
223 m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnDelete ), NULL, this );
224 m_buttonGenerate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnGenerate ), NULL, this );
225
226}
227
228DIALOG_OUTPUT_RUN_RESULTS_BASE::DIALOG_OUTPUT_RUN_RESULTS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
229{
230 this->SetSizeHints( wxSize( 450,250 ), wxDefaultSize );
231
232 wxBoxSizer* bMainSizer;
233 bMainSizer = new wxBoxSizer( wxVERTICAL );
234
235 m_staticTextOutputName = new wxStaticText( this, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
236 m_staticTextOutputName->Wrap( -1 );
237 bMainSizer->Add( m_staticTextOutputName, 0, wxALL, 5 );
238
239 wxBoxSizer* bSizer16;
240 bSizer16 = new wxBoxSizer( wxHORIZONTAL );
241
242 m_jobList = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL );
243 bSizer16->Add( m_jobList, 1, wxALL|wxEXPAND, 5 );
244
245 m_textCtrlOutput = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_BESTWRAP|wxTE_MULTILINE|wxTE_READONLY );
246 bSizer16->Add( m_textCtrlOutput, 1, wxALL|wxEXPAND, 5 );
247
248
249 bMainSizer->Add( bSizer16, 1, wxEXPAND, 5 );
250
251 m_sdbSizer = new wxStdDialogButtonSizer();
252 m_sdbSizerOK = new wxButton( this, wxID_OK );
253 m_sdbSizer->AddButton( m_sdbSizerOK );
254 m_sdbSizer->Realize();
255
256 bMainSizer->Add( m_sdbSizer, 0, wxEXPAND, 5 );
257
258
259 this->SetSizer( bMainSizer );
260 this->Layout();
261 bMainSizer->Fit( this );
262
263 this->Centre( wxBOTH );
264
265 // Connect Events
266 m_jobList->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_OUTPUT_RUN_RESULTS_BASE::OnJobListItemSelected ), NULL, this );
267 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_OUTPUT_RUN_RESULTS_BASE::OnButtonOk ), NULL, this );
268}
269
271{
272 // Disconnect Events
273 m_jobList->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_OUTPUT_RUN_RESULTS_BASE::OnJobListItemSelected ), NULL, this );
274 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_OUTPUT_RUN_RESULTS_BASE::OnButtonOk ), NULL, this );
275
276}
const char * name
Definition: DXF_plotter.cpp:59
virtual void OnButtonOk(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
DIALOG_OUTPUT_RUN_RESULTS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Job Output Run Log"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnJobListItemSelected(wxListEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
virtual void OnGenerateAllOutputsClick(wxCommandEvent &event)
wxBoxSizer * m_outputListSizer
virtual void OnGridCellChange(wxGridEvent &event)
STD_BITMAP_BUTTON * m_buttonDown
virtual void OnSizeGrid(wxSizeEvent &event)
wxButton * m_buttonRunAllOutputs
virtual void OnSaveButtonClick(wxCommandEvent &event)
wxScrolledWindow * m_outputList
STD_BITMAP_BUTTON * m_buttonOutputAdd
virtual void OnAddJobClick(wxCommandEvent &event)
virtual void OnJobButtonDelete(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_buttonAddJob
PANEL_JOBSET_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(600, 400), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
virtual void OnAddOutputClick(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_buttonDelete
virtual void OnJobButtonDown(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_buttonUp
virtual void OnJobButtonUp(wxCommandEvent &event)
wxStaticBitmap * m_bitmapOutputType
virtual void OnGenerate(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_buttonDelete
STD_BITMAP_BUTTON * m_buttonProperties
virtual void OnProperties(wxCommandEvent &event)
virtual void OnRightDown(wxMouseEvent &event)
PANEL_JOBSET_OUTPUT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxBORDER_SUNKEN|wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
virtual void OnDelete(wxCommandEvent &event)
wxStaticBitmap * m_statusBitmap
wxStaticText * m_textOutputType
virtual void OnLastStatusClick(wxMouseEvent &event)
A bitmap button widget that behaves like a standard dialog button except with an icon.
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:256
#define _(s)