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_TimePickerImpl.h
19 * @brief This is the header file for the _TimePickerImpl class.
22 #ifndef _FUI_CTRL_INTERNAL_TIMEPICKER_IMPL_H_
23 #define _FUI_CTRL_INTERNAL_TIMEPICKER_IMPL_H_
25 #include <FUiCtrlTimePicker.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 ITimeChangeEventListener;
36 namespace Tizen { namespace Ui { namespace Controls
41 , public _IDateTimeChangeEventListener
42 , virtual public Tizen::Base::Runtime::IEventListener
45 class TimePickerSizeInfo : public _ControlImpl::SizeInfo
47 virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const;
48 virtual Tizen::Graphics::Dimension GetDefaultMaximumSize(_ControlOrientation orientation) const;
52 static _TimePickerImpl* CreateTimePickerImplN(TimePicker* pControl, const Tizen::Base::String& title = L"");
53 virtual ~_TimePickerImpl(void);
55 virtual const char* GetPublicClassName(void) const;
56 virtual const TimePicker& GetPublic(void) const;
57 virtual TimePicker& GetPublic(void);
58 virtual const _DateTimePicker& GetCore(void) const;
59 virtual _DateTimePicker& GetCore(void);
61 result AddTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener);
62 result RemoveTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener);
64 void SetCurrentTime(void);
65 result SetHour(int hour);
66 int GetHour(void) const;
67 result SetMinute(int minute);
68 int GetMinute(void) const;
69 void SetTime(const Tizen::Base::DateTime& time);
70 Tizen::Base::DateTime GetTime(void) const;
71 void Set24HourNotationEnabled(bool enable);
73 virtual result OnAttachedToMainTree(void);
74 virtual void OnDateTimeChanged(const Tizen::Ui::_Control& source, int year, int month, int day, int hour, int minute);
75 virtual void OnDateTimeChangeCanceled(const Tizen::Ui::_Control& source);
76 virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
79 static _TimePickerImpl* GetInstance(TimePicker& timePicker);
80 static const _TimePickerImpl* GetInstance(const TimePicker& timePicker);
83 result SetYear(int year);
84 result SetMonth(int month);
85 result SetDay(int day);
87 _TimePickerImpl(TimePicker* pPublic, _DateTimePicker* pCore);
88 _TimePickerImpl(const _TimePickerImpl&);
89 _TimePickerImpl& operator =(const _TimePickerImpl&);
92 _PublicDateTimeChangeEvent* __pPublicDateTimeChangeEvent;
95 }}} // Tizen::Ui::Controls
97 #endif //_FUI_CTRL_INTERNAL_TIMEPICKER_IMPL_H_