]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/datectrl.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/datectrl.cpp
3 // Purpose: wxDatePickerCtrl implementation
4 // Author: Wlodzimierz ABX Skiba
8 // Copyright: (c) Wlodzimierz Skiba
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 #include "wx/wxprec.h"
29 #if wxUSE_DATEPICKCTRL
31 #include "wx/datectrl.h"
34 #include "wx/dynlib.h"
36 #define _WX_DEFINE_DATE_EVENTS_
37 #include "wx/dateevt.h"
39 // ============================================================================
41 // ============================================================================
43 // ----------------------------------------------------------------------------
44 // wxDatePickerCtrl creation
45 // ----------------------------------------------------------------------------
47 bool wxDatePickerCtrl::Create(wxWindow
*parent
,
53 const wxValidator
& validator
,
56 if(!wxControl::Create(parent
, id
, pos
, size
, style
, validator
, name
))
64 ig(!wxControl::PalmCreateControl(selectorTriggerCtl
, label
, pos
, size
))
70 // ----------------------------------------------------------------------------
71 // wxDatePickerCtrl geometry
72 // ----------------------------------------------------------------------------
74 wxSize
wxDatePickerCtrl::DoGetBestSize() const
76 const int y
= GetCharHeight();
78 return wxSize(DEFAULT_ITEM_WIDTH
, EDIT_HEIGHT_FROM_CHAR_HEIGHT(y
));
81 // ----------------------------------------------------------------------------
82 // wxDatePickerCtrl operations
83 // ----------------------------------------------------------------------------
85 void wxDatePickerCtrl::SetValue(const wxDateTime
& dt
)
87 SetLabel(_T("test1"));
90 wxDateTime
wxDatePickerCtrl::GetValue() const
97 void wxDatePickerCtrl::SetRange(const wxDateTime
& dt1
, const wxDateTime
& dt2
)
102 bool wxDatePickerCtrl::GetRange(wxDateTime
*dt1
, wxDateTime
*dt2
) const
108 #endif // wxUSE_DATEPICKCTRL