Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUIObjectHandleResource.h
Go to the documentation of this file.
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 GUI_OBJECTHANDLE_RESOURCE__H_
11#define GUI_OBJECTHANDLE_RESOURCE__H_
12#include "eC_Types.h"
13#include <limits.h>
14
16//
17// DO NOT EDIT THIS FILE!!! Add your own IDS within UserXXXResource.h files!
18// DO NOT EDIT THIS FILE!!! Add your own IDS within UserXXXResource.h files!
19// DO NOT EDIT THIS FILE!!! Add your own IDS within UserXXXResource.h files!
20//
21
22// -----------------------------------------------------------------------------------------
24// Attention: If a new ID is added, please also change the number of OBJ_START_TAG,
25// so that NO_HANDLE is always 0, which should guarantee that the user
26// ID numbers will not be affected when adding Guiliani IDs.
27// If you add a new Guiliani ID you should add it in front of the enumeration
28// so that the other Guiliani IDs will not be shifted, i.e. add the
29// new Guiliani ID below.
30
31// Please add Guiliani ObjectIDs right here:
32#define OBJECTID_TABLE \
33ENTRY(OBJ_MSGBOX_SAVEAS) \
34ENTRY(OBJ_MSGBOX_SAVE) \
35ENTRY(OBJ_MSGBOX_CANCEL) \
36ENTRY(OBJ_MSGBOX_OK) \
37ENTRY(OBJ_KEYBOARD_LAYOUT_ABC_CAPITAL) \
38ENTRY(OBJ_KEYBOARD_LAYOUT_ABC) \
39ENTRY(OBJ_KEYBOARD_LAYOUT_123) \
40ENTRY(OBJ_KEYBOARD_LAYOUT_SYM)
41
42// Calculate the value for the START_TAG used in th enum definition below.
43#define ENTRY_ENUM(a) -1
44#define ENTRY(obj_id) -1
46#undef ENTRY
47#undef ENTRY_ENUM
48
49#ifndef GUILIANI_GUILIANILIB
50 #include "UserObjectResource.h"
51#endif
52
55{
56 OBJ_START_TAG = ciCalculatedObjStartTag-1,
57#define ENTRY_ENUM(a) a,
58#define ENTRY(obj_id) obj_id,
60 NO_HANDLE, // must be a constant 0
61#ifndef GUILIANI_GUILIANILIB
62 USER_OBJECTID_TABLE
63#endif
64#undef ENTRY
65#undef ENTRY_ENUM
66 NOF_OBJECTHANDLES,
67 GUILIANI_INTERNAL_ID = INT_MAX // Do not touch this. Required for ensuring consistent enum type size across libraries.
68};
69
70// Check if the DUMMY value is always 0. If not compile error!
71typedef int static_assert_something[(NO_HANDLE == 0) ? 1 : -1];
72
74#define MAP_OBJID_TO_ARRAY(OBJ_ID) static_cast<eC_UInt>(OBJ_ID-OBJ_START_TAG-1)
76#define UNMAP_OBJENTRY_TO_ARRAY(OBJ_ENTRY) static_cast<ObjectHandle_t>(OBJ_ENTRY+OBJ_START_TAG+1)
77// Amount of resources.
78extern const eC_UInt cuiNOFObjectHandles;
79
80#endif
ObjectHandle_t
List of object resource ids.
Definition: GUIObjectHandleResource.h:55
const eC_UInt cuiNOFObjectHandles
Used to contain the highest index cuiNOFXXXClasses = MAP_PROPID_TO_ARRAY(NOF_XXXCLASSES);.
Definition: GUIConfig.cpp:61
#define OBJECTID_TABLE
Object Handles.
Definition: GUIObjectHandleResource.h:32
int static_assert_something[(NO_HANDLE==0) ? 1 :-1]
Will throw compile error negative subscript if NO_HANDLE is NOT 0!
Definition: GUIObjectHandleResource.h:71
const int ciCalculatedObjStartTag
preprocessor generates for all entries of OBJECTID_TABLE: -1 -1 -1..., resulting in a mathematical ex...
Definition: GUIObjectHandleResource.h:45