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.
19 * @file FUiCtrl_Panel.h
20 * @brief This is the header file for the _Panel class.
22 * This header file contains the declarations of the _Panel class.
25 #ifndef _FUI_CTRL_INTERNAL_PANEL_H_
26 #define _FUI_CTRL_INTERNAL_PANEL_H_
28 #include <FUiCtrlGroupTypes.h>
29 #include "FUi_Control.h"
30 #include "FUiCtrl_PanelPresenter.h"
32 namespace Tizen { namespace Graphics
39 namespace Tizen { namespace Ui { namespace Controls
42 enum _PanelBackgroundBitmapHorizontalAlign
44 PANEL_BACKGROUND_BITMAP_HORIZONTAL_ALIGN_LEFT,
45 PANEL_BACKGROUND_BITMAP_HORIZONTAL_ALIGN_CENTER,
46 PANEL_BACKGROUND_BITMAP_HORIZONTAL_ALIGN_RIGHT
49 enum _PanelBackgroundBitmapVerticalAlign
51 PANEL_BACKGROUND_BITMAP_VERTICAL_ALIGN_TOP,
52 PANEL_BACKGROUND_BITMAP_VERTICAL_ALIGN_MIDDLE,
53 PANEL_BACKGROUND_BITMAP_VERTICAL_ALIGN_BOTTOM
56 class _OSP_EXPORT_ _Panel
58 , virtual public Tizen::Base::Runtime::IEventListener
59 , virtual public _IUiEventListener
60 , virtual public _IUiEventPreviewer
64 virtual ~_Panel(void);
68 static _Panel* CreatePanelN(const Tizen::Graphics::Rectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE);
70 virtual void OnDraw(void);
73 void SetBackgroundColor(const Tizen::Graphics::Color& color);
75 GroupStyle GetGroupStyle(void) const;
76 void SetGroupStyle(GroupStyle groupStyle);
78 Tizen::Graphics::Bitmap* GetGroupStyleBitmap(void) const;
79 Tizen::Graphics::Bitmap* GetGroupStyleBackgroundBitmap(void) const;
81 bool IsBackgroundBitmapStretch(void) const;
82 void SetBackgroundBitmapStretch(bool stretch);
84 _PanelBackgroundBitmapHorizontalAlign GetBackgroundBitmapHorizontalAlign(void) const;
85 void SetBackgroundBitmapHorizontalAlign(_PanelBackgroundBitmapHorizontalAlign align);
87 _PanelBackgroundBitmapVerticalAlign GetBackgroundBitmapVerticalAlign(void) const;
88 void SetBackgroundBitmapVerticalAlign(_PanelBackgroundBitmapVerticalAlign align);
90 void SetBackgroundBitmapAlign(_PanelBackgroundBitmapHorizontalAlign horizontalAlign, _PanelBackgroundBitmapVerticalAlign verticalAlign);
92 Tizen::Graphics::Bitmap* GetBackgroundBitmap(void) const;
93 void SetBackgroundBitmap(Tizen::Graphics::Bitmap* bitmap);
99 virtual result Initialize(const _PanelPresenter& presenter);
102 virtual result SetPanelPresenter(const _PanelPresenter* presenter);
107 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
112 _Panel(const _Panel& rhs);
115 * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
120 _Panel& operator =(const _Panel& rhs);
124 _PanelPresenter* __pPanelPresenter;
126 GroupStyle __groupStyle;
127 Tizen::Graphics::Bitmap* __pGroupStyleBitmap;
128 Tizen::Graphics::Bitmap* __pGroupStyleBackgroundBitmap;
130 bool __backgroundBitmapStretch;
131 _PanelBackgroundBitmapHorizontalAlign __backgroundBitmapHorizontalAlign;
132 _PanelBackgroundBitmapVerticalAlign __backgroundBitmapVerticalAlign;
133 Tizen::Graphics::Bitmap* __pBackgroundBitmap;
137 }}} // Tizen::Ui::Controls
139 #endif // _FUI_CTRL_INTERNAL_PANEL_H_