Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUIBehaviour.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 GUIBEHAVIOUR__H_
11#define GUIBEHAVIOUR__H_
12
13#include "GUIStreamableObject.h"
15#include "eC_Math.h"
16
17class CGUIEvent;
18class CGUIObject;
19
23enum BehaviourType_t
24{
25 BT_CLICK = 0,
26 BT_LONG_CLICK,
27 BT_DOUBLE_CLICK,
28 BT_BUTTON_DOWN,
29 BT_BUTTON_UP,
30 BT_FOCUS_PREVIOUS,
31 BT_FOCUS_NEXT,
32 BT_DECREASE,
33 BT_INCREASE,
34 BT_DRAG,
35 BT_MOUSE_ENTER,
36 BT_MOUSE_LEAVE,
37 BT_MOUSE_MOVE,
38 BT_WHEEL_UP,
39 BT_WHEEL_DOWN,
40 BT_USER_EVENT,
41 BT_KEY_DOWN,
42 BT_KEY_UP,
43 BT_CHAR,
44 BT_GETFOCUS,
45 BT_LOSEFOCUS,
46 BT_DRAGEND,
47 BT_ONCREATE,
48 BT_ONDELETE,
49 BT_ONSHOW,
50 BT_ONHIDE,
51 BT_DUMMY
52};
53
55
68{
69public:
72
90 virtual eC_Bool DoClick(
91 const eC_Value& vAbsX = eC_FromInt(-1),
92 const eC_Value& vAbsY = eC_FromInt(-1));
93
112 virtual eC_Bool DoLongClick(
113 const eC_Value& vAbsX = eC_FromInt(-1),
114 const eC_Value& vAbsY = eC_FromInt(-1));
115
133 virtual eC_Bool DoDoubleClick(
134 const eC_Value& vAbsX = eC_FromInt(-1),
135 const eC_Value& vAbsY = eC_FromInt(-1));
136
153 virtual eC_Bool DoButtonDown(
154 const eC_Value& vAbsX = eC_FromInt(-1),
155 const eC_Value& vAbsY = eC_FromInt(-1));
156
176 virtual eC_Bool DoButtonUp(
177 const eC_Value& vAbsX = eC_FromInt(-1),
178 const eC_Value& vAbsY = eC_FromInt(-1));
179
191 virtual eC_Bool DoDrag(
192 const eC_Value& vDeltaX = eC_FromInt(-1),
193 const eC_Value& vDeltaY = eC_FromInt(-1),
194 const eC_Value& vAbsX = eC_FromInt(-1),
195 const eC_Value& vAbsY = eC_FromInt(-1));
196
205 virtual eC_Bool DoDragEnd(
206 const eC_Value& vAbsX = eC_FromInt(-1),
207 const eC_Value& vAbsY = eC_FromInt(-1));
208
209
220 virtual eC_Bool DoMouseEnter(
221 const eC_Value& vAbsX = eC_FromInt(-1),
222 const eC_Value& vAbsY = eC_FromInt(-1));
223
232 virtual eC_Bool DoMouseLeave(
233 const eC_Value& vAbsX = eC_FromInt(-1),
234 const eC_Value& vAbsY = eC_FromInt(-1));
235
245 virtual eC_Bool DoMouseMove(
246 const eC_Value& vAbsX = eC_FromInt(-1),
247 const eC_Value& vAbsY = eC_FromInt(-1));
249
251
264 virtual eC_Bool FocusPrevious(
265 CGUIObject* const pRefObj = NULL,
266 const eC_Bool &bSubTreeOfRefObjDone = false);
267
281 virtual eC_Bool FocusNext(
282 CGUIObject* const pRefObj = NULL,
283 const eC_Bool &bSubTreeOfRefObjDone = false);
284
291 virtual void GetFocus();
292
296 virtual void LoseFocus();
298
300
307 virtual eC_Bool Decrease();
308
316 virtual eC_Bool Increase();
317
326 virtual eC_Bool DoKeyDown(
327 const GUIKeyIdentifier_t &eKeyIdentifier,
328 const eC_UInt &uiModifiers);
329
338 virtual eC_Bool DoKeyUp(
339 const GUIKeyIdentifier_t &eKeyIdentifier,
340 const eC_UInt &uiModifiers);
341
354 virtual eC_Bool DoChar(
355 const eC_UInt &uiKey,
356 const GUIKeyIdentifier_t &eKeyIdentifier,
357 const eC_UInt &uiModifiers);
359
361
367 virtual eC_Bool DoScrollUp(
368 const eC_Value& vAbsX,
369 const eC_Value& vAbsY);
370
377 virtual eC_Bool DoScrollDown(
378 const eC_Value& vAbsX,
379 const eC_Value& vAbsY);
380
389 virtual eC_Bool DoScrollLeft(
390 const eC_Value& vAbsX,
391 const eC_Value& vAbsY);
392
401 virtual eC_Bool DoScrollRight(
402 const eC_Value& vAbsX,
403 const eC_Value& vAbsY);
405
422 virtual eC_Bool DoUserEvent(CGUIEvent* const pEvent);
423
427 virtual void OnCreate();
428
432 virtual void OnDelete();
433
435 virtual void OnShow();
436
438 virtual void OnHide();
439
440#if defined(GUILIANI_STREAM_GUI) || defined(GUILIANI_WRITE_GUI)
442 static const eC_Char XMLTAG_BEHAVIOURCLASSID[];
443#endif
444};
445
446#endif
GUIKeyIdentifier_t
Platform independent key identifiers.
Definition: GUIEventTypeResource.h:205
CGUIBehaviour base class.
Definition: GUIBehaviour.h:68
virtual void OnCreate()
virtual void GetFocus()
static const eC_Char XMLTAG_BEHAVIOURCLASSID[]
XML tag to be used when writing a behaviour class ID into a stream.
Definition: GUIBehaviour.h:442
virtual eC_Bool DoButtonDown(const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
virtual eC_Bool DoMouseEnter(const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
virtual eC_Bool DoClick(const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
virtual eC_Bool DoKeyDown(const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
virtual eC_Bool DoUserEvent(CGUIEvent *const pEvent)
virtual eC_Bool DoScrollRight(const eC_Value &vAbsX, const eC_Value &vAbsY)
virtual eC_Bool DoScrollDown(const eC_Value &vAbsX, const eC_Value &vAbsY)
virtual void LoseFocus()
virtual eC_Bool FocusPrevious(CGUIObject *const pRefObj=NULL, const eC_Bool &bSubTreeOfRefObjDone=false)
virtual eC_Bool DoButtonUp(const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
virtual eC_Bool Increase()
virtual eC_Bool DoDragEnd(const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
virtual eC_Bool Decrease()
virtual eC_Bool FocusNext(CGUIObject *const pRefObj=NULL, const eC_Bool &bSubTreeOfRefObjDone=false)
virtual eC_Bool DoDrag(const eC_Value &vDeltaX=eC_FromInt(-1), const eC_Value &vDeltaY=eC_FromInt(-1), const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
virtual eC_Bool DoChar(const eC_UInt &uiKey, const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
virtual eC_Bool DoMouseMove(const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
virtual eC_Bool DoScrollUp(const eC_Value &vAbsX, const eC_Value &vAbsY)
virtual eC_Bool DoScrollLeft(const eC_Value &vAbsX, const eC_Value &vAbsY)
virtual void OnShow()
virtual eC_Bool DoKeyUp(const GUIKeyIdentifier_t &eKeyIdentifier, const eC_UInt &uiModifiers)
virtual void OnHide()
virtual eC_Bool DoMouseLeave(const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
virtual eC_Bool DoDoubleClick(const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
virtual void OnDelete()
virtual eC_Bool DoLongClick(const eC_Value &vAbsX=eC_FromInt(-1), const eC_Value &vAbsY=eC_FromInt(-1))
Base class for Guiliani Events.
Definition: GUIEvent.h:26
This is the Guiliani base class all controls are derived from.
Definition: GUIObject.h:79
Base class for streamable objects.
Definition: GUIStreamableObject.h:45