Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUIBlendButton.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 GUIBLENDBUTTON__H_
11#define GUIBLENDBUTTON__H_
12
13#include "GUIButton.h"
14#include "GUIImageResource.h"
15
17
18// @guiliani_doxygen toplevel_control Blend Button
29// @endguiliani_doxygen
64{
65public:
77 CGUICompositeObject* const pkParent,
78 const eC_Value& vX,
79 const eC_Value& vY,
80 const eC_Value& vWidth,
81 const eC_Value& vHeight,
82 const eC_String& rkText,
83 CGUICommandPtr pkCommandObject,
84 const ObjectHandle_t &eID = NO_HANDLE);
85
97 CGUICompositeObject* const pkParent,
98 const eC_Value& vX,
99 const eC_Value& vY,
100 const eC_Value& vWidth,
101 const eC_Value& vHeight,
102 const TextResource_t &eTextID,
103 CGUICommandPtr pkCommandObject,
104 const ObjectHandle_t &eID = NO_HANDLE);
105
110
116
117 virtual eC_Bool DoDraw();
118
121 void SetBlendDuration(const eC_UInt& uiBlendDuration);
122
126 eC_UInt GetBlendDuration() const;
127
132 void SetCrossFade(const eC_Bool& bCrossFade);
133
137 eC_Bool GetCrossFade() const;
138
139#ifdef GUILIANI_STREAM_GUI
141 virtual void ReadFromStream();
142#endif
143#ifdef GUILIANI_WRITE_GUI
144 virtual void WriteToStream(const eC_Bool bWriteClassID = false);
145#endif
146
147protected:
148 virtual void DoAnimate(const eC_Value& vTimes = eC_FromInt(1));
149
151 void Init();
152
153protected:
156 eC_Value m_vBlendFactor;
158 eC_Bool m_bCrossFade;
159};
160
161#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
TextResource_t
List of text resource ids.
Definition: GUITextResource.h:40
Button specialization that softly blends between the button's different states.
Definition: GUIBlendButton.h:64
void SetBlendDuration(const eC_UInt &uiBlendDuration)
eC_UInt m_uiBlendDuration
Duration of blend transition in milliseconds.
Definition: GUIBlendButton.h:157
CGUIBlendButton(CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const eC_String &rkText, CGUICommandPtr pkCommandObject, const ObjectHandle_t &eID=NO_HANDLE)
CGUIBlendButton & operator=(const CGUIBlendButton &kSource)
CGUIBlendButton(CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const TextResource_t &eTextID, CGUICommandPtr pkCommandObject, const ObjectHandle_t &eID=NO_HANDLE)
eC_Bool GetCrossFade() const
ImageResource_t m_eLastFrameImage
Image which was shown during last frame (used to detect state changes)
Definition: GUIBlendButton.h:155
ImageResource_t m_ePreviousImage
ImageResource FROM which to blend.
Definition: GUIBlendButton.h:154
virtual void DoAnimate(const eC_Value &vTimes=eC_FromInt(1))
virtual eC_Bool DoDraw()
eC_UInt GetBlendDuration() const
void SetCrossFade(const eC_Bool &bCrossFade)
eC_Value m_vBlendFactor
Progress of blending transition (0 to m_uiBlendDuration)
Definition: GUIBlendButton.h:156
CGUIBlendButton(const CGUIBlendButton &kSource)
eC_Bool m_bCrossFade
When crossfading the old and new image will be simultaneously blended. Otherwise the new old image is...
Definition: GUIBlendButton.h:158
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
void Init()
Helper for initialization.
virtual void ReadFromStream()
Button specialization that uses images for graphical representation.
Definition: GUIButton.h:69
This is the Guiliani base class for all composite objects.
Definition: GUICompositeObject.h:70