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_CheckButtonImpl.h
19 * @brief This is the header file for the _CheckButtonImpl class.
21 * This header file contains the declarations of the %_CheckButtonImpl class.
23 #ifndef _FUI_CTRL_INTERNAL_CHECK_BUTTON_IMPL_H_
24 #define _FUI_CTRL_INTERNAL_CHECK_BUTTON_IMPL_H_
26 #include <FUiCtrlCheckButton.h>
27 #include "FUi_ControlImpl.h"
28 #include "FUiCtrl_CheckButton.h"
29 #include "FUiCtrl_IActionEventListener.h"
30 #include "FUiCtrl_PublicActionEvent.h"
32 namespace Tizen { namespace Graphics
37 namespace Tizen { namespace Ui { namespace Controls
40 class _CheckButtonImpl
42 , public _IActionEventListener
43 , virtual public Tizen::Base::Runtime::IEventListener
46 class CheckButtonSizeInfo : public _ControlImpl::SizeInfo
48 virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const;
49 }; // CheckButtonSizeInfo
52 virtual ~_CheckButtonImpl(void);
53 static _CheckButtonImpl* CreateCheckButtonImplN(CheckButton* pControl, const Tizen::Graphics::Rectangle& bounds);
55 virtual const char* GetPublicClassName(void) const;
56 virtual const CheckButton& GetPublic(void) const;
57 virtual CheckButton& GetPublic(void);
58 virtual const _CheckButton& GetCore(void) const;
59 virtual _CheckButton& GetCore(void);
62 result SetSelected(bool select);
63 bool IsSelected(void) const;
65 result AddActionEventListener(Tizen::Ui::IActionEventListener& listener);
66 result RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener);
68 result SetActionId(int checkedActionId, int uncheckedActionId, int selectedActionId = -1);
69 int GetCheckedActionId(void) const;
70 int GetUncheckedActionId(void) const;
71 int GetSelectedActionId(void) const;
73 result SetText(const Tizen::Base::String& text);
74 Tizen::Base::String GetText(void) const;
75 result SetTitleText(const Tizen::Base::String& title);
76 Tizen::Base::String GetTitleText(void) const;
78 result SetTextHorizontalAlignment(HorizontalAlignment alignment);
79 HorizontalAlignment GetTextHorizontalAlignment(void) const;
80 result SetTextVerticalAlignment(VerticalAlignment alignment);
81 VerticalAlignment GetTextVerticalAlignment(void) const;
83 result SetTextColor(const Tizen::Graphics::Color& color);
84 Tizen::Graphics::Color GetTextColor(void) const;
85 result SetDisabledTextColor(const Tizen::Graphics::Color& color);
86 Tizen::Graphics::Color GetDisabledTextColor(void) const;
87 result SetPressedTextColor(const Tizen::Graphics::Color& color);
88 Tizen::Graphics::Color GetPressedTextColor(void) const;
89 result SetHighlightedTextColor(const Tizen::Graphics::Color& color);
90 Tizen::Graphics::Color GetHighlightedTextColor(void) const;
92 result SetTitleTextColor(const Tizen::Graphics::Color& color);
93 Tizen::Graphics::Color GetTitleTextColor(void) const;
94 result SetDisabledTitleTextColor(const Tizen::Graphics::Color& color);
95 Tizen::Graphics::Color GetDisabledTitleTextColor(void) const;
96 result SetPressedTitleTextColor(const Tizen::Graphics::Color& color);
97 Tizen::Graphics::Color GetPressedTitleTextColor(void) const;
98 result SetHighlightedTitleTextColor(const Tizen::Graphics::Color& color);
99 Tizen::Graphics::Color GetHighlightedTitleTextColor(void) const;
101 result SetColor(CheckButtonStatus status, const Tizen::Graphics::Color& color);
102 Tizen::Graphics::Color GetColor(CheckButtonStatus status) const;
104 result SetCheckButtonStyle(const CheckButtonStyle& checkButtonStyle);
105 result SetBackgroundStyle(const BackgroundStyle& backgroundStyle);
106 result SetShowTitle(bool showTitle);
107 result SetGroupStyle(const GroupStyle& groupStyle);
109 virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId);
110 virtual bool IsLayoutable(void) const;
113 static Tizen::Graphics::Color GetColorOnError(void);
115 static _CheckButtonImpl* GetInstance(CheckButton& checkButton);
116 static const _CheckButtonImpl* GetInstance(const CheckButton& checkButton);
119 _CheckButtonImpl(CheckButton* pPublic, _CheckButton* pCore);
121 _CheckButtonImpl(const _CheckButtonImpl& rhs);
122 _CheckButtonImpl& operator =(const _CheckButtonImpl& rhs);
124 _PublicActionEvent* __pPublicActionEvent;
125 }; // _CheckButtonImpl
127 }}} // Tizen::Ui::Controls
129 #endif //_FUI_CTRL_INTERNAL_CHECK_BUTTON_IMPL_H_