datetimectrl.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/timectrl.h
  3. // Purpose: Declaration of wxDateTimePickerCtrl class.
  4. // Author: Vadim Zeitlin
  5. // Created: 2011-09-22
  6. // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
  7. // Licence: wxWindows licence
  8. ///////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_DATETIME_CTRL_H_
  10. #define _WX_DATETIME_CTRL_H_
  11. #include "wx/defs.h"
  12. #if wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
  13. #define wxNEEDS_DATETIMEPICKCTRL
  14. #include "wx/control.h" // the base class
  15. #include "wx/datetime.h"
  16. // ----------------------------------------------------------------------------
  17. // wxDateTimePickerCtrl: Private common base class of wx{Date,Time}PickerCtrl.
  18. // ----------------------------------------------------------------------------
  19. // This class is an implementation detail and should not be used directly, only
  20. // use the documented API of wxDateTimePickerCtrl and wxTimePickerCtrl.
  21. class WXDLLIMPEXP_ADV wxDateTimePickerCtrlBase : public wxControl
  22. {
  23. public:
  24. // Set/get the date or time (in the latter case, time part is ignored).
  25. virtual void SetValue(const wxDateTime& dt) = 0;
  26. virtual wxDateTime GetValue() const = 0;
  27. };
  28. #if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
  29. #include "wx/msw/datetimectrl.h"
  30. #elif defined(__WXOSX_COCOA__) && !defined(__WXUNIVERSAL__)
  31. #include "wx/osx/datetimectrl.h"
  32. #else
  33. typedef wxDateTimePickerCtrlBase wxDateTimePickerCtrl;
  34. #endif
  35. #endif // wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
  36. #endif // _WX_DATETIME_CTRL_H_