]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/datectrl.h
override GetDefaultBorder() to return wxBORDER_NONE, radio buttons shouldn't have...
[wxWidgets.git] / include / wx / palmos / datectrl.h
CommitLineData
324eeecb
WS
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/palmos/datectrl.h
3// Purpose: wxDatePickerCtrl for PalmOS
4// Author: Wlodzimierz ABX Skiba
5// Modified by:
6// Created: 02/15/05
7// RCS-ID: $Id$
8// Copyright: (c) Wlodzimierz Skiba
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_PALMOS_DATECTRL_H_
13#define _WX_PALMOS_DATECTRL_H_
14
15// ----------------------------------------------------------------------------
16// wxDatePickerCtrl
17// ----------------------------------------------------------------------------
18
19class WXDLLIMPEXP_ADV wxDatePickerCtrl : public wxDatePickerCtrlBase
20{
21public:
22 // ctors
60582201 23 wxDatePickerCtrl() { Init(); }
324eeecb
WS
24
25 wxDatePickerCtrl(wxWindow *parent,
26 wxWindowID id,
27 const wxDateTime& dt = wxDefaultDateTime,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
31 const wxValidator& validator = wxDefaultValidator,
32 const wxString& name = wxDatePickerCtrlNameStr)
33 {
60582201 34 Init();
324eeecb
WS
35 Create(parent, id, dt, pos, size, style, validator, name);
36 }
37
38 bool Create(wxWindow *parent,
39 wxWindowID id,
40 const wxDateTime& dt = wxDefaultDateTime,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
43 long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
44 const wxValidator& validator = wxDefaultValidator,
45 const wxString& name = wxDatePickerCtrlNameStr);
46
47 // set/get the date
48 virtual void SetValue(const wxDateTime& dt);
49 virtual wxDateTime GetValue() const;
50
51 // set/get the allowed valid range for the dates, if either/both of them
52 // are invalid, there is no corresponding limit and if neither is set
53 // GetRange() returns false
54 virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2);
55 virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const;
56
6a27c749
WS
57 // send a notification event, return true if processed
58 bool SendClickEvent();
59
324eeecb
WS
60protected:
61 virtual wxSize DoGetBestSize() const;
62
60582201
WS
63private:
64 wxDateTime m_dt;
65
66 void Init() { m_dt = wxDateTime::Today(); }
67
a69e2a0a
VZ
68
69 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl)
324eeecb
WS
70};
71
72#endif // _WX_PALMOS_DATECTRL_H_