OpenCPN Partial API docs
Loading...
Searching...
No Matches
GribUIDialogBase.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version Jun 5 2014)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO "NOT" EDIT THIS FILE!
7
11#include "GribUIDialogBase.h"
12#include "XyGribPanel.h"
13#include "manual.h"
14#include "ocpn_plugin.h"
15#include "folder.xpm"
16
18
19GRIBUICtrlBarBase::GRIBUICtrlBarBase(wxWindow* parent, wxWindowID id,
20 const wxString& title, const wxPoint& pos,
21 const wxSize& size, long style,
22 double scale_factor)
23 : wxDialog(parent, id, title, pos, size, style) {
24 m_ProjectBoatPanel = nullptr;
25 m_ScaledFactor = scale_factor;
26
27#ifdef __OCPN__ANDROID__
28 const bool m_bcompact = true;
29#else
30 const bool m_bcompact = false;
31#endif
32 if (m_bcompact) {
33 this->SetSizeHints(wxDefaultSize, wxDefaultSize);
34
35 m_fgCtrlBarSizer = new wxFlexGridSizer(0, 1, 0, 0);
36 m_fgCtrlBarSizer->AddGrowableCol(0);
37 m_fgCtrlBarSizer->SetFlexibleDirection(wxHORIZONTAL);
38 m_fgCtrlBarSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_NONE);
39
40 wxBoxSizer* mainBox = new wxBoxSizer(wxVERTICAL);
41 m_fgCtrlBarSizer->Add(mainBox, 1, wxEXPAND, 0);
42
43 wxBoxSizer* fgSizer50 = new wxBoxSizer(wxHORIZONTAL);
44 mainBox->Add(fgSizer50, 0, wxEXPAND, 5);
45
46 m_bpPrev =
47 new wxBitmapButton(this, ID_BTNPREV, wxNullBitmap, wxDefaultPosition,
48 wxDefaultSize, wxBU_AUTODRAW);
49 m_bpPrev->SetToolTip(_("Previous"));
50
51 fgSizer50->Add(m_bpPrev, 0, wxALL, 1);
52
53 wxArrayString m_cRecordForecastChoices;
54 m_cRecordForecastChoices.Add(_T("Item0"));
55 m_cRecordForecast =
56 new wxChoice(this, ID_CTRLTIME, wxDefaultPosition, wxDefaultSize,
57 m_cRecordForecastChoices, 0);
58 m_cRecordForecast->SetSelection(0);
59 fgSizer50->Add(m_cRecordForecast, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1);
60
61 m_bpNext =
62 new wxBitmapButton(this, ID_BTNNEXT, wxNullBitmap, wxDefaultPosition,
63 wxDefaultSize, wxBU_AUTODRAW);
64 m_bpNext->SetToolTip(_("Next"));
65
66 fgSizer50->Add(m_bpNext, 0, wxALL, 1);
67
68 wxBoxSizer* fgSizer51 = new wxBoxSizer(wxHORIZONTAL);
69 mainBox->Add(fgSizer51, 0, wxEXPAND, 5);
70
71 m_bpAltitude =
72 new wxBitmapButton(this, ID_CTRLALTITUDE, wxNullBitmap,
73 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
74 m_bpAltitude->SetToolTip(_("Select geoptential altitude"));
75
76 fgSizer51->Add(m_bpAltitude, 0, wxALL, 1);
77
78 m_bpNow =
79 new wxBitmapButton(this, ID_BTNNOW, wxNullBitmap, wxDefaultPosition,
80 wxDefaultSize, wxBU_AUTODRAW);
81 m_bpNow->SetToolTip(_("Now"));
82
83 fgSizer51->Add(m_bpNow, 0, wxALL, 1);
84
85 m_bpZoomToCenter =
86 new wxBitmapButton(this, ID_BTNZOOMTC, wxNullBitmap, wxDefaultPosition,
87 wxDefaultSize, wxBU_AUTODRAW);
88 m_bpZoomToCenter->SetToolTip(_("Zoom To Center"));
89
90 fgSizer51->Add(m_bpZoomToCenter, 0, wxALL, 1);
91
92 m_bpShowCursorData =
93 new wxBitmapButton(this, ID_BTNSHOWCDATA, wxNullBitmap,
94 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
95 fgSizer51->Add(m_bpShowCursorData, 0, wxALL, 1);
96
97 fgSizer51->Add(0, 0, 1, wxEXPAND | wxLEFT | wxRIGHT, 1);
98 m_bpPlay =
99 new wxBitmapButton(this, ID_BTNPLAY, wxNullBitmap, wxDefaultPosition,
100 wxDefaultSize, wxBU_AUTODRAW);
101 fgSizer51->Add(m_bpPlay, 0, wxBOTTOM | wxLEFT | wxTOP, 1);
102
103 m_sTimeline = new wxSlider(this, ID_TIMELINE, 1, 0, 10, wxDefaultPosition,
104 wxSize(90, -1), wxSL_HORIZONTAL);
105 fgSizer51->Add(m_sTimeline, 0, wxEXPAND, 1);
106
107 fgSizer51->Add(0, 0, 1, wxEXPAND | wxLEFT | wxRIGHT, 1);
108
109 m_bpOpenFile = nullptr;
110 // m_bpOpenFile = new wxBitmapButton( this, ID_BTNOPENFILE,
111 // wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
112 // m_bpOpenFile->SetToolTip( _("Open a new file") );
113 // fgSizer51->Add( m_bpOpenFile, 0, wxALL, 1 );
114
115 m_bpSettings =
116 new wxBitmapButton(this, ID_BTNSETTING, wxNullBitmap, wxDefaultPosition,
117 wxDefaultSize, wxBU_AUTODRAW);
118 m_bpSettings->SetToolTip(_("Settings"));
119
120 fgSizer51->Add(m_bpSettings, 0, wxALL, 1);
121
122 m_bpRequest = nullptr;
123
124 // m_bpRequest = new wxBitmapButton( this, ID_BTNREQUEST,
125 // wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
126 // fgSizer51->Add( m_bpRequest, 0, wxALL, 1 );
127
128 // wxFlexGridSizer* fgSizer49;
129 // fgSizer49 = new wxFlexGridSizer( 0, 1, 0, 0 );
130 // fgSizer49->AddGrowableCol( 0 );
131 // fgSizer49->SetFlexibleDirection( wxVERTICAL );
132 // fgSizer49->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
133
134 m_fgCDataSizer = new wxFlexGridSizer(0, 2, 0, 0);
135 m_fgCDataSizer->SetFlexibleDirection(wxVERTICAL);
136 m_fgCDataSizer->AddGrowableCol(0);
137 m_fgCDataSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
138
139 mainBox->Add(m_fgCDataSizer, 1, wxEXPAND, 5);
140
141 m_fgCtrlGrabberSize = new wxFlexGridSizer(0, 1, 0, 0);
142 m_fgCtrlGrabberSize->SetFlexibleDirection(wxBOTH);
143 m_fgCtrlGrabberSize->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
144
145 this->SetSizer(m_fgCtrlBarSizer);
146 this->Layout();
147 m_fgCtrlBarSizer->Fit(this);
148 } else {
149 this->SetSizeHints(wxDefaultSize, wxDefaultSize);
150
151 m_fgCtrlBarSizer = new wxFlexGridSizer(1, 2, 0, 0);
152 m_fgCtrlBarSizer->AddGrowableCol(0);
153 m_fgCtrlBarSizer->SetFlexibleDirection(wxHORIZONTAL);
154 m_fgCtrlBarSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_NONE);
155
156 wxFlexGridSizer* fgSizer49;
157 fgSizer49 = new wxFlexGridSizer(0, 1, 0, 0);
158 fgSizer49->AddGrowableCol(0);
159 fgSizer49->SetFlexibleDirection(wxVERTICAL);
160 fgSizer49->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
161
162 wxFlexGridSizer* fgSizer50;
163 fgSizer50 = new wxFlexGridSizer(0, 15, 0, 0);
164 fgSizer50->AddGrowableCol(3);
165 fgSizer50->AddGrowableCol(7);
166 fgSizer50->AddGrowableCol(10);
167 fgSizer50->SetFlexibleDirection(wxHORIZONTAL);
168 fgSizer50->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
169
170 m_bpPrev =
171 new wxBitmapButton(this, ID_BTNPREV, wxNullBitmap, wxDefaultPosition,
172 wxDefaultSize, wxBU_AUTODRAW);
173 m_bpPrev->SetToolTip(_("Previous"));
174
175 fgSizer50->Add(m_bpPrev, 0, wxALL, 1);
176
177 wxArrayString m_cRecordForecastChoices;
178 m_cRecordForecastChoices.Add(_T("Item0"));
179 m_cRecordForecast =
180 new wxChoice(this, ID_CTRLTIME, wxDefaultPosition, wxDefaultSize,
181 m_cRecordForecastChoices, 0);
182 m_cRecordForecast->SetSelection(0);
183 fgSizer50->Add(m_cRecordForecast, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1);
184
185 m_bpNext =
186 new wxBitmapButton(this, ID_BTNNEXT, wxNullBitmap, wxDefaultPosition,
187 wxDefaultSize, wxBU_AUTODRAW);
188 m_bpNext->SetToolTip(_("Next"));
189
190 fgSizer50->Add(m_bpNext, 0, wxALL, 1);
191
192 fgSizer50->Add(0, 0, 1, wxEXPAND | wxLEFT | wxRIGHT, 1);
193
194 m_bpAltitude =
195 new wxBitmapButton(this, ID_CTRLALTITUDE, wxNullBitmap,
196 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
197 m_bpAltitude->SetToolTip(_("Select geoptential altitude"));
198
199 fgSizer50->Add(m_bpAltitude, 0, wxALL, 1);
200
201 m_bpNow =
202 new wxBitmapButton(this, ID_BTNNOW, wxNullBitmap, wxDefaultPosition,
203 wxDefaultSize, wxBU_AUTODRAW);
204 m_bpNow->SetToolTip(_("Now"));
205
206 fgSizer50->Add(m_bpNow, 0, wxALL, 1);
207
208 m_bpZoomToCenter =
209 new wxBitmapButton(this, ID_BTNZOOMTC, wxNullBitmap, wxDefaultPosition,
210 wxDefaultSize, wxBU_AUTODRAW);
211 m_bpZoomToCenter->SetToolTip(_("Zoom To Center"));
212
213 fgSizer50->Add(m_bpZoomToCenter, 0, wxALL, 1);
214
215 m_bpShowCursorData =
216 new wxBitmapButton(this, ID_BTNSHOWCDATA, wxNullBitmap,
217 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
218 fgSizer50->Add(m_bpShowCursorData, 0, wxALL, 1);
219
220 fgSizer50->Add(0, 0, 1, wxEXPAND | wxLEFT | wxRIGHT, 1);
221
222 m_bpPlay =
223 new wxBitmapButton(this, ID_BTNPLAY, wxNullBitmap, wxDefaultPosition,
224 wxDefaultSize, wxBU_AUTODRAW);
225 fgSizer50->Add(m_bpPlay, 0, wxBOTTOM | wxLEFT | wxTOP, 1);
226
227 m_sTimeline = new wxSlider(this, ID_TIMELINE, 1, 0, 10, wxDefaultPosition,
228 wxSize(90, -1), wxSL_HORIZONTAL);
229 fgSizer50->Add(m_sTimeline, 0, wxEXPAND, 1);
230
231 fgSizer50->Add(0, 0, 1, wxEXPAND | wxLEFT | wxRIGHT, 1);
232
233 m_bpOpenFile =
234 new wxBitmapButton(this, ID_BTNOPENFILE, wxNullBitmap,
235 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
236 m_bpOpenFile->SetToolTip(_("Open a new file"));
237
238 fgSizer50->Add(m_bpOpenFile, 0, wxALL, 1);
239
240 m_bpSettings =
241 new wxBitmapButton(this, ID_BTNSETTING, wxNullBitmap, wxDefaultPosition,
242 wxDefaultSize, wxBU_AUTODRAW);
243 m_bpSettings->SetToolTip(_("Settings"));
244
245 fgSizer50->Add(m_bpSettings, 0, wxALL, 1);
246
247 m_bpRequest =
248 new wxBitmapButton(this, ID_BTNREQUEST, wxNullBitmap, wxDefaultPosition,
249 wxDefaultSize, wxBU_AUTODRAW);
250 fgSizer50->Add(m_bpRequest, 0, wxALL, 1);
251
252 fgSizer49->Add(fgSizer50, 1, wxEXPAND, 5);
253 m_ProjectBoatPanel = new ProjectBoatPanel(this);
254 fgSizer49->Add(m_ProjectBoatPanel, 0, wxEXPAND | wxALL, 1);
255
256 m_fgCDataSizer = new wxFlexGridSizer(0, 2, 0, 0);
257 m_fgCDataSizer->SetFlexibleDirection(wxBOTH);
258 m_fgCDataSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
259
260 fgSizer49->Add(m_fgCDataSizer, 1, wxEXPAND, 5);
261
262 m_fgCtrlBarSizer->Add(fgSizer49, 1, wxEXPAND, 0);
263
264 m_fgCtrlGrabberSize = new wxFlexGridSizer(0, 1, 0, 0);
265 m_fgCtrlGrabberSize->SetFlexibleDirection(wxBOTH);
266 m_fgCtrlGrabberSize->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
267
268 m_fgCtrlBarSizer->Add(m_fgCtrlGrabberSize, 1, wxEXPAND, 0);
269
270 this->SetSizer(m_fgCtrlBarSizer);
271 this->Layout();
272 m_fgCtrlBarSizer->Fit(this);
273 }
274
275 this->Centre(wxBOTH);
276
277 // Connect Events
278 this->Connect(wxEVT_CLOSE_WINDOW,
279 wxCloseEventHandler(GRIBUICtrlBarBase::OnClose));
280 this->Connect(wxEVT_LEFT_DOWN,
281 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
282 this->Connect(wxEVT_LEFT_UP,
283 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
284 this->Connect(wxEVT_MIDDLE_DOWN,
285 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
286 this->Connect(wxEVT_MIDDLE_UP,
287 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
288 this->Connect(wxEVT_RIGHT_DOWN,
289 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
290 this->Connect(wxEVT_RIGHT_UP,
291 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
292 this->Connect(wxEVT_MOTION,
293 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
294 this->Connect(wxEVT_LEFT_DCLICK,
295 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
296 this->Connect(wxEVT_MIDDLE_DCLICK,
297 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
298 this->Connect(wxEVT_RIGHT_DCLICK,
299 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
300 this->Connect(wxEVT_LEAVE_WINDOW,
301 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
302 this->Connect(wxEVT_ENTER_WINDOW,
303 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
304 this->Connect(wxEVT_MOUSEWHEEL,
305 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
306 this->Connect(wxEVT_SIZE, wxSizeEventHandler(GRIBUICtrlBarBase::OnSize));
307
308#ifndef __WXQT__
309 this->Connect(wxEVT_PAINT, wxPaintEventHandler(GRIBUICtrlBarBase::OnPaint));
310#endif
311 m_bpPrev->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
312 wxCommandEventHandler(GRIBUICtrlBarBase::OnPrev), nullptr,
313 this);
314 m_bpPrev->Connect(wxEVT_RIGHT_DOWN,
315 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
316 nullptr, this);
317 m_cRecordForecast->Connect(
318 wxEVT_COMMAND_CHOICE_SELECTED,
319 wxCommandEventHandler(GRIBUICtrlBarBase::OnRecordForecast), nullptr,
320 this);
321 m_cRecordForecast->Connect(
322 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
323 nullptr, this);
324 m_bpNext->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
325 wxCommandEventHandler(GRIBUICtrlBarBase::OnNext), nullptr,
326 this);
327 m_bpNext->Connect(wxEVT_RIGHT_DOWN,
328 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
329 nullptr, this);
330 m_bpAltitude->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
331 wxCommandEventHandler(GRIBUICtrlBarBase::OnAltitude),
332 nullptr, this);
333 m_bpAltitude->Connect(wxEVT_RIGHT_DOWN,
334 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
335 nullptr, this);
336 m_bpNow->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
337 wxCommandEventHandler(GRIBUICtrlBarBase::OnNow), nullptr,
338 this);
339 m_bpNow->Connect(wxEVT_RIGHT_DOWN,
340 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
341 nullptr, this);
342 m_bpZoomToCenter->Connect(
343 wxEVT_COMMAND_BUTTON_CLICKED,
344 wxCommandEventHandler(GRIBUICtrlBarBase::OnZoomToCenterClick), nullptr,
345 this);
346 m_bpZoomToCenter->Connect(
347 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
348 nullptr, this);
349 m_bpShowCursorData->Connect(
350 wxEVT_COMMAND_BUTTON_CLICKED,
351 wxCommandEventHandler(GRIBUICtrlBarBase::OnShowCursorData), nullptr,
352 this);
353 m_bpShowCursorData->Connect(
354 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
355 nullptr, this);
356 m_bpPlay->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
357 wxCommandEventHandler(GRIBUICtrlBarBase::OnPlayStop),
358 nullptr, this);
359 m_bpPlay->Connect(wxEVT_RIGHT_DOWN,
360 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
361 nullptr, this);
362 m_sTimeline->Connect(wxEVT_RIGHT_DOWN,
363 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
364 nullptr, this);
365 m_sTimeline->Connect(wxEVT_SCROLL_TOP,
366 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
367 nullptr, this);
368 m_sTimeline->Connect(wxEVT_SCROLL_BOTTOM,
369 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
370 nullptr, this);
371 m_sTimeline->Connect(wxEVT_SCROLL_LINEUP,
372 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
373 nullptr, this);
374 m_sTimeline->Connect(wxEVT_SCROLL_LINEDOWN,
375 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
376 nullptr, this);
377 m_sTimeline->Connect(wxEVT_SCROLL_PAGEUP,
378 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
379 nullptr, this);
380 m_sTimeline->Connect(wxEVT_SCROLL_PAGEDOWN,
381 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
382 nullptr, this);
383 m_sTimeline->Connect(wxEVT_SCROLL_THUMBTRACK,
384 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
385 nullptr, this);
386 m_sTimeline->Connect(wxEVT_SCROLL_THUMBRELEASE,
387 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
388 nullptr, this);
389 m_sTimeline->Connect(wxEVT_SCROLL_CHANGED,
390 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
391 nullptr, this);
392
393 if (m_bpOpenFile) {
394 m_bpOpenFile->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
395 wxCommandEventHandler(GRIBUICtrlBarBase::OnOpenFile),
396 nullptr, this);
397 m_bpOpenFile->Connect(wxEVT_RIGHT_DOWN,
398 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
399 nullptr, this);
400 }
401
402#ifdef __OCPN__ANDROID__
403 m_bpSettings->Connect(
404 wxEVT_COMMAND_BUTTON_CLICKED,
405 wxCommandEventHandler(GRIBUICtrlBarBase::OnCompositeDialog), nullptr,
406 this);
407#else
408 m_bpSettings->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
409 wxCommandEventHandler(GRIBUICtrlBarBase::OnSettings),
410 nullptr, this);
411 m_bpSettings->Connect(wxEVT_RIGHT_DOWN,
412 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
413 nullptr, this);
414#endif
415
416 if (m_bpRequest) {
417 m_bpRequest->Connect(
418 wxEVT_COMMAND_BUTTON_CLICKED,
419 wxCommandEventHandler(GRIBUICtrlBarBase::OnRequestForecastData),
420 nullptr, this);
421 m_bpRequest->Connect(wxEVT_RIGHT_DOWN,
422 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
423 nullptr, this);
424 }
425}
426
427GRIBUICtrlBarBase::~GRIBUICtrlBarBase() {
428 // Disconnect Events
429 this->Disconnect(wxEVT_CLOSE_WINDOW,
430 wxCloseEventHandler(GRIBUICtrlBarBase::OnClose));
431 this->Disconnect(wxEVT_LEFT_DOWN,
432 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
433 this->Disconnect(wxEVT_LEFT_UP,
434 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
435 this->Disconnect(wxEVT_MIDDLE_DOWN,
436 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
437 this->Disconnect(wxEVT_MIDDLE_UP,
438 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
439 this->Disconnect(wxEVT_RIGHT_DOWN,
440 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
441 this->Disconnect(wxEVT_RIGHT_UP,
442 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
443 this->Disconnect(wxEVT_MOTION,
444 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
445 this->Disconnect(wxEVT_LEFT_DCLICK,
446 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
447 this->Disconnect(wxEVT_MIDDLE_DCLICK,
448 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
449 this->Disconnect(wxEVT_RIGHT_DCLICK,
450 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
451 this->Disconnect(wxEVT_LEAVE_WINDOW,
452 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
453 this->Disconnect(wxEVT_ENTER_WINDOW,
454 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
455 this->Disconnect(wxEVT_MOUSEWHEEL,
456 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent));
457 this->Disconnect(wxEVT_PAINT,
458 wxPaintEventHandler(GRIBUICtrlBarBase::OnPaint));
459 this->Disconnect(wxEVT_SIZE, wxSizeEventHandler(GRIBUICtrlBarBase::OnSize));
460 m_bpPrev->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
461 wxCommandEventHandler(GRIBUICtrlBarBase::OnPrev),
462 nullptr, this);
463 m_bpPrev->Disconnect(wxEVT_RIGHT_DOWN,
464 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
465 nullptr, this);
466 m_cRecordForecast->Disconnect(
467 wxEVT_COMMAND_CHOICE_SELECTED,
468 wxCommandEventHandler(GRIBUICtrlBarBase::OnRecordForecast), nullptr,
469 this);
470 m_cRecordForecast->Disconnect(
471 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
472 nullptr, this);
473 m_bpNext->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
474 wxCommandEventHandler(GRIBUICtrlBarBase::OnNext),
475 nullptr, this);
476 m_bpNext->Disconnect(wxEVT_RIGHT_DOWN,
477 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
478 nullptr, this);
479 m_bpAltitude->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
480 wxCommandEventHandler(GRIBUICtrlBarBase::OnAltitude),
481 nullptr, this);
482 m_bpAltitude->Disconnect(wxEVT_RIGHT_DOWN,
483 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
484 nullptr, this);
485 m_bpNow->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
486 wxCommandEventHandler(GRIBUICtrlBarBase::OnNow), nullptr,
487 this);
488 m_bpNow->Disconnect(wxEVT_RIGHT_DOWN,
489 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
490 nullptr, this);
491 m_bpZoomToCenter->Disconnect(
492 wxEVT_COMMAND_BUTTON_CLICKED,
493 wxCommandEventHandler(GRIBUICtrlBarBase::OnZoomToCenterClick), nullptr,
494 this);
495 m_bpZoomToCenter->Disconnect(
496 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
497 nullptr, this);
498 m_bpShowCursorData->Disconnect(
499 wxEVT_COMMAND_BUTTON_CLICKED,
500 wxCommandEventHandler(GRIBUICtrlBarBase::OnShowCursorData), nullptr,
501 this);
502 m_bpShowCursorData->Disconnect(
503 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
504 nullptr, this);
505 m_bpPlay->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
506 wxCommandEventHandler(GRIBUICtrlBarBase::OnPlayStop),
507 nullptr, this);
508 m_bpPlay->Disconnect(wxEVT_RIGHT_DOWN,
509 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
510 nullptr, this);
511 m_sTimeline->Disconnect(wxEVT_RIGHT_DOWN,
512 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
513 nullptr, this);
514 m_sTimeline->Disconnect(wxEVT_SCROLL_TOP,
515 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
516 nullptr, this);
517 m_sTimeline->Disconnect(wxEVT_SCROLL_BOTTOM,
518 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
519 nullptr, this);
520 m_sTimeline->Disconnect(wxEVT_SCROLL_LINEUP,
521 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
522 nullptr, this);
523 m_sTimeline->Disconnect(wxEVT_SCROLL_LINEDOWN,
524 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
525 nullptr, this);
526 m_sTimeline->Disconnect(wxEVT_SCROLL_PAGEUP,
527 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
528 nullptr, this);
529 m_sTimeline->Disconnect(wxEVT_SCROLL_PAGEDOWN,
530 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
531 nullptr, this);
532 m_sTimeline->Disconnect(wxEVT_SCROLL_THUMBTRACK,
533 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
534 nullptr, this);
535 m_sTimeline->Disconnect(wxEVT_SCROLL_THUMBRELEASE,
536 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
537 nullptr, this);
538 m_sTimeline->Disconnect(wxEVT_SCROLL_CHANGED,
539 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
540 nullptr, this);
541
542 if (m_bpOpenFile) {
543 m_bpOpenFile->Disconnect(
544 wxEVT_COMMAND_BUTTON_CLICKED,
545 wxCommandEventHandler(GRIBUICtrlBarBase::OnOpenFile), nullptr, this);
546 m_bpOpenFile->Disconnect(
547 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
548 nullptr, this);
549 }
550
551 m_bpSettings->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
552 wxCommandEventHandler(GRIBUICtrlBarBase::OnSettings),
553 nullptr, this);
554 m_bpSettings->Disconnect(wxEVT_RIGHT_DOWN,
555 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
556 nullptr, this);
557
558 if (m_bpRequest) {
559 m_bpRequest->Disconnect(
560 wxEVT_COMMAND_BUTTON_CLICKED,
561 wxCommandEventHandler(GRIBUICtrlBarBase::OnRequestForecastData),
562 nullptr, this);
563 m_bpRequest->Disconnect(
564 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
565 nullptr, this);
566 }
567}
568
569wxBitmap GRIBUICtrlBarBase::GetScaledBitmap(wxBitmap bitmap,
570 const wxString svgFileName,
571 double scale_factor) {
572 int margin = 4; // there is a small margin around the bitmap drawn by the
573 // wxBitmapButton
574 int w = bitmap.GetWidth() - margin;
575 int h = bitmap.GetHeight() - margin;
576 w *= scale_factor;
577 h *= scale_factor;
578
579#ifdef ocpnUSE_SVG
580 wxString shareLocn = *GetpSharedDataLocation() + _T("plugins") +
581 wxFileName::GetPathSeparator() + _T("grib_pi") +
582 wxFileName::GetPathSeparator() + _T("data") +
583 wxFileName::GetPathSeparator();
584 wxString filename = shareLocn + svgFileName + _T(".svg");
585
586 wxBitmap svgbm = GetBitmapFromSVGFile(filename, w, h);
587 if (svgbm.GetWidth() > 0 && svgbm.GetHeight() > 0)
588 return svgbm;
589 else
590#endif // ocpnUSE_SVG
591 {
592 wxImage a = bitmap.ConvertToImage();
593 return wxBitmap(a.Scale(w, h), wxIMAGE_QUALITY_HIGH);
594 }
595}
596
597GRIBUICDataBase::GRIBUICDataBase(wxWindow* parent, wxWindowID id,
598 const wxString& title, const wxPoint& pos,
599 const wxSize& size, long style)
600 : wxDialog(parent, id, title, pos, size, style) {
601 this->SetSizeHints(wxSize(-1, -1), wxDefaultSize);
602 this->SetFont(wxFont(9, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,
603 wxFONTWEIGHT_NORMAL, false, wxEmptyString));
604
605 wxFlexGridSizer* fgSizer57;
606 fgSizer57 = new wxFlexGridSizer(0, 2, 0, 0);
607 fgSizer57->SetFlexibleDirection(wxBOTH);
608 fgSizer57->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
609
610 m_fgCdataSizer = new wxFlexGridSizer(0, 1, 0, 0);
611 m_fgCdataSizer->SetFlexibleDirection(wxBOTH);
612 m_fgCdataSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
613
614 fgSizer57->Add(m_fgCdataSizer, 1, wxEXPAND, 5);
615
616 this->SetSizer(fgSizer57);
617 this->Layout();
618 fgSizer57->Fit(this);
619
620 this->Centre(wxBOTH);
621}
622
623GRIBUICDataBase::~GRIBUICDataBase() {}
624
625CursorDataBase::CursorDataBase(wxWindow* parent, wxWindowID id,
626 const wxPoint& pos, const wxSize& size,
627 long style)
628 : wxPanel(parent, id, pos, size, style) {
629 fgSizer30 = new wxFlexGridSizer(0, 1, 0, 0);
630 fgSizer30->AddGrowableRow(1);
631 fgSizer30->SetFlexibleDirection(wxBOTH);
632 fgSizer30->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_ALL);
633
634 m_stTrackingText = new wxStaticText(this, wxID_ANY, _("MyLabel"),
635 wxDefaultPosition, wxDefaultSize, 0);
636 m_stTrackingText->Wrap(-1);
637 fgSizer30->Add(m_stTrackingText, 0, wxEXPAND | wxLEFT, 5);
638
639 wxFlexGridSizer* fgSizer43;
640 fgSizer43 = new wxFlexGridSizer(0, 1, 0, 0);
641 fgSizer43->SetFlexibleDirection(wxBOTH);
642 fgSizer43->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
643
644 m_fgTrackingControls = new wxFlexGridSizer(0, 8, 0, 0);
645 m_fgTrackingControls->SetFlexibleDirection(wxBOTH);
646 m_fgTrackingControls->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
647
648 m_cbWind = new wxCheckBox(this, ID_CB_WIND, _("Wind"), wxDefaultPosition,
649 wxDefaultSize, 0);
650 m_fgTrackingControls->Add(m_cbWind, 0, wxEXPAND | wxLEFT | wxTOP, 2);
651
652 m_tcWindSpeed =
653 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
654 wxSize(70, -1), wxTE_READONLY);
655 m_fgTrackingControls->Add(m_tcWindSpeed, 0, 0, 1);
656
657 m_tcWindSpeedBf =
658 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxPoint(-1, -1),
659 wxSize(45, -1), wxTE_READONLY);
660 m_fgTrackingControls->Add(m_tcWindSpeedBf, 0, wxALIGN_CENTER_VERTICAL, 1);
661
662 m_tcWindDirection =
663 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
664 wxSize(45, -1), wxTE_READONLY);
665 m_fgTrackingControls->Add(m_tcWindDirection, 0, 0, 1);
666
667 m_cbWindGust = new wxCheckBox(this, ID_CB_WIND_GUSTS, _("Wind Gust"),
668 wxDefaultPosition, wxDefaultSize, 0);
669 m_fgTrackingControls->Add(m_cbWindGust, 0, wxALL | wxEXPAND, 5);
670
671 m_tcWindGust =
672 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
673 wxSize(70, -1), wxTE_READONLY);
674 m_fgTrackingControls->Add(m_tcWindGust, 0, 0, 1);
675
676 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 1);
677
678 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 1);
679
680 m_cbPressure = new wxCheckBox(this, ID_CB_PRESSURE, _("Pressure"),
681 wxDefaultPosition, wxDefaultSize, 0);
682 m_fgTrackingControls->Add(m_cbPressure, 0, wxALL | wxEXPAND, 5);
683
684 m_tcPressure =
685 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
686 wxSize(70, -1), wxTE_READONLY);
687 m_tcPressure->SetToolTip(_("Mean Sea Level Pressure (MSLP)"));
688
689 m_fgTrackingControls->Add(m_tcPressure, 0, 0, 1);
690
691 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
692
693 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
694
695 m_cbWave = new wxCheckBox(this, ID_CB_WAVES, _("Waves"), wxDefaultPosition,
696 wxDefaultSize, 0);
697 m_fgTrackingControls->Add(m_cbWave, 0, wxALL | wxEXPAND, 5);
698
699 m_tcWaveHeight =
700 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
701 wxSize(70, -1), wxTE_READONLY);
702 m_tcWaveHeight->SetToolTip(_("Significant Wave Height"));
703
704 m_fgTrackingControls->Add(m_tcWaveHeight, 0, 0, 1);
705
706 m_tcWavePeriode =
707 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
708 wxSize(45, -1), wxTE_READONLY);
709 m_tcWavePeriode->SetToolTip(_("Waves period"));
710
711 m_fgTrackingControls->Add(m_tcWavePeriode, 0, 0, 1);
712
713 m_tcWaveDirection =
714 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
715 wxSize(45, -1), wxTE_READONLY);
716 m_tcWaveDirection->SetToolTip(_("Waves Direction"));
717
718 m_fgTrackingControls->Add(m_tcWaveDirection, 0, 0, 1);
719
720 m_cbCurrent = new wxCheckBox(this, ID_CB_CURRENT, _("Current"),
721 wxDefaultPosition, wxDefaultSize, 0);
722 m_fgTrackingControls->Add(m_cbCurrent, 0, wxALL | wxEXPAND, 5);
723
724 m_tcCurrentVelocity =
725 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
726 wxSize(70, -1), wxTE_READONLY);
727 m_tcCurrentVelocity->SetToolTip(_("Surface Current Speed"));
728
729 m_fgTrackingControls->Add(m_tcCurrentVelocity, 0, 0, 1);
730
731 m_tcCurrentDirection =
732 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
733 wxSize(45, -1), wxTE_READONLY);
734 m_tcCurrentDirection->SetToolTip(_("Surface Current Direction"));
735
736 m_fgTrackingControls->Add(m_tcCurrentDirection, 0, 0, 1);
737
738 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
739
740 m_cbPrecipitation = new wxCheckBox(this, ID_CB_RAINFALL, _("Rainfall"),
741 wxDefaultPosition, wxDefaultSize, 0);
742 m_fgTrackingControls->Add(m_cbPrecipitation, 0, wxALL | wxEXPAND, 5);
743
744 m_tcPrecipitation =
745 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
746 wxSize(70, -1), wxTE_READONLY);
747 m_tcPrecipitation->SetToolTip(_("Cumulative Rainfall per Hour"));
748
749 m_fgTrackingControls->Add(m_tcPrecipitation, 0, 0, 1);
750
751 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 1);
752
753 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
754
755 m_cbCloud = new wxCheckBox(this, ID_CB_CLOUD_COVER, _("Cloud Cover"),
756 wxDefaultPosition, wxDefaultSize, 0);
757 m_fgTrackingControls->Add(m_cbCloud, 0, wxALL | wxEXPAND, 5);
758
759 m_tcCloud = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
760 wxSize(70, -1), wxTE_READONLY);
761 m_tcCloud->SetToolTip(_("Cloud Cover"));
762
763 m_fgTrackingControls->Add(m_tcCloud, 0, 0, 1);
764
765 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 1);
766
767 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
768
769 m_cbAirTemperature = new wxCheckBox(this, ID_CB_AIR_TEMP, _("Air Temp"),
770 wxDefaultPosition, wxDefaultSize, 0);
771 m_fgTrackingControls->Add(m_cbAirTemperature, 0, wxALL | wxEXPAND, 5);
772
773 m_tcAirTemperature =
774 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
775 wxSize(70, -1), wxTE_READONLY);
776 m_fgTrackingControls->Add(m_tcAirTemperature, 0, 0, 1);
777
778 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 1);
779
780 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
781
782 m_cbSeaTemperature = new wxCheckBox(this, ID_CB_SEA_TEMP, _("Sea Temp"),
783 wxDefaultPosition, wxDefaultSize, 0);
784 m_fgTrackingControls->Add(m_cbSeaTemperature, 0, wxALL | wxEXPAND, 5);
785
786 m_tcSeaTemperature =
787 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
788 wxSize(70, -1), wxTE_READONLY);
789 m_tcSeaTemperature->SetToolTip(_("Sea or Air Temperature at Surface Level"));
790
791 m_fgTrackingControls->Add(m_tcSeaTemperature, 0, 0, 1);
792
793 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
794
795 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
796
797 m_cbCAPE = new wxCheckBox(this, ID_CB_CAPE, _("CAPE"), wxDefaultPosition,
798 wxDefaultSize, 0);
799 m_fgTrackingControls->Add(m_cbCAPE, 0, wxALL | wxEXPAND, 5);
800
801 m_tcCAPE = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxPoint(-1, -1),
802 wxSize(70, -1), wxTE_READONLY);
803 m_tcCAPE->SetToolTip(_("Convective Available Potential Energy"));
804
805 m_fgTrackingControls->Add(m_tcCAPE, 0, 0, 1);
806
807 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
808
809 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
810
811 m_cbReflC = new wxCheckBox(this, ID_CB_COMP_REFL, _("Comp. Refl."),
812 wxDefaultPosition, wxDefaultSize, 0);
813 m_fgTrackingControls->Add(m_cbReflC, 0, wxALL | wxEXPAND, 5);
814
815 m_tcReflC = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxPoint(-1, -1),
816 wxSize(70, -1), wxTE_READONLY);
817 m_tcReflC->SetToolTip(_("Composite Reflectivity"));
818
819 m_fgTrackingControls->Add(m_tcReflC, 0, 0, 1);
820
821 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
822
823 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
824
825 m_cbAltitude = new wxCheckBox(this, wxID_ANY, _("Altitude"),
826 wxDefaultPosition, wxDefaultSize, 0);
827 m_cbAltitude->SetValue(true);
828 m_cbAltitude->Enable(false);
829
830 m_fgTrackingControls->Add(m_cbAltitude, 0, wxALL | wxEXPAND, 5);
831
832 m_tcAltitude =
833 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
834 wxSize(-1, -1), wxTE_READONLY);
835 m_tcAltitude->SetMinSize(wxSize(70, -1));
836
837 m_fgTrackingControls->Add(m_tcAltitude, 0, 0, 5);
838
839 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
840
841 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
842
843 m_cbTemp = new wxCheckBox(this, wxID_ANY, _("Temp."), wxDefaultPosition,
844 wxDefaultSize, 0);
845 m_cbTemp->SetValue(true);
846 m_cbTemp->Enable(false);
847
848 m_fgTrackingControls->Add(m_cbTemp, 0, wxALL | wxEXPAND, 5);
849
850 m_tcTemp = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
851 wxDefaultSize, wxTE_READONLY);
852 m_tcTemp->SetMinSize(wxSize(70, -1));
853
854 m_fgTrackingControls->Add(m_tcTemp, 0, 0, 5);
855
856 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
857
858 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
859
860 m_cbRelHumid = new wxCheckBox(this, wxID_ANY, _("Relat. Hum."),
861 wxDefaultPosition, wxDefaultSize, 0);
862 m_cbRelHumid->SetValue(true);
863 m_cbRelHumid->Enable(false);
864
865 m_fgTrackingControls->Add(m_cbRelHumid, 0, wxALL | wxEXPAND, 5);
866
867 m_tcRelHumid =
868 new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
869 wxDefaultSize, wxTE_READONLY);
870 m_tcRelHumid->SetMinSize(wxSize(70, -1));
871
872 m_fgTrackingControls->Add(m_tcRelHumid, 0, 0, 5);
873
874 fgSizer43->Add(m_fgTrackingControls, 1, wxEXPAND, 1);
875
876 fgSizer30->Add(fgSizer43, 1, wxEXPAND, 5);
877
878 this->SetSizer(fgSizer30);
879 this->Layout();
880 fgSizer30->Fit(this);
881
882 // Connect Events
883 this->Connect(wxEVT_LEFT_DOWN,
884 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
885 this->Connect(wxEVT_LEFT_UP,
886 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
887 this->Connect(wxEVT_MIDDLE_DOWN,
888 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
889 this->Connect(wxEVT_MIDDLE_UP,
890 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
891 this->Connect(wxEVT_RIGHT_DOWN,
892 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
893 this->Connect(wxEVT_RIGHT_UP,
894 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
895 this->Connect(wxEVT_MOTION,
896 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
897 this->Connect(wxEVT_LEFT_DCLICK,
898 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
899 this->Connect(wxEVT_MIDDLE_DCLICK,
900 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
901 this->Connect(wxEVT_RIGHT_DCLICK,
902 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
903 this->Connect(wxEVT_LEAVE_WINDOW,
904 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
905 this->Connect(wxEVT_ENTER_WINDOW,
906 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
907 this->Connect(wxEVT_MOUSEWHEEL,
908 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
909 m_stTrackingText->Connect(wxEVT_LEFT_DOWN,
910 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
911 nullptr, this);
912 m_stTrackingText->Connect(wxEVT_LEFT_UP,
913 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
914 nullptr, this);
915 m_stTrackingText->Connect(wxEVT_MIDDLE_DOWN,
916 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
917 nullptr, this);
918 m_stTrackingText->Connect(wxEVT_MIDDLE_UP,
919 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
920 nullptr, this);
921 m_stTrackingText->Connect(wxEVT_RIGHT_DOWN,
922 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
923 nullptr, this);
924 m_stTrackingText->Connect(wxEVT_RIGHT_UP,
925 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
926 nullptr, this);
927 m_stTrackingText->Connect(wxEVT_MOTION,
928 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
929 nullptr, this);
930 m_stTrackingText->Connect(wxEVT_LEFT_DCLICK,
931 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
932 nullptr, this);
933 m_stTrackingText->Connect(wxEVT_MIDDLE_DCLICK,
934 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
935 nullptr, this);
936 m_stTrackingText->Connect(wxEVT_RIGHT_DCLICK,
937 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
938 nullptr, this);
939 m_stTrackingText->Connect(wxEVT_LEAVE_WINDOW,
940 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
941 nullptr, this);
942 m_stTrackingText->Connect(wxEVT_ENTER_WINDOW,
943 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
944 nullptr, this);
945 m_stTrackingText->Connect(wxEVT_MOUSEWHEEL,
946 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
947 nullptr, this);
948 m_cbWind->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
949 wxCommandEventHandler(CursorDataBase::OnCBAny), nullptr,
950 this);
951 m_cbWind->Connect(wxEVT_RIGHT_DOWN,
952 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
953 nullptr, this);
954 m_cbWindGust->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
955 wxCommandEventHandler(CursorDataBase::OnCBAny), nullptr,
956 this);
957 m_cbWindGust->Connect(wxEVT_RIGHT_DOWN,
958 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
959 nullptr, this);
960 m_cbPressure->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
961 wxCommandEventHandler(CursorDataBase::OnCBAny), nullptr,
962 this);
963 m_cbPressure->Connect(wxEVT_RIGHT_DOWN,
964 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
965 nullptr, this);
966 m_cbWave->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
967 wxCommandEventHandler(CursorDataBase::OnCBAny), nullptr,
968 this);
969 m_cbWave->Connect(wxEVT_RIGHT_DOWN,
970 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
971 nullptr, this);
972 m_cbCurrent->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
973 wxCommandEventHandler(CursorDataBase::OnCBAny), nullptr,
974 this);
975 m_cbCurrent->Connect(wxEVT_RIGHT_DOWN,
976 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
977 nullptr, this);
978 m_cbPrecipitation->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
979 wxCommandEventHandler(CursorDataBase::OnCBAny),
980 nullptr, this);
981 m_cbPrecipitation->Connect(
982 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
983 nullptr, this);
984 m_cbCloud->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
985 wxCommandEventHandler(CursorDataBase::OnCBAny), nullptr,
986 this);
987 m_cbCloud->Connect(wxEVT_RIGHT_DOWN,
988 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
989 nullptr, this);
990 m_cbAirTemperature->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
991 wxCommandEventHandler(CursorDataBase::OnCBAny),
992 nullptr, this);
993 m_cbAirTemperature->Connect(
994 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
995 nullptr, this);
996 m_cbSeaTemperature->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
997 wxCommandEventHandler(CursorDataBase::OnCBAny),
998 nullptr, this);
999 m_cbSeaTemperature->Connect(
1000 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1001 nullptr, this);
1002 m_cbCAPE->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1003 wxCommandEventHandler(CursorDataBase::OnCBAny), nullptr,
1004 this);
1005 m_cbCAPE->Connect(wxEVT_RIGHT_DOWN,
1006 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1007 nullptr, this);
1008 m_cbReflC->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1009 wxCommandEventHandler(CursorDataBase::OnCBAny), nullptr,
1010 this);
1011 m_cbReflC->Connect(wxEVT_RIGHT_DOWN,
1012 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1013 nullptr, this);
1014}
1015
1016CursorDataBase::~CursorDataBase() {
1017 // Disconnect Events
1018 this->Disconnect(wxEVT_LEFT_DOWN,
1019 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
1020 this->Disconnect(wxEVT_LEFT_UP,
1021 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
1022 this->Disconnect(wxEVT_MIDDLE_DOWN,
1023 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
1024 this->Disconnect(wxEVT_MIDDLE_UP,
1025 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
1026 this->Disconnect(wxEVT_RIGHT_DOWN,
1027 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
1028 this->Disconnect(wxEVT_RIGHT_UP,
1029 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
1030 this->Disconnect(wxEVT_MOTION,
1031 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
1032 this->Disconnect(wxEVT_LEFT_DCLICK,
1033 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
1034 this->Disconnect(wxEVT_MIDDLE_DCLICK,
1035 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
1036 this->Disconnect(wxEVT_RIGHT_DCLICK,
1037 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
1038 this->Disconnect(wxEVT_LEAVE_WINDOW,
1039 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
1040 this->Disconnect(wxEVT_ENTER_WINDOW,
1041 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
1042 this->Disconnect(wxEVT_MOUSEWHEEL,
1043 wxMouseEventHandler(CursorDataBase::OnMouseEvent));
1044 m_stTrackingText->Disconnect(
1045 wxEVT_LEFT_DOWN, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1046 nullptr, this);
1047 m_stTrackingText->Disconnect(
1048 wxEVT_LEFT_UP, wxMouseEventHandler(CursorDataBase::OnMouseEvent), nullptr,
1049 this);
1050 m_stTrackingText->Disconnect(
1051 wxEVT_MIDDLE_DOWN, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1052 nullptr, this);
1053 m_stTrackingText->Disconnect(
1054 wxEVT_MIDDLE_UP, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1055 nullptr, this);
1056 m_stTrackingText->Disconnect(
1057 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1058 nullptr, this);
1059 m_stTrackingText->Disconnect(
1060 wxEVT_RIGHT_UP, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1061 nullptr, this);
1062 m_stTrackingText->Disconnect(
1063 wxEVT_MOTION, wxMouseEventHandler(CursorDataBase::OnMouseEvent), nullptr,
1064 this);
1065 m_stTrackingText->Disconnect(
1066 wxEVT_LEFT_DCLICK, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1067 nullptr, this);
1068 m_stTrackingText->Disconnect(
1069 wxEVT_MIDDLE_DCLICK, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1070 nullptr, this);
1071 m_stTrackingText->Disconnect(
1072 wxEVT_RIGHT_DCLICK, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1073 nullptr, this);
1074 m_stTrackingText->Disconnect(
1075 wxEVT_LEAVE_WINDOW, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1076 nullptr, this);
1077 m_stTrackingText->Disconnect(
1078 wxEVT_ENTER_WINDOW, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1079 nullptr, this);
1080 m_stTrackingText->Disconnect(
1081 wxEVT_MOUSEWHEEL, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1082 nullptr, this);
1083 m_cbWind->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1084 wxCommandEventHandler(CursorDataBase::OnCBAny), nullptr,
1085 this);
1086 m_cbWind->Disconnect(wxEVT_RIGHT_DOWN,
1087 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1088 nullptr, this);
1089 m_cbWindGust->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1090 wxCommandEventHandler(CursorDataBase::OnCBAny),
1091 nullptr, this);
1092 m_cbWindGust->Disconnect(wxEVT_RIGHT_DOWN,
1093 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1094 nullptr, this);
1095 m_cbPressure->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1096 wxCommandEventHandler(CursorDataBase::OnCBAny),
1097 nullptr, this);
1098 m_cbPressure->Disconnect(wxEVT_RIGHT_DOWN,
1099 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1100 nullptr, this);
1101 m_cbWave->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1102 wxCommandEventHandler(CursorDataBase::OnCBAny), nullptr,
1103 this);
1104 m_cbWave->Disconnect(wxEVT_RIGHT_DOWN,
1105 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1106 nullptr, this);
1107 m_cbCurrent->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1108 wxCommandEventHandler(CursorDataBase::OnCBAny),
1109 nullptr, this);
1110 m_cbCurrent->Disconnect(wxEVT_RIGHT_DOWN,
1111 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1112 nullptr, this);
1113 m_cbPrecipitation->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1114 wxCommandEventHandler(CursorDataBase::OnCBAny),
1115 nullptr, this);
1116 m_cbPrecipitation->Disconnect(
1117 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1118 nullptr, this);
1119 m_cbCloud->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1120 wxCommandEventHandler(CursorDataBase::OnCBAny), nullptr,
1121 this);
1122 m_cbCloud->Disconnect(wxEVT_RIGHT_DOWN,
1123 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1124 nullptr, this);
1125 m_cbAirTemperature->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1126 wxCommandEventHandler(CursorDataBase::OnCBAny),
1127 nullptr, this);
1128 m_cbAirTemperature->Disconnect(
1129 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1130 nullptr, this);
1131 m_cbSeaTemperature->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1132 wxCommandEventHandler(CursorDataBase::OnCBAny),
1133 nullptr, this);
1134 m_cbSeaTemperature->Disconnect(
1135 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1136 nullptr, this);
1137 m_cbCAPE->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1138 wxCommandEventHandler(CursorDataBase::OnCBAny), nullptr,
1139 this);
1140 m_cbCAPE->Disconnect(wxEVT_RIGHT_DOWN,
1141 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1142 nullptr, this);
1143 m_cbReflC->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1144 wxCommandEventHandler(CursorDataBase::OnCBAny), nullptr,
1145 this);
1146 m_cbReflC->Disconnect(wxEVT_RIGHT_DOWN,
1147 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1148 nullptr, this);
1149}
1150
1151GribSettingsDialogBase::GribSettingsDialogBase(wxWindow* parent, wxWindowID id,
1152 const wxString& title,
1153 const wxPoint& pos,
1154 const wxSize& size, long style)
1155 : wxDialog(parent, id, title, pos, size, style) {
1156 this->SetSizeHints(wxDefaultSize, wxSize(-1, -1));
1157
1158 wxFlexGridSizer* fgSizer53;
1159 fgSizer53 = new wxFlexGridSizer(0, 1, 0, 0);
1160 fgSizer53->SetFlexibleDirection(wxBOTH);
1161 fgSizer53->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1162
1163 m_nSettingsBook =
1164 new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0);
1165 wxScrolledWindow* m_scSetDataPanel;
1166 m_scSetDataPanel =
1167 new wxScrolledWindow(m_nSettingsBook, wxID_ANY, wxDefaultPosition,
1168 wxDefaultSize, wxHSCROLL | wxVSCROLL);
1169 m_scSetDataPanel->SetScrollRate(5, 5);
1170 m_fgSetDataSizer = new wxFlexGridSizer(0, 1, 0, 0);
1171 m_fgSetDataSizer->AddGrowableCol(0);
1172 m_fgSetDataSizer->AddGrowableRow(1);
1173 m_fgSetDataSizer->SetFlexibleDirection(wxBOTH);
1174 m_fgSetDataSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1175
1176 wxStaticBoxSizer* sbSizer101;
1177 sbSizer101 = new wxStaticBoxSizer(
1178 new wxStaticBox(m_scSetDataPanel, wxID_ANY, _("Data Display Options")),
1179 wxVERTICAL);
1180
1181 wxFlexGridSizer* fgSizer15;
1182 fgSizer15 = new wxFlexGridSizer(0, 3, 0, 0);
1183 fgSizer15->SetFlexibleDirection(wxBOTH);
1184 fgSizer15->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1185
1186 wxArrayString m_cDataTypeChoices;
1187 m_cDataTypeChoices.Add(_T("Item0"));
1188 m_cDataType = new wxChoice(m_scSetDataPanel, wxID_ANY, wxDefaultPosition,
1189 wxDefaultSize, m_cDataTypeChoices, 0);
1190 m_cDataType->SetSelection(0);
1191 fgSizer15->Add(m_cDataType, 0, wxBOTTOM | wxEXPAND | wxTOP, 5);
1192
1193 wxStaticText* m_staticText12;
1194 m_staticText12 = new wxStaticText(m_scSetDataPanel, wxID_ANY, _("Units"),
1195 wxDefaultPosition, wxDefaultSize, 0);
1196 m_staticText12->Wrap(-1);
1197 m_staticText12->SetMinSize(wxSize(110, -1));
1198
1199 fgSizer15->Add(m_staticText12, 0, wxALL | wxEXPAND, 5);
1200
1201 wxArrayString m_cDataUnitsChoices;
1202 m_cDataUnitsChoices.Add(_T("Item0"));
1203 m_cDataUnits = new wxChoice(m_scSetDataPanel, wxID_ANY, wxDefaultPosition,
1204 wxDefaultSize, m_cDataUnitsChoices, 0);
1205 m_cDataUnits->SetSelection(0);
1206 fgSizer15->Add(m_cDataUnits, 0, wxBOTTOM | wxEXPAND | wxTOP, 5);
1207
1208 m_cbBarbedArrows =
1209 new wxCheckBox(m_scSetDataPanel, wxID_ANY, _("Barbed Arrows"),
1210 wxDefaultPosition, wxDefaultSize, 0);
1211 fgSizer15->Add(m_cbBarbedArrows, 0, wxBOTTOM | wxTOP, 5);
1212
1213 m_fgBarbedData1 = new wxFlexGridSizer(0, 1, 0, 0);
1214 m_fgBarbedData1->SetFlexibleDirection(wxBOTH);
1215 m_fgBarbedData1->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1216
1217 wxString m_cBarbedColoursChoices[] = {_("Default Color"),
1218 _("Controlled Colors")};
1219 int m_cBarbedColoursNChoices =
1220 sizeof(m_cBarbedColoursChoices) / sizeof(wxString);
1221 m_cBarbedColours =
1222 new wxChoice(m_scSetDataPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize,
1223 m_cBarbedColoursNChoices, m_cBarbedColoursChoices, 0);
1224 m_cBarbedColours->SetSelection(0);
1225 m_fgBarbedData1->Add(m_cBarbedColours, 0, wxALL | wxEXPAND, 5);
1226
1227 wxFlexGridSizer* fgSizer42;
1228 fgSizer42 = new wxFlexGridSizer(0, 2, 0, 0);
1229 fgSizer42->SetFlexibleDirection(wxBOTH);
1230 fgSizer42->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1231
1232 wxStaticText* m_staticText41;
1233 m_staticText41 =
1234 new wxStaticText(m_scSetDataPanel, wxID_ANY, _("Spacing (pixels)"),
1235 wxDefaultPosition, wxDefaultSize, 0);
1236 m_staticText41->Wrap(-1);
1237 fgSizer42->Add(m_staticText41, 0, wxALL, 5);
1238
1239 m_cBarbArrFixSpac =
1240 new wxCheckBox(m_scSetDataPanel, BARBFIXSPACING, _("Fixed"),
1241 wxDefaultPosition, wxDefaultSize, 0);
1242 fgSizer42->Add(m_cBarbArrFixSpac, 0, wxLEFT | wxRIGHT | wxTOP, 5);
1243
1244 fgSizer42->Add(0, 0, 1, wxEXPAND, 5);
1245
1246 m_cBarbArrMinSpac =
1247 new wxCheckBox(m_scSetDataPanel, BARBMINSPACING, _("Minimum"),
1248 wxDefaultPosition, wxDefaultSize, 0);
1249 fgSizer42->Add(m_cBarbArrMinSpac, 0, wxBOTTOM | wxLEFT | wxRIGHT, 5);
1250
1251 m_fgBarbedData1->Add(fgSizer42, 1, wxEXPAND, 0);
1252
1253 fgSizer15->Add(m_fgBarbedData1, 1, wxEXPAND, 0);
1254
1255 m_fgBarbedData2 = new wxFlexGridSizer(0, 1, 0, 0);
1256 m_fgBarbedData2->SetFlexibleDirection(wxBOTH);
1257 m_fgBarbedData2->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1258
1259 m_cBarbedVisibility =
1260 new wxCheckBox(m_scSetDataPanel, wxID_ANY, _("Always visible"),
1261 wxDefaultPosition, wxDefaultSize, 0);
1262 m_fgBarbedData2->Add(m_cBarbedVisibility, 0, wxALL | wxEXPAND, 5);
1263
1264 m_sBarbArrSpacing = new wxSpinCtrl(m_scSetDataPanel, wxID_ANY, wxEmptyString,
1265 wxDefaultPosition, wxDefaultSize,
1266 wxSP_ARROW_KEYS, 30, 100, 30);
1267 m_fgBarbedData2->Add(m_sBarbArrSpacing, 0, wxALL, 5);
1268
1269 fgSizer15->Add(m_fgBarbedData2, 1, wxEXPAND, 0);
1270
1271 m_cbIsoBars = new wxCheckBox(m_scSetDataPanel, wxID_ANY, _("IsoBars"),
1272 wxDefaultPosition, wxDefaultSize, 0);
1273 fgSizer15->Add(m_cbIsoBars, 0, wxBOTTOM | wxTOP, 5);
1274
1275 m_fIsoBarSpacing = new wxFlexGridSizer(0, 2, 0, 0);
1276 m_fIsoBarSpacing->SetFlexibleDirection(wxBOTH);
1277 m_fIsoBarSpacing->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1278
1279 m_tIsoBarSpacing = new wxStaticText(m_scSetDataPanel, wxID_ANY, _("Spacing"),
1280 wxDefaultPosition, wxDefaultSize, 0);
1281 m_tIsoBarSpacing->Wrap(-1);
1282 m_fIsoBarSpacing->Add(m_tIsoBarSpacing, 0, wxALL, 5);
1283
1284 m_sIsoBarSpacing = new wxSpinCtrl(m_scSetDataPanel, wxID_ANY, wxEmptyString,
1285 wxDefaultPosition, wxDefaultSize,
1286 wxSP_ARROW_KEYS, 1, 1000, 1);
1287 m_fIsoBarSpacing->Add(m_sIsoBarSpacing, 0, wxALL | wxALIGN_RIGHT, 5);
1288
1289 fgSizer15->Add(m_fIsoBarSpacing, 1, wxALL | wxEXPAND, 0);
1290
1291 m_fIsoBarVisibility = new wxFlexGridSizer(0, 1, 0, 0);
1292 m_fIsoBarVisibility->SetFlexibleDirection(wxBOTH);
1293 m_fIsoBarVisibility->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1294
1295 m_sIsoBarVisibility =
1296 new wxCheckBox(m_scSetDataPanel, wxID_ANY, _("Always visible"),
1297 wxDefaultPosition, wxDefaultSize, 0);
1298 m_fIsoBarVisibility->Add(m_sIsoBarVisibility, 0, wxALL | wxEXPAND, 5);
1299
1300 fgSizer15->Add(m_fIsoBarVisibility, 1, wxALL | wxEXPAND, 5);
1301
1302 fgSizer15->Add(0, 0, 1, wxEXPAND, 5);
1303
1304 m_cbAbbrIsoBarsNumbers =
1305 new wxCheckBox(m_scSetDataPanel, wxID_ANY, _("Abbreviated Numbers"),
1306 wxDefaultPosition, wxDefaultSize, 0);
1307 fgSizer15->Add(m_cbAbbrIsoBarsNumbers, 0, wxEXPAND, 5);
1308
1309 fgSizer15->Add(0, 0, 1, wxEXPAND, 5);
1310
1311 m_cbDirectionArrows =
1312 new wxCheckBox(m_scSetDataPanel, wxID_ANY, _("Direction Arrows"),
1313 wxDefaultPosition, wxDefaultSize, 0);
1314 fgSizer15->Add(m_cbDirectionArrows, 0, wxBOTTOM | wxTOP, 5);
1315
1316 m_fgDirArrData1 = new wxFlexGridSizer(0, 1, 0, 0);
1317 m_fgDirArrData1->SetFlexibleDirection(wxBOTH);
1318 m_fgDirArrData1->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1319
1320 wxString m_cDirectionArrowFormChoices[] = {
1321 _("Single Arrow"), _("Double Arrow"), _("Proportional Arrow")};
1322 int m_cDirectionArrowFormNChoices =
1323 sizeof(m_cDirectionArrowFormChoices) / sizeof(wxString);
1324 m_cDirectionArrowForm = new wxChoice(
1325 m_scSetDataPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize,
1326 m_cDirectionArrowFormNChoices, m_cDirectionArrowFormChoices, 0);
1327 m_cDirectionArrowForm->SetSelection(1);
1328 m_fgDirArrData1->Add(m_cDirectionArrowForm, 0, wxBOTTOM | wxEXPAND | wxTOP,
1329 5);
1330
1331 wxFlexGridSizer* fgSizer43;
1332 fgSizer43 = new wxFlexGridSizer(0, 2, 0, 0);
1333 fgSizer43->SetFlexibleDirection(wxBOTH);
1334 fgSizer43->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1335
1336 wxStaticText* m_staticText42;
1337 m_staticText42 =
1338 new wxStaticText(m_scSetDataPanel, wxID_ANY, _("Spacing (pixels)"),
1339 wxDefaultPosition, wxDefaultSize, 0);
1340 m_staticText42->Wrap(-1);
1341 fgSizer43->Add(m_staticText42, 0, wxALL, 5);
1342
1343 m_cDirArrFixSpac = new wxCheckBox(m_scSetDataPanel, DIRFIXSPACING, _("Fixed"),
1344 wxDefaultPosition, wxDefaultSize, 0);
1345 fgSizer43->Add(m_cDirArrFixSpac, 0, wxLEFT | wxRIGHT | wxTOP, 5);
1346
1347 fgSizer43->Add(0, 0, 1, wxEXPAND, 5);
1348
1349 m_cDirArrMinSpac =
1350 new wxCheckBox(m_scSetDataPanel, DIRMINSPACING, _("Minimum"),
1351 wxDefaultPosition, wxDefaultSize, 0);
1352 fgSizer43->Add(m_cDirArrMinSpac, 0, wxBOTTOM | wxLEFT | wxRIGHT, 5);
1353
1354 m_fgDirArrData1->Add(fgSizer43, 1, wxEXPAND, 0);
1355
1356 fgSizer15->Add(m_fgDirArrData1, 1, wxEXPAND, 5);
1357
1358 m_fgDirArrData2 = new wxFlexGridSizer(0, 1, 0, 0);
1359 m_fgDirArrData2->SetFlexibleDirection(wxBOTH);
1360 m_fgDirArrData2->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1361
1362 wxString m_cDirectionArrowSizeChoices[] = {_("Default Size"),
1363 _("Small Size")};
1364 int m_cDirectionArrowSizeNChoices =
1365 sizeof(m_cDirectionArrowSizeChoices) / sizeof(wxString);
1366 m_cDirectionArrowSize = new wxChoice(
1367 m_scSetDataPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize,
1368 m_cDirectionArrowSizeNChoices, m_cDirectionArrowSizeChoices, 0);
1369 m_cDirectionArrowSize->SetSelection(0);
1370 m_fgDirArrData2->Add(m_cDirectionArrowSize, 0, wxALL | wxEXPAND, 5);
1371
1372 m_sDirArrSpacing = new wxSpinCtrl(m_scSetDataPanel, wxID_ANY, wxEmptyString,
1373 wxDefaultPosition, wxDefaultSize,
1374 wxSP_ARROW_KEYS, 30, 100, 30);
1375 m_fgDirArrData2->Add(m_sDirArrSpacing, 0, wxALL, 5);
1376
1377 fgSizer15->Add(m_fgDirArrData2, 1, wxEXPAND, 0);
1378
1379 m_cbOverlayMap = new wxCheckBox(m_scSetDataPanel, wxID_ANY, _("OverlayMap"),
1380 wxDefaultPosition, wxDefaultSize, 0);
1381 fgSizer15->Add(m_cbOverlayMap, 0, wxBOTTOM | wxTOP, 5);
1382
1383 m_tOverlayColors =
1384 new wxStaticText(m_scSetDataPanel, wxID_ANY, _("Color scheme"),
1385 wxDefaultPosition, wxDefaultSize, 0);
1386 m_tOverlayColors->Wrap(-1);
1387 fgSizer15->Add(m_tOverlayColors, 0, wxALL | wxEXPAND, 5);
1388
1389 wxString m_cOverlayColorsChoices[] = {
1390 _("Generic"), _("Wind"), _("Air Temp"), _("Sea Temp"),
1391 _("Rainfall"), _("Cloud Cover"), _("Current"), _("CAPE"),
1392 _("REFC"), _("Windy")};
1393 int m_cOverlayColorsNChoices =
1394 sizeof(m_cOverlayColorsChoices) / sizeof(wxString);
1395 m_cOverlayColors =
1396 new wxChoice(m_scSetDataPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize,
1397 m_cOverlayColorsNChoices, m_cOverlayColorsChoices, 0);
1398 m_cOverlayColors->SetSelection(0);
1399 fgSizer15->Add(m_cOverlayColors, 0, wxALL | wxEXPAND, 5);
1400
1401 m_cbNumbers = new wxCheckBox(m_scSetDataPanel, wxID_ANY, _("Numbers"),
1402 wxDefaultPosition, wxDefaultSize, 0);
1403 fgSizer15->Add(m_cbNumbers, 0, wxBOTTOM | wxTOP, 5);
1404
1405 m_fgNumData1 = new wxFlexGridSizer(0, 2, 0, 0);
1406 m_fgNumData1->SetFlexibleDirection(wxBOTH);
1407 m_fgNumData1->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1408
1409 wxStaticText* m_staticText43;
1410 m_staticText43 =
1411 new wxStaticText(m_scSetDataPanel, wxID_ANY, _("Spacing (pixels)"),
1412 wxDefaultPosition, wxDefaultSize, 0);
1413 m_staticText43->Wrap(-1);
1414 m_fgNumData1->Add(m_staticText43, 0, wxALL, 5);
1415
1416 m_cNumFixSpac = new wxCheckBox(m_scSetDataPanel, NUMFIXSPACING, _("Fixed"),
1417 wxDefaultPosition, wxDefaultSize, 0);
1418 m_fgNumData1->Add(m_cNumFixSpac, 0, wxLEFT | wxRIGHT | wxTOP, 5);
1419
1420 m_fgNumData1->Add(0, 0, 1, wxEXPAND, 5);
1421
1422 m_cNumMinSpac = new wxCheckBox(m_scSetDataPanel, NUMMINSPACING, _("Minimum"),
1423 wxDefaultPosition, wxDefaultSize, 0);
1424 m_fgNumData1->Add(m_cNumMinSpac, 0, wxBOTTOM | wxLEFT | wxRIGHT, 5);
1425
1426 fgSizer15->Add(m_fgNumData1, 1, wxEXPAND, 0);
1427
1428 m_sNumbersSpacing = new wxSpinCtrl(m_scSetDataPanel, wxID_ANY, wxEmptyString,
1429 wxDefaultPosition, wxDefaultSize,
1430 wxSP_ARROW_KEYS, 30, 100, 50);
1431 fgSizer15->Add(m_sNumbersSpacing, 0, wxALL, 5);
1432
1433 m_cbParticles = new wxCheckBox(m_scSetDataPanel, wxID_ANY, _("Particle Map"),
1434 wxDefaultPosition, wxDefaultSize, 0);
1435 fgSizer15->Add(m_cbParticles, 0, wxBOTTOM | wxTOP, 5);
1436
1437 m_ctParticles = new wxStaticText(m_scSetDataPanel, wxID_ANY, _("Density"),
1438 wxDefaultPosition, wxDefaultSize, 0);
1439 m_ctParticles->Wrap(-1);
1440 fgSizer15->Add(m_ctParticles, 0, wxALL, 5);
1441
1442#if defined(__WXOSX__) && !wxCHECK_VERSION(3, 1, 0)
1443 m_sParticleDensity =
1444 new wxSlider(m_scSetDataPanel, wxID_ANY, 5, 1, 10, wxDefaultPosition,
1445 wxDefaultSize, wxSL_BOTTOM | wxSL_HORIZONTAL);
1446#else
1447 m_sParticleDensity =
1448 new wxSlider(m_scSetDataPanel, wxID_ANY, 5, 1, 10, wxDefaultPosition,
1449 wxDefaultSize, wxSL_BOTTOM | wxSL_HORIZONTAL | wxSL_LABELS);
1450#endif
1451 fgSizer15->Add(m_sParticleDensity, 0, wxALL | wxEXPAND, 5);
1452
1453 sbSizer101->Add(fgSizer15, 1, wxEXPAND, 5);
1454
1455 m_fgSetDataSizer->Add(sbSizer101, 1, wxEXPAND | wxTOP, 10);
1456
1457 m_fgSetDataSizer->Add(0, 0, 1, wxEXPAND, 5);
1458
1459 wxStaticBoxSizer* sbSizer12;
1460 sbSizer12 = new wxStaticBoxSizer(
1461 new wxStaticBox(m_scSetDataPanel, wxID_ANY,
1462 _("Transparency for all Overlay Maps")),
1463 wxVERTICAL);
1464
1465 wxFlexGridSizer* fgSizer34;
1466 fgSizer34 = new wxFlexGridSizer(0, 2, 0, 0);
1467 fgSizer34->SetFlexibleDirection(wxBOTH);
1468 fgSizer34->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1469
1470 m_staticText24 = new wxStaticText(m_scSetDataPanel, wxID_ANY,
1471 _("Overlay Transparency (%)"),
1472 wxDefaultPosition, wxDefaultSize, 0);
1473 m_staticText24->Wrap(-1);
1474 fgSizer34->Add(m_staticText24, 0, wxEXPAND | wxRIGHT | wxTOP, 15);
1475
1476 m_sTransparency =
1477 new wxSlider(m_scSetDataPanel, wxID_ANY, 50, 0, 100, wxDefaultPosition,
1478 wxSize(-1, -1), wxSL_BOTTOM | wxSL_HORIZONTAL | wxSL_LABELS);
1479 m_sTransparency->SetMinSize(wxSize(250, -1));
1480
1481 fgSizer34->Add(m_sTransparency, 0, wxALL | wxEXPAND, 5);
1482
1483 sbSizer12->Add(fgSizer34, 1, wxEXPAND | wxLEFT, 5);
1484
1485 m_fgSetDataSizer->Add(sbSizer12, 1, wxEXPAND | wxTOP, 10);
1486
1487 m_scSetDataPanel->SetSizer(m_fgSetDataSizer);
1488 m_scSetDataPanel->Layout();
1489 m_fgSetDataSizer->Fit(m_scSetDataPanel);
1490 m_nSettingsBook->AddPage(m_scSetDataPanel, _("Data"), false);
1491 wxScrolledWindow* m_scSetPlaybackPanel;
1492 m_scSetPlaybackPanel =
1493 new wxScrolledWindow(m_nSettingsBook, wxID_ANY, wxDefaultPosition,
1494 wxDefaultSize, wxHSCROLL | wxVSCROLL);
1495 m_scSetPlaybackPanel->SetScrollRate(5, 5);
1496 m_fgSetPlaybackSizer = new wxFlexGridSizer(0, 1, 0, 0);
1497 m_fgSetPlaybackSizer->AddGrowableCol(0);
1498 m_fgSetPlaybackSizer->SetFlexibleDirection(wxBOTH);
1499 m_fgSetPlaybackSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1500
1501 wxStaticBoxSizer* sbSizer121;
1502 sbSizer121 = new wxStaticBoxSizer(
1503 new wxStaticBox(m_scSetPlaybackPanel, wxID_ANY, _("Playback Options")),
1504 wxVERTICAL);
1505
1506 wxFlexGridSizer* fgSizer48;
1507 fgSizer48 = new wxFlexGridSizer(0, 1, 0, 0);
1508 fgSizer48->SetFlexibleDirection(wxBOTH);
1509 fgSizer48->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1510
1511 wxStaticText* m_staticText4;
1512 m_staticText4 =
1513 new wxStaticText(m_scSetPlaybackPanel, wxID_ANY, _("Speed Control"),
1514 wxDefaultPosition, wxDefaultSize, 0);
1515 m_staticText4->Wrap(-1);
1516 fgSizer48->Add(m_staticText4, 0, wxALL | wxEXPAND, 5);
1517
1518 wxFlexGridSizer* fgSizer480;
1519 fgSizer480 = new wxFlexGridSizer(0, 4, 0, 0);
1520 fgSizer480->SetFlexibleDirection(wxBOTH);
1521 fgSizer480->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1522
1523 fgSizer480->Add(0, 0, 1, wxLEFT | wxRIGHT, 15);
1524
1525 wxStaticText* m_staticText400;
1526 m_staticText400 = new wxStaticText(m_scSetPlaybackPanel, wxID_ANY, _("Slow"),
1527 wxDefaultPosition, wxDefaultSize, 0);
1528 m_staticText400->Wrap(-1);
1529 fgSizer480->Add(m_staticText400, 0, wxLEFT | wxTOP, 5);
1530
1531 m_sUpdatesPerSecond =
1532 new wxSlider(m_scSetPlaybackPanel, wxID_ANY, 4, 2, 12, wxDefaultPosition,
1533 wxSize(-1, -1), wxSL_HORIZONTAL);
1534 fgSizer480->Add(m_sUpdatesPerSecond, 0, wxEXPAND | wxBOTTOM, 5);
1535
1536 wxStaticText* m_staticText401;
1537 m_staticText401 = new wxStaticText(m_scSetPlaybackPanel, wxID_ANY, _("Fast"),
1538 wxDefaultPosition, wxDefaultSize, 0);
1539 m_staticText401->Wrap(-1);
1540 fgSizer480->Add(m_staticText401, 0, wxRIGHT | wxTOP, 5);
1541
1542 fgSizer48->Add(fgSizer480, 0, wxALL | wxEXPAND, 5);
1543
1544 m_cLoopMode = new wxCheckBox(m_scSetPlaybackPanel, wxID_ANY, _("Loop Mode"),
1545 wxDefaultPosition, wxDefaultSize, 0);
1546 fgSizer48->Add(m_cLoopMode, 0, wxALL, 5);
1547
1548 wxFlexGridSizer* fgSizer481;
1549 fgSizer481 = new wxFlexGridSizer(0, 3, 0, 0);
1550 fgSizer481->SetFlexibleDirection(wxBOTH);
1551 fgSizer481->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1552
1553 fgSizer481->Add(0, 0, 1, wxLEFT | wxRIGHT, 15);
1554
1555 m_staticText26 =
1556 new wxStaticText(m_scSetPlaybackPanel, wxID_ANY, _("Loop Start"),
1557 wxDefaultPosition, wxDefaultSize, 0);
1558 m_staticText26->Wrap(-1);
1559 fgSizer481->Add(m_staticText26, 0, wxALL | wxEXPAND, 5);
1560
1561 wxString m_cLoopStartPointChoices[] = {_("Top of Grib File"),
1562 _("Current time forecast")};
1563 int m_cLoopStartPointNChoices =
1564 sizeof(m_cLoopStartPointChoices) / sizeof(wxString);
1565 m_cLoopStartPoint = new wxChoice(
1566 m_scSetPlaybackPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize,
1567 m_cLoopStartPointNChoices, m_cLoopStartPointChoices, 0);
1568 m_cLoopStartPoint->SetSelection(0);
1569 fgSizer481->Add(m_cLoopStartPoint, 0, wxALL | wxEXPAND, 5);
1570
1571 fgSizer48->Add(fgSizer481, 0, wxALL, 5);
1572
1573 m_cInterpolate = new wxCheckBox(m_scSetPlaybackPanel, wxID_ANY,
1574 _("Interpolate between gribs"),
1575 wxDefaultPosition, wxDefaultSize, 0);
1576 fgSizer48->Add(m_cInterpolate, 0, wxALL | wxEXPAND, 5);
1577
1578 wxFlexGridSizer* fgSizer482;
1579 fgSizer482 = new wxFlexGridSizer(0, 3, 0, 0);
1580 fgSizer482->SetFlexibleDirection(wxBOTH);
1581 fgSizer482->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1582
1583 fgSizer482->Add(0, 0, 1, wxLEFT | wxRIGHT, 15);
1584
1585 m_tSlicesPerUpdate =
1586 new wxStaticText(m_scSetPlaybackPanel, wxID_ANY, _("Time Interval"),
1587 wxDefaultPosition, wxDefaultSize, 0);
1588 m_tSlicesPerUpdate->Wrap(-1);
1589 fgSizer482->Add(m_tSlicesPerUpdate, 0, wxALL | wxEXPAND, 5);
1590
1591 wxArrayString m_sSlicesPerUpdateChoices;
1592 m_sSlicesPerUpdate =
1593 new wxChoice(m_scSetPlaybackPanel, wxID_ANY, wxDefaultPosition,
1594 wxDefaultSize, m_sSlicesPerUpdateChoices, 0);
1595 m_sSlicesPerUpdate->SetSelection(0);
1596 fgSizer482->Add(m_sSlicesPerUpdate, 0, wxALL | wxEXPAND, 5);
1597
1598 fgSizer48->Add(fgSizer482, 0, wxALL | wxEXPAND, 5);
1599
1600 sbSizer121->Add(fgSizer48, 1, wxEXPAND | wxALL, 5);
1601
1602 m_fgSetPlaybackSizer->Add(sbSizer121, 1, wxEXPAND | wxTOP, 10);
1603
1604 m_scSetPlaybackPanel->SetSizer(m_fgSetPlaybackSizer);
1605 m_scSetPlaybackPanel->Layout();
1606 m_fgSetPlaybackSizer->Fit(m_scSetPlaybackPanel);
1607 m_nSettingsBook->AddPage(m_scSetPlaybackPanel, _("Playback"), false);
1608 wxScrolledWindow* m_scSetGuiPanel;
1609 m_scSetGuiPanel =
1610 new wxScrolledWindow(m_nSettingsBook, wxID_ANY, wxDefaultPosition,
1611 wxDefaultSize, wxHSCROLL | wxVSCROLL);
1612 m_scSetGuiPanel->SetScrollRate(5, 5);
1613 m_fgSetGuiSizer = new wxFlexGridSizer(0, 1, 0, 0);
1614 m_fgSetGuiSizer->AddGrowableCol(0);
1615 m_fgSetGuiSizer->SetFlexibleDirection(wxBOTH);
1616 m_fgSetGuiSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1617
1618 wxStaticBoxSizer* sbSizer9;
1619 sbSizer9 = new wxStaticBoxSizer(
1620 new wxStaticBox(m_scSetGuiPanel, wxID_ANY, _("Dialogs Style")),
1621 wxVERTICAL);
1622
1623 wxFlexGridSizer* fgSizer47;
1624 fgSizer47 = new wxFlexGridSizer(0, 1, 0, 0);
1625 fgSizer47->SetFlexibleDirection(wxBOTH);
1626 fgSizer47->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1627
1628 m_rbCurDataAttaWCap =
1629 new wxRadioButton(m_scSetGuiPanel, wxID_ANY,
1630 _("Data at cursor dialog is attached to icons bar - "
1631 "with a title/drag bar"),
1632 wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
1633 fgSizer47->Add(m_rbCurDataAttaWCap, 0, wxALL, 5);
1634
1635 m_rbCurDataAttaWoCap =
1636 new wxRadioButton(m_scSetGuiPanel, wxID_ANY,
1637 _("Data at cursor dialog is attached to icons bar - "
1638 "without a title/drag bar"),
1639 wxDefaultPosition, wxDefaultSize, 0);
1640 fgSizer47->Add(m_rbCurDataAttaWoCap, 0, wxALL, 5);
1641
1642 m_rbCurDataIsolHoriz = new wxRadioButton(
1643 m_scSetGuiPanel, wxID_ANY,
1644 _("Data at cursor dialog is isolated and displayed horizontally"),
1645 wxDefaultPosition, wxDefaultSize, 0);
1646 fgSizer47->Add(m_rbCurDataIsolHoriz, 0, wxALL, 5);
1647
1648 m_rbCurDataIsolVertic = new wxRadioButton(
1649 m_scSetGuiPanel, wxID_ANY,
1650 _("Data at cursor dialog is isolated and displayed vertically"),
1651 wxDefaultPosition, wxDefaultSize, 0);
1652 fgSizer47->Add(m_rbCurDataIsolVertic, 0, wxALL, 5);
1653
1654 sbSizer9->Add(fgSizer47, 1, wxEXPAND, 5);
1655
1656 m_fgSetGuiSizer->Add(sbSizer9, 1, wxEXPAND | wxTOP, 10);
1657
1658 m_fgSetGuiSizer->Add(0, 0, 1, wxALL, 5);
1659
1660 wxStaticBoxSizer* sbSizer10;
1661 sbSizer10 = new wxStaticBoxSizer(
1662 new wxStaticBox(m_scSetGuiPanel, wxID_ANY, _("Buttons Visibility")),
1663 wxVERTICAL);
1664
1665 wxFlexGridSizer* fgSizer52;
1666 fgSizer52 = new wxFlexGridSizer(0, 4, 0, 0);
1667 fgSizer52->SetFlexibleDirection(wxBOTH);
1668 fgSizer52->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1669
1670 fgSizer52->Add(0, 0, 1, wxEXPAND, 5);
1671
1672 fgSizer52->Add(0, 0, 1, wxEXPAND, 5);
1673
1674 wxStaticText* m_staticText44;
1675 m_staticText44 =
1676 new wxStaticText(m_scSetGuiPanel, wxID_ANY, _("Attached icon bar"),
1677 wxDefaultPosition, wxDefaultSize, 0);
1678 m_staticText44->Wrap(-1);
1679 fgSizer52->Add(m_staticText44, 0, wxBOTTOM | wxLEFT | wxRIGHT, 5);
1680
1681 wxStaticText* m_staticText45;
1682 m_staticText45 =
1683 new wxStaticText(m_scSetGuiPanel, wxID_ANY, _("Isolated icon bar"),
1684 wxDefaultPosition, wxDefaultSize, 0);
1685 m_staticText45->Wrap(-1);
1686 fgSizer52->Add(m_staticText45, 0, wxBOTTOM | wxLEFT | wxRIGHT, 5);
1687
1688 m_biAltitude = new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1689 wxDefaultPosition, wxDefaultSize, 0);
1690 fgSizer52->Add(m_biAltitude, 0, wxALL, 2);
1691
1692 wxStaticText* m_staticText46;
1693 m_staticText46 =
1694 new wxStaticText(m_scSetGuiPanel, wxID_ANY, _("Geopot. Height Choice"),
1695 wxDefaultPosition, wxDefaultSize, 0);
1696 m_staticText46->Wrap(-1);
1697 fgSizer52->Add(m_staticText46, 0, wxALL, 3);
1698
1699 wxCheckBox* m_checkBox48;
1700 m_checkBox48 = new wxCheckBox(m_scSetGuiPanel, AC0, wxEmptyString,
1701 wxDefaultPosition, wxDefaultSize, 0);
1702 fgSizer52->Add(m_checkBox48, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1703
1704 wxCheckBox* m_checkBox49;
1705 m_checkBox49 = new wxCheckBox(m_scSetGuiPanel, AC1, wxEmptyString,
1706 wxDefaultPosition, wxDefaultSize, 0);
1707 fgSizer52->Add(m_checkBox49, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1708
1709 m_biNow = new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1710 wxDefaultPosition, wxDefaultSize, 0);
1711 fgSizer52->Add(m_biNow, 0, wxALL, 3);
1712
1713 wxStaticText* m_staticText47;
1714 m_staticText47 = new wxStaticText(m_scSetGuiPanel, wxID_ANY, _("Now"),
1715 wxDefaultPosition, wxDefaultSize, 0);
1716 m_staticText47->Wrap(-1);
1717 fgSizer52->Add(m_staticText47, 0, wxALL, 3);
1718
1719 wxCheckBox* m_checkBox50;
1720 m_checkBox50 = new wxCheckBox(m_scSetGuiPanel, NW0, wxEmptyString,
1721 wxDefaultPosition, wxDefaultSize, 0);
1722 fgSizer52->Add(m_checkBox50, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1723
1724 wxCheckBox* m_checkBox51;
1725 m_checkBox51 = new wxCheckBox(m_scSetGuiPanel, NW1, wxEmptyString,
1726 wxDefaultPosition, wxDefaultSize, 0);
1727 fgSizer52->Add(m_checkBox51, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1728
1729 m_biZoomToCenter = new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1730 wxDefaultPosition, wxDefaultSize, 0);
1731 fgSizer52->Add(m_biZoomToCenter, 0, wxALL, 3);
1732
1733 wxStaticText* m_staticText48;
1734 m_staticText48 =
1735 new wxStaticText(m_scSetGuiPanel, wxID_ANY, _("Zoom to Center"),
1736 wxDefaultPosition, wxDefaultSize, 0);
1737 m_staticText48->Wrap(-1);
1738 fgSizer52->Add(m_staticText48, 0, wxALL, 3);
1739
1740 wxCheckBox* m_checkBox52;
1741 m_checkBox52 = new wxCheckBox(m_scSetGuiPanel, ZC0, wxEmptyString,
1742 wxDefaultPosition, wxDefaultSize, 0);
1743 fgSizer52->Add(m_checkBox52, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1744
1745 wxCheckBox* m_checkBox53;
1746 m_checkBox53 = new wxCheckBox(m_scSetGuiPanel, ZC1, wxEmptyString,
1747 wxDefaultPosition, wxDefaultSize, 0);
1748 fgSizer52->Add(m_checkBox53, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1749
1750 m_biShowCursorData =
1751 new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1752 wxDefaultPosition, wxDefaultSize, 0);
1753 fgSizer52->Add(m_biShowCursorData, 0, wxALL, 3);
1754
1755 wxStaticText* m_staticText49;
1756 m_staticText49 =
1757 new wxStaticText(m_scSetGuiPanel, wxID_ANY, _("Show Cursor Data"),
1758 wxDefaultPosition, wxDefaultSize, 0);
1759 m_staticText49->Wrap(-1);
1760 fgSizer52->Add(m_staticText49, 0, wxALL, 3);
1761
1762 wxCheckBox* m_checkBox54;
1763 m_checkBox54 = new wxCheckBox(m_scSetGuiPanel, SCD0, wxEmptyString,
1764 wxDefaultPosition, wxDefaultSize, 0);
1765 fgSizer52->Add(m_checkBox54, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1766
1767 wxCheckBox* m_checkBox55;
1768 m_checkBox55 = new wxCheckBox(m_scSetGuiPanel, SCD1, wxEmptyString,
1769 wxDefaultPosition, wxDefaultSize, 0);
1770 fgSizer52->Add(m_checkBox55, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1771
1772 m_biPlay = new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1773 wxDefaultPosition, wxDefaultSize, 0);
1774 fgSizer52->Add(m_biPlay, 0, wxALL, 3);
1775
1776 wxStaticText* m_staticText50;
1777 m_staticText50 = new wxStaticText(m_scSetGuiPanel, wxID_ANY, _("Playback"),
1778 wxDefaultPosition, wxDefaultSize, 0);
1779 m_staticText50->Wrap(-1);
1780 fgSizer52->Add(m_staticText50, 0, wxALL, 3);
1781
1782 wxCheckBox* m_checkBox56;
1783 m_checkBox56 = new wxCheckBox(m_scSetGuiPanel, PB0, wxEmptyString,
1784 wxDefaultPosition, wxDefaultSize, 0);
1785 fgSizer52->Add(m_checkBox56, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1786
1787 wxCheckBox* m_checkBox57;
1788 m_checkBox57 = new wxCheckBox(m_scSetGuiPanel, PB1, wxEmptyString,
1789 wxDefaultPosition, wxDefaultSize, 0);
1790 fgSizer52->Add(m_checkBox57, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1791
1792 m_biTimeSlider = new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1793 wxDefaultPosition, wxDefaultSize, 0);
1794 fgSizer52->Add(m_biTimeSlider, 0, wxALL, 3);
1795
1796 wxStaticText* m_staticText51;
1797 m_staticText51 = new wxStaticText(m_scSetGuiPanel, wxID_ANY, _("Time Slider"),
1798 wxDefaultPosition, wxDefaultSize, 0);
1799 m_staticText51->Wrap(-1);
1800 fgSizer52->Add(m_staticText51, 0, wxALL, 3);
1801
1802 wxCheckBox* m_checkBox58;
1803 m_checkBox58 = new wxCheckBox(m_scSetGuiPanel, TL0, wxEmptyString,
1804 wxDefaultPosition, wxDefaultSize, 0);
1805 fgSizer52->Add(m_checkBox58, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1806
1807 wxCheckBox* m_checkBox59;
1808 m_checkBox59 = new wxCheckBox(m_scSetGuiPanel, TL1, wxEmptyString,
1809 wxDefaultPosition, wxDefaultSize, 0);
1810 fgSizer52->Add(m_checkBox59, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1811
1812 m_biOpenFile = new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1813 wxDefaultPosition, wxDefaultSize, 0);
1814 fgSizer52->Add(m_biOpenFile, 0, wxALL, 3);
1815
1816 wxStaticText* m_staticText52;
1817 m_staticText52 = new wxStaticText(m_scSetGuiPanel, wxID_ANY, _("Open File"),
1818 wxDefaultPosition, wxDefaultSize, 0);
1819 m_staticText52->Wrap(-1);
1820 fgSizer52->Add(m_staticText52, 0, wxALL, 3);
1821
1822 wxCheckBox* m_checkBox60;
1823 m_checkBox60 = new wxCheckBox(m_scSetGuiPanel, OF0, wxEmptyString,
1824 wxDefaultPosition, wxDefaultSize, 0);
1825 fgSizer52->Add(m_checkBox60, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1826
1827 wxCheckBox* m_checkBox61;
1828 m_checkBox61 = new wxCheckBox(m_scSetGuiPanel, OF1, wxEmptyString,
1829 wxDefaultPosition, wxDefaultSize, 0);
1830 fgSizer52->Add(m_checkBox61, 0, wxALIGN_CENTER_HORIZONTAL, 5);
1831
1832 m_biSettings = new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1833 wxDefaultPosition, wxDefaultSize, 0);
1834 fgSizer52->Add(m_biSettings, 0, wxALL, 3);
1835
1836 wxStaticText* m_staticText53;
1837 m_staticText53 = new wxStaticText(m_scSetGuiPanel, wxID_ANY, _("Settings"),
1838 wxDefaultPosition, wxDefaultSize, 0);
1839 m_staticText53->Wrap(-1);
1840 fgSizer52->Add(m_staticText53, 0, wxALL, 3);
1841
1842 wxCheckBox* m_checkBox62;
1843 m_checkBox62 = new wxCheckBox(m_scSetGuiPanel, STS0, wxEmptyString,
1844 wxDefaultPosition, wxDefaultSize, 0);
1845 fgSizer52->Add(m_checkBox62, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1846
1847 wxCheckBox* m_checkBox63;
1848 m_checkBox63 = new wxCheckBox(m_scSetGuiPanel, STS1, wxEmptyString,
1849 wxDefaultPosition, wxDefaultSize, 0);
1850 fgSizer52->Add(m_checkBox63, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1851
1852 m_biRequest = new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1853 wxDefaultPosition, wxDefaultSize, 0);
1854 fgSizer52->Add(m_biRequest, 0, wxALL, 3);
1855
1856 wxStaticText* m_staticText54;
1857 m_staticText54 = new wxStaticText(m_scSetGuiPanel, wxID_ANY, _("Request"),
1858 wxDefaultPosition, wxDefaultSize, 0);
1859 m_staticText54->Wrap(-1);
1860 fgSizer52->Add(m_staticText54, 0, wxALL, 3);
1861
1862 wxCheckBox* m_checkBox64;
1863 m_checkBox64 = new wxCheckBox(m_scSetGuiPanel, RQ0, wxEmptyString,
1864 wxDefaultPosition, wxDefaultSize, 0);
1865 fgSizer52->Add(m_checkBox64, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1866
1867 wxCheckBox* m_checkBox65;
1868 m_checkBox65 = new wxCheckBox(m_scSetGuiPanel, RQ1, wxEmptyString,
1869 wxDefaultPosition, wxDefaultSize, 0);
1870 fgSizer52->Add(m_checkBox65, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 3);
1871
1872 sbSizer10->Add(fgSizer52, 1, wxEXPAND, 5);
1873
1874 m_fgSetGuiSizer->Add(sbSizer10, 1, wxEXPAND | wxTOP, 5);
1875
1876 m_scSetGuiPanel->SetSizer(m_fgSetGuiSizer);
1877 m_scSetGuiPanel->Layout();
1878 m_fgSetGuiSizer->Fit(m_scSetGuiPanel);
1879 m_nSettingsBook->AddPage(m_scSetGuiPanel, _("GUI"), true);
1880
1881 fgSizer53->Add(m_nSettingsBook, 1, wxEXPAND | wxALL, 5);
1882
1883 m_sButton = new wxStdDialogButtonSizer();
1884 m_sButtonOK = new wxButton(this, wxID_OK);
1885 m_sButton->AddButton(m_sButtonOK);
1886 m_sButtonApply = new wxButton(this, wxID_APPLY);
1887 m_sButton->AddButton(m_sButtonApply);
1888 m_sButtonCancel = new wxButton(this, wxID_CANCEL, _("Cancel"));
1889 m_sButton->AddButton(m_sButtonCancel);
1890 m_sButton->Realize();
1891
1892 fgSizer53->Add(m_sButton, 1, wxEXPAND, 5);
1893
1894 this->SetSizer(fgSizer53);
1895 this->Layout();
1896 fgSizer53->Fit(this);
1897
1898 this->Centre(wxBOTH);
1899
1900 // Connect Events
1901 m_nSettingsBook->Connect(
1902 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
1903 wxNotebookEventHandler(GribSettingsDialogBase::OnPageChange), nullptr,
1904 this);
1905 m_cDataType->Connect(
1906 wxEVT_COMMAND_CHOICE_SELECTED,
1907 wxCommandEventHandler(GribSettingsDialogBase::OnDataTypeChoice), nullptr,
1908 this);
1909 m_cDataUnits->Connect(
1910 wxEVT_COMMAND_CHOICE_SELECTED,
1911 wxCommandEventHandler(GribSettingsDialogBase::OnUnitChange), nullptr,
1912 this);
1913 m_cBarbArrFixSpac->Connect(
1914 wxEVT_COMMAND_CHECKBOX_CLICKED,
1915 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
1916 nullptr, this);
1917 m_cBarbArrMinSpac->Connect(
1918 wxEVT_COMMAND_CHECKBOX_CLICKED,
1919 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
1920 nullptr, this);
1921 m_cDirArrFixSpac->Connect(
1922 wxEVT_COMMAND_CHECKBOX_CLICKED,
1923 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
1924 nullptr, this);
1925 m_cDirArrMinSpac->Connect(
1926 wxEVT_COMMAND_CHECKBOX_CLICKED,
1927 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
1928 nullptr, this);
1929 m_cNumFixSpac->Connect(
1930 wxEVT_COMMAND_CHECKBOX_CLICKED,
1931 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
1932 nullptr, this);
1933 m_cNumMinSpac->Connect(
1934 wxEVT_COMMAND_CHECKBOX_CLICKED,
1935 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
1936 nullptr, this);
1937 m_sTransparency->Connect(
1938 wxEVT_SCROLL_TOP,
1939 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1940 nullptr, this);
1941 m_sTransparency->Connect(
1942 wxEVT_SCROLL_BOTTOM,
1943 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1944 nullptr, this);
1945 m_sTransparency->Connect(
1946 wxEVT_SCROLL_LINEUP,
1947 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1948 nullptr, this);
1949 m_sTransparency->Connect(
1950 wxEVT_SCROLL_LINEDOWN,
1951 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1952 nullptr, this);
1953 m_sTransparency->Connect(
1954 wxEVT_SCROLL_PAGEUP,
1955 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1956 nullptr, this);
1957 m_sTransparency->Connect(
1958 wxEVT_SCROLL_PAGEDOWN,
1959 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1960 nullptr, this);
1961 m_sTransparency->Connect(
1962 wxEVT_SCROLL_THUMBTRACK,
1963 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1964 nullptr, this);
1965 m_sTransparency->Connect(
1966 wxEVT_SCROLL_THUMBRELEASE,
1967 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1968 nullptr, this);
1969 m_sTransparency->Connect(
1970 wxEVT_SCROLL_CHANGED,
1971 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1972 nullptr, this);
1973 m_cLoopMode->Connect(
1974 wxEVT_COMMAND_CHECKBOX_CLICKED,
1975 wxCommandEventHandler(GribSettingsDialogBase::OnIntepolateChange),
1976 nullptr, this);
1977 m_cInterpolate->Connect(
1978 wxEVT_COMMAND_CHECKBOX_CLICKED,
1979 wxCommandEventHandler(GribSettingsDialogBase::OnIntepolateChange),
1980 nullptr, this);
1981 m_rbCurDataAttaWCap->Connect(
1982 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
1983 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
1984 nullptr, this);
1985 m_rbCurDataAttaWoCap->Connect(
1986 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
1987 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
1988 nullptr, this);
1989 m_rbCurDataIsolHoriz->Connect(
1990 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
1991 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
1992 nullptr, this);
1993 m_rbCurDataIsolVertic->Connect(
1994 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
1995 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
1996 nullptr, this);
1997 m_sButtonApply->Connect(
1998 wxEVT_COMMAND_BUTTON_CLICKED,
1999 wxCommandEventHandler(GribSettingsDialogBase::OnApply), nullptr, this);
2000}
2001
2002GribSettingsDialogBase::~GribSettingsDialogBase() {
2003 // Disconnect Events
2004 m_nSettingsBook->Disconnect(
2005 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
2006 wxNotebookEventHandler(GribSettingsDialogBase::OnPageChange), nullptr,
2007 this);
2008 m_cDataType->Disconnect(
2009 wxEVT_COMMAND_CHOICE_SELECTED,
2010 wxCommandEventHandler(GribSettingsDialogBase::OnDataTypeChoice), nullptr,
2011 this);
2012 m_cDataUnits->Disconnect(
2013 wxEVT_COMMAND_CHOICE_SELECTED,
2014 wxCommandEventHandler(GribSettingsDialogBase::OnUnitChange), nullptr,
2015 this);
2016 m_cBarbArrFixSpac->Disconnect(
2017 wxEVT_COMMAND_CHECKBOX_CLICKED,
2018 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
2019 nullptr, this);
2020 m_cBarbArrMinSpac->Disconnect(
2021 wxEVT_COMMAND_CHECKBOX_CLICKED,
2022 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
2023 nullptr, this);
2024 m_cDirArrFixSpac->Disconnect(
2025 wxEVT_COMMAND_CHECKBOX_CLICKED,
2026 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
2027 nullptr, this);
2028 m_cDirArrMinSpac->Disconnect(
2029 wxEVT_COMMAND_CHECKBOX_CLICKED,
2030 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
2031 nullptr, this);
2032 m_cNumFixSpac->Disconnect(
2033 wxEVT_COMMAND_CHECKBOX_CLICKED,
2034 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
2035 nullptr, this);
2036 m_cNumMinSpac->Disconnect(
2037 wxEVT_COMMAND_CHECKBOX_CLICKED,
2038 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
2039 nullptr, this);
2040 m_sTransparency->Disconnect(
2041 wxEVT_SCROLL_TOP,
2042 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2043 nullptr, this);
2044 m_sTransparency->Disconnect(
2045 wxEVT_SCROLL_BOTTOM,
2046 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2047 nullptr, this);
2048 m_sTransparency->Disconnect(
2049 wxEVT_SCROLL_LINEUP,
2050 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2051 nullptr, this);
2052 m_sTransparency->Disconnect(
2053 wxEVT_SCROLL_LINEDOWN,
2054 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2055 nullptr, this);
2056 m_sTransparency->Disconnect(
2057 wxEVT_SCROLL_PAGEUP,
2058 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2059 nullptr, this);
2060 m_sTransparency->Disconnect(
2061 wxEVT_SCROLL_PAGEDOWN,
2062 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2063 nullptr, this);
2064 m_sTransparency->Disconnect(
2065 wxEVT_SCROLL_THUMBTRACK,
2066 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2067 nullptr, this);
2068 m_sTransparency->Disconnect(
2069 wxEVT_SCROLL_THUMBRELEASE,
2070 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2071 nullptr, this);
2072 m_sTransparency->Disconnect(
2073 wxEVT_SCROLL_CHANGED,
2074 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2075 nullptr, this);
2076 m_cLoopMode->Disconnect(
2077 wxEVT_COMMAND_CHECKBOX_CLICKED,
2078 wxCommandEventHandler(GribSettingsDialogBase::OnIntepolateChange),
2079 nullptr, this);
2080 m_cInterpolate->Disconnect(
2081 wxEVT_COMMAND_CHECKBOX_CLICKED,
2082 wxCommandEventHandler(GribSettingsDialogBase::OnIntepolateChange),
2083 nullptr, this);
2084 m_rbCurDataAttaWCap->Disconnect(
2085 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
2086 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
2087 nullptr, this);
2088 m_rbCurDataAttaWoCap->Disconnect(
2089 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
2090 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
2091 nullptr, this);
2092 m_rbCurDataIsolHoriz->Disconnect(
2093 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
2094 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
2095 nullptr, this);
2096 m_rbCurDataIsolVertic->Disconnect(
2097 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
2098 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
2099 nullptr, this);
2100 m_sButtonApply->Disconnect(
2101 wxEVT_COMMAND_BUTTON_CLICKED,
2102 wxCommandEventHandler(GribSettingsDialogBase::OnApply), nullptr, this);
2103}
2104
2105#ifndef __OCPN__ANDROID__
2106GribPreferencesDialogBase::GribPreferencesDialogBase(
2107 wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos,
2108 const wxSize& size, long style)
2109 : wxDialog(parent, id, title, pos, size, style) {
2110 this->SetSizeHints(wxDefaultSize, wxDefaultSize);
2111
2112 wxBoxSizer* itemBoxSizerMainPanel = new wxBoxSizer(wxVERTICAL);
2113 SetSizer(itemBoxSizerMainPanel);
2114
2115 wxScrolledWindow* scrollWin = new wxScrolledWindow(
2116 this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxVSCROLL);
2117 scrollWin->SetScrollRate(1, 1);
2118 itemBoxSizerMainPanel->Add(scrollWin, 1, wxEXPAND | wxALL, 0);
2119
2120 wxBoxSizer* bSizerPrefsMain = new wxBoxSizer(wxVERTICAL);
2121 scrollWin->SetSizer(bSizerPrefsMain);
2122
2123 wxStdDialogButtonSizer* m_sdbSizer2;
2124 wxButton* m_sdbSizer2OK;
2125 wxButton* m_sdbSizer2Cancel;
2126 m_sdbSizer2 = new wxStdDialogButtonSizer();
2127 m_sdbSizer2OK = new wxButton(this, wxID_OK);
2128 m_sdbSizer2->AddButton(m_sdbSizer2OK);
2129 m_sdbSizer2Cancel = new wxButton(this, wxID_CANCEL, _("Cancel"));
2130 m_sdbSizer2->AddButton(m_sdbSizer2Cancel);
2131 auto help_btn = new wxButton(this, wxID_HELP);
2132 help_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [&](wxCommandEvent) {
2133 wxString datadir = GetPluginDataDir("manual_pi");
2134 Manual(this, datadir.ToStdString()).Launch("Grib");
2135 });
2136 m_sdbSizer2->AddButton(help_btn);
2137
2138 m_sdbSizer2->Realize();
2139
2140 itemBoxSizerMainPanel->Add(m_sdbSizer2, 0, wxEXPAND, 5);
2141
2142 wxStaticBoxSizer* sbSizer9;
2143 sbSizer9 = new wxStaticBoxSizer(
2144 new wxStaticBox(scrollWin, wxID_ANY, _("General Options")), wxVERTICAL);
2145
2146 wxFlexGridSizer* fgSizer46;
2147 fgSizer46 = new wxFlexGridSizer(0, 1, 0, 0);
2148 fgSizer46->SetFlexibleDirection(wxBOTH);
2149 fgSizer46->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2150
2151 m_cbUseHiDef =
2152 new wxCheckBox(scrollWin, wxID_ANY, _("Use High Definition Graphics"),
2153 wxDefaultPosition, wxDefaultSize, 0);
2154 fgSizer46->Add(m_cbUseHiDef, 0, wxALL, 5);
2155
2156 m_cbUseGradualColors =
2157 new wxCheckBox(scrollWin, wxID_ANY, _("Use Gradual Colors"),
2158 wxDefaultPosition, wxDefaultSize, 0);
2159 fgSizer46->Add(m_cbUseGradualColors, 0, wxALL, 5);
2160
2161 m_cbCopyFirstCumulativeRecord = new wxCheckBox(
2162 scrollWin, wxID_ANY, _("Copy First Cumulative Missing Record"),
2163 wxDefaultPosition, wxDefaultSize, 0);
2164 fgSizer46->Add(m_cbCopyFirstCumulativeRecord, 0, wxALL, 5);
2165
2166 m_cbCopyMissingWaveRecord =
2167 new wxCheckBox(scrollWin, wxID_ANY, _("Copy Missing Wave Records"),
2168 wxDefaultPosition, wxDefaultSize, 0);
2169 fgSizer46->Add(m_cbCopyMissingWaveRecord, 0, wxALL, 5);
2170
2171 m_cbDrawBarbedArrowHead =
2172 new wxCheckBox(scrollWin, wxID_ANY, _("Draw Barbed Arrows Head"),
2173 wxDefaultPosition, wxDefaultSize, 0);
2174 fgSizer46->Add(m_cbDrawBarbedArrowHead, 0, wxALL, 5);
2175
2176 m_cZoomToCenterAtInit =
2177 new wxCheckBox(scrollWin, wxID_ANY, _("Zoom to file center when opened"),
2178 wxDefaultPosition, wxDefaultSize, 0);
2179 fgSizer46->Add(m_cZoomToCenterAtInit, 0, wxALL, 5);
2180
2181 sbSizer9->Add(fgSizer46, 1, wxEXPAND, 5);
2182
2183 bSizerPrefsMain->Add(sbSizer9, 1, wxEXPAND, 5);
2184
2185 wxString m_rbLoadOptionsChoices[] = {
2186 _("Load the More Recent File in Directory"),
2187 _("Load the Last Opened File")};
2188 int m_rbLoadOptionsNChoices =
2189 sizeof(m_rbLoadOptionsChoices) / sizeof(wxString);
2190 m_rbLoadOptions =
2191 new wxRadioBox(scrollWin, wxID_ANY, _("Load File Options"),
2192 wxDefaultPosition, wxDefaultSize, m_rbLoadOptionsNChoices,
2193 m_rbLoadOptionsChoices, 1, wxRA_SPECIFY_COLS);
2194 m_rbLoadOptions->SetSelection(0);
2195 bSizerPrefsMain->Add(m_rbLoadOptions, 0, wxALL | wxEXPAND, 5);
2196
2197 wxString m_rbStartOptionsChoices[] = {
2198 _("Start at the first forecast in GRIB file"),
2199 _("Start at the nearest forecast to current time"),
2200 _("Authorize Interpolation to start at current time")};
2201 int m_rbStartOptionsNChoices =
2202 sizeof(m_rbStartOptionsChoices) / sizeof(wxString);
2203 m_rbStartOptions = new wxRadioBox(
2204 scrollWin, wxID_ANY, _("Start Options"), wxDefaultPosition, wxDefaultSize,
2205 m_rbStartOptionsNChoices, m_rbStartOptionsChoices, 1, wxRA_SPECIFY_COLS);
2206 m_rbStartOptions->SetSelection(0);
2207 bSizerPrefsMain->Add(m_rbStartOptions, 0, wxALL | wxEXPAND, 5);
2208
2209 wxString m_rbTimeFormatChoices[] = {_("Local Time"), _("UTC"),
2210 _("Honor Global Settings")};
2211 int m_rbTimeFormatNChoices = sizeof(m_rbTimeFormatChoices) / sizeof(wxString);
2212 m_rbTimeFormat = new wxRadioBox(
2213 scrollWin, wxID_ANY, _("Time Options"), wxDefaultPosition, wxDefaultSize,
2214 m_rbTimeFormatNChoices, m_rbTimeFormatChoices, 1, wxRA_SPECIFY_COLS);
2215 m_rbTimeFormat->SetSelection(2 /*Honor Global Settings*/);
2216 bSizerPrefsMain->Add(m_rbTimeFormat, 0, wxALL | wxEXPAND, 5);
2217
2218#ifdef __WXMSW__
2219 wxFlexGridSizer* fgSizer47;
2220 fgSizer47 = new wxFlexGridSizer(0, 2, 0, 0);
2221 fgSizer47->SetFlexibleDirection(wxBOTH);
2222 fgSizer47->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2223 wxStaticText* text =
2224 new wxStaticText(scrollWin, wxID_ANY, _("Icons Size Factor"),
2225 wxDefaultPosition, wxDefaultSize);
2226 fgSizer47->Add(text, 0, wxALL | wxEXPAND, 5);
2227 m_sIconSizeFactor =
2228 new wxSlider(scrollWin, wxID_ANY, 0, -8, 8, wxDefaultPosition,
2229 wxDefaultSize, wxSL_BOTTOM | wxSL_HORIZONTAL | wxSL_LABELS);
2230 fgSizer47->Add(m_sIconSizeFactor, 0, wxALL | wxEXPAND, 5);
2231 bSizerPrefsMain->Add(fgSizer47, 0, wxALL | wxEXPAND, 5);
2232#endif
2233
2234 wxButton* SetSaveButton =
2235 new wxButton(scrollWin, wxID_ANY, _("Select GRIB download directory"));
2236 bSizerPrefsMain->Add(SetSaveButton, 0, wxALL | wxEXPAND, 5);
2237 SetSaveButton->Connect(
2238 wxEVT_COMMAND_BUTTON_CLICKED,
2239 wxCommandEventHandler(GribPreferencesDialogBase::OnDirSelClick), nullptr,
2240 this);
2241
2242 Layout();
2243 Fit();
2244
2245 // Connect Events
2246 m_rbStartOptions->Connect(
2247 wxEVT_COMMAND_RADIOBOX_SELECTED,
2248 wxCommandEventHandler(GribPreferencesDialogBase::OnStartOptionChange),
2249 nullptr, this);
2250 m_sdbSizer2OK->Connect(
2251 wxEVT_COMMAND_BUTTON_CLICKED,
2252 wxCommandEventHandler(GribPreferencesDialogBase::OnOKClick), nullptr,
2253 this);
2254}
2255#else
2256
2257GribPreferencesDialogBase::GribPreferencesDialogBase(
2258 wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos,
2259 const wxSize& size, long style)
2260 : wxDialog(parent, id, title, pos, size, style) {
2261 this->SetSizeHints(wxDefaultSize, wxDefaultSize);
2262
2263 wxBoxSizer* topSizer = new wxBoxSizer(wxVERTICAL);
2264 SetSizer(topSizer);
2265
2266 wxBoxSizer* labelSizer = new wxBoxSizer(wxHORIZONTAL);
2267 topSizer->Add(labelSizer, 0, wxEXPAND, 5);
2268
2269 wxStaticText* labelBox =
2270 new wxStaticText(this, wxID_ANY, _("GRIB PlugIn Preferences"),
2271 wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE);
2272 labelSizer->Add(labelBox, 1, wxEXPAND, 0);
2273
2274 wxScrolledWindow* itemScrollWin = new wxScrolledWindow(
2275 this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), wxVSCROLL);
2276 topSizer->Add(itemScrollWin, 1, wxEXPAND | wxALL, 0);
2277 itemScrollWin->SetScrollRate(2, 2);
2278
2279 wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
2280 itemScrollWin->SetSizer(itemBoxSizer2);
2281
2282 wxStaticBoxSizer* sbSizer9;
2283 sbSizer9 = new wxStaticBoxSizer(
2284 new wxStaticBox(itemScrollWin, wxID_ANY, _("General Options")),
2285 wxVERTICAL);
2286 itemBoxSizer2->Add(sbSizer9, 1, wxEXPAND, 5);
2287
2288 m_cbUseHiDef =
2289 new wxCheckBox(itemScrollWin, wxID_ANY, _("Use High Definition Graphics"),
2290 wxDefaultPosition, wxDefaultSize, 0);
2291 sbSizer9->Add(m_cbUseHiDef, 0, wxALL, 5);
2292
2293 m_cbUseGradualColors =
2294 new wxCheckBox(itemScrollWin, wxID_ANY, _("Use Gradual Colors"),
2295 wxDefaultPosition, wxDefaultSize, 0);
2296 sbSizer9->Add(m_cbUseGradualColors, 0, wxALL, 5);
2297
2298 m_cbCopyFirstCumulativeRecord = new wxCheckBox(
2299 itemScrollWin, wxID_ANY, _("Copy First Cumulative Missing Record"),
2300 wxDefaultPosition, wxDefaultSize, 0);
2301 sbSizer9->Add(m_cbCopyFirstCumulativeRecord, 0, wxALL, 5);
2302
2303 m_cbCopyMissingWaveRecord =
2304 new wxCheckBox(itemScrollWin, wxID_ANY, _("Copy Missing Wave Records"),
2305 wxDefaultPosition, wxDefaultSize, 0);
2306 sbSizer9->Add(m_cbCopyMissingWaveRecord, 0, wxALL, 5);
2307
2308 m_cbDrawBarbedArrowHead =
2309 new wxCheckBox(itemScrollWin, wxID_ANY, _("Draw Barbed Arrows Head"),
2310 wxDefaultPosition, wxDefaultSize, 0);
2311 sbSizer9->Add(m_cbDrawBarbedArrowHead, 0, wxALL, 5);
2312
2313 m_cZoomToCenterAtInit = new wxCheckBox(itemScrollWin, wxID_ANY,
2314 _("Zoom to file center when opened"),
2315 wxDefaultPosition, wxDefaultSize, 0);
2316 sbSizer9->Add(m_cZoomToCenterAtInit, 0, wxALL, 5);
2317
2318 wxString m_rbLoadOptionsChoices[] = {
2319 _("Load the More Recent File in Directory"),
2320 _("Load the Last Opened File")};
2321 int m_rbLoadOptionsNChoices =
2322 sizeof(m_rbLoadOptionsChoices) / sizeof(wxString);
2323 m_rbLoadOptions =
2324 new wxRadioBox(itemScrollWin, wxID_ANY, _("Load File Options"),
2325 wxDefaultPosition, wxDefaultSize, m_rbLoadOptionsNChoices,
2326 m_rbLoadOptionsChoices, 1, wxRA_SPECIFY_COLS);
2327 m_rbLoadOptions->SetSelection(0);
2328 sbSizer9->Add(m_rbLoadOptions, 0, wxALL | wxEXPAND, 5);
2329
2330 wxString m_rbStartOptionsChoices[] = {
2331 _("Start at the first forecast in GRIB file"),
2332 _("Start at the nearest forecast to current time"),
2333 _("Authorize Interpolation to start at current time")};
2334 int m_rbStartOptionsNChoices =
2335 sizeof(m_rbStartOptionsChoices) / sizeof(wxString);
2336 m_rbStartOptions =
2337 new wxRadioBox(itemScrollWin, wxID_ANY, _("Start Options"),
2338 wxDefaultPosition, wxDefaultSize, m_rbStartOptionsNChoices,
2339 m_rbStartOptionsChoices, 1, wxRA_SPECIFY_COLS);
2340 m_rbStartOptions->SetSelection(0);
2341 sbSizer9->Add(m_rbStartOptions, 0, wxALL | wxEXPAND, 5);
2342
2343 wxString m_rbTimeFormatChoices[] = {_("Local Time"), _("UTC"),
2344 _("Honor Global Settings")};
2345 int m_rbTimeFormatNChoices = sizeof(m_rbTimeFormatChoices) / sizeof(wxString);
2346 m_rbTimeFormat =
2347 new wxRadioBox(itemScrollWin, wxID_ANY, _("Time Options"),
2348 wxDefaultPosition, wxDefaultSize, m_rbTimeFormatNChoices,
2349 m_rbTimeFormatChoices, 1, wxRA_SPECIFY_COLS);
2350 m_rbTimeFormat->SetSelection(2);
2351 sbSizer9->Add(m_rbTimeFormat, 0, wxALL | wxEXPAND, 5);
2352
2353 wxBoxSizer* m_sdbButtonSizer = new wxBoxSizer(wxHORIZONTAL);
2354 topSizer->Add(m_sdbButtonSizer, 0, wxEXPAND, 5);
2355
2356 wxButton* m_sdbButtonSizerOK = new wxButton(this, wxID_OK);
2357 m_sdbButtonSizer->Add(m_sdbButtonSizerOK, 0, wxALL | wxALIGN_RIGHT, 15);
2358
2359 wxButton* m_sdbButtonSizerCancel = new wxButton(this, wxID_CANCEL);
2360 m_sdbButtonSizer->Add(m_sdbButtonSizerCancel, 0, wxALL | wxALIGN_RIGHT, 15);
2361
2362 // Connect Events
2363 m_rbStartOptions->Connect(
2364 wxEVT_COMMAND_RADIOBOX_SELECTED,
2365 wxCommandEventHandler(GribPreferencesDialogBase::OnStartOptionChange),
2366 nullptr, this);
2367 m_sdbButtonSizerOK->Connect(
2368 wxEVT_COMMAND_BUTTON_CLICKED,
2369 wxCommandEventHandler(GribPreferencesDialogBase::OnOKClick), nullptr,
2370 this);
2371}
2372
2373#endif
2374
2375GribPreferencesDialogBase::~GribPreferencesDialogBase() {
2376 // Disconnect Events
2377 m_rbStartOptions->Disconnect(
2378 wxEVT_COMMAND_RADIOBOX_SELECTED,
2379 wxCommandEventHandler(GribPreferencesDialogBase::OnStartOptionChange),
2380 nullptr, this);
2381}
2382
2383void GribPreferencesDialogBase::OnDirSelClick(wxCommandEvent& event) {
2384 wxString dir_spec;
2385 int response = PlatformDirSelectorDialog(
2386 this, &dir_spec, _("Choose GRIB File Directory"), m_grib_dir_sel);
2387
2388 if (response == wxID_OK) {
2389 m_grib_dir_sel = dir_spec;
2390 }
2391}
2392
2393wxStaticBoxSizer* GribRequestSettingBase::createAreaSelectionSection(
2394 wxWindow* parent, GRIBUICtrlBarBase* ctrlBar) {
2395 wxStaticBoxSizer* sbSizer81;
2396 sbSizer81 = new wxStaticBoxSizer(
2397 new wxStaticBox(parent, wxID_ANY, _("Area Selection")), wxVERTICAL);
2398
2399 wxFlexGridSizer* fgSizer36;
2400 fgSizer36 = new wxFlexGridSizer(0, 2, 0, 0);
2401 fgSizer36->SetFlexibleDirection(wxBOTH);
2402 fgSizer36->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2403
2404 wxFlexGridSizer* fgSizer37;
2405 fgSizer37 = new wxFlexGridSizer(0, 1, 0, 0);
2406 fgSizer37->SetFlexibleDirection(wxBOTH);
2407 fgSizer37->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2408
2409 wxBoxSizer* zoneSelBoxSizer = new wxBoxSizer(wxVERTICAL);
2411 new wxRadioButton(parent, AUTOSELECT, _("Current View"),
2412 wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
2413 m_rbManualSelect = new wxRadioButton(parent, MANSELECT, _("Manual Selection"),
2414 wxDefaultPosition, wxDefaultSize);
2415 m_rbCurrentView->SetValue(true); // Set Current View as default
2416
2417 zoneSelBoxSizer->Add(m_rbCurrentView, 0, wxALL, 5);
2418 zoneSelBoxSizer->Add(m_rbManualSelect, 0, wxALL, 5);
2419 fgSizer37->Add(zoneSelBoxSizer, 0, wxLEFT | wxBOTTOM, 5);
2420
2421 m_bpManualSelection =
2422 new wxBitmapToggleButton(this, ID_BTNREQUEST, wxNullBitmap,
2423 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
2424 m_bpManualSelection->SetBitmapLabel(GRIBUICtrlBarBase::GetScaledBitmap(
2425 wxBitmap(selzone), _T("selzone"), ctrlBar->GetScaleFactor()));
2426 // Set the pressed state bitmap - use a darker/highlighted version of the same
2427 // bitmap
2428 wxBitmap pressedBitmap = GRIBUICtrlBarBase::GetScaledBitmap(
2429 wxBitmap(selzone), _T("selzone"), ctrlBar->GetScaleFactor());
2430 pressedBitmap =
2431 pressedBitmap.ConvertToDisabled(); // Creates a greyed version
2432 m_bpManualSelection->SetBitmapPressed(pressedBitmap);
2433
2434 m_bpManualSelection->SetToolTip(
2435 _("Click to select the download area, or Shift + Click + Drag on the "
2436 "canvas"));
2437 fgSizer37->Add(m_bpManualSelection, 0, wxLEFT, 5);
2438
2439 fgSizer36->Add(fgSizer37, 1, wxEXPAND | wxLEFT, 5);
2440
2441 fgZoneCoordinatesSizer = new wxFlexGridSizer(0, 6, 0, 0);
2442 fgZoneCoordinatesSizer->SetFlexibleDirection(wxBOTH);
2443 fgZoneCoordinatesSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2444
2445 wxStaticText* m_staticText34;
2446 m_staticText34 = new wxStaticText(parent, wxID_ANY, _("Max Lat"),
2447 wxDefaultPosition, wxDefaultSize, 0);
2448 m_staticText34->Wrap(-1);
2449 fgZoneCoordinatesSizer->Add(m_staticText34, 0, wxLEFT | wxRIGHT, 5);
2450
2451 m_spMaxLat = new wxSpinCtrl(parent, MAXLAT, wxEmptyString, wxDefaultPosition,
2452 wxDefaultSize, wxSP_ARROW_KEYS, -180, 180, 0);
2453 fgZoneCoordinatesSizer->Add(m_spMaxLat, 0, wxLEFT | wxRIGHT, 5);
2454
2455 m_stMaxLatNS = new wxStaticText(parent, wxID_ANY, _("N"), wxDefaultPosition,
2456 wxDefaultSize, 0);
2457 m_stMaxLatNS->Wrap(-1);
2458 fgZoneCoordinatesSizer->Add(m_stMaxLatNS, 0, wxRIGHT, 20);
2459
2460 m_staticText36 = new wxStaticText(parent, wxID_ANY, _("Max Long"),
2461 wxDefaultPosition, wxDefaultSize, 0);
2462 m_staticText36->Wrap(-1);
2463 fgZoneCoordinatesSizer->Add(m_staticText36, 0, wxLEFT | wxRIGHT, 5);
2464
2465 m_spMaxLon = new wxSpinCtrl(parent, MAXLON, wxEmptyString, wxDefaultPosition,
2466 wxDefaultSize, wxSP_ARROW_KEYS, -180, 180, 0);
2467 fgZoneCoordinatesSizer->Add(m_spMaxLon, 0, wxLEFT | wxRIGHT, 5);
2468
2469 m_stMaxLonEW = new wxStaticText(parent, wxID_ANY, _("E"), wxDefaultPosition,
2470 wxDefaultSize, 0);
2471 m_stMaxLonEW->Wrap(-1);
2472 fgZoneCoordinatesSizer->Add(m_stMaxLonEW, 0, wxRIGHT, 5);
2473
2474 wxStaticText* m_staticText38;
2475 m_staticText38 = new wxStaticText(parent, wxID_ANY, _("Min Lat"),
2476 wxDefaultPosition, wxDefaultSize, 0);
2477 m_staticText38->Wrap(-1);
2478 fgZoneCoordinatesSizer->Add(m_staticText38, 0, wxLEFT | wxRIGHT | wxTOP, 5);
2479
2480 m_spMinLat = new wxSpinCtrl(parent, MINLAT, wxEmptyString, wxDefaultPosition,
2481 wxDefaultSize, wxSP_ARROW_KEYS, -180, 180, 0);
2482 fgZoneCoordinatesSizer->Add(m_spMinLat, 0, wxLEFT | wxRIGHT | wxTOP, 5);
2483
2484 m_stMinLatNS = new wxStaticText(parent, wxID_ANY, _("S"), wxDefaultPosition,
2485 wxDefaultSize, 0);
2486 m_stMinLatNS->Wrap(-1);
2487 fgZoneCoordinatesSizer->Add(m_stMinLatNS, 0, wxRIGHT | wxTOP, 5);
2488
2489 wxStaticText* m_staticText40;
2490 m_staticText40 = new wxStaticText(parent, wxID_ANY, _("Min Long"),
2491 wxDefaultPosition, wxDefaultSize, 0);
2492 m_staticText40->Wrap(-1);
2493 fgZoneCoordinatesSizer->Add(m_staticText40, 0, wxLEFT | wxRIGHT | wxTOP, 5);
2494
2495 m_spMinLon = new wxSpinCtrl(parent, MINLON, wxEmptyString, wxDefaultPosition,
2496 wxDefaultSize, wxSP_ARROW_KEYS, -180, 180, 0);
2497 fgZoneCoordinatesSizer->Add(m_spMinLon, 0, wxLEFT | wxRIGHT | wxTOP, 5);
2498
2499 m_stMinLonEW = new wxStaticText(parent, wxID_ANY, _("W"), wxDefaultPosition,
2500 wxDefaultSize, 0);
2501 m_stMinLonEW->Wrap(-1);
2502 fgZoneCoordinatesSizer->Add(m_stMinLonEW, 0, wxRIGHT | wxTOP, 5);
2503
2504 wxFlexGridSizer* fgSizer38;
2505 fgSizer38 = new wxFlexGridSizer(0, 1, 0, 0);
2506 fgSizer38->Add(fgZoneCoordinatesSizer, 1, wxEXPAND | wxLEFT | wxTOP, 5);
2507
2508 m_cUseSavedZone = new wxCheckBox(parent, SAVEDZONE, _("Use Always this Area"),
2509 wxDefaultPosition, wxDefaultSize, 0);
2510 fgSizer38->Add(m_cUseSavedZone, 0, wxLEFT | wxRIGHT | wxTOP, 5);
2511
2512 fgSizer36->Add(fgSizer38, 1, wxEXPAND | wxLEFT | wxTOP, 5);
2513
2514 sbSizer81->Add(fgSizer36, 1, wxBOTTOM | wxEXPAND | wxTOP, 5);
2515
2516 return sbSizer81;
2517}
2518
2519void GribRequestSettingBase::createWorldPanel() {
2520 m_panelWorld = new wxPanel(m_notebookGetGrib, wxID_ANY, wxDefaultPosition,
2521 wxDefaultSize, wxTAB_TRAVERSAL);
2522 wxBoxSizer* bSizerWorldDownload;
2523 bSizerWorldDownload = new wxBoxSizer(wxVERTICAL);
2524
2525 m_htmlWinWorld =
2526 new wxHtmlWindow(m_panelWorld, wxID_ANY, wxDefaultPosition, wxDefaultSize,
2527 wxHW_NO_SELECTION | wxHW_SCROLLBAR_AUTO);
2528 bSizerWorldDownload->Add(m_htmlWinWorld, 1, wxALL | wxEXPAND, 5);
2529
2530 m_staticTextInfo =
2531 new wxStaticText(m_panelWorld, wxID_ANY, _("Download grib..."),
2532 wxDefaultPosition, wxDefaultSize, 0);
2533 m_staticTextInfo->Wrap(-1);
2534 bSizerWorldDownload->Add(m_staticTextInfo, 0, wxALL, 5);
2535
2536 wxBoxSizer* bSizerWorld;
2537 bSizerWorld = new wxBoxSizer(wxHORIZONTAL);
2538
2539 m_stForecastLength =
2540 new wxStaticText(m_panelWorld, wxID_ANY, _("Forecast length"),
2541 wxDefaultPosition, wxDefaultSize, 0);
2542 m_stForecastLength->Wrap(-1);
2543 bSizerWorld->Add(m_stForecastLength, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
2544
2545 wxString m_chForecastLengthChoices[] = {_("24 hours"), _("3 days"),
2546 _("Maximum")};
2547 int m_chForecastLengthNChoices =
2548 sizeof(m_chForecastLengthChoices) / sizeof(wxString);
2549 m_chForecastLength =
2550 new wxChoice(m_panelWorld, wxID_ANY, wxDefaultPosition, wxDefaultSize,
2551 m_chForecastLengthNChoices, m_chForecastLengthChoices, 0);
2552 m_chForecastLength->SetSelection(0);
2553 bSizerWorld->Add(m_chForecastLength, 0, wxALL, 5);
2554
2555 m_stECMWFResolution = new wxStaticText(m_panelWorld, wxID_ANY, _("Model"),
2556 wxDefaultPosition, wxDefaultSize, 0);
2557 m_stECMWFResolution->Wrap(-1);
2558 bSizerWorld->Add(m_stECMWFResolution, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
2559
2560 wxString m_chECMWFResolutionChoices[] = {
2561 wxString::Format("0.25%c IFS", 0x00B0),
2562 wxString::Format("0.25%c AIFS", 0x00B0)};
2563 int m_chECMWFResolutionNChoices =
2564 sizeof(m_chECMWFResolutionChoices) / sizeof(wxString);
2565 m_chECMWFResolution =
2566 new wxChoice(m_panelWorld, wxID_ANY, wxDefaultPosition, wxDefaultSize,
2567 m_chECMWFResolutionNChoices, m_chECMWFResolutionChoices, 0);
2568 m_chECMWFResolution->SetSelection(0);
2569 bSizerWorld->Add(m_chECMWFResolution, 0, wxALL, 5);
2570
2571 bSizerWorld->Add(0, 0, 1, wxEXPAND, 5);
2572
2573 m_btnDownloadWorld = new wxButton(m_panelWorld, wxID_ANY, _("Download"),
2574 wxDefaultPosition, wxDefaultSize, 0);
2575 bSizerWorld->Add(m_btnDownloadWorld, 0, wxALL, 5);
2576
2577 bSizerWorldDownload->Add(bSizerWorld, 0, wxEXPAND, 5);
2578
2579 m_panelWorld->SetSizer(bSizerWorldDownload);
2580 m_panelWorld->Layout();
2581 bSizerWorldDownload->Fit(m_panelWorld);
2582}
2583
2584void GribRequestSettingBase::createLocalModelsPanel() {
2585 m_panelLocalModels =
2586 new wxPanel(m_notebookGetGrib, wxID_ANY, wxDefaultPosition, wxDefaultSize,
2587 wxTAB_TRAVERSAL);
2588 wxBoxSizer* bMainSizer;
2589 bMainSizer = new wxBoxSizer(wxVERTICAL);
2590
2591 wxBoxSizer* bSizerSource;
2592 bSizerSource = new wxBoxSizer(wxHORIZONTAL);
2593
2594 m_SourcesTreeCtrl1 = new wxTreeCtrl(
2595 m_panelLocalModels, wxID_ANY, wxDefaultPosition, wxDefaultSize,
2596 wxTR_DEFAULT_STYLE | wxTR_FULL_ROW_HIGHLIGHT | wxTR_SINGLE);
2597 bSizerSource->Add(m_SourcesTreeCtrl1, 1, wxALL | wxEXPAND, 5);
2598
2599 m_htmlInfoWin =
2600 new wxHtmlWindow(m_panelLocalModels, wxID_ANY, wxDefaultPosition,
2601 wxDefaultSize, wxHW_NO_SELECTION | wxHW_SCROLLBAR_AUTO);
2602 bSizerSource->Add(m_htmlInfoWin, 1, wxALL | wxEXPAND, 5);
2603
2604 bMainSizer->Add(bSizerSource, 1, wxEXPAND, 5);
2605
2606 m_stLocalDownloadInfo =
2607 new wxStaticText(m_panelLocalModels, wxID_ANY, _("Download grib..."),
2608 wxDefaultPosition, wxDefaultSize, 0);
2609 m_stLocalDownloadInfo->Wrap(-1);
2610 bMainSizer->Add(m_stLocalDownloadInfo, 0, wxALL, 5);
2611
2612 wxBoxSizer* bSizerLocalButtons;
2613 bSizerLocalButtons = new wxBoxSizer(wxHORIZONTAL);
2614
2615 m_buttonUpdateCatalog =
2616 new wxButton(m_panelLocalModels, wxID_ANY, _("Update Catalog"),
2617 wxDefaultPosition, wxDefaultSize, 0);
2618 bSizerLocalButtons->Add(m_buttonUpdateCatalog, 0, wxALL, 5);
2619
2620 bSizerLocalButtons->Add(0, 0, 1, wxEXPAND, 5);
2621
2622 m_btnDownloadLocal = new wxButton(m_panelLocalModels, wxID_ANY, _("Download"),
2623 wxDefaultPosition, wxDefaultSize, 0);
2624 bSizerLocalButtons->Add(m_btnDownloadLocal, 0, wxALL, 5);
2625
2626 bMainSizer->Add(bSizerLocalButtons, 0, wxEXPAND, 5);
2627
2628 m_panelLocalModels->SetSizer(bMainSizer);
2629 m_panelLocalModels->Layout();
2630 bMainSizer->Fit(m_panelLocalModels);
2631}
2632
2633void GribRequestSettingBase::createEmailPanel() {
2634 m_panelEmail = new wxPanel(m_notebookGetGrib, wxID_ANY, wxDefaultPosition,
2635 wxDefaultSize, wxTAB_TRAVERSAL);
2636
2637 wxFlexGridSizer* fgSizer101;
2638 fgSizer101 = new wxFlexGridSizer(0, 1, 0, 0);
2639 fgSizer101->SetFlexibleDirection(wxBOTH);
2640 fgSizer101->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2641
2642 m_sScrolledDialog = new wxScrolledWindow(
2643 m_panelEmail, wxID_ANY, wxDefaultPosition, wxDefaultSize,
2644 wxHSCROLL | wxTAB_TRAVERSAL | wxVSCROLL);
2645 m_sScrolledDialog->SetScrollRate(0, 5);
2646 m_fgScrollSizer = new wxFlexGridSizer(0, 1, 0, 0);
2647 m_fgScrollSizer->SetFlexibleDirection(wxBOTH);
2648 m_fgScrollSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2649
2650 wxStaticBoxSizer* sbSizer7;
2651 sbSizer7 = new wxStaticBoxSizer(
2652 new wxStaticBox(m_sScrolledDialog, wxID_ANY, _("Profile")), wxVERTICAL);
2653
2654 wxFlexGridSizer* fgSizer17;
2655 fgSizer17 = new wxFlexGridSizer(0, 1, 0, 0);
2656 fgSizer17->SetFlexibleDirection(wxBOTH);
2657 fgSizer17->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2658
2659 m_pSenderSizer = new wxFlexGridSizer(0, 2, 0, 0);
2660 m_pSenderSizer->AddGrowableCol(1);
2661 m_pSenderSizer->SetFlexibleDirection(wxBOTH);
2662 m_pSenderSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2663
2664 wxStaticText* m_staticText25;
2665 m_staticText25 =
2666 new wxStaticText(m_sScrolledDialog, wxID_ANY, _("Sender eMail Address"),
2667 wxDefaultPosition, wxDefaultSize, 0);
2668 m_staticText25->Wrap(-1);
2669 m_pSenderSizer->Add(m_staticText25, 0, wxALL, 5);
2670
2671 m_pSenderAddress = new wxTextCtrl(m_sScrolledDialog, wxID_ANY, wxEmptyString,
2672 wxDefaultPosition, wxDefaultSize, 0);
2673 m_pSenderSizer->Add(m_pSenderAddress, 0, wxALL | wxEXPAND, 5);
2674
2675 wxStaticLine* m_staticline4;
2676 m_staticline4 =
2677 new wxStaticLine(m_sScrolledDialog, wxID_ANY, wxDefaultPosition,
2678 wxDefaultSize, wxLI_HORIZONTAL);
2679 m_pSenderSizer->Add(m_staticline4, 0, wxEXPAND | wxALL, 5);
2680
2681 wxStaticLine* m_staticline5;
2682 m_staticline5 =
2683 new wxStaticLine(m_sScrolledDialog, wxID_ANY, wxDefaultPosition,
2684 wxDefaultSize, wxLI_HORIZONTAL);
2685 m_pSenderSizer->Add(m_staticline5, 0, wxEXPAND | wxALL, 5);
2686
2687 fgSizer17->Add(m_pSenderSizer, 1, wxEXPAND, 5);
2688
2689 wxFlexGridSizer* fgSizer9;
2690 fgSizer9 = new wxFlexGridSizer(0, 3, 0, 0);
2691 fgSizer9->SetFlexibleDirection(wxBOTH);
2692 fgSizer9->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2693
2694 wxFlexGridSizer* fgSizer33;
2695 fgSizer33 = new wxFlexGridSizer(0, 2, 0, 0);
2696 fgSizer33->SetFlexibleDirection(wxBOTH);
2697 fgSizer33->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2698
2699 wxStaticText* m_staticText15;
2700 m_staticText15 = new wxStaticText(m_sScrolledDialog, wxID_ANY, _("Mail To "),
2701 wxDefaultPosition, wxDefaultSize, 0);
2702 m_staticText15->Wrap(-1);
2703 fgSizer33->Add(m_staticText15, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 5);
2704
2705 wxArrayString m_pMailToChoices;
2706 m_pMailTo = new wxChoice(m_sScrolledDialog, wxID_ANY, wxDefaultPosition,
2707 wxDefaultSize, m_pMailToChoices, 0);
2708 m_pMailTo->SetSelection(0);
2709 fgSizer33->Add(m_pMailTo, 0, wxALL, 5);
2710
2711 wxStaticText* m_staticText16;
2712 m_staticText16 =
2713 new wxStaticText(m_sScrolledDialog, wxID_ANY, _("Forecast Model "),
2714 wxDefaultPosition, wxDefaultSize, 0);
2715 m_staticText16->Wrap(-1);
2716 fgSizer33->Add(m_staticText16, 0, wxALL | wxEXPAND | wxLEFT | wxRIGHT | wxTOP,
2717 5);
2718
2719 wxArrayString m_pModelChoices;
2720 m_pModel = new wxChoice(m_sScrolledDialog, wxID_ANY, wxDefaultPosition,
2721 wxDefaultSize, m_pModelChoices, 0);
2722 m_pModel->SetSelection(0);
2723 fgSizer33->Add(m_pModel, 0, wxALL, 5);
2724
2725 fgSizer9->Add(fgSizer33, 1, wxEXPAND, 5);
2726
2727 wxFlexGridSizer* fgSizer32;
2728 fgSizer32 = new wxFlexGridSizer(0, 2, 0, 0);
2729 fgSizer32->SetFlexibleDirection(wxBOTH);
2730 fgSizer32->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2731
2732 m_cMovingGribEnabled =
2733 new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("Moving Grib"),
2734 wxDefaultPosition, wxDefaultSize, 0);
2735 fgSizer32->Add(m_cMovingGribEnabled, 0, wxALL, 5);
2736
2737 m_fgMovingParams = new wxFlexGridSizer(0, 3, 0, 0);
2738 m_fgMovingParams->SetFlexibleDirection(wxBOTH);
2739 m_fgMovingParams->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2740
2741 wxStaticText* m_staticText27;
2742 m_staticText27 = new wxStaticText(m_sScrolledDialog, wxID_ANY, _("Speed"),
2743 wxDefaultPosition, wxDefaultSize, 0);
2744 m_staticText27->Wrap(-1);
2745 m_fgMovingParams->Add(m_staticText27, 0, wxALL, 5);
2746
2747 m_sMovingSpeed = new wxSpinCtrl(m_sScrolledDialog, wxID_ANY, wxEmptyString,
2748 wxDefaultPosition, wxDefaultSize,
2749 wxSP_ARROW_KEYS, 1, 30, 1);
2750 m_fgMovingParams->Add(m_sMovingSpeed, 0, wxALL, 5);
2751
2752 wxStaticText* m_sSpeedUnit;
2753 m_sSpeedUnit = new wxStaticText(m_sScrolledDialog, wxID_ANY, _("Kts"),
2754 wxDefaultPosition, wxDefaultSize, 0);
2755 m_sSpeedUnit->Wrap(-1);
2756 m_fgMovingParams->Add(m_sSpeedUnit, 0, wxBOTTOM | wxEXPAND | wxRIGHT | wxTOP,
2757 5);
2758
2759 wxStaticText* m_staticText29;
2760 m_staticText29 = new wxStaticText(m_sScrolledDialog, wxID_ANY, _("Course"),
2761 wxDefaultPosition, wxDefaultSize, 0);
2762 m_staticText29->Wrap(-1);
2763 m_fgMovingParams->Add(m_staticText29, 0, wxALL, 5);
2764
2765 m_sMovingCourse = new wxSpinCtrl(m_sScrolledDialog, wxID_ANY, wxEmptyString,
2766 wxDefaultPosition, wxDefaultSize,
2767 wxSP_ARROW_KEYS, 1, 360, 1);
2768 m_fgMovingParams->Add(m_sMovingCourse, 0, wxALL, 5);
2769
2770 m_sCourseUnit = new wxStaticText(m_sScrolledDialog, wxID_ANY, _("Deg"),
2771 wxDefaultPosition, wxDefaultSize, 0);
2772 m_sCourseUnit->Wrap(-1);
2773 m_fgMovingParams->Add(m_sCourseUnit, 0, wxBOTTOM | wxEXPAND | wxRIGHT | wxTOP,
2774 5);
2775
2776 fgSizer32->Add(m_fgMovingParams, 1, wxEXPAND, 5);
2777
2778 fgSizer9->Add(fgSizer32, 1, wxEXPAND, 5);
2779
2780 m_fgLog = new wxFlexGridSizer(0, 2, 0, 0);
2781 m_fgLog->SetFlexibleDirection(wxBOTH);
2782 m_fgLog->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2783
2784 wxStaticText* m_tLogin;
2785 m_tLogin = new wxStaticText(m_sScrolledDialog, wxID_ANY, _("zyGrib Login"),
2786 wxDefaultPosition, wxDefaultSize, 0);
2787 m_tLogin->Wrap(-1);
2788 m_fgLog->Add(m_tLogin, 0, wxALL, 5);
2789
2790 m_pLogin = new wxTextCtrl(m_sScrolledDialog, wxID_ANY, wxEmptyString,
2791 wxDefaultPosition, wxDefaultSize, 0);
2792 m_fgLog->Add(m_pLogin, 0, wxALL, 5);
2793
2794 wxStaticText* m_tCode;
2795 m_tCode = new wxStaticText(m_sScrolledDialog, wxID_ANY, _("zyGrib Code"),
2796 wxDefaultPosition, wxDefaultSize, 0);
2797 m_tCode->Wrap(-1);
2798 m_fgLog->Add(m_tCode, 0, wxALL, 5);
2799
2800 m_pCode = new wxTextCtrl(m_sScrolledDialog, wxID_ANY, wxEmptyString,
2801 wxDefaultPosition, wxDefaultSize, 0);
2802 m_fgLog->Add(m_pCode, 0, wxALL, 5);
2803
2804 fgSizer9->Add(m_fgLog, 1, wxEXPAND, 5);
2805
2806 fgSizer17->Add(fgSizer9, 1, wxEXPAND, 10);
2807
2808 wxFlexGridSizer* fgSizer13;
2809 fgSizer13 = new wxFlexGridSizer(0, 9, 0, 0);
2810 fgSizer13->SetFlexibleDirection(wxBOTH);
2811 fgSizer13->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2812
2813 wxStaticText* m_staticText17;
2814 m_staticText17 =
2815 new wxStaticText(m_sScrolledDialog, wxID_ANY, _("Resolution"),
2816 wxDefaultPosition, wxDefaultSize, 0);
2817 m_staticText17->Wrap(-1);
2818 fgSizer13->Add(m_staticText17, 0, wxALL, 5);
2819
2820 wxArrayString m_pResolutionChoices;
2821 m_pResolution = new wxChoice(m_sScrolledDialog, wxID_ANY, wxDefaultPosition,
2822 wxDefaultSize, m_pResolutionChoices, 0);
2823 m_pResolution->SetSelection(0);
2824 fgSizer13->Add(m_pResolution, 0, wxALL, 1);
2825
2826 m_tResUnit = new wxStaticText(m_sScrolledDialog, wxID_ANY, _("Deg"),
2827 wxDefaultPosition, wxDefaultSize, 0);
2828 m_tResUnit->Wrap(-1);
2829 fgSizer13->Add(m_tResUnit, 0, wxTOP | wxBOTTOM | wxRIGHT, 5);
2830
2831 wxStaticText* m_staticText18;
2832 m_staticText18 = new wxStaticText(m_sScrolledDialog, wxID_ANY, _("Interval"),
2833 wxDefaultPosition, wxDefaultSize, 0);
2834 m_staticText18->Wrap(-1);
2835 fgSizer13->Add(m_staticText18, 0, wxALL, 5);
2836
2837 wxArrayString m_pIntervalChoices;
2838 m_pInterval = new wxChoice(m_sScrolledDialog, wxID_ANY, wxDefaultPosition,
2839 wxDefaultSize, m_pIntervalChoices, 0);
2840 m_pInterval->SetSelection(0);
2841 fgSizer13->Add(m_pInterval, 0, wxALL, 1);
2842
2843 wxStaticText* m_staticText20;
2844 m_staticText20 = new wxStaticText(m_sScrolledDialog, wxID_ANY, _("Hours"),
2845 wxDefaultPosition, wxDefaultSize, 0);
2846 m_staticText20->Wrap(-1);
2847 fgSizer13->Add(m_staticText20, 0, wxTOP | wxBOTTOM | wxRIGHT, 5);
2848
2849 wxStaticText* m_staticText19;
2850 m_staticText19 =
2851 new wxStaticText(m_sScrolledDialog, wxID_ANY, _("Time Range"),
2852 wxDefaultPosition, wxDefaultSize, 0);
2853 m_staticText19->Wrap(-1);
2854 fgSizer13->Add(m_staticText19, 0, wxALL, 5);
2855
2856 wxArrayString m_pTimeRangeChoices;
2857 m_pTimeRange = new wxChoice(m_sScrolledDialog, wxID_ANY, wxDefaultPosition,
2858 wxDefaultSize, m_pTimeRangeChoices, 0);
2859 m_pTimeRange->SetSelection(0);
2860 fgSizer13->Add(m_pTimeRange, 0, wxALL, 1);
2861
2862 m_staticText21 = new wxStaticText(m_sScrolledDialog, wxID_ANY, _("Days"),
2863 wxDefaultPosition, wxDefaultSize, 0);
2864 m_staticText21->Wrap(-1);
2865 fgSizer13->Add(m_staticText21, 0, wxTOP | wxBOTTOM | wxRIGHT, 5);
2866
2867 fgSizer17->Add(fgSizer13, 1, wxEXPAND, 5);
2868
2869 sbSizer7->Add(fgSizer17, 1, wxEXPAND, 5);
2870
2871 m_fgScrollSizer->Add(sbSizer7, 1, wxEXPAND, 5);
2872
2873 // wxStaticBoxSizer* sbSizer81 =
2874 // createAreaSelectionSection(m_sScrolledDialog);
2875 // m_fgScrollSizer->Add(sbSizer81, 1, wxEXPAND, 5);
2876
2877 wxStaticBoxSizer* sbSizer8;
2878 sbSizer8 = new wxStaticBoxSizer(
2879 new wxStaticBox(m_sScrolledDialog, wxID_ANY, _("Data Selection")),
2880 wxVERTICAL);
2881
2882 wxFlexGridSizer* fgSizer10;
2883 fgSizer10 = new wxFlexGridSizer(0, 3, 0, 0);
2884 fgSizer10->SetFlexibleDirection(wxBOTH);
2885 fgSizer10->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2886
2887 m_pWind = new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("Wind"),
2888 wxDefaultPosition, wxDefaultSize, 0);
2889 fgSizer10->Add(m_pWind, 0, wxALL | wxEXPAND, 5);
2890
2891 m_pPress = new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("Pressure"),
2892 wxDefaultPosition, wxDefaultSize, 0);
2893 fgSizer10->Add(m_pPress, 0, wxALL | wxEXPAND, 5);
2894
2895 m_pWindGust = new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("Wind Gust"),
2896 wxDefaultPosition, wxDefaultSize, 0);
2897 fgSizer10->Add(m_pWindGust, 0, wxALL | wxEXPAND, 5);
2898
2899 m_pRainfall = new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("Rainfall"),
2900 wxDefaultPosition, wxDefaultSize, 0);
2901 fgSizer10->Add(m_pRainfall, 0, wxALL | wxEXPAND, 5);
2902
2903 m_pCloudCover = new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("Cloud Cover"),
2904 wxDefaultPosition, wxDefaultSize, 0);
2905 fgSizer10->Add(m_pCloudCover, 0, wxALL | wxEXPAND, 5);
2906
2907 m_pAirTemp =
2908 new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("Air Temperature(2m)"),
2909 wxDefaultPosition, wxDefaultSize, 0);
2910 m_pAirTemp->SetValue(true);
2911 fgSizer10->Add(m_pAirTemp, 0, wxALL | wxEXPAND, 5);
2912
2913 m_pCAPE = new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("CAPE"),
2914 wxDefaultPosition, wxDefaultSize, 0);
2915 fgSizer10->Add(m_pCAPE, 0, wxALL | wxEXPAND, 5);
2916
2917 m_pReflectivity =
2918 new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("Comp. Reflect."),
2919 wxDefaultPosition, wxDefaultSize, 0);
2920 fgSizer10->Add(m_pReflectivity, 0, wxALL | wxEXPAND, 5);
2921
2922 m_pSeaTemp =
2923 new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("Sea Temperature(surf.)"),
2924 wxDefaultPosition, wxDefaultSize, 0);
2925 fgSizer10->Add(m_pSeaTemp, 0, wxALL | wxEXPAND, 5);
2926
2927 m_pCurrent = new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("Current"),
2928 wxDefaultPosition, wxDefaultSize, 0);
2929 fgSizer10->Add(m_pCurrent, 0, wxALL | wxEXPAND, 5);
2930
2931 wxFlexGridSizer* fgSizer28;
2932 fgSizer28 = new wxFlexGridSizer(0, 2, 0, 0);
2933 fgSizer28->SetFlexibleDirection(wxBOTH);
2934 fgSizer28->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2935
2936 m_pWaves = new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("Waves"),
2937 wxDefaultPosition, wxDefaultSize, 0);
2938 fgSizer28->Add(m_pWaves, 0, wxALL, 5);
2939
2940 wxArrayString m_pWModelChoices;
2941 m_pWModel = new wxChoice(m_sScrolledDialog, wxID_ANY, wxDefaultPosition,
2942 wxDefaultSize, m_pWModelChoices, 0);
2943 m_pWModel->SetSelection(0);
2944 fgSizer28->Add(m_pWModel, 0, wxALL | wxRESERVE_SPACE_EVEN_IF_HIDDEN, 1);
2945
2946 fgSizer10->Add(fgSizer28, 1, wxEXPAND, 5);
2947
2948 wxFlexGridSizer* fgSizer331;
2949 fgSizer331 = new wxFlexGridSizer(0, 2, 0, 0);
2950 fgSizer331->SetFlexibleDirection(wxBOTH);
2951 fgSizer331->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2952
2953 m_pAltitudeData =
2954 new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("Geopotential Height"),
2955 wxDefaultPosition, wxDefaultSize, 0);
2956 fgSizer331->Add(m_pAltitudeData, 0, wxALL | wxEXPAND, 5);
2957
2958 fgSizer10->Add(fgSizer331, 1, wxEXPAND, 5);
2959
2960 m_fgAltitudeData = new wxFlexGridSizer(0, 2, 0, 0);
2961 m_fgAltitudeData->SetFlexibleDirection(wxBOTH);
2962 m_fgAltitudeData->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2963
2964 m_p850hpa = new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("850 hPa"),
2965 wxDefaultPosition, wxDefaultSize, 0);
2966 m_fgAltitudeData->Add(m_p850hpa, 0,
2967 wxALL | wxEXPAND | wxRESERVE_SPACE_EVEN_IF_HIDDEN, 5);
2968
2969 m_p700hpa = new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("700 hPa"),
2970 wxDefaultPosition, wxDefaultSize, 0);
2971 m_fgAltitudeData->Add(m_p700hpa, 0,
2972 wxALL | wxEXPAND | wxRESERVE_SPACE_EVEN_IF_HIDDEN, 5);
2973
2974 m_p500hpa = new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("500 hPa"),
2975 wxDefaultPosition, wxDefaultSize, 0);
2976 m_fgAltitudeData->Add(m_p500hpa, 0, wxALL | wxEXPAND, 5);
2977
2978 m_p300hpa = new wxCheckBox(m_sScrolledDialog, wxID_ANY, _("300 hPa"),
2979 wxDefaultPosition, wxDefaultSize, 0);
2980 m_fgAltitudeData->Add(m_p300hpa, 0, wxALL | wxEXPAND, 5);
2981
2982 fgSizer10->Add(m_fgAltitudeData, 1, wxEXPAND, 5);
2983
2984 sbSizer8->Add(fgSizer10, 1, wxEXPAND, 5);
2985
2986 m_fgScrollSizer->Add(sbSizer8, 1, wxEXPAND | wxTOP, 5);
2987
2988 wxStaticBoxSizer* sbSizer6;
2989 sbSizer6 = new wxStaticBoxSizer(
2990 new wxStaticBox(m_sScrolledDialog, wxID_ANY, _("Mail")), wxVERTICAL);
2991
2992 wxFlexGridSizer* fgSizer11;
2993 fgSizer11 = new wxFlexGridSizer(0, 1, 0, 0);
2994 fgSizer11->AddGrowableCol(0);
2995 fgSizer11->SetFlexibleDirection(wxBOTH);
2996 fgSizer11->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2997
2998 m_MailImage = new wxTextCtrl(m_sScrolledDialog, wxID_ANY, wxEmptyString,
2999 wxDefaultPosition, wxDefaultSize,
3000 wxTE_MULTILINE | wxTE_READONLY);
3001 fgSizer11->Add(m_MailImage, 0, wxALL | wxEXPAND, 5);
3002
3003 sbSizer6->Add(fgSizer11, 1, wxEXPAND, 5);
3004
3005 m_fgScrollSizer->Add(sbSizer6, 1, wxEXPAND, 5);
3006
3007 m_sScrolledDialog->SetSizer(m_fgScrollSizer);
3008 m_sScrolledDialog->Layout();
3009 m_fgScrollSizer->Fit(m_sScrolledDialog);
3010 fgSizer101->Add(m_sScrolledDialog, 1, 0, 5);
3011
3012 m_fgFixedSizer = new wxFlexGridSizer(0, 3, 0, 0);
3013 m_fgFixedSizer->SetFlexibleDirection(wxBOTH);
3014 m_fgFixedSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
3015
3016 wxStaticText* m_staticText181;
3017 m_staticText181 =
3018 new wxStaticText(m_panelEmail, wxID_ANY, _("Estimated File Size"),
3019 wxDefaultPosition, wxDefaultSize, 0);
3020 m_staticText181->Wrap(-1);
3021 m_fgFixedSizer->Add(m_staticText181, 0, wxALL, 5);
3022
3023 m_tFileSize = new wxStaticText(m_panelEmail, wxID_ANY, wxEmptyString,
3024 wxDefaultPosition, wxDefaultSize, 0);
3025 m_tFileSize->Wrap(-1);
3026 m_fgFixedSizer->Add(m_tFileSize, 0, wxTOP | wxBOTTOM, 5);
3027
3028 m_tLimit = new wxStaticText(m_panelEmail, wxID_ANY, _(" (Max size )"),
3029 wxDefaultPosition, wxDefaultSize, 0);
3030 m_tLimit->Wrap(-1);
3031 m_fgFixedSizer->Add(m_tLimit, 0, wxALL, 5);
3032
3033 fgSizer101->Add(m_fgFixedSizer, 1, wxEXPAND, 5);
3034
3035 wxBoxSizer* buttonSizer = new wxBoxSizer(wxHORIZONTAL);
3036 m_rButtonYes = new wxButton(m_panelEmail, wxID_YES);
3037 m_rButtonYes->SetLabel(_("Send"));
3038 buttonSizer->Add(m_rButtonYes, 0, wxALL, 5);
3039 fgSizer101->Add(buttonSizer, 0, wxEXPAND | wxALL, 5);
3040
3041 m_panelEmail->SetSizer(fgSizer101);
3042 m_panelEmail->Layout();
3043 fgSizer101->Fit(m_panelEmail);
3044}
3045
3046GribRequestSettingBase::GribRequestSettingBase(GRIBUICtrlBarBase* parent,
3047 wxWindowID id,
3048 const wxString& title,
3049 const wxPoint& pos,
3050 const wxSize& size, long style)
3051 : wxDialog(parent, id, title, pos, size, style) {
3052 this->SetSizeHints(wxDefaultSize, wxDefaultSize);
3053
3054 wxBoxSizer* bSizerMain;
3055 bSizerMain = new wxBoxSizer(wxVERTICAL);
3056
3057 m_notebookGetGrib =
3058 new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0);
3059
3060 // Create "World" tab.
3061 createWorldPanel();
3062 m_notebookGetGrib->AddPage(m_panelWorld, _("World"), true);
3063
3064 // Create "Local models" tab.
3065 createLocalModelsPanel();
3066 m_notebookGetGrib->AddPage(m_panelLocalModels, _("Local models"), false);
3067
3068 // Create "e-mail" tab.
3069 createEmailPanel();
3070 m_notebookGetGrib->AddPage(m_panelEmail, _("e-mail"), false);
3071
3072 // Create XyGrib panel tab
3073 m_xygribPanel =
3074 new XyGribPanel(m_notebookGetGrib, wxID_ANY, wxDefaultPosition,
3075 wxDefaultSize, wxTAB_TRAVERSAL);
3076 // Add the XyGrib panel to the download notebook
3077 m_notebookGetGrib->AddPage(m_xygribPanel, _("XyGrib"), false);
3078
3079 // Add area selection panel tab.
3080 wxStaticBoxSizer* sbSizer81 = createAreaSelectionSection(this, parent);
3081 bSizerMain->Add(sbSizer81, 0, wxEXPAND | wxALL, 5);
3082
3083 // Add notebook with the tabs (World, Local Models, e-mail, XyGrib) to the
3084 // main sizer.
3085 bSizerMain->Add(m_notebookGetGrib, 1, wxEXPAND | wxALL, 5);
3086
3087 // Add Save and Cancel buttons.
3088 wxBoxSizer* bottomButtonSizer = new wxBoxSizer(wxHORIZONTAL);
3089 m_rButtonCancel = new wxButton(this, wxID_CANCEL, _("Cancel"));
3090 bottomButtonSizer->Add(m_rButtonCancel, 0, wxALL, 5);
3091
3092 bottomButtonSizer->AddStretchSpacer();
3093
3094 m_rButtonApply = new wxButton(this, wxID_APPLY);
3095 bottomButtonSizer->Add(m_rButtonApply, 0, wxALL, 5);
3096
3097 bSizerMain->Add(bottomButtonSizer, 0, wxEXPAND | wxALL, 5);
3098
3099 this->SetSizer(bSizerMain);
3100 this->Layout();
3101 // this->Fit();
3102 bSizerMain->Fit(this);
3103
3104 this->Centre(wxBOTH);
3105
3106 // Connect Events
3107 this->Connect(wxEVT_CLOSE_WINDOW,
3108 wxCloseEventHandler(GribRequestSettingBase::OnClose));
3109 m_chForecastLength->Connect(
3110 wxEVT_COMMAND_CHOICE_SELECTED,
3111 wxCommandEventHandler(GribRequestSettingBase::OnWorldLengthChoice),
3112 nullptr, this);
3113 m_btnDownloadWorld->Connect(
3114 wxEVT_COMMAND_BUTTON_CLICKED,
3115 wxCommandEventHandler(GribRequestSettingBase::OnWorldDownload), nullptr,
3116 this);
3117 m_SourcesTreeCtrl1->Connect(
3118 wxEVT_COMMAND_TREE_ITEM_EXPANDED,
3119 wxTreeEventHandler(GribRequestSettingBase::OnLocalTreeItemExpanded),
3120 nullptr, this);
3121 m_SourcesTreeCtrl1->Connect(
3122 wxEVT_COMMAND_TREE_SEL_CHANGED,
3123 wxTreeEventHandler(GribRequestSettingBase::OnLocalTreeSelChanged),
3124 nullptr, this);
3125 m_buttonUpdateCatalog->Connect(
3126 wxEVT_COMMAND_BUTTON_CLICKED,
3127 wxCommandEventHandler(GribRequestSettingBase::OnUpdateLocalCatalog),
3128 nullptr, this);
3129 m_btnDownloadLocal->Connect(
3130 wxEVT_COMMAND_BUTTON_CLICKED,
3131 wxCommandEventHandler(GribRequestSettingBase::OnDownloadLocal), nullptr,
3132 this);
3133 m_pMailTo->Connect(wxEVT_COMMAND_CHOICE_SELECTED,
3134 wxCommandEventHandler(GribRequestSettingBase::OnTopChange),
3135 nullptr, this);
3136 m_pModel->Connect(wxEVT_COMMAND_CHOICE_SELECTED,
3137 wxCommandEventHandler(GribRequestSettingBase::OnTopChange),
3138 nullptr, this);
3139 m_cMovingGribEnabled->Connect(
3140 wxEVT_COMMAND_CHECKBOX_CLICKED,
3141 wxCommandEventHandler(GribRequestSettingBase::OnMovingClick), nullptr,
3142 this);
3143 m_sMovingSpeed->Connect(
3144 wxEVT_COMMAND_SPINCTRL_UPDATED,
3145 wxSpinEventHandler(GribRequestSettingBase::OnAnySpinChange), nullptr,
3146 this);
3147 m_sMovingCourse->Connect(
3148 wxEVT_COMMAND_SPINCTRL_UPDATED,
3149 wxSpinEventHandler(GribRequestSettingBase::OnAnySpinChange), nullptr,
3150 this);
3151 m_pLogin->Connect(wxEVT_COMMAND_TEXT_UPDATED,
3152 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3153 nullptr, this);
3154 m_pCode->Connect(wxEVT_COMMAND_TEXT_UPDATED,
3155 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3156 nullptr, this);
3157 m_pResolution->Connect(
3158 wxEVT_COMMAND_CHOICE_SELECTED,
3159 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3160 this);
3161 m_pInterval->Connect(
3162 wxEVT_COMMAND_CHOICE_SELECTED,
3163 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3164 this);
3165 m_pTimeRange->Connect(
3166 wxEVT_COMMAND_CHOICE_SELECTED,
3167 wxCommandEventHandler(GribRequestSettingBase::OnTimeRangeChange), nullptr,
3168 this);
3169 m_rbCurrentView->Connect(
3170 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
3171 wxCommandEventHandler(GribRequestSettingBase::OnZoneSelectionModeChange),
3172 nullptr, this);
3173 m_rbManualSelect->Connect(
3174 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
3175 wxCommandEventHandler(GribRequestSettingBase::OnZoneSelectionModeChange),
3176 nullptr, this);
3177 m_cUseSavedZone->Connect(
3178 wxEVT_COMMAND_CHECKBOX_CLICKED,
3179 wxCommandEventHandler(GribRequestSettingBase::OnZoneSelectionModeChange),
3180 nullptr, this);
3181 m_spMaxLat->Connect(
3182 wxEVT_COMMAND_SPINCTRL_UPDATED,
3183 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange), nullptr,
3184 this);
3185 m_spMaxLon->Connect(
3186 wxEVT_COMMAND_SPINCTRL_UPDATED,
3187 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange), nullptr,
3188 this);
3189 m_spMinLat->Connect(
3190 wxEVT_COMMAND_SPINCTRL_UPDATED,
3191 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange), nullptr,
3192 this);
3193 m_spMinLon->Connect(
3194 wxEVT_COMMAND_SPINCTRL_UPDATED,
3195 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange), nullptr,
3196 this);
3197 m_pWind->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3198 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3199 nullptr, this);
3200 m_pPress->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3201 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3202 nullptr, this);
3203 m_pWindGust->Connect(
3204 wxEVT_COMMAND_CHECKBOX_CLICKED,
3205 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3206 this);
3207 m_pRainfall->Connect(
3208 wxEVT_COMMAND_CHECKBOX_CLICKED,
3209 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3210 this);
3211 m_pCloudCover->Connect(
3212 wxEVT_COMMAND_CHECKBOX_CLICKED,
3213 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3214 this);
3215 m_pAirTemp->Connect(
3216 wxEVT_COMMAND_CHECKBOX_CLICKED,
3217 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3218 this);
3219 m_pCAPE->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3220 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3221 nullptr, this);
3222 m_pReflectivity->Connect(
3223 wxEVT_COMMAND_CHECKBOX_CLICKED,
3224 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3225 this);
3226 m_pSeaTemp->Connect(
3227 wxEVT_COMMAND_CHECKBOX_CLICKED,
3228 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3229 this);
3230 m_pCurrent->Connect(
3231 wxEVT_COMMAND_CHECKBOX_CLICKED,
3232 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3233 this);
3234 m_pWaves->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3235 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3236 nullptr, this);
3237 m_pWModel->Connect(wxEVT_COMMAND_CHOICE_SELECTED,
3238 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3239 nullptr, this);
3240 m_pAltitudeData->Connect(
3241 wxEVT_COMMAND_CHECKBOX_CLICKED,
3242 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3243 this);
3244 m_p850hpa->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3245 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3246 nullptr, this);
3247 m_p700hpa->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3248 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3249 nullptr, this);
3250 m_p500hpa->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3251 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3252 nullptr, this);
3253 m_p300hpa->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3254 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3255 nullptr, this);
3256 m_rButtonApply->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
3257 wxCommandEventHandler(GribRequestSettingBase::OnOK),
3258 nullptr, this);
3259 m_rButtonCancel->Connect(
3260 wxEVT_COMMAND_BUTTON_CLICKED,
3261 wxCommandEventHandler(GribRequestSettingBase::OnCancel), nullptr, this);
3262 m_rButtonYes->Connect(
3263 wxEVT_COMMAND_BUTTON_CLICKED,
3264 wxCommandEventHandler(GribRequestSettingBase::OnSendMaiL), nullptr, this);
3265
3266 // Connect XyGrib related callbacks
3267 m_xygribPanel->m_download_button->Connect(
3268 wxEVT_COMMAND_BUTTON_CLICKED,
3269 wxCommandEventHandler(GribRequestSettingBase::OnXyGribDownloadButton),
3270 nullptr, this);
3271 m_xygribPanel->m_atmmodel_choice->Connect(
3272 wxEVT_COMMAND_CHOICE_SELECTED,
3273 wxCommandEventHandler(GribRequestSettingBase::OnXyGribAtmModelChoice),
3274 nullptr, this);
3275 m_xygribPanel->m_wavemodel_choice->Connect(
3276 wxEVT_COMMAND_CHOICE_SELECTED,
3277 wxCommandEventHandler(GribRequestSettingBase::OnXyGribWaveModelChoice),
3278 nullptr, this);
3279 m_xygribPanel->m_wind_cbox->Connect(
3280 wxEVT_COMMAND_CHECKBOX_CLICKED,
3281 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3282 nullptr, this);
3283 m_xygribPanel->m_gust_cbox->Connect(
3284 wxEVT_COMMAND_CHECKBOX_CLICKED,
3285 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3286 nullptr, this);
3287 m_xygribPanel->m_reflectivity_cbox->Connect(
3288 wxEVT_COMMAND_CHECKBOX_CLICKED,
3289 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3290 nullptr, this);
3291 m_xygribPanel->m_precipitation_cbox->Connect(
3292 wxEVT_COMMAND_CHECKBOX_CLICKED,
3293 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3294 nullptr, this);
3295 m_xygribPanel->m_cape_cbox->Connect(
3296 wxEVT_COMMAND_CHECKBOX_CLICKED,
3297 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3298 nullptr, this);
3299 m_xygribPanel->m_pressure_cbox->Connect(
3300 wxEVT_COMMAND_CHECKBOX_CLICKED,
3301 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3302 nullptr, this);
3303 m_xygribPanel->m_cloudcover_cbox->Connect(
3304 wxEVT_COMMAND_CHECKBOX_CLICKED,
3305 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3306 nullptr, this);
3307 m_xygribPanel->m_temperature_cbox->Connect(
3308 wxEVT_COMMAND_CHECKBOX_CLICKED,
3309 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3310 nullptr, this);
3311 m_xygribPanel->m_waveheight_cbox->Connect(
3312 wxEVT_COMMAND_CHECKBOX_CLICKED,
3313 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3314 nullptr, this);
3315 m_xygribPanel->m_windwave_cbox->Connect(
3316 wxEVT_COMMAND_CHECKBOX_CLICKED,
3317 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3318 nullptr, this);
3319 m_xygribPanel->m_resolution_choice->Connect(
3320 wxEVT_COMMAND_CHOICE_SELECTED,
3321 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3322 nullptr, this);
3323 m_xygribPanel->m_duration_choice->Connect(
3324 wxEVT_COMMAND_CHOICE_SELECTED,
3325 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3326 nullptr, this);
3327 m_xygribPanel->m_interval_choice->Connect(
3328 wxEVT_COMMAND_CHOICE_SELECTED,
3329 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3330 nullptr, this);
3331}
3332
3333GribRequestSettingBase::~GribRequestSettingBase() {
3334 // Disconnect Events
3335 this->Disconnect(wxEVT_CLOSE_WINDOW,
3336 wxCloseEventHandler(GribRequestSettingBase::OnClose));
3337 m_chForecastLength->Disconnect(
3338 wxEVT_COMMAND_CHOICE_SELECTED,
3339 wxCommandEventHandler(GribRequestSettingBase::OnWorldLengthChoice),
3340 nullptr, this);
3341 m_btnDownloadWorld->Disconnect(
3342 wxEVT_COMMAND_BUTTON_CLICKED,
3343 wxCommandEventHandler(GribRequestSettingBase::OnWorldDownload), nullptr,
3344 this);
3345 m_SourcesTreeCtrl1->Disconnect(
3346 wxEVT_COMMAND_TREE_ITEM_EXPANDED,
3347 wxTreeEventHandler(GribRequestSettingBase::OnLocalTreeItemExpanded),
3348 nullptr, this);
3349 m_SourcesTreeCtrl1->Disconnect(
3350 wxEVT_COMMAND_TREE_SEL_CHANGED,
3351 wxTreeEventHandler(GribRequestSettingBase::OnLocalTreeSelChanged),
3352 nullptr, this);
3353 m_buttonUpdateCatalog->Disconnect(
3354 wxEVT_COMMAND_BUTTON_CLICKED,
3355 wxCommandEventHandler(GribRequestSettingBase::OnUpdateLocalCatalog),
3356 nullptr, this);
3357 m_btnDownloadLocal->Disconnect(
3358 wxEVT_COMMAND_BUTTON_CLICKED,
3359 wxCommandEventHandler(GribRequestSettingBase::OnDownloadLocal), nullptr,
3360 this);
3361 m_pMailTo->Disconnect(
3362 wxEVT_COMMAND_CHOICE_SELECTED,
3363 wxCommandEventHandler(GribRequestSettingBase::OnTopChange), nullptr,
3364 this);
3365 m_pModel->Disconnect(
3366 wxEVT_COMMAND_CHOICE_SELECTED,
3367 wxCommandEventHandler(GribRequestSettingBase::OnTopChange), nullptr,
3368 this);
3369 m_cMovingGribEnabled->Disconnect(
3370 wxEVT_COMMAND_CHECKBOX_CLICKED,
3371 wxCommandEventHandler(GribRequestSettingBase::OnMovingClick), nullptr,
3372 this);
3373 m_sMovingSpeed->Disconnect(
3374 wxEVT_COMMAND_SPINCTRL_UPDATED,
3375 wxSpinEventHandler(GribRequestSettingBase::OnAnySpinChange), nullptr,
3376 this);
3377 m_sMovingCourse->Disconnect(
3378 wxEVT_COMMAND_SPINCTRL_UPDATED,
3379 wxSpinEventHandler(GribRequestSettingBase::OnAnySpinChange), nullptr,
3380 this);
3381 m_pLogin->Disconnect(
3382 wxEVT_COMMAND_TEXT_UPDATED,
3383 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3384 this);
3385 m_pCode->Disconnect(
3386 wxEVT_COMMAND_TEXT_UPDATED,
3387 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3388 this);
3389 m_pResolution->Disconnect(
3390 wxEVT_COMMAND_CHOICE_SELECTED,
3391 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3392 this);
3393 m_pInterval->Disconnect(
3394 wxEVT_COMMAND_CHOICE_SELECTED,
3395 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3396 this);
3397 m_pTimeRange->Disconnect(
3398 wxEVT_COMMAND_CHOICE_SELECTED,
3399 wxCommandEventHandler(GribRequestSettingBase::OnTimeRangeChange), nullptr,
3400 this);
3401 m_rbCurrentView->Disconnect(
3402 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
3403 wxCommandEventHandler(GribRequestSettingBase::OnZoneSelectionModeChange),
3404 nullptr, this);
3405 m_rbManualSelect->Disconnect(
3406 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
3407 wxCommandEventHandler(GribRequestSettingBase::OnZoneSelectionModeChange),
3408 nullptr, this);
3409 m_cUseSavedZone->Disconnect(
3410 wxEVT_COMMAND_CHECKBOX_CLICKED,
3411 wxCommandEventHandler(GribRequestSettingBase::OnZoneSelectionModeChange),
3412 nullptr, this);
3413 m_spMaxLat->Disconnect(
3414 wxEVT_COMMAND_SPINCTRL_UPDATED,
3415 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange), nullptr,
3416 this);
3417 m_spMaxLon->Disconnect(
3418 wxEVT_COMMAND_SPINCTRL_UPDATED,
3419 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange), nullptr,
3420 this);
3421 m_spMinLat->Disconnect(
3422 wxEVT_COMMAND_SPINCTRL_UPDATED,
3423 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange), nullptr,
3424 this);
3425 m_spMinLon->Disconnect(
3426 wxEVT_COMMAND_SPINCTRL_UPDATED,
3427 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange), nullptr,
3428 this);
3429 m_pWind->Disconnect(
3430 wxEVT_COMMAND_CHECKBOX_CLICKED,
3431 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3432 this);
3433 m_pPress->Disconnect(
3434 wxEVT_COMMAND_CHECKBOX_CLICKED,
3435 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3436 this);
3437 m_pWindGust->Disconnect(
3438 wxEVT_COMMAND_CHECKBOX_CLICKED,
3439 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3440 this);
3441 m_pRainfall->Disconnect(
3442 wxEVT_COMMAND_CHECKBOX_CLICKED,
3443 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3444 this);
3445 m_pCloudCover->Disconnect(
3446 wxEVT_COMMAND_CHECKBOX_CLICKED,
3447 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3448 this);
3449 m_pAirTemp->Disconnect(
3450 wxEVT_COMMAND_CHECKBOX_CLICKED,
3451 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3452 this);
3453 m_pCAPE->Disconnect(
3454 wxEVT_COMMAND_CHECKBOX_CLICKED,
3455 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3456 this);
3457 m_pReflectivity->Disconnect(
3458 wxEVT_COMMAND_CHECKBOX_CLICKED,
3459 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3460 this);
3461 m_pSeaTemp->Disconnect(
3462 wxEVT_COMMAND_CHECKBOX_CLICKED,
3463 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3464 this);
3465 m_pCurrent->Disconnect(
3466 wxEVT_COMMAND_CHECKBOX_CLICKED,
3467 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3468 this);
3469 m_pWaves->Disconnect(
3470 wxEVT_COMMAND_CHECKBOX_CLICKED,
3471 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3472 this);
3473 m_pWModel->Disconnect(
3474 wxEVT_COMMAND_CHOICE_SELECTED,
3475 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3476 this);
3477 m_pAltitudeData->Disconnect(
3478 wxEVT_COMMAND_CHECKBOX_CLICKED,
3479 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3480 this);
3481 m_p850hpa->Disconnect(
3482 wxEVT_COMMAND_CHECKBOX_CLICKED,
3483 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3484 this);
3485 m_p700hpa->Disconnect(
3486 wxEVT_COMMAND_CHECKBOX_CLICKED,
3487 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3488 this);
3489 m_p500hpa->Disconnect(
3490 wxEVT_COMMAND_CHECKBOX_CLICKED,
3491 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3492 this);
3493 m_p300hpa->Disconnect(
3494 wxEVT_COMMAND_CHECKBOX_CLICKED,
3495 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange), nullptr,
3496 this);
3497 m_rButtonApply->Disconnect(
3498 wxEVT_COMMAND_BUTTON_CLICKED,
3499 wxCommandEventHandler(GribRequestSettingBase::OnOK), nullptr, this);
3500 m_rButtonCancel->Disconnect(
3501 wxEVT_COMMAND_BUTTON_CLICKED,
3502 wxCommandEventHandler(GribRequestSettingBase::OnCancel), nullptr, this);
3503 m_rButtonYes->Disconnect(
3504 wxEVT_COMMAND_BUTTON_CLICKED,
3505 wxCommandEventHandler(GribRequestSettingBase::OnSendMaiL), nullptr, this);
3506
3507 // Disconnect XyGrib related callbacks
3508 m_xygribPanel->m_download_button->Disconnect(
3509 wxEVT_COMMAND_BUTTON_CLICKED,
3510 wxCommandEventHandler(GribRequestSettingBase::OnXyGribDownloadButton),
3511 nullptr, this);
3512 m_xygribPanel->m_atmmodel_choice->Disconnect(
3513 wxEVT_COMMAND_CHOICE_SELECTED,
3514 wxCommandEventHandler(GribRequestSettingBase::OnXyGribAtmModelChoice),
3515 nullptr, this);
3516 m_xygribPanel->m_wavemodel_choice->Disconnect(
3517 wxEVT_COMMAND_CHOICE_SELECTED,
3518 wxCommandEventHandler(GribRequestSettingBase::OnXyGribWaveModelChoice),
3519 nullptr, this);
3520 m_xygribPanel->m_wind_cbox->Disconnect(
3521 wxEVT_COMMAND_CHECKBOX_CLICKED,
3522 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3523 nullptr, this);
3524 m_xygribPanel->m_gust_cbox->Disconnect(
3525 wxEVT_COMMAND_CHECKBOX_CLICKED,
3526 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3527 nullptr, this);
3528 m_xygribPanel->m_reflectivity_cbox->Disconnect(
3529 wxEVT_COMMAND_CHECKBOX_CLICKED,
3530 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3531 nullptr, this);
3532 m_xygribPanel->m_precipitation_cbox->Disconnect(
3533 wxEVT_COMMAND_CHECKBOX_CLICKED,
3534 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3535 nullptr, this);
3536 m_xygribPanel->m_cape_cbox->Disconnect(
3537 wxEVT_COMMAND_CHECKBOX_CLICKED,
3538 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3539 nullptr, this);
3540 m_xygribPanel->m_pressure_cbox->Disconnect(
3541 wxEVT_COMMAND_CHECKBOX_CLICKED,
3542 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3543 nullptr, this);
3544 m_xygribPanel->m_cloudcover_cbox->Disconnect(
3545 wxEVT_COMMAND_CHECKBOX_CLICKED,
3546 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3547 nullptr, this);
3548 m_xygribPanel->m_temperature_cbox->Disconnect(
3549 wxEVT_COMMAND_CHECKBOX_CLICKED,
3550 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3551 nullptr, this);
3552 m_xygribPanel->m_waveheight_cbox->Disconnect(
3553 wxEVT_COMMAND_CHECKBOX_CLICKED,
3554 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3555 nullptr, this);
3556 m_xygribPanel->m_windwave_cbox->Disconnect(
3557 wxEVT_COMMAND_CHECKBOX_CLICKED,
3558 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3559 nullptr, this);
3560 m_xygribPanel->m_resolution_choice->Disconnect(
3561 wxEVT_COMMAND_CHOICE_SELECTED,
3562 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3563 nullptr, this);
3564 m_xygribPanel->m_duration_choice->Disconnect(
3565 wxEVT_COMMAND_CHOICE_SELECTED,
3566 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3567 nullptr, this);
3568 m_xygribPanel->m_interval_choice->Disconnect(
3569 wxEVT_COMMAND_CHOICE_SELECTED,
3570 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3571 nullptr, this);
3572}
3573
3574GRIBTableBase::GRIBTableBase(wxWindow* parent, wxWindowID id,
3575 const wxString& title, const wxPoint& pos,
3576 const wxSize& size, long style)
3577 : wxDialog(parent, id, title, pos, size, style) {
3578 this->SetSizeHints(wxSize(-1, -1), wxSize(-1, -1));
3579
3580 wxBoxSizer* bSizer1;
3581 bSizer1 = new wxBoxSizer(wxVERTICAL);
3582
3583 wxFlexGridSizer* fgSizer18;
3584 fgSizer18 = new wxFlexGridSizer(0, 1, 0, 0);
3585 fgSizer18->AddGrowableRow(1);
3586 fgSizer18->SetFlexibleDirection(wxBOTH);
3587 fgSizer18->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_NONE);
3588
3589 wxFlexGridSizer* fgSizer19;
3590 fgSizer19 = new wxFlexGridSizer(0, 2, 0, 0);
3591 fgSizer19->SetFlexibleDirection(wxBOTH);
3592 fgSizer19->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_NONE);
3593
3594 m_pPositionText = new wxStaticText(this, wxID_ANY, _("Data at Position:"),
3595 wxDefaultPosition, wxDefaultSize, 0);
3596 m_pPositionText->Wrap(-1);
3597 fgSizer19->Add(m_pPositionText, 0, wxALL | wxEXPAND, 5);
3598
3599 m_pCursorPosition = new wxStaticText(this, wxID_ANY, wxEmptyString,
3600 wxDefaultPosition, wxDefaultSize, 0);
3601 m_pCursorPosition->Wrap(-1);
3602 fgSizer19->Add(m_pCursorPosition, 0, wxALL | wxEXPAND, 5);
3603
3604 fgSizer18->Add(fgSizer19, 1, wxEXPAND, 10);
3605
3606 wxFlexGridSizer* fgSizer20;
3607 fgSizer20 = new wxFlexGridSizer(0, 1, 0, 0);
3608 fgSizer20->AddGrowableRow(0);
3609 fgSizer20->SetFlexibleDirection(wxBOTH);
3610 fgSizer20->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_ALL);
3611
3612 m_pGribTable = new CustomGrid(this, wxID_ANY, wxDefaultPosition,
3613 wxSize(-1, 50), 0, _T(" "));
3614
3615 // Cell Defaults
3616 m_pGribTable->SetDefaultCellFont(
3617 wxFont(wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT,
3618 wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString));
3619 m_pGribTable->SetDefaultCellAlignment(wxALIGN_CENTRE, wxALIGN_TOP);
3620 fgSizer20->Add(m_pGribTable, 0, wxALL | wxEXPAND, 5);
3621
3622 fgSizer18->Add(fgSizer20, 1, wxEXPAND, 5);
3623
3624 wxStdDialogButtonSizer* m_pButtonTable = new wxStdDialogButtonSizer();
3625 m_pButtonTableOK = new wxButton(this, wxID_OK, _("Close"));
3626 m_pButtonTableOK->SetFont(GetOCPNGUIScaledFont_PlugIn(_("Dialog")));
3627 m_pButtonTable->AddButton(m_pButtonTableOK);
3628 m_pButtonTable->Realize();
3629
3630 fgSizer18->Add(m_pButtonTable, 1, wxEXPAND, 5);
3631
3632 bSizer1->Add(fgSizer18, 1, wxEXPAND, 5);
3633
3634 this->SetSizer(bSizer1);
3635 this->Layout();
3636 bSizer1->Fit(this);
3637
3638 this->Centre(wxBOTH);
3639
3640 // Connect Events
3641 this->Connect(wxEVT_CLOSE_WINDOW,
3642 wxCloseEventHandler(GRIBTableBase::OnClose));
3643 m_pButtonTableOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
3644 wxCommandEventHandler(GRIBTableBase::OnOKButton),
3645 nullptr, this);
3646}
3647
3648GRIBTableBase::~GRIBTableBase() {
3649 // Disconnect Events
3650 this->Disconnect(wxEVT_CLOSE_WINDOW,
3651 wxCloseEventHandler(GRIBTableBase::OnClose));
3652 m_pButtonTableOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
3653 wxCommandEventHandler(GRIBTableBase::OnOKButton),
3654 nullptr, this);
3655}
3656
3657ProjectBoatPanel::ProjectBoatPanel(wxWindow* parent, wxWindowID id,
3658 const wxPoint& pos, const wxSize& size,
3659 long style, const wxString& name)
3660 : wxPanel(parent, id, pos, size, style, name) {
3661 wxBoxSizer* bSizerProjectBoat;
3662 bSizerProjectBoat = new wxBoxSizer(wxHORIZONTAL);
3663
3664 m_cbProjectPosition = new wxCheckBox(this, wxID_ANY, _("Project position"),
3665 wxDefaultPosition, wxDefaultSize, 0);
3666 bSizerProjectBoat->Add(m_cbProjectPosition, 0,
3667 wxALIGN_CENTER_VERTICAL | wxALL, 5);
3668
3669 m_stCourse = new wxStaticText(this, wxID_ANY, _("Course"), wxDefaultPosition,
3670 wxDefaultSize, 0);
3671 m_stCourse->Wrap(-1);
3672 bSizerProjectBoat->Add(m_stCourse, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
3673
3674 m_tCourse = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
3675 wxDefaultSize, 0);
3676 bSizerProjectBoat->Add(m_tCourse, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
3677
3678 m_stSpeed = new wxStaticText(this, wxID_ANY, _("Speed"), wxDefaultPosition,
3679 wxDefaultSize, 0);
3680 m_stSpeed->Wrap(-1);
3681 bSizerProjectBoat->Add(m_stSpeed, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
3682
3683 m_tSpeed = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
3684 wxDefaultSize, 0);
3685 bSizerProjectBoat->Add(m_tSpeed, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
3686
3687 m_stSpeedUnit = new wxStaticText(this, wxID_ANY, wxT("kt"), wxDefaultPosition,
3688 wxDefaultSize, 0);
3689 m_stSpeedUnit->Wrap(-1);
3690 bSizerProjectBoat->Add(m_stSpeedUnit, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
3691
3692 this->SetSizer(bSizerProjectBoat);
3693 this->Layout();
3694}
3695
3696ProjectBoatPanel::~ProjectBoatPanel() {}
3697
3698double ProjectBoatPanel::GetCourse() {
3699 double val;
3700 if (m_tCourse->GetValue().ToDouble(&val)) {
3701 return val;
3702 } else {
3703 return 0;
3704 }
3705}
3706double ProjectBoatPanel::GetSpeed() {
3707 double val;
3708 if (m_tSpeed->GetValue().ToDouble(&val)) {
3709 return val;
3710 } else {
3711 return 0;
3712 }
3713}
3714bool ProjectBoatPanel::ProjectionEnabled() {
3715 return m_cbProjectPosition->IsChecked();
3716}
Base User Interface Components for GRIB Plugin.
#define ID_BTNREQUEST
ID of button for requesting/downloading GRIB data./*#end#*‍/.
#define SAVEDZONE
Save zone.
#define MANSELECT
Manual selection mode.
#define AUTOSELECT
Automatic selection mode.
Class GRIBUICtrlBarBase.
wxButton * m_rButtonCancel
Button to Cancel a request to download, close the dialog without saving the configuration.
wxSpinCtrl * m_spMaxLon
A spinner for the max longitude of the bounding box for downloads.
wxSpinCtrl * m_spMaxLat
A spinner for the max latitude of the bounding box for downloads.
virtual void OnSendMaiL(wxCommandEvent &event)
Callback invoked when the user clicks the "Send" button in the "e-mail" tab.
virtual void OnOK(wxCommandEvent &event)
Callback invoked when the user clicks the "OK" button in the "download" dialog.
wxRadioButton * m_rbManualSelect
Radio button selected to indicate the download area is based on the area selected by the user.
wxRadioButton * m_rbCurrentView
Radio button selected to indicate the download area is based on the visible area of the chart in the ...
wxSpinCtrl * m_spMinLat
A spinner for the min latitude of the bounding box for downloads.
wxButton * m_rButtonApply
Button to Save the "download request" configuration.
wxButton * m_rButtonYes
Button to Send a download request through e-mail.
virtual void OnCancel(wxCommandEvent &event)
Callback invoked when the user clicks the "Cancel" button in the "download" dialog.
wxSpinCtrl * m_spMinLon
A spinner for the min longitude of the bounding box for downloads.
wxCheckBox * m_cBarbArrFixSpac
Flag to determine barbed arrow layout mode.
Class ProjectBoatPanel.
Class XyGribPanel.
Definition XyGribPanel.h:37
PlugIn Object Definition/API.
wxString * GetpSharedDataLocation(void)
Gets shared application data location.
int PlatformDirSelectorDialog(wxWindow *parent, wxString *file_spec, wxString Title, wxString initDir)
Shows platform-optimized directory selector dialog.
wxFont GetOCPNGUIScaledFont_PlugIn(wxString item)
Gets a uniquely scaled font copy for responsive UI elements.
wxBitmap GetBitmapFromSVGFile(wxString filename, unsigned int width, unsigned int height)
Creates bitmap from SVG file.