12#include "XyGribPanel.h"
19GRIBUICtrlBarBase::GRIBUICtrlBarBase(wxWindow* parent, wxWindowID
id,
20 const wxString& title,
const wxPoint& pos,
21 const wxSize& size,
long style,
23 : wxDialog(parent, id, title, pos, size, style) {
24 m_ProjectBoatPanel =
nullptr;
25 m_ScaledFactor = scale_factor;
27#ifdef __OCPN__ANDROID__
28 const bool m_bcompact =
true;
30 const bool m_bcompact =
false;
33 this->SetSizeHints(wxDefaultSize, wxDefaultSize);
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);
40 wxBoxSizer* mainBox =
new wxBoxSizer(wxVERTICAL);
41 m_fgCtrlBarSizer->Add(mainBox, 1, wxEXPAND, 0);
43 wxBoxSizer* fgSizer50 =
new wxBoxSizer(wxHORIZONTAL);
44 mainBox->Add(fgSizer50, 0, wxEXPAND, 5);
47 new wxBitmapButton(
this, ID_BTNPREV, wxNullBitmap, wxDefaultPosition,
48 wxDefaultSize, wxBU_AUTODRAW);
49 m_bpPrev->SetToolTip(_(
"Previous"));
51 fgSizer50->Add(m_bpPrev, 0, wxALL, 1);
53 wxArrayString m_cRecordForecastChoices;
54 m_cRecordForecastChoices.Add(_T(
"Item0"));
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);
62 new wxBitmapButton(
this, ID_BTNNEXT, wxNullBitmap, wxDefaultPosition,
63 wxDefaultSize, wxBU_AUTODRAW);
64 m_bpNext->SetToolTip(_(
"Next"));
66 fgSizer50->Add(m_bpNext, 0, wxALL, 1);
68 wxBoxSizer* fgSizer51 =
new wxBoxSizer(wxHORIZONTAL);
69 mainBox->Add(fgSizer51, 0, wxEXPAND, 5);
72 new wxBitmapButton(
this, ID_CTRLALTITUDE, wxNullBitmap,
73 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
74 m_bpAltitude->SetToolTip(_(
"Select geoptential altitude"));
76 fgSizer51->Add(m_bpAltitude, 0, wxALL, 1);
79 new wxBitmapButton(
this, ID_BTNNOW, wxNullBitmap, wxDefaultPosition,
80 wxDefaultSize, wxBU_AUTODRAW);
81 m_bpNow->SetToolTip(_(
"Now"));
83 fgSizer51->Add(m_bpNow, 0, wxALL, 1);
86 new wxBitmapButton(
this, ID_BTNZOOMTC, wxNullBitmap, wxDefaultPosition,
87 wxDefaultSize, wxBU_AUTODRAW);
88 m_bpZoomToCenter->SetToolTip(_(
"Zoom To Center"));
90 fgSizer51->Add(m_bpZoomToCenter, 0, wxALL, 1);
93 new wxBitmapButton(
this, ID_BTNSHOWCDATA, wxNullBitmap,
94 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
95 fgSizer51->Add(m_bpShowCursorData, 0, wxALL, 1);
97 fgSizer51->Add(0, 0, 1, wxEXPAND | wxLEFT | wxRIGHT, 1);
99 new wxBitmapButton(
this, ID_BTNPLAY, wxNullBitmap, wxDefaultPosition,
100 wxDefaultSize, wxBU_AUTODRAW);
101 fgSizer51->Add(m_bpPlay, 0, wxBOTTOM | wxLEFT | wxTOP, 1);
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);
107 fgSizer51->Add(0, 0, 1, wxEXPAND | wxLEFT | wxRIGHT, 1);
109 m_bpOpenFile =
nullptr;
116 new wxBitmapButton(
this, ID_BTNSETTING, wxNullBitmap, wxDefaultPosition,
117 wxDefaultSize, wxBU_AUTODRAW);
118 m_bpSettings->SetToolTip(_(
"Settings"));
120 fgSizer51->Add(m_bpSettings, 0, wxALL, 1);
122 m_bpRequest =
nullptr;
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);
139 mainBox->Add(m_fgCDataSizer, 1, wxEXPAND, 5);
141 m_fgCtrlGrabberSize =
new wxFlexGridSizer(0, 1, 0, 0);
142 m_fgCtrlGrabberSize->SetFlexibleDirection(wxBOTH);
143 m_fgCtrlGrabberSize->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
145 this->SetSizer(m_fgCtrlBarSizer);
147 m_fgCtrlBarSizer->Fit(
this);
149 this->SetSizeHints(wxDefaultSize, wxDefaultSize);
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);
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);
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);
171 new wxBitmapButton(
this, ID_BTNPREV, wxNullBitmap, wxDefaultPosition,
172 wxDefaultSize, wxBU_AUTODRAW);
173 m_bpPrev->SetToolTip(_(
"Previous"));
175 fgSizer50->Add(m_bpPrev, 0, wxALL, 1);
177 wxArrayString m_cRecordForecastChoices;
178 m_cRecordForecastChoices.Add(_T(
"Item0"));
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);
186 new wxBitmapButton(
this, ID_BTNNEXT, wxNullBitmap, wxDefaultPosition,
187 wxDefaultSize, wxBU_AUTODRAW);
188 m_bpNext->SetToolTip(_(
"Next"));
190 fgSizer50->Add(m_bpNext, 0, wxALL, 1);
192 fgSizer50->Add(0, 0, 1, wxEXPAND | wxLEFT | wxRIGHT, 1);
195 new wxBitmapButton(
this, ID_CTRLALTITUDE, wxNullBitmap,
196 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
197 m_bpAltitude->SetToolTip(_(
"Select geoptential altitude"));
199 fgSizer50->Add(m_bpAltitude, 0, wxALL, 1);
202 new wxBitmapButton(
this, ID_BTNNOW, wxNullBitmap, wxDefaultPosition,
203 wxDefaultSize, wxBU_AUTODRAW);
204 m_bpNow->SetToolTip(_(
"Now"));
206 fgSizer50->Add(m_bpNow, 0, wxALL, 1);
209 new wxBitmapButton(
this, ID_BTNZOOMTC, wxNullBitmap, wxDefaultPosition,
210 wxDefaultSize, wxBU_AUTODRAW);
211 m_bpZoomToCenter->SetToolTip(_(
"Zoom To Center"));
213 fgSizer50->Add(m_bpZoomToCenter, 0, wxALL, 1);
216 new wxBitmapButton(
this, ID_BTNSHOWCDATA, wxNullBitmap,
217 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
218 fgSizer50->Add(m_bpShowCursorData, 0, wxALL, 1);
220 fgSizer50->Add(0, 0, 1, wxEXPAND | wxLEFT | wxRIGHT, 1);
223 new wxBitmapButton(
this, ID_BTNPLAY, wxNullBitmap, wxDefaultPosition,
224 wxDefaultSize, wxBU_AUTODRAW);
225 fgSizer50->Add(m_bpPlay, 0, wxBOTTOM | wxLEFT | wxTOP, 1);
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);
231 fgSizer50->Add(0, 0, 1, wxEXPAND | wxLEFT | wxRIGHT, 1);
234 new wxBitmapButton(
this, ID_BTNOPENFILE, wxNullBitmap,
235 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
236 m_bpOpenFile->SetToolTip(_(
"Open a new file"));
238 fgSizer50->Add(m_bpOpenFile, 0, wxALL, 1);
241 new wxBitmapButton(
this, ID_BTNSETTING, wxNullBitmap, wxDefaultPosition,
242 wxDefaultSize, wxBU_AUTODRAW);
243 m_bpSettings->SetToolTip(_(
"Settings"));
245 fgSizer50->Add(m_bpSettings, 0, wxALL, 1);
248 new wxBitmapButton(
this,
ID_BTNREQUEST, wxNullBitmap, wxDefaultPosition,
249 wxDefaultSize, wxBU_AUTODRAW);
250 fgSizer50->Add(m_bpRequest, 0, wxALL, 1);
252 fgSizer49->Add(fgSizer50, 1, wxEXPAND, 5);
254 fgSizer49->Add(m_ProjectBoatPanel, 0, wxEXPAND | wxALL, 1);
256 m_fgCDataSizer =
new wxFlexGridSizer(0, 2, 0, 0);
257 m_fgCDataSizer->SetFlexibleDirection(wxBOTH);
258 m_fgCDataSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
260 fgSizer49->Add(m_fgCDataSizer, 1, wxEXPAND, 5);
262 m_fgCtrlBarSizer->Add(fgSizer49, 1, wxEXPAND, 0);
264 m_fgCtrlGrabberSize =
new wxFlexGridSizer(0, 1, 0, 0);
265 m_fgCtrlGrabberSize->SetFlexibleDirection(wxBOTH);
266 m_fgCtrlGrabberSize->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
268 m_fgCtrlBarSizer->Add(m_fgCtrlGrabberSize, 1, wxEXPAND, 0);
270 this->SetSizer(m_fgCtrlBarSizer);
272 m_fgCtrlBarSizer->Fit(
this);
275 this->Centre(wxBOTH);
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));
309 this->Connect(wxEVT_PAINT, wxPaintEventHandler(GRIBUICtrlBarBase::OnPaint));
311 m_bpPrev->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
312 wxCommandEventHandler(GRIBUICtrlBarBase::OnPrev),
nullptr,
314 m_bpPrev->Connect(wxEVT_RIGHT_DOWN,
315 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
317 m_cRecordForecast->Connect(
318 wxEVT_COMMAND_CHOICE_SELECTED,
319 wxCommandEventHandler(GRIBUICtrlBarBase::OnRecordForecast),
nullptr,
321 m_cRecordForecast->Connect(
322 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
324 m_bpNext->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
325 wxCommandEventHandler(GRIBUICtrlBarBase::OnNext),
nullptr,
327 m_bpNext->Connect(wxEVT_RIGHT_DOWN,
328 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
330 m_bpAltitude->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
331 wxCommandEventHandler(GRIBUICtrlBarBase::OnAltitude),
333 m_bpAltitude->Connect(wxEVT_RIGHT_DOWN,
334 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
336 m_bpNow->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
337 wxCommandEventHandler(GRIBUICtrlBarBase::OnNow),
nullptr,
339 m_bpNow->Connect(wxEVT_RIGHT_DOWN,
340 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
342 m_bpZoomToCenter->Connect(
343 wxEVT_COMMAND_BUTTON_CLICKED,
344 wxCommandEventHandler(GRIBUICtrlBarBase::OnZoomToCenterClick),
nullptr,
346 m_bpZoomToCenter->Connect(
347 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
349 m_bpShowCursorData->Connect(
350 wxEVT_COMMAND_BUTTON_CLICKED,
351 wxCommandEventHandler(GRIBUICtrlBarBase::OnShowCursorData),
nullptr,
353 m_bpShowCursorData->Connect(
354 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
356 m_bpPlay->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
357 wxCommandEventHandler(GRIBUICtrlBarBase::OnPlayStop),
359 m_bpPlay->Connect(wxEVT_RIGHT_DOWN,
360 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
362 m_sTimeline->Connect(wxEVT_RIGHT_DOWN,
363 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
365 m_sTimeline->Connect(wxEVT_SCROLL_TOP,
366 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
368 m_sTimeline->Connect(wxEVT_SCROLL_BOTTOM,
369 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
371 m_sTimeline->Connect(wxEVT_SCROLL_LINEUP,
372 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
374 m_sTimeline->Connect(wxEVT_SCROLL_LINEDOWN,
375 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
377 m_sTimeline->Connect(wxEVT_SCROLL_PAGEUP,
378 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
380 m_sTimeline->Connect(wxEVT_SCROLL_PAGEDOWN,
381 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
383 m_sTimeline->Connect(wxEVT_SCROLL_THUMBTRACK,
384 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
386 m_sTimeline->Connect(wxEVT_SCROLL_THUMBRELEASE,
387 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
389 m_sTimeline->Connect(wxEVT_SCROLL_CHANGED,
390 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
394 m_bpOpenFile->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
395 wxCommandEventHandler(GRIBUICtrlBarBase::OnOpenFile),
397 m_bpOpenFile->Connect(wxEVT_RIGHT_DOWN,
398 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
402#ifdef __OCPN__ANDROID__
403 m_bpSettings->Connect(
404 wxEVT_COMMAND_BUTTON_CLICKED,
405 wxCommandEventHandler(GRIBUICtrlBarBase::OnCompositeDialog),
nullptr,
408 m_bpSettings->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
409 wxCommandEventHandler(GRIBUICtrlBarBase::OnSettings),
411 m_bpSettings->Connect(wxEVT_RIGHT_DOWN,
412 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
417 m_bpRequest->Connect(
418 wxEVT_COMMAND_BUTTON_CLICKED,
419 wxCommandEventHandler(GRIBUICtrlBarBase::OnRequestForecastData),
421 m_bpRequest->Connect(wxEVT_RIGHT_DOWN,
422 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
427GRIBUICtrlBarBase::~GRIBUICtrlBarBase() {
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),
463 m_bpPrev->Disconnect(wxEVT_RIGHT_DOWN,
464 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
466 m_cRecordForecast->Disconnect(
467 wxEVT_COMMAND_CHOICE_SELECTED,
468 wxCommandEventHandler(GRIBUICtrlBarBase::OnRecordForecast),
nullptr,
470 m_cRecordForecast->Disconnect(
471 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
473 m_bpNext->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
474 wxCommandEventHandler(GRIBUICtrlBarBase::OnNext),
476 m_bpNext->Disconnect(wxEVT_RIGHT_DOWN,
477 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
479 m_bpAltitude->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
480 wxCommandEventHandler(GRIBUICtrlBarBase::OnAltitude),
482 m_bpAltitude->Disconnect(wxEVT_RIGHT_DOWN,
483 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
485 m_bpNow->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
486 wxCommandEventHandler(GRIBUICtrlBarBase::OnNow),
nullptr,
488 m_bpNow->Disconnect(wxEVT_RIGHT_DOWN,
489 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
491 m_bpZoomToCenter->Disconnect(
492 wxEVT_COMMAND_BUTTON_CLICKED,
493 wxCommandEventHandler(GRIBUICtrlBarBase::OnZoomToCenterClick),
nullptr,
495 m_bpZoomToCenter->Disconnect(
496 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
498 m_bpShowCursorData->Disconnect(
499 wxEVT_COMMAND_BUTTON_CLICKED,
500 wxCommandEventHandler(GRIBUICtrlBarBase::OnShowCursorData),
nullptr,
502 m_bpShowCursorData->Disconnect(
503 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
505 m_bpPlay->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
506 wxCommandEventHandler(GRIBUICtrlBarBase::OnPlayStop),
508 m_bpPlay->Disconnect(wxEVT_RIGHT_DOWN,
509 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
511 m_sTimeline->Disconnect(wxEVT_RIGHT_DOWN,
512 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
514 m_sTimeline->Disconnect(wxEVT_SCROLL_TOP,
515 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
517 m_sTimeline->Disconnect(wxEVT_SCROLL_BOTTOM,
518 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
520 m_sTimeline->Disconnect(wxEVT_SCROLL_LINEUP,
521 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
523 m_sTimeline->Disconnect(wxEVT_SCROLL_LINEDOWN,
524 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
526 m_sTimeline->Disconnect(wxEVT_SCROLL_PAGEUP,
527 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
529 m_sTimeline->Disconnect(wxEVT_SCROLL_PAGEDOWN,
530 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
532 m_sTimeline->Disconnect(wxEVT_SCROLL_THUMBTRACK,
533 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
535 m_sTimeline->Disconnect(wxEVT_SCROLL_THUMBRELEASE,
536 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
538 m_sTimeline->Disconnect(wxEVT_SCROLL_CHANGED,
539 wxScrollEventHandler(GRIBUICtrlBarBase::OnTimeline),
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),
551 m_bpSettings->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
552 wxCommandEventHandler(GRIBUICtrlBarBase::OnSettings),
554 m_bpSettings->Disconnect(wxEVT_RIGHT_DOWN,
555 wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
559 m_bpRequest->Disconnect(
560 wxEVT_COMMAND_BUTTON_CLICKED,
561 wxCommandEventHandler(GRIBUICtrlBarBase::OnRequestForecastData),
563 m_bpRequest->Disconnect(
564 wxEVT_RIGHT_DOWN, wxMouseEventHandler(GRIBUICtrlBarBase::OnMouseEvent),
569wxBitmap GRIBUICtrlBarBase::GetScaledBitmap(wxBitmap bitmap,
570 const wxString svgFileName,
571 double scale_factor) {
574 int w = bitmap.GetWidth() - margin;
575 int h = bitmap.GetHeight() - margin;
581 wxFileName::GetPathSeparator() + _T(
"grib_pi") +
582 wxFileName::GetPathSeparator() + _T(
"data") +
583 wxFileName::GetPathSeparator();
584 wxString filename = shareLocn + svgFileName + _T(
".svg");
587 if (svgbm.GetWidth() > 0 && svgbm.GetHeight() > 0)
592 wxImage a = bitmap.ConvertToImage();
593 return wxBitmap(a.Scale(w, h), wxIMAGE_QUALITY_HIGH);
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));
605 wxFlexGridSizer* fgSizer57;
606 fgSizer57 =
new wxFlexGridSizer(0, 2, 0, 0);
607 fgSizer57->SetFlexibleDirection(wxBOTH);
608 fgSizer57->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
610 m_fgCdataSizer =
new wxFlexGridSizer(0, 1, 0, 0);
611 m_fgCdataSizer->SetFlexibleDirection(wxBOTH);
612 m_fgCdataSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
614 fgSizer57->Add(m_fgCdataSizer, 1, wxEXPAND, 5);
616 this->SetSizer(fgSizer57);
618 fgSizer57->Fit(
this);
620 this->Centre(wxBOTH);
623GRIBUICDataBase::~GRIBUICDataBase() {}
625CursorDataBase::CursorDataBase(wxWindow* parent, wxWindowID
id,
626 const wxPoint& pos,
const wxSize& size,
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);
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);
639 wxFlexGridSizer* fgSizer43;
640 fgSizer43 =
new wxFlexGridSizer(0, 1, 0, 0);
641 fgSizer43->SetFlexibleDirection(wxBOTH);
642 fgSizer43->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
644 m_fgTrackingControls =
new wxFlexGridSizer(0, 8, 0, 0);
645 m_fgTrackingControls->SetFlexibleDirection(wxBOTH);
646 m_fgTrackingControls->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
648 m_cbWind =
new wxCheckBox(
this, ID_CB_WIND, _(
"Wind"), wxDefaultPosition,
650 m_fgTrackingControls->Add(m_cbWind, 0, wxEXPAND | wxLEFT | wxTOP, 2);
653 new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
654 wxSize(70, -1), wxTE_READONLY);
655 m_fgTrackingControls->Add(m_tcWindSpeed, 0, 0, 1);
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);
663 new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
664 wxSize(45, -1), wxTE_READONLY);
665 m_fgTrackingControls->Add(m_tcWindDirection, 0, 0, 1);
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);
672 new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
673 wxSize(70, -1), wxTE_READONLY);
674 m_fgTrackingControls->Add(m_tcWindGust, 0, 0, 1);
676 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 1);
678 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 1);
680 m_cbPressure =
new wxCheckBox(
this, ID_CB_PRESSURE, _(
"Pressure"),
681 wxDefaultPosition, wxDefaultSize, 0);
682 m_fgTrackingControls->Add(m_cbPressure, 0, wxALL | wxEXPAND, 5);
685 new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
686 wxSize(70, -1), wxTE_READONLY);
687 m_tcPressure->SetToolTip(_(
"Mean Sea Level Pressure (MSLP)"));
689 m_fgTrackingControls->Add(m_tcPressure, 0, 0, 1);
691 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
693 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
695 m_cbWave =
new wxCheckBox(
this, ID_CB_WAVES, _(
"Waves"), wxDefaultPosition,
697 m_fgTrackingControls->Add(m_cbWave, 0, wxALL | wxEXPAND, 5);
700 new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
701 wxSize(70, -1), wxTE_READONLY);
702 m_tcWaveHeight->SetToolTip(_(
"Significant Wave Height"));
704 m_fgTrackingControls->Add(m_tcWaveHeight, 0, 0, 1);
707 new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
708 wxSize(45, -1), wxTE_READONLY);
709 m_tcWavePeriode->SetToolTip(_(
"Waves period"));
711 m_fgTrackingControls->Add(m_tcWavePeriode, 0, 0, 1);
714 new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
715 wxSize(45, -1), wxTE_READONLY);
716 m_tcWaveDirection->SetToolTip(_(
"Waves Direction"));
718 m_fgTrackingControls->Add(m_tcWaveDirection, 0, 0, 1);
720 m_cbCurrent =
new wxCheckBox(
this, ID_CB_CURRENT, _(
"Current"),
721 wxDefaultPosition, wxDefaultSize, 0);
722 m_fgTrackingControls->Add(m_cbCurrent, 0, wxALL | wxEXPAND, 5);
724 m_tcCurrentVelocity =
725 new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
726 wxSize(70, -1), wxTE_READONLY);
727 m_tcCurrentVelocity->SetToolTip(_(
"Surface Current Speed"));
729 m_fgTrackingControls->Add(m_tcCurrentVelocity, 0, 0, 1);
731 m_tcCurrentDirection =
732 new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
733 wxSize(45, -1), wxTE_READONLY);
734 m_tcCurrentDirection->SetToolTip(_(
"Surface Current Direction"));
736 m_fgTrackingControls->Add(m_tcCurrentDirection, 0, 0, 1);
738 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
740 m_cbPrecipitation =
new wxCheckBox(
this, ID_CB_RAINFALL, _(
"Rainfall"),
741 wxDefaultPosition, wxDefaultSize, 0);
742 m_fgTrackingControls->Add(m_cbPrecipitation, 0, wxALL | wxEXPAND, 5);
745 new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
746 wxSize(70, -1), wxTE_READONLY);
747 m_tcPrecipitation->SetToolTip(_(
"Cumulative Rainfall per Hour"));
749 m_fgTrackingControls->Add(m_tcPrecipitation, 0, 0, 1);
751 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 1);
753 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
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);
759 m_tcCloud =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
760 wxSize(70, -1), wxTE_READONLY);
761 m_tcCloud->SetToolTip(_(
"Cloud Cover"));
763 m_fgTrackingControls->Add(m_tcCloud, 0, 0, 1);
765 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 1);
767 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
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);
774 new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
775 wxSize(70, -1), wxTE_READONLY);
776 m_fgTrackingControls->Add(m_tcAirTemperature, 0, 0, 1);
778 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 1);
780 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
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);
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"));
791 m_fgTrackingControls->Add(m_tcSeaTemperature, 0, 0, 1);
793 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
795 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
797 m_cbCAPE =
new wxCheckBox(
this, ID_CB_CAPE, _(
"CAPE"), wxDefaultPosition,
799 m_fgTrackingControls->Add(m_cbCAPE, 0, wxALL | wxEXPAND, 5);
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"));
805 m_fgTrackingControls->Add(m_tcCAPE, 0, 0, 1);
807 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
809 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
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);
815 m_tcReflC =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxPoint(-1, -1),
816 wxSize(70, -1), wxTE_READONLY);
817 m_tcReflC->SetToolTip(_(
"Composite Reflectivity"));
819 m_fgTrackingControls->Add(m_tcReflC, 0, 0, 1);
821 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
823 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
825 m_cbAltitude =
new wxCheckBox(
this, wxID_ANY, _(
"Altitude"),
826 wxDefaultPosition, wxDefaultSize, 0);
827 m_cbAltitude->SetValue(
true);
828 m_cbAltitude->Enable(
false);
830 m_fgTrackingControls->Add(m_cbAltitude, 0, wxALL | wxEXPAND, 5);
833 new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
834 wxSize(-1, -1), wxTE_READONLY);
835 m_tcAltitude->SetMinSize(wxSize(70, -1));
837 m_fgTrackingControls->Add(m_tcAltitude, 0, 0, 5);
839 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
841 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
843 m_cbTemp =
new wxCheckBox(
this, wxID_ANY, _(
"Temp."), wxDefaultPosition,
845 m_cbTemp->SetValue(
true);
846 m_cbTemp->Enable(
false);
848 m_fgTrackingControls->Add(m_cbTemp, 0, wxALL | wxEXPAND, 5);
850 m_tcTemp =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
851 wxDefaultSize, wxTE_READONLY);
852 m_tcTemp->SetMinSize(wxSize(70, -1));
854 m_fgTrackingControls->Add(m_tcTemp, 0, 0, 5);
856 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
858 m_fgTrackingControls->Add(0, 0, 1, wxEXPAND, 5);
860 m_cbRelHumid =
new wxCheckBox(
this, wxID_ANY, _(
"Relat. Hum."),
861 wxDefaultPosition, wxDefaultSize, 0);
862 m_cbRelHumid->SetValue(
true);
863 m_cbRelHumid->Enable(
false);
865 m_fgTrackingControls->Add(m_cbRelHumid, 0, wxALL | wxEXPAND, 5);
868 new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
869 wxDefaultSize, wxTE_READONLY);
870 m_tcRelHumid->SetMinSize(wxSize(70, -1));
872 m_fgTrackingControls->Add(m_tcRelHumid, 0, 0, 5);
874 fgSizer43->Add(m_fgTrackingControls, 1, wxEXPAND, 1);
876 fgSizer30->Add(fgSizer43, 1, wxEXPAND, 5);
878 this->SetSizer(fgSizer30);
880 fgSizer30->Fit(
this);
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),
912 m_stTrackingText->Connect(wxEVT_LEFT_UP,
913 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
915 m_stTrackingText->Connect(wxEVT_MIDDLE_DOWN,
916 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
918 m_stTrackingText->Connect(wxEVT_MIDDLE_UP,
919 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
921 m_stTrackingText->Connect(wxEVT_RIGHT_DOWN,
922 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
924 m_stTrackingText->Connect(wxEVT_RIGHT_UP,
925 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
927 m_stTrackingText->Connect(wxEVT_MOTION,
928 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
930 m_stTrackingText->Connect(wxEVT_LEFT_DCLICK,
931 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
933 m_stTrackingText->Connect(wxEVT_MIDDLE_DCLICK,
934 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
936 m_stTrackingText->Connect(wxEVT_RIGHT_DCLICK,
937 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
939 m_stTrackingText->Connect(wxEVT_LEAVE_WINDOW,
940 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
942 m_stTrackingText->Connect(wxEVT_ENTER_WINDOW,
943 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
945 m_stTrackingText->Connect(wxEVT_MOUSEWHEEL,
946 wxMouseEventHandler(CursorDataBase::OnMouseEvent),
948 m_cbWind->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
949 wxCommandEventHandler(CursorDataBase::OnCBAny),
nullptr,
951 m_cbWind->Connect(wxEVT_RIGHT_DOWN,
952 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
954 m_cbWindGust->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
955 wxCommandEventHandler(CursorDataBase::OnCBAny),
nullptr,
957 m_cbWindGust->Connect(wxEVT_RIGHT_DOWN,
958 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
960 m_cbPressure->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
961 wxCommandEventHandler(CursorDataBase::OnCBAny),
nullptr,
963 m_cbPressure->Connect(wxEVT_RIGHT_DOWN,
964 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
966 m_cbWave->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
967 wxCommandEventHandler(CursorDataBase::OnCBAny),
nullptr,
969 m_cbWave->Connect(wxEVT_RIGHT_DOWN,
970 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
972 m_cbCurrent->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
973 wxCommandEventHandler(CursorDataBase::OnCBAny),
nullptr,
975 m_cbCurrent->Connect(wxEVT_RIGHT_DOWN,
976 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
978 m_cbPrecipitation->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
979 wxCommandEventHandler(CursorDataBase::OnCBAny),
981 m_cbPrecipitation->Connect(
982 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
984 m_cbCloud->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
985 wxCommandEventHandler(CursorDataBase::OnCBAny),
nullptr,
987 m_cbCloud->Connect(wxEVT_RIGHT_DOWN,
988 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
990 m_cbAirTemperature->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
991 wxCommandEventHandler(CursorDataBase::OnCBAny),
993 m_cbAirTemperature->Connect(
994 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
996 m_cbSeaTemperature->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
997 wxCommandEventHandler(CursorDataBase::OnCBAny),
999 m_cbSeaTemperature->Connect(
1000 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1002 m_cbCAPE->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1003 wxCommandEventHandler(CursorDataBase::OnCBAny),
nullptr,
1005 m_cbCAPE->Connect(wxEVT_RIGHT_DOWN,
1006 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1008 m_cbReflC->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1009 wxCommandEventHandler(CursorDataBase::OnCBAny),
nullptr,
1011 m_cbReflC->Connect(wxEVT_RIGHT_DOWN,
1012 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1016CursorDataBase::~CursorDataBase() {
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),
1047 m_stTrackingText->Disconnect(
1048 wxEVT_LEFT_UP, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
nullptr,
1050 m_stTrackingText->Disconnect(
1051 wxEVT_MIDDLE_DOWN, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1053 m_stTrackingText->Disconnect(
1054 wxEVT_MIDDLE_UP, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1056 m_stTrackingText->Disconnect(
1057 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1059 m_stTrackingText->Disconnect(
1060 wxEVT_RIGHT_UP, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1062 m_stTrackingText->Disconnect(
1063 wxEVT_MOTION, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
nullptr,
1065 m_stTrackingText->Disconnect(
1066 wxEVT_LEFT_DCLICK, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1068 m_stTrackingText->Disconnect(
1069 wxEVT_MIDDLE_DCLICK, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1071 m_stTrackingText->Disconnect(
1072 wxEVT_RIGHT_DCLICK, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1074 m_stTrackingText->Disconnect(
1075 wxEVT_LEAVE_WINDOW, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1077 m_stTrackingText->Disconnect(
1078 wxEVT_ENTER_WINDOW, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1080 m_stTrackingText->Disconnect(
1081 wxEVT_MOUSEWHEEL, wxMouseEventHandler(CursorDataBase::OnMouseEvent),
1083 m_cbWind->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1084 wxCommandEventHandler(CursorDataBase::OnCBAny),
nullptr,
1086 m_cbWind->Disconnect(wxEVT_RIGHT_DOWN,
1087 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1089 m_cbWindGust->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1090 wxCommandEventHandler(CursorDataBase::OnCBAny),
1092 m_cbWindGust->Disconnect(wxEVT_RIGHT_DOWN,
1093 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1095 m_cbPressure->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1096 wxCommandEventHandler(CursorDataBase::OnCBAny),
1098 m_cbPressure->Disconnect(wxEVT_RIGHT_DOWN,
1099 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1101 m_cbWave->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1102 wxCommandEventHandler(CursorDataBase::OnCBAny),
nullptr,
1104 m_cbWave->Disconnect(wxEVT_RIGHT_DOWN,
1105 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1107 m_cbCurrent->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1108 wxCommandEventHandler(CursorDataBase::OnCBAny),
1110 m_cbCurrent->Disconnect(wxEVT_RIGHT_DOWN,
1111 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1113 m_cbPrecipitation->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1114 wxCommandEventHandler(CursorDataBase::OnCBAny),
1116 m_cbPrecipitation->Disconnect(
1117 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1119 m_cbCloud->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1120 wxCommandEventHandler(CursorDataBase::OnCBAny),
nullptr,
1122 m_cbCloud->Disconnect(wxEVT_RIGHT_DOWN,
1123 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1125 m_cbAirTemperature->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1126 wxCommandEventHandler(CursorDataBase::OnCBAny),
1128 m_cbAirTemperature->Disconnect(
1129 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1131 m_cbSeaTemperature->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1132 wxCommandEventHandler(CursorDataBase::OnCBAny),
1134 m_cbSeaTemperature->Disconnect(
1135 wxEVT_RIGHT_DOWN, wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1137 m_cbCAPE->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1138 wxCommandEventHandler(CursorDataBase::OnCBAny),
nullptr,
1140 m_cbCAPE->Disconnect(wxEVT_RIGHT_DOWN,
1141 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1143 m_cbReflC->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED,
1144 wxCommandEventHandler(CursorDataBase::OnCBAny),
nullptr,
1146 m_cbReflC->Disconnect(wxEVT_RIGHT_DOWN,
1147 wxMouseEventHandler(CursorDataBase::OnMenuCallBack),
1151GribSettingsDialogBase::GribSettingsDialogBase(wxWindow* parent, wxWindowID
id,
1152 const wxString& title,
1154 const wxSize& size,
long style)
1155 : wxDialog(parent, id, title, pos, size, style) {
1156 this->SetSizeHints(wxDefaultSize, wxSize(-1, -1));
1158 wxFlexGridSizer* fgSizer53;
1159 fgSizer53 =
new wxFlexGridSizer(0, 1, 0, 0);
1160 fgSizer53->SetFlexibleDirection(wxBOTH);
1161 fgSizer53->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1164 new wxNotebook(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0);
1165 wxScrolledWindow* 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);
1176 wxStaticBoxSizer* sbSizer101;
1177 sbSizer101 =
new wxStaticBoxSizer(
1178 new wxStaticBox(m_scSetDataPanel, wxID_ANY, _(
"Data Display Options")),
1181 wxFlexGridSizer* fgSizer15;
1182 fgSizer15 =
new wxFlexGridSizer(0, 3, 0, 0);
1183 fgSizer15->SetFlexibleDirection(wxBOTH);
1184 fgSizer15->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
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);
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));
1199 fgSizer15->Add(m_staticText12, 0, wxALL | wxEXPAND, 5);
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);
1209 new wxCheckBox(m_scSetDataPanel, wxID_ANY, _(
"Barbed Arrows"),
1210 wxDefaultPosition, wxDefaultSize, 0);
1211 fgSizer15->Add(m_cbBarbedArrows, 0, wxBOTTOM | wxTOP, 5);
1213 m_fgBarbedData1 =
new wxFlexGridSizer(0, 1, 0, 0);
1214 m_fgBarbedData1->SetFlexibleDirection(wxBOTH);
1215 m_fgBarbedData1->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1217 wxString m_cBarbedColoursChoices[] = {_(
"Default Color"),
1218 _(
"Controlled Colors")};
1219 int m_cBarbedColoursNChoices =
1220 sizeof(m_cBarbedColoursChoices) /
sizeof(wxString);
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);
1227 wxFlexGridSizer* fgSizer42;
1228 fgSizer42 =
new wxFlexGridSizer(0, 2, 0, 0);
1229 fgSizer42->SetFlexibleDirection(wxBOTH);
1230 fgSizer42->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1232 wxStaticText* 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);
1240 new wxCheckBox(m_scSetDataPanel, BARBFIXSPACING, _(
"Fixed"),
1241 wxDefaultPosition, wxDefaultSize, 0);
1242 fgSizer42->Add(m_cBarbArrFixSpac, 0, wxLEFT | wxRIGHT | wxTOP, 5);
1244 fgSizer42->Add(0, 0, 1, wxEXPAND, 5);
1247 new wxCheckBox(m_scSetDataPanel, BARBMINSPACING, _(
"Minimum"),
1248 wxDefaultPosition, wxDefaultSize, 0);
1249 fgSizer42->Add(m_cBarbArrMinSpac, 0, wxBOTTOM | wxLEFT | wxRIGHT, 5);
1251 m_fgBarbedData1->Add(fgSizer42, 1, wxEXPAND, 0);
1253 fgSizer15->Add(m_fgBarbedData1, 1, wxEXPAND, 0);
1255 m_fgBarbedData2 =
new wxFlexGridSizer(0, 1, 0, 0);
1256 m_fgBarbedData2->SetFlexibleDirection(wxBOTH);
1257 m_fgBarbedData2->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
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);
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);
1269 fgSizer15->Add(m_fgBarbedData2, 1, wxEXPAND, 0);
1271 m_cbIsoBars =
new wxCheckBox(m_scSetDataPanel, wxID_ANY, _(
"IsoBars"),
1272 wxDefaultPosition, wxDefaultSize, 0);
1273 fgSizer15->Add(m_cbIsoBars, 0, wxBOTTOM | wxTOP, 5);
1275 m_fIsoBarSpacing =
new wxFlexGridSizer(0, 2, 0, 0);
1276 m_fIsoBarSpacing->SetFlexibleDirection(wxBOTH);
1277 m_fIsoBarSpacing->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
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);
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);
1289 fgSizer15->Add(m_fIsoBarSpacing, 1, wxALL | wxEXPAND, 0);
1291 m_fIsoBarVisibility =
new wxFlexGridSizer(0, 1, 0, 0);
1292 m_fIsoBarVisibility->SetFlexibleDirection(wxBOTH);
1293 m_fIsoBarVisibility->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
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);
1300 fgSizer15->Add(m_fIsoBarVisibility, 1, wxALL | wxEXPAND, 5);
1302 fgSizer15->Add(0, 0, 1, wxEXPAND, 5);
1304 m_cbAbbrIsoBarsNumbers =
1305 new wxCheckBox(m_scSetDataPanel, wxID_ANY, _(
"Abbreviated Numbers"),
1306 wxDefaultPosition, wxDefaultSize, 0);
1307 fgSizer15->Add(m_cbAbbrIsoBarsNumbers, 0, wxEXPAND, 5);
1309 fgSizer15->Add(0, 0, 1, wxEXPAND, 5);
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);
1316 m_fgDirArrData1 =
new wxFlexGridSizer(0, 1, 0, 0);
1317 m_fgDirArrData1->SetFlexibleDirection(wxBOTH);
1318 m_fgDirArrData1->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
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,
1331 wxFlexGridSizer* fgSizer43;
1332 fgSizer43 =
new wxFlexGridSizer(0, 2, 0, 0);
1333 fgSizer43->SetFlexibleDirection(wxBOTH);
1334 fgSizer43->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1336 wxStaticText* 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);
1343 m_cDirArrFixSpac =
new wxCheckBox(m_scSetDataPanel, DIRFIXSPACING, _(
"Fixed"),
1344 wxDefaultPosition, wxDefaultSize, 0);
1345 fgSizer43->Add(m_cDirArrFixSpac, 0, wxLEFT | wxRIGHT | wxTOP, 5);
1347 fgSizer43->Add(0, 0, 1, wxEXPAND, 5);
1350 new wxCheckBox(m_scSetDataPanel, DIRMINSPACING, _(
"Minimum"),
1351 wxDefaultPosition, wxDefaultSize, 0);
1352 fgSizer43->Add(m_cDirArrMinSpac, 0, wxBOTTOM | wxLEFT | wxRIGHT, 5);
1354 m_fgDirArrData1->Add(fgSizer43, 1, wxEXPAND, 0);
1356 fgSizer15->Add(m_fgDirArrData1, 1, wxEXPAND, 5);
1358 m_fgDirArrData2 =
new wxFlexGridSizer(0, 1, 0, 0);
1359 m_fgDirArrData2->SetFlexibleDirection(wxBOTH);
1360 m_fgDirArrData2->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1362 wxString m_cDirectionArrowSizeChoices[] = {_(
"Default 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);
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);
1377 fgSizer15->Add(m_fgDirArrData2, 1, wxEXPAND, 0);
1379 m_cbOverlayMap =
new wxCheckBox(m_scSetDataPanel, wxID_ANY, _(
"OverlayMap"),
1380 wxDefaultPosition, wxDefaultSize, 0);
1381 fgSizer15->Add(m_cbOverlayMap, 0, wxBOTTOM | wxTOP, 5);
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);
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);
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);
1401 m_cbNumbers =
new wxCheckBox(m_scSetDataPanel, wxID_ANY, _(
"Numbers"),
1402 wxDefaultPosition, wxDefaultSize, 0);
1403 fgSizer15->Add(m_cbNumbers, 0, wxBOTTOM | wxTOP, 5);
1405 m_fgNumData1 =
new wxFlexGridSizer(0, 2, 0, 0);
1406 m_fgNumData1->SetFlexibleDirection(wxBOTH);
1407 m_fgNumData1->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1409 wxStaticText* 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);
1416 m_cNumFixSpac =
new wxCheckBox(m_scSetDataPanel, NUMFIXSPACING, _(
"Fixed"),
1417 wxDefaultPosition, wxDefaultSize, 0);
1418 m_fgNumData1->Add(m_cNumFixSpac, 0, wxLEFT | wxRIGHT | wxTOP, 5);
1420 m_fgNumData1->Add(0, 0, 1, wxEXPAND, 5);
1422 m_cNumMinSpac =
new wxCheckBox(m_scSetDataPanel, NUMMINSPACING, _(
"Minimum"),
1423 wxDefaultPosition, wxDefaultSize, 0);
1424 m_fgNumData1->Add(m_cNumMinSpac, 0, wxBOTTOM | wxLEFT | wxRIGHT, 5);
1426 fgSizer15->Add(m_fgNumData1, 1, wxEXPAND, 0);
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);
1433 m_cbParticles =
new wxCheckBox(m_scSetDataPanel, wxID_ANY, _(
"Particle Map"),
1434 wxDefaultPosition, wxDefaultSize, 0);
1435 fgSizer15->Add(m_cbParticles, 0, wxBOTTOM | wxTOP, 5);
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);
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);
1447 m_sParticleDensity =
1448 new wxSlider(m_scSetDataPanel, wxID_ANY, 5, 1, 10, wxDefaultPosition,
1449 wxDefaultSize, wxSL_BOTTOM | wxSL_HORIZONTAL | wxSL_LABELS);
1451 fgSizer15->Add(m_sParticleDensity, 0, wxALL | wxEXPAND, 5);
1453 sbSizer101->Add(fgSizer15, 1, wxEXPAND, 5);
1455 m_fgSetDataSizer->Add(sbSizer101, 1, wxEXPAND | wxTOP, 10);
1457 m_fgSetDataSizer->Add(0, 0, 1, wxEXPAND, 5);
1459 wxStaticBoxSizer* sbSizer12;
1460 sbSizer12 =
new wxStaticBoxSizer(
1461 new wxStaticBox(m_scSetDataPanel, wxID_ANY,
1462 _(
"Transparency for all Overlay Maps")),
1465 wxFlexGridSizer* fgSizer34;
1466 fgSizer34 =
new wxFlexGridSizer(0, 2, 0, 0);
1467 fgSizer34->SetFlexibleDirection(wxBOTH);
1468 fgSizer34->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
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);
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));
1481 fgSizer34->Add(m_sTransparency, 0, wxALL | wxEXPAND, 5);
1483 sbSizer12->Add(fgSizer34, 1, wxEXPAND | wxLEFT, 5);
1485 m_fgSetDataSizer->Add(sbSizer12, 1, wxEXPAND | wxTOP, 10);
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);
1501 wxStaticBoxSizer* sbSizer121;
1502 sbSizer121 =
new wxStaticBoxSizer(
1503 new wxStaticBox(m_scSetPlaybackPanel, wxID_ANY, _(
"Playback Options")),
1506 wxFlexGridSizer* fgSizer48;
1507 fgSizer48 =
new wxFlexGridSizer(0, 1, 0, 0);
1508 fgSizer48->SetFlexibleDirection(wxBOTH);
1509 fgSizer48->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1511 wxStaticText* 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);
1518 wxFlexGridSizer* fgSizer480;
1519 fgSizer480 =
new wxFlexGridSizer(0, 4, 0, 0);
1520 fgSizer480->SetFlexibleDirection(wxBOTH);
1521 fgSizer480->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1523 fgSizer480->Add(0, 0, 1, wxLEFT | wxRIGHT, 15);
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);
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);
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);
1542 fgSizer48->Add(fgSizer480, 0, wxALL | wxEXPAND, 5);
1544 m_cLoopMode =
new wxCheckBox(m_scSetPlaybackPanel, wxID_ANY, _(
"Loop Mode"),
1545 wxDefaultPosition, wxDefaultSize, 0);
1546 fgSizer48->Add(m_cLoopMode, 0, wxALL, 5);
1548 wxFlexGridSizer* fgSizer481;
1549 fgSizer481 =
new wxFlexGridSizer(0, 3, 0, 0);
1550 fgSizer481->SetFlexibleDirection(wxBOTH);
1551 fgSizer481->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1553 fgSizer481->Add(0, 0, 1, wxLEFT | wxRIGHT, 15);
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);
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);
1571 fgSizer48->Add(fgSizer481, 0, wxALL, 5);
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);
1578 wxFlexGridSizer* fgSizer482;
1579 fgSizer482 =
new wxFlexGridSizer(0, 3, 0, 0);
1580 fgSizer482->SetFlexibleDirection(wxBOTH);
1581 fgSizer482->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1583 fgSizer482->Add(0, 0, 1, wxLEFT | wxRIGHT, 15);
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);
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);
1598 fgSizer48->Add(fgSizer482, 0, wxALL | wxEXPAND, 5);
1600 sbSizer121->Add(fgSizer48, 1, wxEXPAND | wxALL, 5);
1602 m_fgSetPlaybackSizer->Add(sbSizer121, 1, wxEXPAND | wxTOP, 10);
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;
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);
1618 wxStaticBoxSizer* sbSizer9;
1619 sbSizer9 =
new wxStaticBoxSizer(
1620 new wxStaticBox(m_scSetGuiPanel, wxID_ANY, _(
"Dialogs Style")),
1623 wxFlexGridSizer* fgSizer47;
1624 fgSizer47 =
new wxFlexGridSizer(0, 1, 0, 0);
1625 fgSizer47->SetFlexibleDirection(wxBOTH);
1626 fgSizer47->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
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);
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);
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);
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);
1654 sbSizer9->Add(fgSizer47, 1, wxEXPAND, 5);
1656 m_fgSetGuiSizer->Add(sbSizer9, 1, wxEXPAND | wxTOP, 10);
1658 m_fgSetGuiSizer->Add(0, 0, 1, wxALL, 5);
1660 wxStaticBoxSizer* sbSizer10;
1661 sbSizer10 =
new wxStaticBoxSizer(
1662 new wxStaticBox(m_scSetGuiPanel, wxID_ANY, _(
"Buttons Visibility")),
1665 wxFlexGridSizer* fgSizer52;
1666 fgSizer52 =
new wxFlexGridSizer(0, 4, 0, 0);
1667 fgSizer52->SetFlexibleDirection(wxBOTH);
1668 fgSizer52->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
1670 fgSizer52->Add(0, 0, 1, wxEXPAND, 5);
1672 fgSizer52->Add(0, 0, 1, wxEXPAND, 5);
1674 wxStaticText* 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);
1681 wxStaticText* 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);
1688 m_biAltitude =
new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1689 wxDefaultPosition, wxDefaultSize, 0);
1690 fgSizer52->Add(m_biAltitude, 0, wxALL, 2);
1692 wxStaticText* 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);
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);
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);
1709 m_biNow =
new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1710 wxDefaultPosition, wxDefaultSize, 0);
1711 fgSizer52->Add(m_biNow, 0, wxALL, 3);
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);
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);
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);
1729 m_biZoomToCenter =
new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1730 wxDefaultPosition, wxDefaultSize, 0);
1731 fgSizer52->Add(m_biZoomToCenter, 0, wxALL, 3);
1733 wxStaticText* 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);
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);
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);
1750 m_biShowCursorData =
1751 new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1752 wxDefaultPosition, wxDefaultSize, 0);
1753 fgSizer52->Add(m_biShowCursorData, 0, wxALL, 3);
1755 wxStaticText* 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);
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);
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);
1772 m_biPlay =
new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1773 wxDefaultPosition, wxDefaultSize, 0);
1774 fgSizer52->Add(m_biPlay, 0, wxALL, 3);
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);
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);
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);
1792 m_biTimeSlider =
new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1793 wxDefaultPosition, wxDefaultSize, 0);
1794 fgSizer52->Add(m_biTimeSlider, 0, wxALL, 3);
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);
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);
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);
1812 m_biOpenFile =
new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1813 wxDefaultPosition, wxDefaultSize, 0);
1814 fgSizer52->Add(m_biOpenFile, 0, wxALL, 3);
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);
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);
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);
1832 m_biSettings =
new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1833 wxDefaultPosition, wxDefaultSize, 0);
1834 fgSizer52->Add(m_biSettings, 0, wxALL, 3);
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);
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);
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);
1852 m_biRequest =
new wxStaticBitmap(m_scSetGuiPanel, wxID_ANY, wxNullBitmap,
1853 wxDefaultPosition, wxDefaultSize, 0);
1854 fgSizer52->Add(m_biRequest, 0, wxALL, 3);
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);
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);
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);
1872 sbSizer10->Add(fgSizer52, 1, wxEXPAND, 5);
1874 m_fgSetGuiSizer->Add(sbSizer10, 1, wxEXPAND | wxTOP, 5);
1876 m_scSetGuiPanel->SetSizer(m_fgSetGuiSizer);
1877 m_scSetGuiPanel->Layout();
1878 m_fgSetGuiSizer->Fit(m_scSetGuiPanel);
1879 m_nSettingsBook->AddPage(m_scSetGuiPanel, _(
"GUI"),
true);
1881 fgSizer53->Add(m_nSettingsBook, 1, wxEXPAND | wxALL, 5);
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();
1892 fgSizer53->Add(m_sButton, 1, wxEXPAND, 5);
1894 this->SetSizer(fgSizer53);
1896 fgSizer53->Fit(
this);
1898 this->Centre(wxBOTH);
1901 m_nSettingsBook->Connect(
1902 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
1903 wxNotebookEventHandler(GribSettingsDialogBase::OnPageChange),
nullptr,
1905 m_cDataType->Connect(
1906 wxEVT_COMMAND_CHOICE_SELECTED,
1907 wxCommandEventHandler(GribSettingsDialogBase::OnDataTypeChoice),
nullptr,
1909 m_cDataUnits->Connect(
1910 wxEVT_COMMAND_CHOICE_SELECTED,
1911 wxCommandEventHandler(GribSettingsDialogBase::OnUnitChange),
nullptr,
1913 m_cBarbArrFixSpac->Connect(
1914 wxEVT_COMMAND_CHECKBOX_CLICKED,
1915 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
1917 m_cBarbArrMinSpac->Connect(
1918 wxEVT_COMMAND_CHECKBOX_CLICKED,
1919 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
1921 m_cDirArrFixSpac->Connect(
1922 wxEVT_COMMAND_CHECKBOX_CLICKED,
1923 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
1925 m_cDirArrMinSpac->Connect(
1926 wxEVT_COMMAND_CHECKBOX_CLICKED,
1927 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
1929 m_cNumFixSpac->Connect(
1930 wxEVT_COMMAND_CHECKBOX_CLICKED,
1931 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
1933 m_cNumMinSpac->Connect(
1934 wxEVT_COMMAND_CHECKBOX_CLICKED,
1935 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
1937 m_sTransparency->Connect(
1939 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1941 m_sTransparency->Connect(
1942 wxEVT_SCROLL_BOTTOM,
1943 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1945 m_sTransparency->Connect(
1946 wxEVT_SCROLL_LINEUP,
1947 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1949 m_sTransparency->Connect(
1950 wxEVT_SCROLL_LINEDOWN,
1951 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1953 m_sTransparency->Connect(
1954 wxEVT_SCROLL_PAGEUP,
1955 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1957 m_sTransparency->Connect(
1958 wxEVT_SCROLL_PAGEDOWN,
1959 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1961 m_sTransparency->Connect(
1962 wxEVT_SCROLL_THUMBTRACK,
1963 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1965 m_sTransparency->Connect(
1966 wxEVT_SCROLL_THUMBRELEASE,
1967 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1969 m_sTransparency->Connect(
1970 wxEVT_SCROLL_CHANGED,
1971 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
1973 m_cLoopMode->Connect(
1974 wxEVT_COMMAND_CHECKBOX_CLICKED,
1975 wxCommandEventHandler(GribSettingsDialogBase::OnIntepolateChange),
1977 m_cInterpolate->Connect(
1978 wxEVT_COMMAND_CHECKBOX_CLICKED,
1979 wxCommandEventHandler(GribSettingsDialogBase::OnIntepolateChange),
1981 m_rbCurDataAttaWCap->Connect(
1982 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
1983 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
1985 m_rbCurDataAttaWoCap->Connect(
1986 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
1987 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
1989 m_rbCurDataIsolHoriz->Connect(
1990 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
1991 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
1993 m_rbCurDataIsolVertic->Connect(
1994 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
1995 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
1997 m_sButtonApply->Connect(
1998 wxEVT_COMMAND_BUTTON_CLICKED,
1999 wxCommandEventHandler(GribSettingsDialogBase::OnApply),
nullptr,
this);
2002GribSettingsDialogBase::~GribSettingsDialogBase() {
2004 m_nSettingsBook->Disconnect(
2005 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
2006 wxNotebookEventHandler(GribSettingsDialogBase::OnPageChange),
nullptr,
2008 m_cDataType->Disconnect(
2009 wxEVT_COMMAND_CHOICE_SELECTED,
2010 wxCommandEventHandler(GribSettingsDialogBase::OnDataTypeChoice),
nullptr,
2012 m_cDataUnits->Disconnect(
2013 wxEVT_COMMAND_CHOICE_SELECTED,
2014 wxCommandEventHandler(GribSettingsDialogBase::OnUnitChange),
nullptr,
2017 wxEVT_COMMAND_CHECKBOX_CLICKED,
2018 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
2020 m_cBarbArrMinSpac->Disconnect(
2021 wxEVT_COMMAND_CHECKBOX_CLICKED,
2022 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
2024 m_cDirArrFixSpac->Disconnect(
2025 wxEVT_COMMAND_CHECKBOX_CLICKED,
2026 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
2028 m_cDirArrMinSpac->Disconnect(
2029 wxEVT_COMMAND_CHECKBOX_CLICKED,
2030 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
2032 m_cNumFixSpac->Disconnect(
2033 wxEVT_COMMAND_CHECKBOX_CLICKED,
2034 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
2036 m_cNumMinSpac->Disconnect(
2037 wxEVT_COMMAND_CHECKBOX_CLICKED,
2038 wxCommandEventHandler(GribSettingsDialogBase::OnSpacingModeChange),
2040 m_sTransparency->Disconnect(
2042 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2044 m_sTransparency->Disconnect(
2045 wxEVT_SCROLL_BOTTOM,
2046 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2048 m_sTransparency->Disconnect(
2049 wxEVT_SCROLL_LINEUP,
2050 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2052 m_sTransparency->Disconnect(
2053 wxEVT_SCROLL_LINEDOWN,
2054 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2056 m_sTransparency->Disconnect(
2057 wxEVT_SCROLL_PAGEUP,
2058 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2060 m_sTransparency->Disconnect(
2061 wxEVT_SCROLL_PAGEDOWN,
2062 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2064 m_sTransparency->Disconnect(
2065 wxEVT_SCROLL_THUMBTRACK,
2066 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2068 m_sTransparency->Disconnect(
2069 wxEVT_SCROLL_THUMBRELEASE,
2070 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2072 m_sTransparency->Disconnect(
2073 wxEVT_SCROLL_CHANGED,
2074 wxScrollEventHandler(GribSettingsDialogBase::OnTransparencyChange),
2076 m_cLoopMode->Disconnect(
2077 wxEVT_COMMAND_CHECKBOX_CLICKED,
2078 wxCommandEventHandler(GribSettingsDialogBase::OnIntepolateChange),
2080 m_cInterpolate->Disconnect(
2081 wxEVT_COMMAND_CHECKBOX_CLICKED,
2082 wxCommandEventHandler(GribSettingsDialogBase::OnIntepolateChange),
2084 m_rbCurDataAttaWCap->Disconnect(
2085 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
2086 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
2088 m_rbCurDataAttaWoCap->Disconnect(
2089 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
2090 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
2092 m_rbCurDataIsolHoriz->Disconnect(
2093 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
2094 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
2096 m_rbCurDataIsolVertic->Disconnect(
2097 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
2098 wxCommandEventHandler(GribSettingsDialogBase::OnCtrlandDataStyleChanged),
2100 m_sButtonApply->Disconnect(
2101 wxEVT_COMMAND_BUTTON_CLICKED,
2102 wxCommandEventHandler(GribSettingsDialogBase::OnApply),
nullptr,
this);
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);
2112 wxBoxSizer* itemBoxSizerMainPanel =
new wxBoxSizer(wxVERTICAL);
2113 SetSizer(itemBoxSizerMainPanel);
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);
2120 wxBoxSizer* bSizerPrefsMain =
new wxBoxSizer(wxVERTICAL);
2121 scrollWin->SetSizer(bSizerPrefsMain);
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");
2136 m_sdbSizer2->AddButton(help_btn);
2138 m_sdbSizer2->Realize();
2140 itemBoxSizerMainPanel->Add(m_sdbSizer2, 0, wxEXPAND, 5);
2142 wxStaticBoxSizer* sbSizer9;
2143 sbSizer9 =
new wxStaticBoxSizer(
2144 new wxStaticBox(scrollWin, wxID_ANY, _(
"General Options")), wxVERTICAL);
2146 wxFlexGridSizer* fgSizer46;
2147 fgSizer46 =
new wxFlexGridSizer(0, 1, 0, 0);
2148 fgSizer46->SetFlexibleDirection(wxBOTH);
2149 fgSizer46->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2152 new wxCheckBox(scrollWin, wxID_ANY, _(
"Use High Definition Graphics"),
2153 wxDefaultPosition, wxDefaultSize, 0);
2154 fgSizer46->Add(m_cbUseHiDef, 0, wxALL, 5);
2156 m_cbUseGradualColors =
2157 new wxCheckBox(scrollWin, wxID_ANY, _(
"Use Gradual Colors"),
2158 wxDefaultPosition, wxDefaultSize, 0);
2159 fgSizer46->Add(m_cbUseGradualColors, 0, wxALL, 5);
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);
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);
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);
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);
2181 sbSizer9->Add(fgSizer46, 1, wxEXPAND, 5);
2183 bSizerPrefsMain->Add(sbSizer9, 1, wxEXPAND, 5);
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);
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);
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);
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 );
2216 bSizerPrefsMain->Add(m_rbTimeFormat, 0, wxALL | wxEXPAND, 5);
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);
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);
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,
2246 m_rbStartOptions->Connect(
2247 wxEVT_COMMAND_RADIOBOX_SELECTED,
2248 wxCommandEventHandler(GribPreferencesDialogBase::OnStartOptionChange),
2250 m_sdbSizer2OK->Connect(
2251 wxEVT_COMMAND_BUTTON_CLICKED,
2252 wxCommandEventHandler(GribPreferencesDialogBase::OnOKClick),
nullptr,
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);
2263 wxBoxSizer* topSizer =
new wxBoxSizer(wxVERTICAL);
2266 wxBoxSizer* labelSizer =
new wxBoxSizer(wxHORIZONTAL);
2267 topSizer->Add(labelSizer, 0, wxEXPAND, 5);
2269 wxStaticText* labelBox =
2270 new wxStaticText(
this, wxID_ANY, _(
"GRIB PlugIn Preferences"),
2271 wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE);
2272 labelSizer->Add(labelBox, 1, wxEXPAND, 0);
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);
2279 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
2280 itemScrollWin->SetSizer(itemBoxSizer2);
2282 wxStaticBoxSizer* sbSizer9;
2283 sbSizer9 =
new wxStaticBoxSizer(
2284 new wxStaticBox(itemScrollWin, wxID_ANY, _(
"General Options")),
2286 itemBoxSizer2->Add(sbSizer9, 1, wxEXPAND, 5);
2289 new wxCheckBox(itemScrollWin, wxID_ANY, _(
"Use High Definition Graphics"),
2290 wxDefaultPosition, wxDefaultSize, 0);
2291 sbSizer9->Add(m_cbUseHiDef, 0, wxALL, 5);
2293 m_cbUseGradualColors =
2294 new wxCheckBox(itemScrollWin, wxID_ANY, _(
"Use Gradual Colors"),
2295 wxDefaultPosition, wxDefaultSize, 0);
2296 sbSizer9->Add(m_cbUseGradualColors, 0, wxALL, 5);
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);
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);
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);
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);
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);
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);
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);
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);
2343 wxString m_rbTimeFormatChoices[] = {_(
"Local Time"), _(
"UTC"),
2344 _(
"Honor Global Settings")};
2345 int m_rbTimeFormatNChoices =
sizeof(m_rbTimeFormatChoices) /
sizeof(wxString);
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);
2353 wxBoxSizer* m_sdbButtonSizer =
new wxBoxSizer(wxHORIZONTAL);
2354 topSizer->Add(m_sdbButtonSizer, 0, wxEXPAND, 5);
2356 wxButton* m_sdbButtonSizerOK =
new wxButton(
this, wxID_OK);
2357 m_sdbButtonSizer->Add(m_sdbButtonSizerOK, 0, wxALL | wxALIGN_RIGHT, 15);
2359 wxButton* m_sdbButtonSizerCancel =
new wxButton(
this, wxID_CANCEL);
2360 m_sdbButtonSizer->Add(m_sdbButtonSizerCancel, 0, wxALL | wxALIGN_RIGHT, 15);
2363 m_rbStartOptions->Connect(
2364 wxEVT_COMMAND_RADIOBOX_SELECTED,
2365 wxCommandEventHandler(GribPreferencesDialogBase::OnStartOptionChange),
2367 m_sdbButtonSizerOK->Connect(
2368 wxEVT_COMMAND_BUTTON_CLICKED,
2369 wxCommandEventHandler(GribPreferencesDialogBase::OnOKClick),
nullptr,
2375GribPreferencesDialogBase::~GribPreferencesDialogBase() {
2377 m_rbStartOptions->Disconnect(
2378 wxEVT_COMMAND_RADIOBOX_SELECTED,
2379 wxCommandEventHandler(GribPreferencesDialogBase::OnStartOptionChange),
2383void GribPreferencesDialogBase::OnDirSelClick(wxCommandEvent& event) {
2386 this, &dir_spec, _(
"Choose GRIB File Directory"), m_grib_dir_sel);
2388 if (response == wxID_OK) {
2389 m_grib_dir_sel = dir_spec;
2393wxStaticBoxSizer* GribRequestSettingBase::createAreaSelectionSection(
2395 wxStaticBoxSizer* sbSizer81;
2396 sbSizer81 =
new wxStaticBoxSizer(
2397 new wxStaticBox(parent, wxID_ANY, _(
"Area Selection")), wxVERTICAL);
2399 wxFlexGridSizer* fgSizer36;
2400 fgSizer36 =
new wxFlexGridSizer(0, 2, 0, 0);
2401 fgSizer36->SetFlexibleDirection(wxBOTH);
2402 fgSizer36->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2404 wxFlexGridSizer* fgSizer37;
2405 fgSizer37 =
new wxFlexGridSizer(0, 1, 0, 0);
2406 fgSizer37->SetFlexibleDirection(wxBOTH);
2407 fgSizer37->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2409 wxBoxSizer* zoneSelBoxSizer =
new wxBoxSizer(wxVERTICAL);
2411 new wxRadioButton(parent,
AUTOSELECT, _(
"Current View"),
2412 wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
2414 wxDefaultPosition, wxDefaultSize);
2419 fgSizer37->Add(zoneSelBoxSizer, 0, wxLEFT | wxBOTTOM, 5);
2421 m_bpManualSelection =
2423 wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
2424 m_bpManualSelection->SetBitmapLabel(GRIBUICtrlBarBase::GetScaledBitmap(
2425 wxBitmap(selzone), _T(
"selzone"), ctrlBar->GetScaleFactor()));
2428 wxBitmap pressedBitmap = GRIBUICtrlBarBase::GetScaledBitmap(
2429 wxBitmap(selzone), _T(
"selzone"), ctrlBar->GetScaleFactor());
2431 pressedBitmap.ConvertToDisabled();
2432 m_bpManualSelection->SetBitmapPressed(pressedBitmap);
2434 m_bpManualSelection->SetToolTip(
2435 _(
"Click to select the download area, or Shift + Click + Drag on the "
2437 fgSizer37->Add(m_bpManualSelection, 0, wxLEFT, 5);
2439 fgSizer36->Add(fgSizer37, 1, wxEXPAND | wxLEFT, 5);
2441 fgZoneCoordinatesSizer =
new wxFlexGridSizer(0, 6, 0, 0);
2442 fgZoneCoordinatesSizer->SetFlexibleDirection(wxBOTH);
2443 fgZoneCoordinatesSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
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);
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);
2455 m_stMaxLatNS =
new wxStaticText(parent, wxID_ANY, _(
"N"), wxDefaultPosition,
2457 m_stMaxLatNS->Wrap(-1);
2458 fgZoneCoordinatesSizer->Add(m_stMaxLatNS, 0, wxRIGHT, 20);
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);
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);
2469 m_stMaxLonEW =
new wxStaticText(parent, wxID_ANY, _(
"E"), wxDefaultPosition,
2471 m_stMaxLonEW->Wrap(-1);
2472 fgZoneCoordinatesSizer->Add(m_stMaxLonEW, 0, wxRIGHT, 5);
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);
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);
2484 m_stMinLatNS =
new wxStaticText(parent, wxID_ANY, _(
"S"), wxDefaultPosition,
2486 m_stMinLatNS->Wrap(-1);
2487 fgZoneCoordinatesSizer->Add(m_stMinLatNS, 0, wxRIGHT | wxTOP, 5);
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);
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);
2499 m_stMinLonEW =
new wxStaticText(parent, wxID_ANY, _(
"W"), wxDefaultPosition,
2501 m_stMinLonEW->Wrap(-1);
2502 fgZoneCoordinatesSizer->Add(m_stMinLonEW, 0, wxRIGHT | wxTOP, 5);
2504 wxFlexGridSizer* fgSizer38;
2505 fgSizer38 =
new wxFlexGridSizer(0, 1, 0, 0);
2506 fgSizer38->Add(fgZoneCoordinatesSizer, 1, wxEXPAND | wxLEFT | wxTOP, 5);
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);
2512 fgSizer36->Add(fgSizer38, 1, wxEXPAND | wxLEFT | wxTOP, 5);
2514 sbSizer81->Add(fgSizer36, 1, wxBOTTOM | wxEXPAND | wxTOP, 5);
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);
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);
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);
2536 wxBoxSizer* bSizerWorld;
2537 bSizerWorld =
new wxBoxSizer(wxHORIZONTAL);
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);
2545 wxString m_chForecastLengthChoices[] = {_(
"24 hours"), _(
"3 days"),
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);
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);
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);
2571 bSizerWorld->Add(0, 0, 1, wxEXPAND, 5);
2573 m_btnDownloadWorld =
new wxButton(m_panelWorld, wxID_ANY, _(
"Download"),
2574 wxDefaultPosition, wxDefaultSize, 0);
2575 bSizerWorld->Add(m_btnDownloadWorld, 0, wxALL, 5);
2577 bSizerWorldDownload->Add(bSizerWorld, 0, wxEXPAND, 5);
2579 m_panelWorld->SetSizer(bSizerWorldDownload);
2580 m_panelWorld->Layout();
2581 bSizerWorldDownload->Fit(m_panelWorld);
2584void GribRequestSettingBase::createLocalModelsPanel() {
2585 m_panelLocalModels =
2586 new wxPanel(m_notebookGetGrib, wxID_ANY, wxDefaultPosition, wxDefaultSize,
2588 wxBoxSizer* bMainSizer;
2589 bMainSizer =
new wxBoxSizer(wxVERTICAL);
2591 wxBoxSizer* bSizerSource;
2592 bSizerSource =
new wxBoxSizer(wxHORIZONTAL);
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);
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);
2604 bMainSizer->Add(bSizerSource, 1, wxEXPAND, 5);
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);
2612 wxBoxSizer* bSizerLocalButtons;
2613 bSizerLocalButtons =
new wxBoxSizer(wxHORIZONTAL);
2615 m_buttonUpdateCatalog =
2616 new wxButton(m_panelLocalModels, wxID_ANY, _(
"Update Catalog"),
2617 wxDefaultPosition, wxDefaultSize, 0);
2618 bSizerLocalButtons->Add(m_buttonUpdateCatalog, 0, wxALL, 5);
2620 bSizerLocalButtons->Add(0, 0, 1, wxEXPAND, 5);
2622 m_btnDownloadLocal =
new wxButton(m_panelLocalModels, wxID_ANY, _(
"Download"),
2623 wxDefaultPosition, wxDefaultSize, 0);
2624 bSizerLocalButtons->Add(m_btnDownloadLocal, 0, wxALL, 5);
2626 bMainSizer->Add(bSizerLocalButtons, 0, wxEXPAND, 5);
2628 m_panelLocalModels->SetSizer(bMainSizer);
2629 m_panelLocalModels->Layout();
2630 bMainSizer->Fit(m_panelLocalModels);
2633void GribRequestSettingBase::createEmailPanel() {
2634 m_panelEmail =
new wxPanel(m_notebookGetGrib, wxID_ANY, wxDefaultPosition,
2635 wxDefaultSize, wxTAB_TRAVERSAL);
2637 wxFlexGridSizer* fgSizer101;
2638 fgSizer101 =
new wxFlexGridSizer(0, 1, 0, 0);
2639 fgSizer101->SetFlexibleDirection(wxBOTH);
2640 fgSizer101->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
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);
2650 wxStaticBoxSizer* sbSizer7;
2651 sbSizer7 =
new wxStaticBoxSizer(
2652 new wxStaticBox(m_sScrolledDialog, wxID_ANY, _(
"Profile")), wxVERTICAL);
2654 wxFlexGridSizer* fgSizer17;
2655 fgSizer17 =
new wxFlexGridSizer(0, 1, 0, 0);
2656 fgSizer17->SetFlexibleDirection(wxBOTH);
2657 fgSizer17->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
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);
2664 wxStaticText* 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);
2671 m_pSenderAddress =
new wxTextCtrl(m_sScrolledDialog, wxID_ANY, wxEmptyString,
2672 wxDefaultPosition, wxDefaultSize, 0);
2673 m_pSenderSizer->Add(m_pSenderAddress, 0, wxALL | wxEXPAND, 5);
2675 wxStaticLine* m_staticline4;
2677 new wxStaticLine(m_sScrolledDialog, wxID_ANY, wxDefaultPosition,
2678 wxDefaultSize, wxLI_HORIZONTAL);
2679 m_pSenderSizer->Add(m_staticline4, 0, wxEXPAND | wxALL, 5);
2681 wxStaticLine* m_staticline5;
2683 new wxStaticLine(m_sScrolledDialog, wxID_ANY, wxDefaultPosition,
2684 wxDefaultSize, wxLI_HORIZONTAL);
2685 m_pSenderSizer->Add(m_staticline5, 0, wxEXPAND | wxALL, 5);
2687 fgSizer17->Add(m_pSenderSizer, 1, wxEXPAND, 5);
2689 wxFlexGridSizer* fgSizer9;
2690 fgSizer9 =
new wxFlexGridSizer(0, 3, 0, 0);
2691 fgSizer9->SetFlexibleDirection(wxBOTH);
2692 fgSizer9->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2694 wxFlexGridSizer* fgSizer33;
2695 fgSizer33 =
new wxFlexGridSizer(0, 2, 0, 0);
2696 fgSizer33->SetFlexibleDirection(wxBOTH);
2697 fgSizer33->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
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);
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);
2711 wxStaticText* 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,
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);
2725 fgSizer9->Add(fgSizer33, 1, wxEXPAND, 5);
2727 wxFlexGridSizer* fgSizer32;
2728 fgSizer32 =
new wxFlexGridSizer(0, 2, 0, 0);
2729 fgSizer32->SetFlexibleDirection(wxBOTH);
2730 fgSizer32->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2732 m_cMovingGribEnabled =
2733 new wxCheckBox(m_sScrolledDialog, wxID_ANY, _(
"Moving Grib"),
2734 wxDefaultPosition, wxDefaultSize, 0);
2735 fgSizer32->Add(m_cMovingGribEnabled, 0, wxALL, 5);
2737 m_fgMovingParams =
new wxFlexGridSizer(0, 3, 0, 0);
2738 m_fgMovingParams->SetFlexibleDirection(wxBOTH);
2739 m_fgMovingParams->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
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);
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);
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,
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);
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);
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,
2776 fgSizer32->Add(m_fgMovingParams, 1, wxEXPAND, 5);
2778 fgSizer9->Add(fgSizer32, 1, wxEXPAND, 5);
2780 m_fgLog =
new wxFlexGridSizer(0, 2, 0, 0);
2781 m_fgLog->SetFlexibleDirection(wxBOTH);
2782 m_fgLog->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2784 wxStaticText* m_tLogin;
2785 m_tLogin =
new wxStaticText(m_sScrolledDialog, wxID_ANY, _(
"zyGrib Login"),
2786 wxDefaultPosition, wxDefaultSize, 0);
2788 m_fgLog->Add(m_tLogin, 0, wxALL, 5);
2790 m_pLogin =
new wxTextCtrl(m_sScrolledDialog, wxID_ANY, wxEmptyString,
2791 wxDefaultPosition, wxDefaultSize, 0);
2792 m_fgLog->Add(m_pLogin, 0, wxALL, 5);
2794 wxStaticText* m_tCode;
2795 m_tCode =
new wxStaticText(m_sScrolledDialog, wxID_ANY, _(
"zyGrib Code"),
2796 wxDefaultPosition, wxDefaultSize, 0);
2798 m_fgLog->Add(m_tCode, 0, wxALL, 5);
2800 m_pCode =
new wxTextCtrl(m_sScrolledDialog, wxID_ANY, wxEmptyString,
2801 wxDefaultPosition, wxDefaultSize, 0);
2802 m_fgLog->Add(m_pCode, 0, wxALL, 5);
2804 fgSizer9->Add(m_fgLog, 1, wxEXPAND, 5);
2806 fgSizer17->Add(fgSizer9, 1, wxEXPAND, 10);
2808 wxFlexGridSizer* fgSizer13;
2809 fgSizer13 =
new wxFlexGridSizer(0, 9, 0, 0);
2810 fgSizer13->SetFlexibleDirection(wxBOTH);
2811 fgSizer13->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2813 wxStaticText* 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);
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);
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);
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);
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);
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);
2849 wxStaticText* 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);
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);
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);
2867 fgSizer17->Add(fgSizer13, 1, wxEXPAND, 5);
2869 sbSizer7->Add(fgSizer17, 1, wxEXPAND, 5);
2871 m_fgScrollSizer->Add(sbSizer7, 1, wxEXPAND, 5);
2877 wxStaticBoxSizer* sbSizer8;
2878 sbSizer8 =
new wxStaticBoxSizer(
2879 new wxStaticBox(m_sScrolledDialog, wxID_ANY, _(
"Data Selection")),
2882 wxFlexGridSizer* fgSizer10;
2883 fgSizer10 =
new wxFlexGridSizer(0, 3, 0, 0);
2884 fgSizer10->SetFlexibleDirection(wxBOTH);
2885 fgSizer10->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2887 m_pWind =
new wxCheckBox(m_sScrolledDialog, wxID_ANY, _(
"Wind"),
2888 wxDefaultPosition, wxDefaultSize, 0);
2889 fgSizer10->Add(m_pWind, 0, wxALL | wxEXPAND, 5);
2891 m_pPress =
new wxCheckBox(m_sScrolledDialog, wxID_ANY, _(
"Pressure"),
2892 wxDefaultPosition, wxDefaultSize, 0);
2893 fgSizer10->Add(m_pPress, 0, wxALL | wxEXPAND, 5);
2895 m_pWindGust =
new wxCheckBox(m_sScrolledDialog, wxID_ANY, _(
"Wind Gust"),
2896 wxDefaultPosition, wxDefaultSize, 0);
2897 fgSizer10->Add(m_pWindGust, 0, wxALL | wxEXPAND, 5);
2899 m_pRainfall =
new wxCheckBox(m_sScrolledDialog, wxID_ANY, _(
"Rainfall"),
2900 wxDefaultPosition, wxDefaultSize, 0);
2901 fgSizer10->Add(m_pRainfall, 0, wxALL | wxEXPAND, 5);
2903 m_pCloudCover =
new wxCheckBox(m_sScrolledDialog, wxID_ANY, _(
"Cloud Cover"),
2904 wxDefaultPosition, wxDefaultSize, 0);
2905 fgSizer10->Add(m_pCloudCover, 0, wxALL | wxEXPAND, 5);
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);
2913 m_pCAPE =
new wxCheckBox(m_sScrolledDialog, wxID_ANY, _(
"CAPE"),
2914 wxDefaultPosition, wxDefaultSize, 0);
2915 fgSizer10->Add(m_pCAPE, 0, wxALL | wxEXPAND, 5);
2918 new wxCheckBox(m_sScrolledDialog, wxID_ANY, _(
"Comp. Reflect."),
2919 wxDefaultPosition, wxDefaultSize, 0);
2920 fgSizer10->Add(m_pReflectivity, 0, wxALL | wxEXPAND, 5);
2923 new wxCheckBox(m_sScrolledDialog, wxID_ANY, _(
"Sea Temperature(surf.)"),
2924 wxDefaultPosition, wxDefaultSize, 0);
2925 fgSizer10->Add(m_pSeaTemp, 0, wxALL | wxEXPAND, 5);
2927 m_pCurrent =
new wxCheckBox(m_sScrolledDialog, wxID_ANY, _(
"Current"),
2928 wxDefaultPosition, wxDefaultSize, 0);
2929 fgSizer10->Add(m_pCurrent, 0, wxALL | wxEXPAND, 5);
2931 wxFlexGridSizer* fgSizer28;
2932 fgSizer28 =
new wxFlexGridSizer(0, 2, 0, 0);
2933 fgSizer28->SetFlexibleDirection(wxBOTH);
2934 fgSizer28->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2936 m_pWaves =
new wxCheckBox(m_sScrolledDialog, wxID_ANY, _(
"Waves"),
2937 wxDefaultPosition, wxDefaultSize, 0);
2938 fgSizer28->Add(m_pWaves, 0, wxALL, 5);
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);
2946 fgSizer10->Add(fgSizer28, 1, wxEXPAND, 5);
2948 wxFlexGridSizer* fgSizer331;
2949 fgSizer331 =
new wxFlexGridSizer(0, 2, 0, 0);
2950 fgSizer331->SetFlexibleDirection(wxBOTH);
2951 fgSizer331->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
2954 new wxCheckBox(m_sScrolledDialog, wxID_ANY, _(
"Geopotential Height"),
2955 wxDefaultPosition, wxDefaultSize, 0);
2956 fgSizer331->Add(m_pAltitudeData, 0, wxALL | wxEXPAND, 5);
2958 fgSizer10->Add(fgSizer331, 1, wxEXPAND, 5);
2960 m_fgAltitudeData =
new wxFlexGridSizer(0, 2, 0, 0);
2961 m_fgAltitudeData->SetFlexibleDirection(wxBOTH);
2962 m_fgAltitudeData->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
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);
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);
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);
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);
2982 fgSizer10->Add(m_fgAltitudeData, 1, wxEXPAND, 5);
2984 sbSizer8->Add(fgSizer10, 1, wxEXPAND, 5);
2986 m_fgScrollSizer->Add(sbSizer8, 1, wxEXPAND | wxTOP, 5);
2988 wxStaticBoxSizer* sbSizer6;
2989 sbSizer6 =
new wxStaticBoxSizer(
2990 new wxStaticBox(m_sScrolledDialog, wxID_ANY, _(
"Mail")), wxVERTICAL);
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);
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);
3003 sbSizer6->Add(fgSizer11, 1, wxEXPAND, 5);
3005 m_fgScrollSizer->Add(sbSizer6, 1, wxEXPAND, 5);
3007 m_sScrolledDialog->SetSizer(m_fgScrollSizer);
3008 m_sScrolledDialog->Layout();
3009 m_fgScrollSizer->Fit(m_sScrolledDialog);
3010 fgSizer101->Add(m_sScrolledDialog, 1, 0, 5);
3012 m_fgFixedSizer =
new wxFlexGridSizer(0, 3, 0, 0);
3013 m_fgFixedSizer->SetFlexibleDirection(wxBOTH);
3014 m_fgFixedSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
3016 wxStaticText* 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);
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);
3028 m_tLimit =
new wxStaticText(m_panelEmail, wxID_ANY, _(
" (Max size )"),
3029 wxDefaultPosition, wxDefaultSize, 0);
3031 m_fgFixedSizer->Add(m_tLimit, 0, wxALL, 5);
3033 fgSizer101->Add(m_fgFixedSizer, 1, wxEXPAND, 5);
3035 wxBoxSizer* buttonSizer =
new wxBoxSizer(wxHORIZONTAL);
3039 fgSizer101->Add(buttonSizer, 0, wxEXPAND | wxALL, 5);
3041 m_panelEmail->SetSizer(fgSizer101);
3042 m_panelEmail->Layout();
3043 fgSizer101->Fit(m_panelEmail);
3048 const wxString& title,
3050 const wxSize& size,
long style)
3051 : wxDialog(parent, id, title, pos, size, style) {
3052 this->SetSizeHints(wxDefaultSize, wxDefaultSize);
3054 wxBoxSizer* bSizerMain;
3055 bSizerMain =
new wxBoxSizer(wxVERTICAL);
3058 new wxNotebook(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0);
3062 m_notebookGetGrib->AddPage(m_panelWorld, _(
"World"),
true);
3065 createLocalModelsPanel();
3066 m_notebookGetGrib->AddPage(m_panelLocalModels, _(
"Local models"),
false);
3070 m_notebookGetGrib->AddPage(m_panelEmail, _(
"e-mail"),
false);
3074 new XyGribPanel(m_notebookGetGrib, wxID_ANY, wxDefaultPosition,
3075 wxDefaultSize, wxTAB_TRAVERSAL);
3077 m_notebookGetGrib->AddPage(m_xygribPanel, _(
"XyGrib"),
false);
3080 wxStaticBoxSizer* sbSizer81 = createAreaSelectionSection(
this, parent);
3081 bSizerMain->Add(sbSizer81, 0, wxEXPAND | wxALL, 5);
3085 bSizerMain->Add(m_notebookGetGrib, 1, wxEXPAND | wxALL, 5);
3088 wxBoxSizer* bottomButtonSizer =
new wxBoxSizer(wxHORIZONTAL);
3089 m_rButtonCancel =
new wxButton(
this, wxID_CANCEL, _(
"Cancel"));
3090 bottomButtonSizer->Add(m_rButtonCancel, 0, wxALL, 5);
3092 bottomButtonSizer->AddStretchSpacer();
3094 m_rButtonApply =
new wxButton(
this, wxID_APPLY);
3095 bottomButtonSizer->Add(m_rButtonApply, 0, wxALL, 5);
3097 bSizerMain->Add(bottomButtonSizer, 0, wxEXPAND | wxALL, 5);
3099 this->SetSizer(bSizerMain);
3102 bSizerMain->Fit(
this);
3104 this->Centre(wxBOTH);
3107 this->Connect(wxEVT_CLOSE_WINDOW,
3108 wxCloseEventHandler(GribRequestSettingBase::OnClose));
3109 m_chForecastLength->Connect(
3110 wxEVT_COMMAND_CHOICE_SELECTED,
3111 wxCommandEventHandler(GribRequestSettingBase::OnWorldLengthChoice),
3113 m_btnDownloadWorld->Connect(
3114 wxEVT_COMMAND_BUTTON_CLICKED,
3115 wxCommandEventHandler(GribRequestSettingBase::OnWorldDownload),
nullptr,
3117 m_SourcesTreeCtrl1->Connect(
3118 wxEVT_COMMAND_TREE_ITEM_EXPANDED,
3119 wxTreeEventHandler(GribRequestSettingBase::OnLocalTreeItemExpanded),
3121 m_SourcesTreeCtrl1->Connect(
3122 wxEVT_COMMAND_TREE_SEL_CHANGED,
3123 wxTreeEventHandler(GribRequestSettingBase::OnLocalTreeSelChanged),
3125 m_buttonUpdateCatalog->Connect(
3126 wxEVT_COMMAND_BUTTON_CLICKED,
3127 wxCommandEventHandler(GribRequestSettingBase::OnUpdateLocalCatalog),
3129 m_btnDownloadLocal->Connect(
3130 wxEVT_COMMAND_BUTTON_CLICKED,
3131 wxCommandEventHandler(GribRequestSettingBase::OnDownloadLocal),
nullptr,
3133 m_pMailTo->Connect(wxEVT_COMMAND_CHOICE_SELECTED,
3134 wxCommandEventHandler(GribRequestSettingBase::OnTopChange),
3136 m_pModel->Connect(wxEVT_COMMAND_CHOICE_SELECTED,
3137 wxCommandEventHandler(GribRequestSettingBase::OnTopChange),
3139 m_cMovingGribEnabled->Connect(
3140 wxEVT_COMMAND_CHECKBOX_CLICKED,
3141 wxCommandEventHandler(GribRequestSettingBase::OnMovingClick),
nullptr,
3143 m_sMovingSpeed->Connect(
3144 wxEVT_COMMAND_SPINCTRL_UPDATED,
3145 wxSpinEventHandler(GribRequestSettingBase::OnAnySpinChange),
nullptr,
3147 m_sMovingCourse->Connect(
3148 wxEVT_COMMAND_SPINCTRL_UPDATED,
3149 wxSpinEventHandler(GribRequestSettingBase::OnAnySpinChange),
nullptr,
3151 m_pLogin->Connect(wxEVT_COMMAND_TEXT_UPDATED,
3152 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3154 m_pCode->Connect(wxEVT_COMMAND_TEXT_UPDATED,
3155 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3157 m_pResolution->Connect(
3158 wxEVT_COMMAND_CHOICE_SELECTED,
3159 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3161 m_pInterval->Connect(
3162 wxEVT_COMMAND_CHOICE_SELECTED,
3163 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3165 m_pTimeRange->Connect(
3166 wxEVT_COMMAND_CHOICE_SELECTED,
3167 wxCommandEventHandler(GribRequestSettingBase::OnTimeRangeChange),
nullptr,
3169 m_rbCurrentView->Connect(
3170 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
3171 wxCommandEventHandler(GribRequestSettingBase::OnZoneSelectionModeChange),
3173 m_rbManualSelect->Connect(
3174 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
3175 wxCommandEventHandler(GribRequestSettingBase::OnZoneSelectionModeChange),
3177 m_cUseSavedZone->Connect(
3178 wxEVT_COMMAND_CHECKBOX_CLICKED,
3179 wxCommandEventHandler(GribRequestSettingBase::OnZoneSelectionModeChange),
3181 m_spMaxLat->Connect(
3182 wxEVT_COMMAND_SPINCTRL_UPDATED,
3183 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange),
nullptr,
3185 m_spMaxLon->Connect(
3186 wxEVT_COMMAND_SPINCTRL_UPDATED,
3187 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange),
nullptr,
3189 m_spMinLat->Connect(
3190 wxEVT_COMMAND_SPINCTRL_UPDATED,
3191 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange),
nullptr,
3193 m_spMinLon->Connect(
3194 wxEVT_COMMAND_SPINCTRL_UPDATED,
3195 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange),
nullptr,
3197 m_pWind->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3198 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3200 m_pPress->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3201 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3203 m_pWindGust->Connect(
3204 wxEVT_COMMAND_CHECKBOX_CLICKED,
3205 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3207 m_pRainfall->Connect(
3208 wxEVT_COMMAND_CHECKBOX_CLICKED,
3209 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3211 m_pCloudCover->Connect(
3212 wxEVT_COMMAND_CHECKBOX_CLICKED,
3213 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3215 m_pAirTemp->Connect(
3216 wxEVT_COMMAND_CHECKBOX_CLICKED,
3217 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3219 m_pCAPE->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3220 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3222 m_pReflectivity->Connect(
3223 wxEVT_COMMAND_CHECKBOX_CLICKED,
3224 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3226 m_pSeaTemp->Connect(
3227 wxEVT_COMMAND_CHECKBOX_CLICKED,
3228 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3230 m_pCurrent->Connect(
3231 wxEVT_COMMAND_CHECKBOX_CLICKED,
3232 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3234 m_pWaves->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3235 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3237 m_pWModel->Connect(wxEVT_COMMAND_CHOICE_SELECTED,
3238 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3240 m_pAltitudeData->Connect(
3241 wxEVT_COMMAND_CHECKBOX_CLICKED,
3242 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3244 m_p850hpa->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3245 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3247 m_p700hpa->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3248 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3250 m_p500hpa->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3251 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3253 m_p300hpa->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
3254 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
3256 m_rButtonApply->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
3259 m_rButtonCancel->Connect(
3260 wxEVT_COMMAND_BUTTON_CLICKED,
3262 m_rButtonYes->Connect(
3263 wxEVT_COMMAND_BUTTON_CLICKED,
3267 m_xygribPanel->m_download_button->Connect(
3268 wxEVT_COMMAND_BUTTON_CLICKED,
3269 wxCommandEventHandler(GribRequestSettingBase::OnXyGribDownloadButton),
3271 m_xygribPanel->m_atmmodel_choice->Connect(
3272 wxEVT_COMMAND_CHOICE_SELECTED,
3273 wxCommandEventHandler(GribRequestSettingBase::OnXyGribAtmModelChoice),
3275 m_xygribPanel->m_wavemodel_choice->Connect(
3276 wxEVT_COMMAND_CHOICE_SELECTED,
3277 wxCommandEventHandler(GribRequestSettingBase::OnXyGribWaveModelChoice),
3279 m_xygribPanel->m_wind_cbox->Connect(
3280 wxEVT_COMMAND_CHECKBOX_CLICKED,
3281 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3283 m_xygribPanel->m_gust_cbox->Connect(
3284 wxEVT_COMMAND_CHECKBOX_CLICKED,
3285 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3287 m_xygribPanel->m_reflectivity_cbox->Connect(
3288 wxEVT_COMMAND_CHECKBOX_CLICKED,
3289 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3291 m_xygribPanel->m_precipitation_cbox->Connect(
3292 wxEVT_COMMAND_CHECKBOX_CLICKED,
3293 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3295 m_xygribPanel->m_cape_cbox->Connect(
3296 wxEVT_COMMAND_CHECKBOX_CLICKED,
3297 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3299 m_xygribPanel->m_pressure_cbox->Connect(
3300 wxEVT_COMMAND_CHECKBOX_CLICKED,
3301 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3303 m_xygribPanel->m_cloudcover_cbox->Connect(
3304 wxEVT_COMMAND_CHECKBOX_CLICKED,
3305 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3307 m_xygribPanel->m_temperature_cbox->Connect(
3308 wxEVT_COMMAND_CHECKBOX_CLICKED,
3309 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3311 m_xygribPanel->m_waveheight_cbox->Connect(
3312 wxEVT_COMMAND_CHECKBOX_CLICKED,
3313 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3315 m_xygribPanel->m_windwave_cbox->Connect(
3316 wxEVT_COMMAND_CHECKBOX_CLICKED,
3317 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3319 m_xygribPanel->m_resolution_choice->Connect(
3320 wxEVT_COMMAND_CHOICE_SELECTED,
3321 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3323 m_xygribPanel->m_duration_choice->Connect(
3324 wxEVT_COMMAND_CHOICE_SELECTED,
3325 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3327 m_xygribPanel->m_interval_choice->Connect(
3328 wxEVT_COMMAND_CHOICE_SELECTED,
3329 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3333GribRequestSettingBase::~GribRequestSettingBase() {
3335 this->Disconnect(wxEVT_CLOSE_WINDOW,
3336 wxCloseEventHandler(GribRequestSettingBase::OnClose));
3337 m_chForecastLength->Disconnect(
3338 wxEVT_COMMAND_CHOICE_SELECTED,
3339 wxCommandEventHandler(GribRequestSettingBase::OnWorldLengthChoice),
3341 m_btnDownloadWorld->Disconnect(
3342 wxEVT_COMMAND_BUTTON_CLICKED,
3343 wxCommandEventHandler(GribRequestSettingBase::OnWorldDownload),
nullptr,
3345 m_SourcesTreeCtrl1->Disconnect(
3346 wxEVT_COMMAND_TREE_ITEM_EXPANDED,
3347 wxTreeEventHandler(GribRequestSettingBase::OnLocalTreeItemExpanded),
3349 m_SourcesTreeCtrl1->Disconnect(
3350 wxEVT_COMMAND_TREE_SEL_CHANGED,
3351 wxTreeEventHandler(GribRequestSettingBase::OnLocalTreeSelChanged),
3353 m_buttonUpdateCatalog->Disconnect(
3354 wxEVT_COMMAND_BUTTON_CLICKED,
3355 wxCommandEventHandler(GribRequestSettingBase::OnUpdateLocalCatalog),
3357 m_btnDownloadLocal->Disconnect(
3358 wxEVT_COMMAND_BUTTON_CLICKED,
3359 wxCommandEventHandler(GribRequestSettingBase::OnDownloadLocal),
nullptr,
3361 m_pMailTo->Disconnect(
3362 wxEVT_COMMAND_CHOICE_SELECTED,
3363 wxCommandEventHandler(GribRequestSettingBase::OnTopChange),
nullptr,
3365 m_pModel->Disconnect(
3366 wxEVT_COMMAND_CHOICE_SELECTED,
3367 wxCommandEventHandler(GribRequestSettingBase::OnTopChange),
nullptr,
3369 m_cMovingGribEnabled->Disconnect(
3370 wxEVT_COMMAND_CHECKBOX_CLICKED,
3371 wxCommandEventHandler(GribRequestSettingBase::OnMovingClick),
nullptr,
3373 m_sMovingSpeed->Disconnect(
3374 wxEVT_COMMAND_SPINCTRL_UPDATED,
3375 wxSpinEventHandler(GribRequestSettingBase::OnAnySpinChange),
nullptr,
3377 m_sMovingCourse->Disconnect(
3378 wxEVT_COMMAND_SPINCTRL_UPDATED,
3379 wxSpinEventHandler(GribRequestSettingBase::OnAnySpinChange),
nullptr,
3381 m_pLogin->Disconnect(
3382 wxEVT_COMMAND_TEXT_UPDATED,
3383 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3385 m_pCode->Disconnect(
3386 wxEVT_COMMAND_TEXT_UPDATED,
3387 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3389 m_pResolution->Disconnect(
3390 wxEVT_COMMAND_CHOICE_SELECTED,
3391 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3393 m_pInterval->Disconnect(
3394 wxEVT_COMMAND_CHOICE_SELECTED,
3395 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3397 m_pTimeRange->Disconnect(
3398 wxEVT_COMMAND_CHOICE_SELECTED,
3399 wxCommandEventHandler(GribRequestSettingBase::OnTimeRangeChange),
nullptr,
3402 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
3403 wxCommandEventHandler(GribRequestSettingBase::OnZoneSelectionModeChange),
3406 wxEVT_COMMAND_RADIOBUTTON_SELECTED,
3407 wxCommandEventHandler(GribRequestSettingBase::OnZoneSelectionModeChange),
3409 m_cUseSavedZone->Disconnect(
3410 wxEVT_COMMAND_CHECKBOX_CLICKED,
3411 wxCommandEventHandler(GribRequestSettingBase::OnZoneSelectionModeChange),
3414 wxEVT_COMMAND_SPINCTRL_UPDATED,
3415 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange),
nullptr,
3418 wxEVT_COMMAND_SPINCTRL_UPDATED,
3419 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange),
nullptr,
3422 wxEVT_COMMAND_SPINCTRL_UPDATED,
3423 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange),
nullptr,
3426 wxEVT_COMMAND_SPINCTRL_UPDATED,
3427 wxSpinEventHandler(GribRequestSettingBase::OnCoordinatesChange),
nullptr,
3429 m_pWind->Disconnect(
3430 wxEVT_COMMAND_CHECKBOX_CLICKED,
3431 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3433 m_pPress->Disconnect(
3434 wxEVT_COMMAND_CHECKBOX_CLICKED,
3435 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3437 m_pWindGust->Disconnect(
3438 wxEVT_COMMAND_CHECKBOX_CLICKED,
3439 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3441 m_pRainfall->Disconnect(
3442 wxEVT_COMMAND_CHECKBOX_CLICKED,
3443 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3445 m_pCloudCover->Disconnect(
3446 wxEVT_COMMAND_CHECKBOX_CLICKED,
3447 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3449 m_pAirTemp->Disconnect(
3450 wxEVT_COMMAND_CHECKBOX_CLICKED,
3451 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3453 m_pCAPE->Disconnect(
3454 wxEVT_COMMAND_CHECKBOX_CLICKED,
3455 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3457 m_pReflectivity->Disconnect(
3458 wxEVT_COMMAND_CHECKBOX_CLICKED,
3459 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3461 m_pSeaTemp->Disconnect(
3462 wxEVT_COMMAND_CHECKBOX_CLICKED,
3463 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3465 m_pCurrent->Disconnect(
3466 wxEVT_COMMAND_CHECKBOX_CLICKED,
3467 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3469 m_pWaves->Disconnect(
3470 wxEVT_COMMAND_CHECKBOX_CLICKED,
3471 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3473 m_pWModel->Disconnect(
3474 wxEVT_COMMAND_CHOICE_SELECTED,
3475 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3477 m_pAltitudeData->Disconnect(
3478 wxEVT_COMMAND_CHECKBOX_CLICKED,
3479 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3481 m_p850hpa->Disconnect(
3482 wxEVT_COMMAND_CHECKBOX_CLICKED,
3483 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3485 m_p700hpa->Disconnect(
3486 wxEVT_COMMAND_CHECKBOX_CLICKED,
3487 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3489 m_p500hpa->Disconnect(
3490 wxEVT_COMMAND_CHECKBOX_CLICKED,
3491 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3493 m_p300hpa->Disconnect(
3494 wxEVT_COMMAND_CHECKBOX_CLICKED,
3495 wxCommandEventHandler(GribRequestSettingBase::OnAnyChange),
nullptr,
3498 wxEVT_COMMAND_BUTTON_CLICKED,
3501 wxEVT_COMMAND_BUTTON_CLICKED,
3504 wxEVT_COMMAND_BUTTON_CLICKED,
3508 m_xygribPanel->m_download_button->Disconnect(
3509 wxEVT_COMMAND_BUTTON_CLICKED,
3510 wxCommandEventHandler(GribRequestSettingBase::OnXyGribDownloadButton),
3512 m_xygribPanel->m_atmmodel_choice->Disconnect(
3513 wxEVT_COMMAND_CHOICE_SELECTED,
3514 wxCommandEventHandler(GribRequestSettingBase::OnXyGribAtmModelChoice),
3516 m_xygribPanel->m_wavemodel_choice->Disconnect(
3517 wxEVT_COMMAND_CHOICE_SELECTED,
3518 wxCommandEventHandler(GribRequestSettingBase::OnXyGribWaveModelChoice),
3520 m_xygribPanel->m_wind_cbox->Disconnect(
3521 wxEVT_COMMAND_CHECKBOX_CLICKED,
3522 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3524 m_xygribPanel->m_gust_cbox->Disconnect(
3525 wxEVT_COMMAND_CHECKBOX_CLICKED,
3526 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3528 m_xygribPanel->m_reflectivity_cbox->Disconnect(
3529 wxEVT_COMMAND_CHECKBOX_CLICKED,
3530 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3532 m_xygribPanel->m_precipitation_cbox->Disconnect(
3533 wxEVT_COMMAND_CHECKBOX_CLICKED,
3534 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3536 m_xygribPanel->m_cape_cbox->Disconnect(
3537 wxEVT_COMMAND_CHECKBOX_CLICKED,
3538 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3540 m_xygribPanel->m_pressure_cbox->Disconnect(
3541 wxEVT_COMMAND_CHECKBOX_CLICKED,
3542 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3544 m_xygribPanel->m_cloudcover_cbox->Disconnect(
3545 wxEVT_COMMAND_CHECKBOX_CLICKED,
3546 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3548 m_xygribPanel->m_temperature_cbox->Disconnect(
3549 wxEVT_COMMAND_CHECKBOX_CLICKED,
3550 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3552 m_xygribPanel->m_waveheight_cbox->Disconnect(
3553 wxEVT_COMMAND_CHECKBOX_CLICKED,
3554 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3556 m_xygribPanel->m_windwave_cbox->Disconnect(
3557 wxEVT_COMMAND_CHECKBOX_CLICKED,
3558 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3560 m_xygribPanel->m_resolution_choice->Disconnect(
3561 wxEVT_COMMAND_CHOICE_SELECTED,
3562 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3564 m_xygribPanel->m_duration_choice->Disconnect(
3565 wxEVT_COMMAND_CHOICE_SELECTED,
3566 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
3568 m_xygribPanel->m_interval_choice->Disconnect(
3569 wxEVT_COMMAND_CHOICE_SELECTED,
3570 wxCommandEventHandler(GribRequestSettingBase::OnXyGribConfigChange),
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));
3580 wxBoxSizer* bSizer1;
3581 bSizer1 =
new wxBoxSizer(wxVERTICAL);
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);
3589 wxFlexGridSizer* fgSizer19;
3590 fgSizer19 =
new wxFlexGridSizer(0, 2, 0, 0);
3591 fgSizer19->SetFlexibleDirection(wxBOTH);
3592 fgSizer19->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_NONE);
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);
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);
3604 fgSizer18->Add(fgSizer19, 1, wxEXPAND, 10);
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);
3612 m_pGribTable =
new CustomGrid(
this, wxID_ANY, wxDefaultPosition,
3613 wxSize(-1, 50), 0, _T(
" "));
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);
3622 fgSizer18->Add(fgSizer20, 1, wxEXPAND, 5);
3624 wxStdDialogButtonSizer* m_pButtonTable =
new wxStdDialogButtonSizer();
3625 m_pButtonTableOK =
new wxButton(
this, wxID_OK, _(
"Close"));
3627 m_pButtonTable->AddButton(m_pButtonTableOK);
3628 m_pButtonTable->Realize();
3630 fgSizer18->Add(m_pButtonTable, 1, wxEXPAND, 5);
3632 bSizer1->Add(fgSizer18, 1, wxEXPAND, 5);
3634 this->SetSizer(bSizer1);
3638 this->Centre(wxBOTH);
3641 this->Connect(wxEVT_CLOSE_WINDOW,
3642 wxCloseEventHandler(GRIBTableBase::OnClose));
3643 m_pButtonTableOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
3644 wxCommandEventHandler(GRIBTableBase::OnOKButton),
3648GRIBTableBase::~GRIBTableBase() {
3650 this->Disconnect(wxEVT_CLOSE_WINDOW,
3651 wxCloseEventHandler(GRIBTableBase::OnClose));
3652 m_pButtonTableOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
3653 wxCommandEventHandler(GRIBTableBase::OnOKButton),
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);
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);
3669 m_stCourse =
new wxStaticText(
this, wxID_ANY, _(
"Course"), wxDefaultPosition,
3671 m_stCourse->Wrap(-1);
3672 bSizerProjectBoat->Add(m_stCourse, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
3674 m_tCourse =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
3676 bSizerProjectBoat->Add(m_tCourse, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
3678 m_stSpeed =
new wxStaticText(
this, wxID_ANY, _(
"Speed"), wxDefaultPosition,
3680 m_stSpeed->Wrap(-1);
3681 bSizerProjectBoat->Add(m_stSpeed, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
3683 m_tSpeed =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition,
3685 bSizerProjectBoat->Add(m_tSpeed, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
3687 m_stSpeedUnit =
new wxStaticText(
this, wxID_ANY, wxT(
"kt"), wxDefaultPosition,
3689 m_stSpeedUnit->Wrap(-1);
3690 bSizerProjectBoat->Add(m_stSpeedUnit, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
3692 this->SetSizer(bSizerProjectBoat);
3696ProjectBoatPanel::~ProjectBoatPanel() {}
3698double ProjectBoatPanel::GetCourse() {
3700 if (m_tCourse->GetValue().ToDouble(&val)) {
3706double ProjectBoatPanel::GetSpeed() {
3708 if (m_tSpeed->GetValue().ToDouble(&val)) {
3714bool ProjectBoatPanel::ProjectionEnabled() {
3715 return m_cbProjectPosition->IsChecked();
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.
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.
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.