2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file HmCustomPageMarker.h
19 * @brief Keeps declaration of the CustomPageMarker
20 * declares CustomPageMarker class, which contains the top bubble's bar which indicates the page number
23 #ifndef _HM_CUSTOM_PAGE_MARKER_H_
24 #define _HM_CUSTOM_PAGE_MARKER_H_
27 #include "HmICustomPageMarkerEventListener.h"
30 * @class CustomPageMarker
31 * @brief The control which keeps the bubbles and current state of the bubbles
33 class CustomPageMarker
34 : public Tizen::Ui::Controls::Panel
35 , public Tizen::Ui::ITouchEventListener
41 CustomPageMarker(void);
44 * Destructor, this destructor overrides ~Tizen::Ui::Controls::Panel().
46 virtual ~CustomPageMarker(void);
49 * Constructs the object completely
51 * @param[in] controlRect, position of the control.
52 * @param[in] noOfPages, total no of bubbles to be initialized with.
53 * @param[in] markPos, position of the marker within the form.
55 result Construct(const Tizen::Graphics::Rectangle& controlRect, int bubbleCount = 1);
58 * Adds a new bubble in the marker control
60 * @return result, E_SUCCESS if successfully created the control else Error Code.
62 result AddBubble(void);
65 * returns the total no. of bubbles in the control
67 * @return the no of bubbles in the control
69 const int GetBubbleCount(void);
72 * Deletes a bubble from the marker control
74 * @return result, E_SUCCESS if successfully created the control else Error Code.
75 * @param[in] index, bubble number to be deleted.
77 result RemoveBubble(int index);
80 * Sets the listener to intercept events on the marker control.
82 * @param[in] pListener, Listener object to be notified.
84 void SetPageMarkerEventListener(ICustomPageMarkerEventListener* pListner);
87 * Sets the specified bubble as a current bubble, and highlights it
89 * @return result, E_SUCCESS if successfully created the control else Error Code.
90 * @param[in] index, bubble number to be highlighted.
92 void SetSelectedBubble(int index);
94 // From ITouchEventListener
95 virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
96 virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
97 virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
98 virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
99 virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
100 virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
104 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
106 CustomPageMarker(const CustomPageMarker&);
109 * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
111 CustomPageMarker& operator =(const CustomPageMarker&);
114 ICustomPageMarkerEventListener* __pMarkerListener; // listener to the marker events
115 int __bubbleCount; // total number of bubbles in marker control
116 int __selectedBubble; // currently highlighted bubble in the marker
117 Tizen::Base::Collection::ArrayList* __pBubbleLabels; // list of labels in the marker control
118 Tizen::Base::Collection::ArrayList* __pBubbleBitmaps; // the bitmaps to be shown as bubble
121 #endif //_HM_CUSTOM_PAGE_MARKER_H_