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_Progress.h
19 * @brief This is the header file for the _Progress class.
21 * This header file contains the declarations of the %_Progress class.
23 #ifndef _FUI_CTRL_INTERNAL_PROGRESS_H_
24 #define _FUI_CTRL_INTERNAL_PROGRESS_H_
26 #include <FUiCtrlProgress.h>
27 #include "FUi_Control.h"
29 namespace Tizen { namespace Ui
31 class _AccessibilityElement;
34 namespace Tizen { namespace Ui { namespace Controls
36 class _ProgressPresenter;
39 class _OSP_EXPORT_ _Progress
40 : public Tizen::Ui::_Control
41 , virtual public Tizen::Base::Runtime::IEventListener
42 , virtual public Tizen::Ui::_IUiEventListener
43 , virtual public Tizen::Ui::_IUiEventPreviewer
45 DECLARE_CLASS_BEGIN(_Progress, Tizen::Ui::_Control);
46 DECLARE_PROPERTY("value", GetPropertyValue, SetPropertyValue);
47 DECLARE_PROPERTY("minValue", GetPropertyMinValue, SetPropertyMinValue);
48 DECLARE_PROPERTY("maxValue", GetPropertyMaxValue, SetPropertyMaxValue);
49 DECLARE_PROPERTY("barColor", GetPropertyBarColor, SetPropertyBarColor);
53 virtual ~_Progress(void);
56 result SetValue(int value);
57 result SetRange(int minValue, int maxValue);
58 result SetBarColor(const Tizen::Graphics::Color& color);
59 int GetValue(void) const;
60 result GetRange(int& minValue, int& maxValue) const;
61 Tizen::Graphics::Color GetBarColor(void) const;
62 int GetPercentComplete(void) const;
64 result SetPropertyValue(const Tizen::Ui::Variant& value);
65 result SetPropertyMinValue(const Tizen::Ui::Variant& minValue);
66 result SetPropertyMaxValue(const Tizen::Ui::Variant& maxValue);
67 result SetPropertyBarColor(const Tizen::Ui::Variant& barColor);
68 Tizen::Ui::Variant GetPropertyValue(void) const;
69 Tizen::Ui::Variant GetPropertyMinValue(void) const;
70 Tizen::Ui::Variant GetPropertyMaxValue(void) const;
71 Tizen::Ui::Variant GetPropertyBarColor(void) const;
73 virtual void OnDraw(void);
74 virtual result OnAttachedToMainTree(void);
75 virtual void OnBoundsChanged(void);
76 static _Progress* CreateProgressN(void);
80 _Progress(const _Progress&);
81 _Progress& operator =(const _Progress&);
82 result InitializeAccessibilityElement(void);
85 _ProgressPresenter* __pProgressPresenter;
86 Tizen::Graphics::Color __barColor;
87 Tizen::Ui::_AccessibilityElement* __pAccessibilityElement;
91 }}} // Tizen::Ui::Controls
93 #endif // _FUI_CTRL_INTERNAL_PROGRESS_H_