Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUIRadioButtonGroup.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 GUIRADIOBUTTONGROUP__H_
11#define GUIRADIOBUTTONGROUP__H_
12
13#include "GUICompositeObject.h"
14#include "GUIBaseRadioButton.h" // needed for static_cast
15
16
18
42{
43public:
53 CGUICompositeObject* const pkParent,
54 const eC_Value& vX, const eC_Value& vY,
55 const eC_Value& vWidth, const eC_Value& vHeight,
56 const ObjectHandle_t &eID = NO_HANDLE);
57
64 CGUICompositeObject* const pkParent,
65 const CGUIRect &kRect,
66 const ObjectHandle_t &eID = NO_HANDLE);
67
75 CGUIBaseRadioButton* GetAndCheckObjectByID(ObjectHandle_t eObjID, const eC_String& kObjectName)
76 {
77 return static_cast <CGUIBaseRadioButton*>(
79 }
80
85 eC_Bool SetValue(const CGUIValue& rkValue);
86
92 eC_Bool DoClick(const eC_Value& vAbsX, const eC_Value& vAbsY);
93
102 virtual eC_Bool AddObject(CGUIBaseRadioButton *pRadioButton);
103
108
115
121
129 {
130 m_kSelectionSubject.AddObserver(pObserver);
131 }
132
137 {
138 m_kSelectionSubject.RemoveObserver(pObserver);
139 }
140
141#ifdef GUILIANI_STREAM_GUI
150 virtual void ReadFromStream();
151#endif
152
153#ifdef GUILIANI_WRITE_GUI
154 virtual void WriteToStream(const eC_Bool bWriteClassID = false);
155#endif
156
162
169
170private:
180 eC_Bool AddObject(CGUIObject* pkObject);
181
183 CGUISubject m_kSelectionSubject;
184};
185
186#endif
ObjectHandle_t
List of object resource ids.
Definition: GUIObjectHandleResource.h:55
Base class for radio buttons.
Definition: GUIBaseRadioButton.h:43
This is the Guiliani base class for all composite objects.
Definition: GUICompositeObject.h:70
const CGUIObject * GetAndCheckObjectByID(ObjectHandle_t eObjID, const eC_String &kObjectName) const
This is the Guiliani base class all controls are derived from.
Definition: GUIObject.h:79
Observer Base class for Observer-Design-Pattern within Guiliani.
Definition: GUIObserver.h:28
Container for radio buttons.
Definition: GUIRadioButtonGroup.h:42
virtual void ReadFromStream()
CGUIRadioButtonGroup(const CGUIRadioButtonGroup &kSource)
CGUIRadioButtonGroup(CGUICompositeObject *const pkParent, const CGUIRect &kRect, const ObjectHandle_t &eID=NO_HANDLE)
virtual eC_Bool AddObject(CGUIBaseRadioButton *pRadioButton)
CGUIRadioButtonGroup(CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const ObjectHandle_t &eID=NO_HANDLE)
void SetSelectedRadioButton(CGUIBaseRadioButton &rkRadioButton)
CGUIRadioButtonGroup & operator=(const CGUIRadioButtonGroup &kSource)
eC_Bool SetValue(const CGUIValue &rkValue)
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
eC_Bool DoClick(const eC_Value &vAbsX, const eC_Value &vAbsY)
void RemoveSelectionObserver(CGUIObserver *pObserver)
Definition: GUIRadioButtonGroup.h:136
CGUIBaseRadioButton * GetAndCheckObjectByID(ObjectHandle_t eObjID, const eC_String &kObjectName)
Definition: GUIRadioButtonGroup.h:75
CGUIBaseRadioButton * GetSelectedRadioButton() const
Helper class to supply a platform independent rectangle implementation.
Definition: GUIRect.h:63
Subject Base class for Observer-Design-Pattern within Guiliani.
Definition: GUISubject.h:34
void RemoveObserver(CGUIObserver *pObserver)
void AddObserver(CGUIObserver *pObserver)
CGUIValue stores a single value in one specific type.
Definition: GUIValue.h:25
void AddSelectionObserver(CGUIObserver *pObserver)
Definition: GUIRadioButtonGroup.h:128