Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUICheckBox.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 GUICHECKBOX__H_
11#define GUICHECKBOX__H_
12
13#include "GUIBaseCheckBox.h"
14
15#include "GUIImageResource.h"
16#include "GUINinePatch.h"
17
19
20// @guiliani_doxygen toplevel_control Check Box
31// @endguiliani_doxygen
64{
65public:
70
71 // Destructor
72 virtual ~CGUICheckBox();
73
86 CGUICompositeObject* const pkParent,
87 const eC_Value& vX,
88 const eC_Value& vY,
89 const eC_Value& vWidth,
90 const eC_Value& vHeight,
91 const eC_Bool &bChecked = false,
92 const ObjectHandle_t &eID = NO_HANDLE);
93
94
102 CGUICompositeObject* const pkParent,
103 const CGUIRect &kRect,
104 const eC_Bool &bChecked = false,
105 const ObjectHandle_t &eID = NO_HANDLE);
106
110 CGUICheckBox(const CGUICheckBox& kSource);
111
117
118 eC_Bool DoDraw();
119
133 const ImageResource_t &eSelectedFocussed,
134 const ImageResource_t &eSelectedHighlighted,
135 const ImageResource_t &eSelectedPressed,
136 const ImageResource_t &eSelectedNormal,
137 const ImageResource_t &eSelectedGrayedOut,
138 const ImageResource_t &eNotSelectedFocussed,
139 const ImageResource_t &eNotSelectedHighlighted,
140 const ImageResource_t &eNotSelectedPressed,
141 const ImageResource_t &eNotSelectedNormal,
142 const ImageResource_t &eNotSelectedGrayedOut);
143
146
147#ifdef GUILIANI_STREAM_GUI
148 virtual void ReadFromStream();
149#endif
150
151#ifdef GUILIANI_WRITE_GUI
152 virtual void WriteToStream(const eC_Bool bWriteClassID = false);
153#endif
154
155protected:
157 void Init();
158
159protected:
160 //Images for the situation that the box is selected.
166
167 //Images for the situation that the box is not selected.
173
175
176private:
181 void CopyAttributes(const CGUICheckBox& kSource);
182
183 // This private method assigns dummy images to all attributes intended for images.
184 void SetDummyImages(void);
185
187 void DeInit();
188};
189
190#endif
Helper Macros in Guiliani
ImageResource_t
Enumeration of image resource ids.
Definition: GUIImageResource.h:126
ObjectHandle_t
List of object resource ids.
Definition: GUIObjectHandleResource.h:55
Base class for checkboxes.
Definition: GUIBaseCheckBox.h:66
Check box that draws itself with images.
Definition: GUICheckBox.h:64
ImageResource_t m_eNotSelectedFocussed
the selected focused image
Definition: GUICheckBox.h:172
CGUICheckBox(CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const eC_Bool &bChecked=false, const ObjectHandle_t &eID=NO_HANDLE)
ImageResource_t m_eSelectedHighlighted
the selected highlighted image
Definition: GUICheckBox.h:162
ImageResource_t m_eNotSelectedHighlighted
the selected highlighted image
Definition: GUICheckBox.h:169
CGUINinePatch m_kNinePatch
nine-patch which is used if icon should fill the object
Definition: GUICheckBox.h:174
ImageResource_t m_eNotSelectedPressed
the selected pressed image
Definition: GUICheckBox.h:170
void SetStandardImages()
Set the standard Guiliani images to this image checkbox.
eC_Bool DoDraw()
CGUICheckBox & operator=(const CGUICheckBox &kSource)
ImageResource_t m_eNotSelectedNormal
the selected normal image
Definition: GUICheckBox.h:168
CGUICheckBox(CGUICompositeObject *const pkParent, const CGUIRect &kRect, const eC_Bool &bChecked=false, const ObjectHandle_t &eID=NO_HANDLE)
ImageResource_t m_eSelectedPressed
the selected pressed image
Definition: GUICheckBox.h:163
ImageResource_t m_eSelectedNormal
the selected normal image
Definition: GUICheckBox.h:161
virtual void ReadFromStream()
void SetImages(const ImageResource_t &eSelectedFocussed, const ImageResource_t &eSelectedHighlighted, const ImageResource_t &eSelectedPressed, const ImageResource_t &eSelectedNormal, const ImageResource_t &eSelectedGrayedOut, const ImageResource_t &eNotSelectedFocussed, const ImageResource_t &eNotSelectedHighlighted, const ImageResource_t &eNotSelectedPressed, const ImageResource_t &eNotSelectedNormal, const ImageResource_t &eNotSelectedGrayedOut)
ImageResource_t m_eSelectedFocussed
the selected focused image
Definition: GUICheckBox.h:165
CGUICheckBox(const CGUICheckBox &kSource)
ImageResource_t m_eNotSelectedGrayedOut
the selected grayed out image
Definition: GUICheckBox.h:171
ImageResource_t m_eSelectedGrayedOut
the selected grayed out image
Definition: GUICheckBox.h:164
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
This is the Guiliani base class for all composite objects.
Definition: GUICompositeObject.h:70
Helper class to for storing Nine-Patch images.
Definition: GUINinePatch.h:41
Helper class to supply a platform independent rectangle implementation.
Definition: GUIRect.h:63