Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_LabelImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17 /**
18  * @file                FUiCtrl_LabelImpl.h
19  * @brief               This is the header file for the _LabelImpl class.
20  *
21  * This header file contains the declarations of the %_LabelImpl class.
22  */
23 #ifndef _FUI_CTRL_INTERNAL_LABEL_IMPL_H_
24 #define _FUI_CTRL_INTERNAL_LABEL_IMPL_H_
25
26 #include <FUiCtrlLabel.h>
27 #include <FUiITouchEventListener.h>
28 #include "FUi_ControlImpl.h"
29 #include "FUiCtrl_Label.h"
30
31 namespace Tizen { namespace Ui { namespace Animations
32 {
33         class _VisualElement;
34 }}} // Tizen::Ui::Animations
35
36 namespace Tizen { namespace Graphics
37 {
38         class Dimension;
39 }} // Tizen::Graphics
40
41 namespace Tizen { namespace Ui { namespace Controls
42 {
43
44 class _LabelImpl
45         : public _ControlImpl
46 {
47 public:
48         class LabelSizeInfo : public _ControlImpl::SizeInfo
49         {
50                 virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const;
51         }; // LabelSizeInfo
52
53 public:
54         virtual ~_LabelImpl(void);
55         static _LabelImpl* CreateLabelImplN(Label* pControl, const Tizen::Graphics::Rectangle& bounds);
56
57         virtual const char* GetPublicClassName(void) const;
58         virtual const Label& GetPublic(void) const;
59         virtual Label& GetPublic(void);
60         virtual const _Label& GetCore(void) const;
61         virtual _Label& GetCore(void);
62
63 public:
64         result SetText(const Tizen::Base::String& text);
65         result SetTextColor(const Tizen::Graphics::Color& color);
66         result SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap);
67         result SetTextHorizontalAlignment(HorizontalAlignment alignment);
68         result SetTextVerticalAlignment(VerticalAlignment alignment);
69         result SetTextConfig(int size, LabelTextStyle style);
70         result SetMargin(int topMargin, int leftMargin);
71
72         Tizen::Base::String GetText(void) const;
73         HorizontalAlignment GetTextHorizontalAlignment(void) const;
74         VerticalAlignment GetTextVerticalAlignment(void) const;
75         Tizen::Graphics::Color GetTextColor(void) const;
76         int GetTextSize(void) const;
77         LabelTextStyle GetTextStyle(void) const;
78         int GetTopMargin(void) const;
79         int GetLeftMargin(void) const;
80
81         virtual result OnBoundsChanged(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect);
82         virtual Tizen::Graphics::Dimension GetContentSize(void) const;
83
84 public:
85         static Tizen::Graphics::Color GetColorOnError(void);
86
87         static _LabelImpl* GetInstance(Label& label);
88         static const _LabelImpl* GetInstance(const Label& label);
89
90 private:
91         _LabelImpl(Label* pPublic, _Label* pCore);
92
93         _LabelImpl(const _LabelImpl& rhs);
94         _LabelImpl& operator =(const _LabelImpl& rhs);
95
96 }; // _LabelImpl
97
98 }}} // Tizen::Ui::Controls
99
100 #endif // _FUI_CTRL_INTERNAL_LABEL_IMPL_H_