2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FUiCtrl_DateTimePickerImpl.h
19 * @brief This is the header file for the _DateTimePickerImpl class.
22 #ifndef _FUI_CTRL_INTERNAL_DATETIMEPICKER_IMPL_H_
23 #define _FUI_CTRL_INTERNAL_DATETIMEPICKER_IMPL_H_
25 #include <FUiCtrlDateTimePicker.h>
26 #include "FUi_WindowImpl.h"
27 #include "FUiCtrl_DateTimePicker.h"
28 #include "FUiCtrl_IDateTimeChangeEventListener.h"
29 #include "FUiCtrl_PublicDateTimeChangeEvent.h"
31 namespace Tizen { namespace Ui
33 class IDateTimeChangeEventListener;
36 namespace Tizen { namespace Ui { namespace Controls
39 class _DateTimePickerImpl
41 , public _IDateTimeChangeEventListener
42 , virtual public Tizen::Base::Runtime::IEventListener
45 class DateTimePickerSizeInfo : public _ControlImpl::SizeInfo
47 virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const;
48 virtual Tizen::Graphics::Dimension GetDefaultMaximumSize(_ControlOrientation orientation) const;
51 static _DateTimePickerImpl* CreateDateTimePickerImplN(DateTimePicker* pControl, const Tizen::Base::String& title = L"");
52 virtual ~_DateTimePickerImpl(void);
54 virtual const char* GetPublicClassName(void) const;
55 virtual const DateTimePicker& GetPublic(void) const;
56 virtual DateTimePicker& GetPublic(void);
57 virtual const _DateTimePicker& GetCore(void) const;
58 virtual _DateTimePicker& GetCore(void);
60 result AddDateTimeChangeEventListener(Tizen::Ui::IDateTimeChangeEventListener& listener);
61 result RemoveDateTimeChangeEventListener(Tizen::Ui::IDateTimeChangeEventListener& listener);
63 void SetDateTime(const Tizen::Base::DateTime& dateTime);
64 Tizen::Base::DateTime GetDateTime(void) const;
66 void SetCurrentDateTime(void);
67 result SetYear(int year);
68 int GetYear(void) const;
69 result SetMonth(int month);
70 int GetMonth(void) const;
71 result SetDay(int day);
72 int GetDay(void) const;
73 result SetHour(int hour);
74 int GetHour(void) const;
75 result SetMinute(int minute);
76 int GetMinute(void) const;
78 void Set24HourNotationEnabled(bool enable);
79 bool Is24HourNotationEnabled(void) const;
81 result SetYearRange(int minYear, int maxYear);
82 result GetYearRange(int& minYear, int& maxYear) const;
84 virtual result OnAttachedToMainTree(void);
85 virtual void OnDateTimeChanged(const Tizen::Ui::_Control& source, int year, int month, int day, int hour, int minute);
86 virtual void OnDateTimeChangeCanceled(const Tizen::Ui::_Control& source);
87 virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
90 static _DateTimePickerImpl* GetInstance(DateTimePicker& dateTimePicker);
91 static const _DateTimePickerImpl* GetInstance(const DateTimePicker& dateTimePicker);
94 _DateTimePickerImpl(DateTimePicker* pPublic, _DateTimePicker* pCore);
96 _DateTimePickerImpl(const _DateTimePickerImpl&);
97 _DateTimePickerImpl& operator =(const _DateTimePickerImpl&);
100 _PublicDateTimeChangeEvent* __pPublicDateTimeChangeEvent;
101 }; // _DateTimePickerImpl
103 }}} // Tizen::Ui::Controls
105 #endif //_FUI_CTRL_INTERNAL_DATETIMEPICKER_IMPL_H_