- Added wxH[V]ScrolledWindow (Brad Anderson, Bryan Petty).
- Added wxNotificationMessage class for non-intrusive notifications
- Added wxWindow::Show/HideWithEffect()
+- Added wxWrapSizer
- Added wxDC::StretchBlit() for wxMac and wxMSW (Vince Harron).
- Added support for drop down toolbar buttons (Tim Kosse).
- Added support for labels for toolbar controls (Vince Harron).
- Added support for resizing wxWizard bitmaps to the current page height,
via SetBitmapPlacement, SetBitmapBackgroundColour and SetMinimumBitmapWidth.
Also made it easier to derive from wxWizard and override behaviour.
-- Added wxWrapSizer
- Made wxSizer::Fit() set the client size of the target window
+- Add support for wxDatePickerCtrl in wxGenericValidator (Herry Ayen Yang)
wxGTK:
Constructor taking a wxArrayInt pointer. This will be used for wxListBox, wxCheckListBox.
+\func{}{wxGenericValidator}{\param{wxDateTime*}{ valPtr}}
+
+Constructor taking a \helpref{wxDateTime}{wxdatetime} pointer. This will be
+used for \helpref{wxDatePickerCtrl}{wxdatepickerctrl}.
+
\wxheading{Parameters}
\docparam{validator}{Validator to copy.}
#if wxUSE_VALIDATORS
+class WXDLLIMPEXP_FWD_BASE wxDateTime;
+
class WXDLLEXPORT wxGenericValidator: public wxValidator
{
DECLARE_CLASS(wxGenericValidator)
wxGenericValidator(int* val);
wxGenericValidator(wxString* val);
wxGenericValidator(wxArrayInt* val);
+#if wxUSE_DATETIME
+ wxGenericValidator(wxDateTime* val);
+#endif // wxUSE_DATETIME
wxGenericValidator(const wxGenericValidator& copyFrom);
virtual ~wxGenericValidator(){}
int* m_pInt;
wxString* m_pString;
wxArrayInt* m_pArrayInt;
+#if wxUSE_DATETIME
+ wxDateTime* m_pDateTime;
+#endif // wxUSE_DATETIME
private:
// Cannot use
#endif
#include "wx/spinctrl.h"
+#include "wx/datectrl.h"
#if wxUSE_SPINBTN
#include "wx/spinbutt.h"
m_pArrayInt = val;
}
+#if wxUSE_DATETIME
+
+wxGenericValidator::wxGenericValidator(wxDateTime *val)
+{
+ Initialize();
+ m_pDateTime = val;
+}
+
+#endif // wxUSE_DATETIME
+
wxGenericValidator::wxGenericValidator(const wxGenericValidator& val)
: wxValidator()
{
m_pInt = val.m_pInt;
m_pString = val.m_pString;
m_pArrayInt = val.m_pArrayInt;
+#if wxUSE_DATETIME
+ m_pDateTime = val.m_pDateTime;
+#endif // wxUSE_DATETIME
return true;
}
} else
#endif
+ // date time controls
+#if wxUSE_DATEPICKCTRL
+ if (m_validatorWindow->IsKindOf(CLASSINFO(wxDatePickerCtrl)) )
+ {
+ wxDatePickerCtrl* pControl = (wxDatePickerCtrl*) m_validatorWindow;
+ if (m_pDateTime)
+ {
+ pControl->SetValue(*m_pDateTime) ;
+ return true;
+ }
+ } else
+#endif
+
// string controls
#if wxUSE_BUTTON
if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
} else
#endif
+ // DATE TIME CONTROLS ************************************
+#if wxUSE_DATEPICKCTRL
+ if (m_validatorWindow->IsKindOf(CLASSINFO(wxDatePickerCtrl)) )
+ {
+ wxDatePickerCtrl* pControl = (wxDatePickerCtrl*) m_validatorWindow;
+ if (m_pDateTime)
+ {
+ *m_pDateTime = pControl->GetValue() ;
+ return true;
+ }
+ } else
+#endif
+
// STRING CONTROLS ************************************
#if wxUSE_BUTTON
if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
m_pInt = 0;
m_pString = 0;
m_pArrayInt = 0;
+#if wxUSE_DATETIME
+ m_pDateTime = 0;
+#endif // wxUSE_DATETIME
}
-#endif
- // wxUSE_VALIDATORS
+#endif // wxUSE_VALIDATORS