fixes for MSW
[wxWidgets.git] / src / generic / datectlg.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: generic/datectlg.cpp
3 // Purpose: generic wxDatePickerCtrlGeneric implementation
4 // Author: Andreas Pflug
5 // Modified by:
6 // Created: 2005-01-19
7 // RCS-ID: $Id$
8 // Copyright: (c) 2005 Andreas Pflug <pgadmin@pse-consulting.de>
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 #include "wx/wxprec.h"
21
22 #ifdef __BORLANDC__
23 #pragma hdrstop
24 #endif
25
26 #if wxUSE_DATEPICKCTRL
27
28 #include "wx/datectrl.h"
29
30 // use this version if we're explicitly requested to do it or if it's the only
31 // one we have
32 #if wxUSE_DATEPICKCTRL_GENERIC || !defined(wxHAS_NATIVE_DATEPICKCTRL)
33
34 #ifndef WX_PRECOMP
35 #include "wx/bmpbuttn.h"
36 #include "wx/dialog.h"
37 #include "wx/dcmemory.h"
38 #include "wx/panel.h"
39 #include "wx/textctrl.h"
40 #include "wx/valtext.h"
41 #endif
42
43 #ifdef wxHAS_NATIVE_DATEPICKCTRL
44 // this header is not included from wx/datectrl.h if we have a native
45 // version, but we do need it here
46 #include "wx/generic/datectrl.h"
47 #else
48 // we need to define _WX_DEFINE_DATE_EVENTS_ before including wx/dateevt.h to
49 // define the event types we use if we're the only date picker control version
50 // being compiled -- otherwise it's defined in the native version implementation
51 #define _WX_DEFINE_DATE_EVENTS_
52 #endif
53
54 #include "wx/dateevt.h"
55
56 #include "wx/calctrl.h"
57 #include "wx/renderer.h"
58
59 // ----------------------------------------------------------------------------
60 // constants
61 // ----------------------------------------------------------------------------
62
63 enum
64 {
65 CTRLID_TXT = 101,
66 CTRLID_CAL,
67 CTRLID_BTN,
68 CTRLID_PAN
69 };
70
71 #ifndef DEFAULT_ITEM_WIDTH
72 #define DEFAULT_ITEM_WIDTH 100
73 #endif
74
75 #ifdef __WXMSW__
76 #undef wxUSE_POPUPWIN
77 #define wxUSE_POPUPWIN 0 // Popup not working
78 #define TXTCTRL_FLAGS wxNO_BORDER
79 #define BTN_FLAGS wxNO_BORDER
80 #define CALBORDER 0
81 #define RIGHTBUTTONBORDER 3
82 #define TOPBUTTONBORDER 0
83 #define BUTTONBORDER 3
84 #define TXTPOSY 1
85 #else
86 #define TXTCTRL_FLAGS 0
87 #define BTN_FLAGS wxBU_AUTODRAW
88 #define CALBORDER 4
89 #define RIGHTBUTTONBORDER 0
90 #define TOPBUTTONBORDER 0
91 #define BUTTONBORDER 0
92 #define TXTPOSY 0
93 #endif
94
95
96 // ----------------------------------------------------------------------------
97 // local classes
98 // ----------------------------------------------------------------------------
99
100
101 class wxDropdownButton : public wxBitmapButton
102 {
103 public:
104 wxDropdownButton() { Init(); }
105 wxDropdownButton(wxWindow *parent,
106 wxWindowID id,
107 const wxPoint& pos = wxDefaultPosition,
108 const wxSize& size = wxDefaultSize,
109 long style=0,
110 const wxValidator& validator = wxDefaultValidator);
111
112 void Init()
113 {
114 m_borderX = -1;
115 m_borderY = -1;
116 }
117 bool Create(wxWindow *parent,
118 wxWindowID id,
119 const wxPoint& pos = wxDefaultPosition,
120 const wxSize& size = wxDefaultSize,
121 long style = 0,
122 const wxValidator& validator = wxDefaultValidator);
123
124 void DoMoveWindow(int x, int y, int w, int h);
125
126 protected:
127 int m_borderX, m_borderY;
128 };
129
130
131 wxDropdownButton::wxDropdownButton(wxWindow *parent,
132 wxWindowID id,
133 const wxPoint& pos,
134 const wxSize& size,
135 long style,
136 const wxValidator& validator)
137 {
138 Init();
139 Create(parent, id, pos, size, style, validator);
140 }
141
142
143 bool wxDropdownButton::Create(wxWindow *parent,
144 wxWindowID id,
145 const wxPoint& pos,
146 const wxSize& size,
147 long WXUNUSED(style),
148 const wxValidator& validator)
149 {
150 m_marginX = 0;
151 m_marginY = 0;
152
153 wxBitmap chkBmp(15,15); // arbitrary
154 if ( !wxBitmapButton::Create(parent, id, chkBmp,
155 pos, wxDefaultSize, BTN_FLAGS, validator) )
156 return false;
157
158 #if (BTNFLAGS & wxBU_AUTODRAW ) == 0
159 m_windowStyle |= wxBU_AUTODRAW;
160 #endif
161
162 const wxSize sz = GetSize();
163 int w = chkBmp.GetWidth(),
164 h = chkBmp.GetHeight();
165 m_borderX = sz.x - m_marginX - w;
166 m_borderY = sz.y - m_marginY - h;
167
168 w = size.x > 0 ? size.x : sz.x;
169 h = size.y > 0 ? size.y : sz.y;
170
171 DoMoveWindow(pos.x, pos.y, w, h);
172
173 return true;
174 }
175
176
177 void wxDropdownButton::DoMoveWindow(int x, int y, int w, int h)
178 {
179 if (m_borderX >= 0 && m_borderY >= 0 && (w >= 0 || h >= 0))
180 {
181 wxMemoryDC dc;
182 if (w < 0)
183 w = GetSize().x;
184 #ifdef __WXGTK__
185 else
186 w = m_marginX + m_borderX + 15; // GTK magic size
187 #endif
188 if (h < 0)
189 h = GetSize().y;
190
191 int bw = w - m_marginX - m_borderX;
192 int bh = h - m_marginY - m_borderY;
193 if (bh < 11) bh=11;
194 if (bw < 9) bw=9;
195
196 wxBitmap bmp(bw, bh);
197 dc.SelectObject(bmp);
198
199 wxRendererNative::Get().DrawComboBoxDropButton(this, dc, wxRect(0,0,bw, bh));
200 SetBitmapLabel(bmp);
201 }
202
203 wxBitmapButton::DoMoveWindow(x, y, w, h);
204 }
205
206
207 #if wxUSE_POPUPWIN
208
209 #include "wx/popupwin.h"
210
211 class wxDatePopupInternal : public wxPopupTransientWindow
212 {
213 public:
214 wxDatePopupInternal(wxWindow *parent) : wxPopupTransientWindow(parent) { }
215
216 void ShowAt(int x, int y)
217 {
218 Position(wxPoint(x, y), wxSize(0, 0));
219 Popup();
220 }
221
222 void Hide()
223 {
224 Dismiss();
225 }
226 };
227
228 #else // !wxUSE_POPUPWIN
229
230 class wxDatePopupInternal : public wxDialog
231 {
232 public:
233 wxDatePopupInternal(wxWindow *parent)
234 : wxDialog(parent,
235 wxID_ANY,
236 wxEmptyString,
237 wxDefaultPosition,
238 wxDefaultSize,
239 wxSIMPLE_BORDER)
240 {
241 }
242
243 void ShowAt(int x, int y)
244 {
245 Show();
246 Move(x, y);
247 }
248
249 void Hide()
250 {
251 wxDialog::Hide();
252 }
253 };
254
255 #endif // wxUSE_POPUPWIN/!wxUSE_POPUPWIN
256
257 // ============================================================================
258 // wxDatePickerCtrlGeneric implementation
259 // ============================================================================
260
261 BEGIN_EVENT_TABLE(wxDatePickerCtrlGeneric, wxDatePickerCtrlBase)
262 EVT_BUTTON(CTRLID_BTN, wxDatePickerCtrlGeneric::OnClick)
263 EVT_TEXT(CTRLID_TXT, wxDatePickerCtrlGeneric::OnText)
264 EVT_CHILD_FOCUS(wxDatePickerCtrlGeneric::OnChildSetFocus)
265 END_EVENT_TABLE()
266
267 #ifndef wxHAS_NATIVE_DATEPICKCTRL
268 IMPLEMENT_DYNAMIC_CLASS(wxDatePickerCtrl, wxControl)
269 #endif
270
271 // ----------------------------------------------------------------------------
272 // creation
273 // ----------------------------------------------------------------------------
274
275 bool wxDatePickerCtrlGeneric::Create(wxWindow *parent,
276 wxWindowID id,
277 const wxDateTime& date,
278 const wxPoint& pos,
279 const wxSize& size,
280 long style,
281 const wxValidator& validator,
282 const wxString& name)
283 {
284 wxASSERT_MSG( !(style & wxDP_SPIN),
285 _T("wxDP_SPIN style not supported, use wxDP_DEFAULT") );
286
287 if ( !wxControl::Create(parent, id, pos, size,
288 style | wxCLIP_CHILDREN | wxWANTS_CHARS,
289 validator, name) )
290
291 {
292 return false;
293 }
294
295 InheritAttributes();
296
297 m_txt = new wxTextCtrl(this, CTRLID_TXT, wxEmptyString, wxDefaultPosition, wxDefaultSize, TXTCTRL_FLAGS);
298
299 m_txt->Connect(wxEVT_KEY_DOWN,
300 wxKeyEventHandler(wxDatePickerCtrlGeneric::OnEditKey),
301 NULL, this);
302 m_txt->Connect(wxEVT_KILL_FOCUS,
303 wxFocusEventHandler(wxDatePickerCtrlGeneric::OnKillFocus),
304 NULL, this);
305
306 const int height = m_txt->GetBestSize().y - BUTTONBORDER;
307
308 m_btn = new wxDropdownButton(this, CTRLID_BTN, wxDefaultPosition, wxSize(height, height));
309
310 m_popup = new wxDatePopupInternal(this);
311 m_popup->SetFont(GetFont());
312
313 wxPanel *panel=new wxPanel(m_popup, CTRLID_PAN,
314 wxPoint(0, 0), wxDefaultSize,
315 wxSUNKEN_BORDER);
316 m_cal = new wxCalendarCtrl(panel, CTRLID_CAL, wxDefaultDateTime,
317 wxPoint(0, 0), wxDefaultSize,
318 wxCAL_SHOW_HOLIDAYS | wxSUNKEN_BORDER);
319 m_cal->Connect(wxEVT_CALENDAR_SEL_CHANGED,
320 wxCalendarEventHandler(wxDatePickerCtrlGeneric::OnSelChange),
321 NULL, this);
322 m_cal->Connect(wxEVT_KEY_DOWN,
323 wxKeyEventHandler(wxDatePickerCtrlGeneric::OnCalKey),
324 NULL, this);
325 m_cal->Connect(wxEVT_CALENDAR_DOUBLECLICKED,
326 wxCalendarEventHandler(wxDatePickerCtrlGeneric::OnSelChange),
327 NULL, this);
328 m_cal->Connect(wxEVT_CALENDAR_DAY_CHANGED,
329 wxCalendarEventHandler(wxDatePickerCtrlGeneric::OnSelChange),
330 NULL, this);
331 m_cal->Connect(wxEVT_CALENDAR_MONTH_CHANGED,
332 wxCalendarEventHandler(wxDatePickerCtrlGeneric::OnSelChange),
333 NULL, this);
334 m_cal->Connect(wxEVT_CALENDAR_YEAR_CHANGED,
335 wxCalendarEventHandler(wxDatePickerCtrlGeneric::OnSelChange),
336 NULL, this);
337
338 wxWindow *yearControl = m_cal->GetYearControl();
339
340 Connect(wxEVT_SET_FOCUS,
341 wxFocusEventHandler(wxDatePickerCtrlGeneric::OnSetFocus));
342
343 wxClientDC dc(yearControl);
344 dc.SetFont(m_font);
345 wxCoord width, dummy;
346 dc.GetTextExtent(wxT("2000"), &width, &dummy);
347 width += ConvertDialogToPixels(wxSize(20, 0)).x;
348
349 wxSize calSize = m_cal->GetBestSize();
350 wxSize yearSize = yearControl->GetSize();
351 yearSize.x = width;
352
353 wxPoint yearPosition = yearControl->GetPosition();
354
355 SetFormat(wxT("%x"));
356
357 width = yearPosition.x + yearSize.x+2+CALBORDER/2;
358 if (width < calSize.x-4)
359 width = calSize.x-4;
360
361 int calPos = (width-calSize.x)/2;
362 if (calPos == -1)
363 {
364 calPos = 0;
365 width += 2;
366 }
367 m_cal->SetSize(calPos, 0, calSize.x, calSize.y);
368 yearControl->SetSize(width-yearSize.x-CALBORDER/2, yearPosition.y,
369 yearSize.x, yearSize.y);
370 m_cal->GetMonthControl()->Move(0, 0);
371
372
373
374 panel->SetClientSize(width+CALBORDER/2, calSize.y-2+CALBORDER);
375 m_popup->SetClientSize(panel->GetSize());
376 m_popup->Hide();
377
378 if (!date.IsValid())
379 date.Today();
380
381 SetValue(date);
382
383 SetBestFittingSize(size);
384
385 return true;
386 }
387
388
389 void wxDatePickerCtrlGeneric::Init()
390 {
391 m_popup = NULL;
392 m_txt = NULL;
393 m_cal = NULL;
394 m_btn = NULL;
395
396 m_dropped = false;
397 m_ignoreDrop = false;
398 }
399
400
401 bool wxDatePickerCtrlGeneric::Destroy()
402 {
403 if (m_cal)
404 m_cal->Destroy();
405 if (m_popup)
406 m_popup->Destroy();
407 if (m_txt)
408 m_txt->Destroy();
409 if (m_btn)
410 m_btn->Destroy();
411
412 m_popup = NULL;
413 m_txt = NULL;
414 m_cal = NULL;
415 m_btn = NULL;
416
417 return wxControl::Destroy();
418 }
419
420 // ----------------------------------------------------------------------------
421 // overridden base class methods
422 // ----------------------------------------------------------------------------
423
424 void wxDatePickerCtrlGeneric::DoMoveWindow(int x, int y, int w, int h)
425 {
426 wxControl::DoMoveWindow(x, y, w, h);
427 wxSize bs=m_btn->GetBestSize();
428 int eh=m_txt->GetBestSize().y;
429
430 m_txt->SetSize(0, TXTPOSY, w-bs.x-RIGHTBUTTONBORDER, h > eh ? eh-TXTPOSY : h-TXTPOSY);
431 m_btn->SetSize(w - bs.x-RIGHTBUTTONBORDER, TOPBUTTONBORDER, bs.x, h > bs.y ? bs.y : h);
432
433 if (m_dropped)
434 DropDown(true);
435 }
436
437 wxSize wxDatePickerCtrlGeneric::DoGetBestSize() const
438 {
439 int bh=m_btn->GetBestSize().y;
440 int eh=m_txt->GetBestSize().y;
441 return wxSize(DEFAULT_ITEM_WIDTH, bh > eh ? bh : eh);
442 }
443
444
445 bool wxDatePickerCtrlGeneric::Show(bool show)
446 {
447 if ( !wxControl::Show(show) )
448 {
449 return false;
450 }
451
452 if ( !show )
453 {
454 if ( m_popup )
455 {
456 m_popup->Hide();
457 m_dropped = false;
458 }
459 }
460
461 return true;
462 }
463
464
465 bool wxDatePickerCtrlGeneric::Enable(bool enable)
466 {
467 if ( !wxControl::Enable(enable) )
468 {
469 return false;
470 }
471
472 if ( !enable )
473 {
474 if ( m_cal )
475 m_cal->Hide();
476 }
477
478 if ( m_btn )
479 m_btn->Enable(enable);
480
481 return true;
482 }
483
484 // ----------------------------------------------------------------------------
485 // wxDatePickerCtrlGeneric API
486 // ----------------------------------------------------------------------------
487
488 bool
489 wxDatePickerCtrlGeneric::SetDateRange(const wxDateTime& lowerdate,
490 const wxDateTime& upperdate)
491 {
492 return m_cal->SetDateRange(lowerdate, upperdate);
493 }
494
495 bool wxDatePickerCtrlGeneric::SetFormat(const wxChar *fmt)
496 {
497 wxDateTime dt;
498 dt.ParseFormat(wxT("2003-10-13"), wxT("%Y-%m-%d"));
499 wxString str=dt.Format(fmt);
500 wxChar *p=(wxChar*)str.c_str();
501
502 m_format=wxEmptyString;
503
504 while (*p)
505 {
506 int n=wxAtoi(p);
507 if (n == dt.GetDay())
508 {
509 m_format.Append(wxT("%d"));
510 p += 2;
511 }
512 else if (n == (int)dt.GetMonth()+1)
513 {
514 m_format.Append(wxT("%m"));
515 p += 2;
516 }
517 else if (n == dt.GetYear())
518 {
519 m_format.Append(wxT("%Y"));
520 p += 4;
521 }
522 else if (n == (dt.GetYear() % 100))
523 {
524 if (GetWindowStyle() & wxDP_SHOWCENTURY)
525 m_format.Append(wxT("%Y"));
526 else
527 m_format.Append(wxT("%y"));
528 p += 2;
529 }
530 else
531 m_format.Append(*p++);
532 }
533
534 if (m_txt)
535 {
536 wxArrayString allowedChars;
537 for ( wxChar c = _T('0'); c <= _T('9'); c++ )
538 allowedChars.Add(wxString(c, 1));
539
540 const wxChar *p = m_format.c_str();
541 while (*p)
542 {
543 if (*p == '%')
544 p += 2;
545 else
546 allowedChars.Add(wxString(*p++, 1));
547 }
548
549 wxTextValidator tv(wxFILTER_INCLUDE_CHAR_LIST);
550 tv.SetIncludes(allowedChars);
551
552 m_txt->SetValidator(tv);
553
554 if (m_currentDate.IsValid())
555 m_txt->SetValue(m_currentDate.Format(m_format));
556 }
557
558 return true;
559 }
560
561
562 wxDateTime wxDatePickerCtrlGeneric::GetValue() const
563 {
564 return m_currentDate;
565 }
566
567
568 void wxDatePickerCtrlGeneric::SetValue(const wxDateTime& date)
569 {
570 if (m_cal)
571 {
572 if (date.IsValid())
573 m_txt->SetValue(date.Format(m_format));
574 else
575 {
576 wxASSERT_MSG( HasFlag(wxDP_ALLOWNONE),
577 _T("this control must have a valid date") );
578
579 m_txt->SetValue(wxEmptyString);
580 }
581
582 m_currentDate = date;
583 }
584 }
585
586
587 bool wxDatePickerCtrlGeneric::GetRange(wxDateTime *dt1, wxDateTime *dt2) const
588 {
589 if (dt1)
590 *dt1 = m_cal->GetLowerDateLimit();
591 if (dt1)
592 *dt2 = m_cal->GetUpperDateLimit();
593 return true;
594 }
595
596
597 void
598 wxDatePickerCtrlGeneric::SetRange(const wxDateTime &dt1, const wxDateTime &dt2)
599 {
600 m_cal->SetDateRange(dt1, dt2);
601 }
602
603 // ----------------------------------------------------------------------------
604 // event handlers
605 // ----------------------------------------------------------------------------
606
607 void wxDatePickerCtrlGeneric::DropDown(bool down)
608 {
609 if (m_popup)
610 {
611 if (down)
612 {
613 wxDateTime dt;
614 if (!m_txt->GetValue().empty())
615 dt.ParseFormat(m_txt->GetValue(), m_format);
616
617 if (dt.IsValid())
618 m_cal->SetDate(dt);
619 else
620 m_cal->SetDate(wxDateTime::Today());
621
622 wxPoint pos=GetParent()->ClientToScreen(GetPosition());
623 m_popup->ShowAt(pos.x, pos.y + GetSize().y);
624 m_dropped = true;
625 m_cal->SetFocus();
626 }
627 else
628 {
629 if (m_dropped)
630 m_popup->Hide();
631 m_dropped = false;
632 }
633 }
634 }
635
636
637 void wxDatePickerCtrlGeneric::OnChildSetFocus(wxChildFocusEvent &ev)
638 {
639 ev.Skip();
640 m_ignoreDrop = false;
641
642 wxWindow *w=(wxWindow*)ev.GetEventObject();
643 while (w)
644 {
645 if (w == m_popup)
646 return;
647 w = w->GetParent();
648 }
649
650 if (m_dropped)
651 {
652 DropDown(false);
653 if (ev.GetEventObject() == m_btn)
654 m_ignoreDrop = true;
655 }
656 }
657
658
659 void wxDatePickerCtrlGeneric::OnClick(wxCommandEvent& WXUNUSED(event))
660 {
661 if (m_ignoreDrop)
662 {
663 m_ignoreDrop = false;
664 m_txt->SetFocus();
665 }
666 else
667 {
668 DropDown();
669 m_cal->SetFocus();
670 }
671 }
672
673
674 void wxDatePickerCtrlGeneric::OnSetFocus(wxFocusEvent& WXUNUSED(ev))
675 {
676 if (m_txt)
677 {
678 m_txt->SetFocus();
679 m_txt->SetSelection(-1, -1); // select everything
680 }
681 }
682
683
684 void wxDatePickerCtrlGeneric::OnKillFocus(wxFocusEvent &ev)
685 {
686 ev.Skip();
687
688 wxDateTime dt;
689 dt.ParseFormat(m_txt->GetValue(), m_format);
690 if ( !dt.IsValid() )
691 {
692 if ( !HasFlag(wxDP_ALLOWNONE) )
693 dt = m_currentDate;
694 }
695
696 if(dt.IsValid())
697 m_txt->SetValue(dt.Format(m_format));
698 else
699 m_txt->SetValue(wxEmptyString);
700
701 // notify that we had to change the date after validation
702 if ( (dt.IsValid() && m_currentDate != dt) ||
703 (!dt.IsValid() && m_currentDate.IsValid()) )
704 {
705 m_currentDate = dt;
706 wxDateEvent event(this, dt, wxEVT_DATE_CHANGED);
707 GetEventHandler()->ProcessEvent(event);
708 }
709 }
710
711
712 void wxDatePickerCtrlGeneric::OnSelChange(wxCalendarEvent &ev)
713 {
714 if (m_cal)
715 {
716 m_currentDate = m_cal->GetDate();
717 m_txt->SetValue(m_currentDate.Format(m_format));
718 if (ev.GetEventType() == wxEVT_CALENDAR_DOUBLECLICKED)
719 {
720 DropDown(false);
721 m_txt->SetFocus();
722 }
723 }
724 ev.SetEventObject(this);
725 ev.SetId(GetId());
726 GetParent()->ProcessEvent(ev);
727
728 wxDateEvent dev(this, ev.GetDate(), wxEVT_DATE_CHANGED);
729 GetParent()->ProcessEvent(dev);
730 }
731
732
733 void wxDatePickerCtrlGeneric::OnText(wxCommandEvent &ev)
734 {
735 ev.SetEventObject(this);
736 ev.SetId(GetId());
737 GetParent()->ProcessEvent(ev);
738
739 // We'll create an additional event if the date is valid.
740 // If the date isn't valid, the user's probably in the middle of typing
741 wxString txt = m_txt->GetValue();
742 wxDateTime dt;
743 if (!txt.empty())
744 {
745 dt.ParseFormat(txt, m_format);
746 if (!dt.IsValid())
747 return;
748 }
749
750 wxCalendarEvent cev(m_cal, wxEVT_CALENDAR_SEL_CHANGED);
751 cev.SetEventObject(this);
752 cev.SetId(GetId());
753 cev.SetDate(dt);
754
755 GetParent()->ProcessEvent(cev);
756
757 wxDateEvent dev(this, dt, wxEVT_DATE_CHANGED);
758 GetParent()->ProcessEvent(dev);
759 }
760
761
762 void wxDatePickerCtrlGeneric::OnEditKey(wxKeyEvent & ev)
763 {
764 if (ev.GetKeyCode() == WXK_DOWN && !ev.HasModifiers())
765 DropDown(true);
766 else
767 ev.Skip();
768 }
769
770
771 void wxDatePickerCtrlGeneric::OnCalKey(wxKeyEvent & ev)
772 {
773 if (ev.GetKeyCode() == WXK_ESCAPE && !ev.HasModifiers())
774 DropDown(false);
775 else
776 ev.Skip();
777 }
778
779 #endif // wxUSE_DATEPICKCTRL_GENERIC
780
781 #endif // wxUSE_DATEPICKCTRL
782