Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUICompositeBehaviour.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 __COMPOSITEBHVR__H_
11#define __COMPOSITEBHVR__H_
12
13#include "GUIBehaviourDecorator.h"
14#include "GUIDeleteNotification.h"
15
16class CGUIEvent;
17
46{
47public:
51
55
63 void AddBehaviour(CGUIBehaviourDecorator* pBehaviour, eC_Bool bAtFront = false);
64
71
74
81 virtual eC_Bool IsCompositeBehaviour() const { return true; }
82
86 virtual CGUIBehaviourDecorator* Clone() const;
87
88 // All following event handling methods forward the calls to child behaviours.
89
90 virtual eC_Bool DoClick(
91 const eC_Value& vAbsX = eC_FromInt(-1),
92 const eC_Value& vAbsY = eC_FromInt(-1));
93
94 virtual eC_Bool DoLongClick(
95 const eC_Value& vAbsX = eC_FromInt(-1),
96 const eC_Value& vAbsY = eC_FromInt(-1));
97
98 virtual eC_Bool DoDoubleClick(
99 const eC_Value& vAbsX = eC_FromInt(-1),
100 const eC_Value& vAbsY = eC_FromInt(-1));
101
102 virtual eC_Bool DoButtonDown(
103 const eC_Value& vAbsX,
104 const eC_Value& vAbsY);
105
106 virtual eC_Bool DoButtonUp(
107 const eC_Value& vAbsX,
108 const eC_Value& vAbsY);
109
110 virtual eC_Bool FocusPrevious(
111 CGUIObject* const pRefObj = NULL,
112 const eC_Bool &bSubTreeOfRefObjDone = false);
113
114 virtual eC_Bool FocusNext(
115 CGUIObject* const pRefObj = NULL,
116 const eC_Bool &bSubTreeOfRefObjDone = false);
117
118 virtual eC_Bool Decrease();
119
120 virtual eC_Bool Increase();
121
122 virtual eC_Bool DoDrag(
123 const eC_Value& vDeltaX,
124 const eC_Value& vDeltaY,
125 const eC_Value& vAbsX,
126 const eC_Value& vAbsY);
127
128 virtual eC_Bool DoDragEnd(
129 const eC_Value& vAbsX,
130 const eC_Value& vAbsY);
131
132 virtual eC_Bool DoMouseEnter(
133 const eC_Value& vAbsX,
134 const eC_Value& vAbsY);
135
136 virtual eC_Bool DoMouseLeave(
137 const eC_Value& vAbsX,
138 const eC_Value& vAbsY);
139
140 virtual eC_Bool DoMouseMove(
141 const eC_Value& vAbsX,
142 const eC_Value& vAbsY);
143
144 virtual eC_Bool DoUserEvent(CGUIEvent* const pEvent);
145
146 virtual eC_Bool DoKeyDown(
147 const GUIKeyIdentifier_t &eKeyIdentifier,
148 const eC_UInt &uiModifiers);
149
150 virtual eC_Bool DoKeyUp(
151 const GUIKeyIdentifier_t &eKeyIdentifier,
152 const eC_UInt &uiModifiers);
153
154 virtual eC_Bool DoChar(
155 const eC_UInt &uiKey,
156 const GUIKeyIdentifier_t &eKeyIdentifier,
157 const eC_UInt &uiModifiers);
158
159 virtual eC_Bool DoScrollUp(
160 const eC_Value& vAbsX,
161 const eC_Value& vAbsY);
162
163 virtual eC_Bool DoScrollDown(
164 const eC_Value& vAbsX,
165 const eC_Value& vAbsY);
166
167 virtual eC_Bool DoScrollLeft(
168 const eC_Value& vAbsX,
169 const eC_Value& vAbsY);
170
171 virtual eC_Bool DoScrollRight(
172 const eC_Value& vAbsX,
173 const eC_Value& vAbsY);
174
175 virtual void GetFocus();
176
177 virtual void LoseFocus();
178
184
185#if defined(GUILIANI_STREAM_GUI)
186 virtual void ReadFromStream();
187#endif
188
189#if defined(GUILIANI_WRITE_GUI)
190 virtual void WriteToStream(const eC_Bool bWriteClassID = false);
191#endif
192
193#if defined(GUILIANI_STREAM_GUI) || defined(GUILIANI_WRITE_GUI)
195 static const eC_Char XMLTAG_NUMBER_OF_BEHAVIOURS[];
196#endif
197
198protected:
205
208
210};
211
212#endif
GUIKeyIdentifier_t
Platform independent key identifiers.
Definition: GUIEventTypeResource.h:205
GUIBehaviourDecorator base class.
Definition: GUIBehaviourDecorator.h:78
Contains other behaviours and forwards events to them.
Definition: GUICompositeBehaviour.h:46
virtual eC_Bool Decrease()
virtual void ReadFromStream()
virtual eC_Bool Increase()
virtual eC_Bool DoScrollRight(const eC_Value &vAbsX, const eC_Value &vAbsY)
virtual eC_Bool DoClick(const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
virtual eC_Bool DoDragEnd(const eC_Value &vAbsX, const eC_Value &vAbsY)
virtual eC_Bool DoLongClick(const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
virtual eC_Bool DoScrollDown(const eC_Value &vAbsX, const eC_Value &vAbsY)
BehaviourList m_Behaviours
List of the attached behaviours.
Definition: GUICompositeBehaviour.h:209
static const eC_Char XMLTAG_NUMBER_OF_BEHAVIOURS[]
XML tag to be used when writing the number of following behaviours into a stream.
Definition: GUICompositeBehaviour.h:195
virtual eC_Bool DoChar(const eC_UInt &uiKey, const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
void CopyBehaviours(const CGUICompositeBehaviour &rSource)
virtual eC_Bool DoDoubleClick(const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
virtual eC_Bool FocusPrevious(CGUIObject *const pRefObj=NULL, const eC_Bool &bSubTreeOfRefObjDone=false)
virtual eC_Bool FocusNext(CGUIObject *const pRefObj=NULL, const eC_Bool &bSubTreeOfRefObjDone=false)
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
virtual eC_Bool DoKeyUp(const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
virtual eC_Bool DoScrollLeft(const eC_Value &vAbsX, const eC_Value &vAbsY)
virtual eC_Bool DoButtonDown(const eC_Value &vAbsX, const eC_Value &vAbsY)
eC_TListDoubleLinked< CGUIBehaviourDecorator * > BehaviourList
A Behaviour list is a double-linked list of behaviour decorator pointers.
Definition: GUICompositeBehaviour.h:207
virtual eC_Bool DoDrag(const eC_Value &vDeltaX, const eC_Value &vDeltaY, const eC_Value &vAbsX, const eC_Value &vAbsY)
void RemoveBehaviour(CGUIBehaviourDecorator *pBehaviour)
virtual eC_Bool DoScrollUp(const eC_Value &vAbsX, const eC_Value &vAbsY)
CGUICompositeBehaviour & operator=(const CGUICompositeBehaviour &rSource)
virtual eC_Bool DoKeyDown(const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
void RemoveAllBehaviours()
Removes all behaviours from this CGUICompositeBehaviour, causing them to be deleted.
virtual eC_Bool DoMouseMove(const eC_Value &vAbsX, const eC_Value &vAbsY)
virtual eC_Bool DoUserEvent(CGUIEvent *const pEvent)
virtual eC_Bool DoMouseLeave(const eC_Value &vAbsX, const eC_Value &vAbsY)
virtual ~CGUICompositeBehaviour()
virtual void LoseFocus()
virtual void GetFocus()
void AddBehaviour(CGUIBehaviourDecorator *pBehaviour, eC_Bool bAtFront=false)
virtual eC_Bool DoMouseEnter(const eC_Value &vAbsX, const eC_Value &vAbsY)
virtual eC_Bool DoButtonUp(const eC_Value &vAbsX, const eC_Value &vAbsY)
virtual eC_Bool IsCompositeBehaviour() const
Definition: GUICompositeBehaviour.h:81
virtual CGUIBehaviourDecorator * Clone() const
Class that sets a local variable to True if the object has been deleted.
Definition: GUIDeleteNotification.h:51
Base class for Guiliani Events.
Definition: GUIEvent.h:26
This is the Guiliani base class all controls are derived from.
Definition: GUIObject.h:79