Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUISetObjectStateCmd.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#if !defined(SETGUIOBJECTSTATE_COMMAND_H)
11#define SETGUIOBJECTSTATE_COMMAND_H
12
13#include "GUICommand.h"
15
24{
25public:
34 CGUISetObjectStateCmd(ObjectHandle_t eTargetObject, eC_Bool bToggle, eC_Bool bFocusable, eC_Bool bInvisible, eC_Bool bGrayedOut, eC_Bool bDisabled);
35
38
39#if defined(GUILIANI_STREAM_GUI)
44 virtual void ReadFromStream();
45#endif
46
47#if defined(GUILIANI_WRITE_GUI)
53 virtual void WriteToStream(const eC_Bool bWriteClassID=false);
54#endif
55
56protected:
58 void Do();
59
62
64 eC_Bool m_bToggle;
65
66 // Object states which can be changed through this command
67 eC_Bool m_bFocussable;
68 eC_Bool m_bInvisible;
69 eC_Bool m_bGrayedOut;
70 eC_Bool m_bDisabled;
71};
72
73#endif // SETGUIOBJECTSTATE_COMMAND_H
Helper Macros in Guiliani
ObjectHandle_t
List of object resource ids.
Definition: GUIObjectHandleResource.h:55
Command object base class.
Definition: GUICommand.h:127
An example for a custom command that changes the object states of an GUIObject.
Definition: GUISetObjectStateCmd.h:24
eC_Bool m_bDisabled
Changeable state: Disabled.
Definition: GUISetObjectStateCmd.h:70
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
CGUISetObjectStateCmd(ObjectHandle_t eTargetObject, eC_Bool bToggle, eC_Bool bFocusable, eC_Bool bInvisible, eC_Bool bGrayedOut, eC_Bool bDisabled)
void Do()
Implements the actual command functionality.
eC_Bool m_bFocussable
Changeable state: focusable.
Definition: GUISetObjectStateCmd.h:67
virtual void ReadFromStream()
ObjectHandle_t m_eTargetObject
Target object ID.
Definition: GUISetObjectStateCmd.h:61
eC_Bool m_bInvisible
Changeable state: Invisible.
Definition: GUISetObjectStateCmd.h:68
eC_Bool m_bGrayedOut
Changeable state: Grayed out.
Definition: GUISetObjectStateCmd.h:69
eC_Bool m_bToggle
Specifies whether the states shall be toggled on/off, or if they will be set exactly as given.
Definition: GUISetObjectStateCmd.h:64
CGUISetObjectStateCmd()
Default constructor to be used by a factory.