Guiliani  Version 2.6 revision 7293 (documentation build 12)
GUITextResource.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_TEXT_RESOURCE__H_
11#define GUI_TEXT_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#define TEXT_TABLE \
25 ENTRY(DUMMY_TEXT)
26
27// Calculate the value for the START_TAG used in th enum definition below.
28#define ENTRY_ENUM(a) -1
29#define ENTRY(a) -1
31#undef ENTRY
32#undef ENTRY_ENUM
33
34#ifndef GUILIANI_GUILIANILIB
35 #include "UserTextResource.h"
36#endif
37
40{
41 TEXT_START_TAG = ciCalculatedTextStartTag,
42#define ENTRY_ENUM(a) a,
43#define ENTRY(a) a,
45 // There are no default texts! All texts that are subject to internationalization are defined
46 // by the user.
47#ifndef GUILIANI_GUILIANILIB
48 USER_TEXT_TABLE
49#endif
50#undef ENTRY
51#undef ENTRY_ENUM
52 NOF_TEXTRESOURCES,
53 GUILIANI_INTERNAL_TEXT = INT_MAX // Do not touch this. Required for ensuring consistent enum type size across libraries.
54};
55
56
57// Check if the DUMMY value is always 0. If not compile error!
58typedef int static_assert_something[(DUMMY_TEXT == 0) ? 1 : -1];
59
61#define MAP_TEXTID_TO_ARRAY(TEXT_ID) static_cast<eC_UInt>(TEXT_ID-TEXT_START_TAG-1)
63#define UNMAP_TEXTENTRY_TO_ARRAY(TEXT_ENTRY) static_cast<TextResource_t>(TEXT_ENTRY+TEXT_START_TAG+1)
64// Amount of resources.
65extern const eC_UInt cuiNOFTextResources;
66
67#endif
const int ciCalculatedTextStartTag
preprocessor generates for all entries of TEXT_TABLE: -1 -1 -1..., resulting in a mathematical expres...
Definition: GUITextResource.h:30
int static_assert_something[(DUMMY_TEXT==0) ? 1 :-1]
Will throw compile error negative subscript if DUMMY_TEXT is NOT 0!
Definition: GUITextResource.h:58
TextResource_t
List of text resource ids.
Definition: GUITextResource.h:40
#define TEXT_TABLE
Text resources.
Definition: GUITextResource.h:24
const eC_UInt cuiNOFTextResources
Used to contain the highest index cuiNOFXXXClasses = MAP_PROPID_TO_ARRAY(NOF_XXXCLASSES);.