Guiliani  Version 2.6 revision 7293 (documentation build 12)
GUICarousel.h
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef GUICAROUSEL__H_
11#define GUICAROUSEL__H_
12
13// necessary includes
14#include "GUICompositeObject.h"
15
17// @guiliani_doxygen toplevel_control Carousel
30// @endguiliani_doxygen
98{
99public:
109 CGUICompositeObject* const pkParent,
110 const eC_Value& vX, const eC_Value& vY,
111 const eC_Value& vWidth, const eC_Value& vHeight,
112 const ObjectHandle_t &eID = NO_HANDLE);
113
114 virtual ~CGUICarousel() {}
115
121 virtual eC_Bool SetValue(const CGUIValue& rkValue)
122 {
123 // Rotate to child object with index given by value
124 RotateToObject(GetChild(rkValue.ToInt()));
125 CGUIObject::SetValue(rkValue);
126 return true;
127 }
128
129 virtual void SetWidth(const eC_Value& vX);
130 virtual void SetHeight(const eC_Value& vX);
131
132 virtual void DoAnimate(const eC_Value& vTimes = eC_FromInt(1));
133
134 virtual eC_Bool AddObject(CGUIObject* pkObject);
135 virtual void RemoveObject(CGUIObject* pkObject);
136
137 virtual eC_Bool IsHighlightable() const { return false; }
138
142 void SetRadius(const eC_Value vRadius) { m_vRadius = vRadius; ArrangeChildren(); }
143
147 eC_Value GetRadius() const
148 {
149 return m_vRadius;
150 }
151
155 eC_Value GetTiltAngle() const
156 {
157 return m_vTiltAngle;
158 }
159
163 eC_Bool Decrease();
164
168 eC_Bool Increase();
169
172 void RotateToObject(CGUIObject* pkObject);
173
176 void JumpToObject(CGUIObject* pkObject);
177
181
184 eC_Int GetSelectedIndex() const
185 {
187 }
188
195 void GetOriginalSize(const eC_UInt uiIndex, eC_Value& vWidth, eC_Value& vHeight)
196 {
197 vWidth = eC_FromInt(0);
198 vHeight = eC_FromInt(0);
199
200 if (uiIndex < GetNumberOfChildren())
201 {
202 sSizeStorage kSize = (*m_OriginalSizes.GetAt(uiIndex));
203 vWidth = kSize.kRect.GetWidth();
204 vHeight = kSize.kRect.GetHeight();
205 }
206 }
207
214 virtual eC_Bool DoKeyDown(
215 const GUIKeyIdentifier_t& eKeyID,
216 const eC_UInt& uiModifiers);
217
218 virtual eC_Bool DoDrag(
219 const eC_Value& vDeltaX,
220 const eC_Value& vDeltaY,
221 const eC_Value& vAbsX,
222 const eC_Value& vAbsY);
223
224 virtual eC_Bool DoDragEnd(
225 const eC_Value& vAbsX,
226 const eC_Value& vAbsY);
227
231 void SetTiltAngle(const eC_Value vTiltAngle);
232
235 void EnableFlowMode(const eC_Bool bEnable) { m_bFlowMode = bEnable; }
236
240 void SetNumberOfFlowModeEntries(const eC_UInt uiNOFEntries) { m_uiNOFEntries = uiNOFEntries; }
241
249 void SetPerspectiveFactor(const eC_Value vPerspectiveFactor) { m_vPerspectiveFactor = vPerspectiveFactor; }
250
254 void SetVertical(const eC_Bool bVertical) { m_bVertical = bVertical; }
255
259 static void SetInvertInput(const eC_Bool bInvert) { ms_bInvertInput = bInvert; }
260
261#ifdef GUILIANI_STREAM_GUI
262 CGUICarousel();
263
264 virtual void ReadFromStream();
265#endif
266#ifdef GUILIANI_WRITE_GUI
267 virtual void WriteToStream(const eC_Bool bWriteClassID = false);
268#endif
269
270protected:
277 };
278
280 struct ZOrderEntry {
284 eC_Value vScaleFactor;
285 };
286
290
295
297 virtual void ArrangeChildren();
298
301
309 eC_Value m_vTiltAngle;
316 eC_Value m_vRadius;
318 eC_Bool m_bDragging;
325 eC_Bool m_bFlowMode;
332 eC_Value m_vDragSpeed;
334 eC_Bool m_bVertical;
336 static eC_Bool ms_bInvertInput;
337
338};
339#endif
GUIKeyIdentifier_t
Platform independent key identifiers.
Definition: GUIEventTypeResource.h:207
ObjectHandle_t
List of object resource ids.
Definition: GUIObjectHandleResource.h:55
This is the Guiliani base class for all composite objects.
Definition: GUICompositeObject.h:70
CGUIObject * GetChild(const eC_UInt uIndex) const
eC_UInt GetNumberOfChildren() const
Definition: GUICompositeObject.h:474
This is the Guiliani base class all controls are derived from.
Definition: GUIObject.h:81
virtual eC_Bool SetValue(const CGUIValue &rkValue)
Definition: GUIObject.h:1067
Helper class to supply a platform independent rectangle implementation.
Definition: GUIRect.h:63
eC_Value GetWidth() const
Definition: GUIRect.h:164
eC_Value GetHeight() const
Definition: GUIRect.h:175
CGUIValue stores a single value in one specific type.
Definition: GUIValue.h:25
eC_Int ToInt() const
Represents a double linked list template with header and tail node.
Definition: eC_TList_doubleLinked.h:67
Helper structure to store carousel items and their corresponding scaling factors for zordering.
Definition: GUICarousel.h:280
CGUIObject * pkObject
Pointer to object (key value)
Definition: GUICarousel.h:282
eC_Value vScaleFactor
Scaling factor (Larger values represent objects in the foreground)
Definition: GUICarousel.h:284