INOS
cinossiotftexp.h
1//******************************************************************************
41//******************************************************************************
42
43#if !defined(_CINOSSIOTFTEXP)
44#define _CINOSSIOTFTEXP
45
46
47//------------------------------------------------------------------------------
48// includes
49//------------------------------------------------------------------------------
50
51#include <inos_xml.h>
52#include <cinossiotft.h>
53
54
55//------------------------------------------------------------------------------
56// defines
57//------------------------------------------------------------------------------
58
60#ifdef SMOS_COMPATIBLE
61 /*
62 * NOTE This is a workaround to support user layouts requiring many variables at the cost
63 * of having only 2 button rows instead of 6. To properly fix this issue,
64 * we need to rework this module in order to dynamically map touch identifiers to
65 * explorer items.
66 */
67 #define DF_SIOTFTEXP_MAX_PROCS 64
68 #define DF_SIOTFTEXP_MAX_VARS 96
69#else
70 #define DF_SIOTFTEXP_MAX_PROCS 16
71 #define DF_SIOTFTEXP_MAX_VARS 16
72#endif
73
75#define DF_SIOTFTEXP_NUMBER_NAME 80
77#define DF_SIOTFTEXP_PROC_NAME 32
79#define DF_SIOTFTEXP_TAB_NAME 32
80
81
82// flags
83
85#define DF_SIOTFTEXP_FLAG_REPAINT 0x00000001
87#define DF_SIOTFTEXP_FLAG_RESET 0x00000002
89#define DF_SIOTFTEXP_FLAG_UPD_ENABLED 0x00000004
91#define DF_SIOTFTEXP_FLAG_LINK_UP 0x00000008
92//
93#define DF_SIOTFTEXP_FLAG_USER_LAYOUT 0x00000010
94#define DF_SIOTFTEXP_FLAG_REFRESH_BLOCKED 0x00000020
95#define DF_SIOTFTEXP_FLAG_DEBUG 0x00000040
96#define DF_SIOTFTEXP_FLAG_HARDCOPY 0x00000080
97
99#define DF_SIOTFTEXP_TYPE 0x000F0000
100#define DF_SIOTFTEXP_TYP_VAR 0x00010000
101#define DF_SIOTFTEXP_TYP_STATIC 0x00020000
102#define DF_SIOTFTEXP_TYP_NOP 0x00030000
103#define DF_SIOTFTEXP_TYP_MEMORY 0x00040000
104#define DF_SIOTFTEXP_TYP_TITLE 0x00050000
105//#define DF_SIOTFTEXP_TYP_GRAPHICS 0x00060000 // not yet done
106#define DF_SIOTFTEXP_TYP_BMP 0x00070000
107
108#define DF_SIOTFTEXP_CHARACTERISTIC 0x00F00000
109#define DF_SIOTFTEXP_CHAR_BIG 0x00100000
110#define DF_SIOTFTEXP_CHAR_HEX 0x00200000
111#define DF_SIOTFTEXP_CHAR_INVISIBLE 0x00400000
112#define DF_SIOTFTEXP_CHAR_VALUE 0x00800000
113#define DF_SIOTFTEXP_CHAR_ACTIVE 0x01000000
114
115#define DF_SIOTFTEXP_USERLEVEL 0xF0000000
116
117// makro to round an signed value correctly, used because fixed numbers contain
118// a '1' in the lowest bit for the inco-server that adulterates the real value.
119// This effect does not matter with fixed numbers but for intergers it is
120// very bothering as they get truncated.
121#define ROUND_SIGNED(value) value<0 ? value-=0.5 : value+=0.5;
122
123// fix value, reason see comment for ROUND_SIGNED
124#define FIX_SIGNED(type, value) (((type==defType_int64)||(type==defType_int32)||(type==defType_int16)||(type==defType_int8))&&(value < 0)) ? value-=1 : value;
125
126// adjust value, reason see comment for ROUND_SIGNED
127#define ADJUST_SIGNED(value) value = value - fixed64(0,1);
128
129
130/*
131 Maximally 6 button rows, maximally 16 variables, 16 procedures and 16 keys
132 simultaneously on screen (in one tab)
133
134 Button codes:
135 0x00: nothing, no key pressed, no button pressed
136 0x01-0x0F: special/internal commands
137 0x01: row 1 scroll left
138 0x02: row 1 scroll right
139 0x03: row 2 scroll left
140 0x04: row 2 scroll right
141 0x05: row 3 scroll left
142 0x06: row 3 scroll right
143 0x07: row 4 scroll left
144 0x08: row 4 scroll right
145 0x09: row 5 scroll left
146 0x0A: row 5 scroll right
147 0x0B: row 6 scroll left
148 0x0C: row 6 scroll right
149
150 0x0D: reset required
151*/
152#define DF_SIOTFTEXP_CMD_SPECIAL 0x10
153#define DF_SIOTFTEXP_CMD_LEVEL 0x20
154#ifdef SMOS_COMPATIBLE
155 /*
156 * NOTE This is a workaround to support user layouts requiring many variables at the cost
157 * of having only 2 button rows instead of 6. To properly fix this issue,
158 * we need to rework this module in order to dynamically map touch identifiers to
159 * explorer items.
160 */
161/*
162 0x10-0x2F: row 1 buttons
163 0x30-0x4F: row 2 buttons
164 0x50-0x6F: 96 variables to edit
165 0x70-0x8F:
166 0x90-0xAF:
167 0xB0-0xCF: 64 call procedure buttons
168 0xD0-0xDF:
169 0xE0-0xEF:
170 0xF0-0xFF: 16 matrix keys
171*/
172 #define DF_SIOTFTEXP_CMD_VARIABLE 0x50
173 #define DF_SIOTFTEXP_CMD_PROCEDURE 0xB0
174#else
175/*
176 0x10-0x2F: row 1 buttons
177 0x30-0x4F: row 2 buttons
178 0x50-0x6F: row 3 buttons
179 0x70-0x8F: row 4 buttons
180 0x90-0xAF: row 5 buttons
181 0xB0-0xCF: row 6 buttons
182 0xD0-0xDF: 16 variables to edit
183 0xE0-0xEF: 16 call procedure buttons
184 0xF0-0xFF: 16 matrix keys
185*/
186 #define DF_SIOTFTEXP_CMD_VARIABLE DF_SIOTFT_CMD_AREA
187 #define DF_SIOTFTEXP_CMD_PROCEDURE 0xE0
188#endif
189#define DF_SIOTFTEXP_CMD_KEYMATRIX 0xF0
190
191
193enum ETFTCharCmd
194{
195 eTFTCharSet,
196 eTFTCharAdd,
197 eTFTCharClear
198};
199
200
201//------------------------------------------------------------------------------
202// variables
203//------------------------------------------------------------------------------
204
205class CINOSSioTftExp;
207
211{
212 friend class CINOSSioTftExp;
213 friend class CINOSSioTftExpTab;
214
215 public:
221
225
230 virtual void GetValueLimited(char* apBuf, uint32 auSize);
231
236 virtual void GetValue(char* apBuf, uint32 auSize);
237
241 virtual void SetValue(char* apBuf);
242
247 virtual void GetUnit(char* apBuf, uint32 auSize);
248
252 virtual uint32 GetCharacteristics();
253
258 bool SetCharacteristics(uint32 auChar, ETFTCharCmd aeCmd);
259
264 virtual bool IsWritable(uint32 auUserLevel);
265
271 virtual void SelLanguage(const char* apLangName, const char* apLangFile,
272 const char* apLangFileEnd);
273
277 virtual bool UpdateInco();
278
282 virtual bool RepaintNeeded();
283
287 virtual const char* GetName();
288
293 virtual const char* FindName(const char* apLangName=NULL) { return NULL; }
294
299 virtual void GetDefaultName(char* apBuf, uint32 auSize) {
300 const char* name=FindName(NULL);
302 }
303
306 virtual bool CanToggle() {return false;};
307
310 virtual void Toggle() {};
311
312
313 virtual uint16 GetCoordX() {
314 return m_uCoordX;
315 }
316
317 virtual uint16 GetCoordY() {
318 return m_uCoordY;
319 }
320
321 virtual void SetCoordY(uint16 auCoordY) {
323 }
324
325 virtual uint16 GetSizeX() {
326 return m_uSizeX;
327 }
328
329 virtual uint16 GetSizeY() {
330 return m_uSizeY;
331 }
332
333 virtual bool HitTest(uint16 auCoordX, uint16 auCoordY) {
334 if (m_uType&DF_SIOTFTEXP_CHAR_INVISIBLE) {
335 return false;
336 }
339 }
340
341 virtual EBlockTextAlignment GetAlignment() {
342 return m_eAlign;
343 }
344
345 uint8 GetForeColor();
346
347 uint8 GetBackColor();
352
353 uint8 GetFrame() {
354 return m_uFrame;
355 }
356
357 STFTFontInfo& GetFont() {
358 return m_Font;
359 }
360
361 void SetReadOnly () {
362 m_bUserReadOnly = true;
363 }
364
365 void SetWritable () {
366 m_bUserReadOnly = false;
367 }
368
369 uint8 GetKeyBoard () const {
370 return m_uKeyboard;
371 }
372
373 protected:
374 CINOSSioTftExpTab* m_pParent;
378 const char* m_pName;
380 uint32 m_uType;
384 uint16 m_uCoordX;
386 uint16 m_uCoordY;
390 uint16 m_uSizeX;
392 uint16 m_uSizeY;
393 EBlockTextAlignment m_eAlign;
394 uint8 m_uColFore;
395 uint8 m_uColBack;
396 uint8 m_uFrame;
405};
406
407
408//------------------------------------------------------------------------------
412{
413 friend class CINOSSioTftExpTab;
414
415
416 public:
417
420 typedef void (*OnValueChanged)(CTFTIncoVariable*, void*, const double);
421
426
427 public:
431
434 virtual ~CTFTIncoVariable() {}
435
441 virtual void GetValueLimited(char* apBuf, uint32 auSize);
442
447 virtual void GetValue(char* apBuf, uint32 auSize);
448
452 virtual void SetValue(char* apBuf);
453
458 virtual void GetUnit(char* apBuf, uint32 auSize);
459
463 virtual uint32 GetCharacteristics();
464
469 virtual bool IsWritable(uint32 auUserLevel);
470
474 virtual bool UpdateInco();
475 virtual bool RepaintNeeded();
476
481 virtual const char* FindName(const char* apLangName=NULL);
482
488
491
494 virtual bool CanToggle();
495
498 virtual void Toggle();
499
502 virtual CINCOItem* GetItem () const;
503
507 virtual void SetDigits (int8 aiDigits);
508
509 protected:
512 void ValueChanged(const double value);
513
514 protected:
526 static void* s_pContext;
528 real64 m_dMin;
529 real64 m_dMax;
530
531};
532
533
534//------------------------------------------------------------------------------
538{
539 public:
543 {
544 m_uType|=DF_SIOTFTEXP_TYP_NOP;
545 }
546
549 virtual ~CTFTIncoNop() {}
550};
551
552
553//------------------------------------------------------------------------------
557{
558 public:
566
569 virtual ~CTFTIncoTitle() {}
570
575 virtual const char* FindName(const char* apLangName=NULL);
576};
577
578
579//------------------------------------------------------------------------------
583{
584 friend class CINOSSioTftExpTab;
585
586 public:
594
597 virtual ~CTFTIncoStatic() {}
598
603 virtual void GetValue(char* apBuf, uint32 auSize);
604
609 virtual const char* FindName(const char* apLangName=NULL);
610
611 protected:
613 const char* m_pValue;
614};
615
616
617//------------------------------------------------------------------------------
621{
622 public:
630
633 virtual ~CTFTIncoMemory() {}
634
639 virtual void GetValue(char* apBuf, uint32 auSize);
640
644 virtual void SetValue(char* apBuf);
645
649 virtual uint32 GetCharacteristics();
650
655 virtual bool IsWritable(uint32 auUserLevel);
656
661 virtual const char* FindName(const char* apLangName=NULL);
662
666 void SetAdr(uint32 auAdr) {
668 }
669
670 protected:
673
674};
675
676
677//------------------------------------------------------------------------------
681{
682 friend class CINOSSioTftExpTab;
683
684 public:
689 , m_pData((uint8*)apData), m_uSize(auSize)
690 {
691 m_uType|=DF_SIOTFTEXP_TYP_BMP;
692 }
693
696 virtual ~CTFTIncoBitmap() {}
697
702// virtual void GetValue(char* apBuf, uint32 auSize);
703
708 virtual const char* FindName(const char* apLangName=NULL);
709
710 void SetCoordY(uint16 auCoordY) {
711 // do nothing
712 }
713 uint8* GetData() {
714 return m_pData;
715 }
716 uint16 GetSize() {
717 return m_uSize;
718 }
719
720 protected:
722 uint8* m_pData;
723 uint16 m_uSize;
724};
725
726
727//------------------------------------------------------------------------------
731{
732 public:
738 CINCOProcedure* apProcItem);
739
743 const char* GetName() { return m_pName; }
744
745 void GetDefaultName(char* apBuf, uint32 auSize) {
746 const char* name=FindName(NULL);
748 }
749
750 const char* FindName(const char* apLangName=NULL);
751
757 void SelLanguage(const char* apLangName, const char* apLangFile,
758 const char* apLangFileEnd);
759
760 inline uint32 GetCharacteristics() {
761 return m_uCharacteristics;
762 }
763
764 bool SetCharacteristics(uint32 auChar, ETFTCharCmd aeCmd);
765
770 bool RepaintNeeded();
771
775 CINCOProcedure* GetProc() {
776 return m_pProc;
777 }
778
779 uint16 GetCoordX() {
780 return m_uCoordX;
781 }
782
783 uint16 GetCoordY() {
784 return m_uCoordY;
785 }
786
787 uint16 GetSizeX() {
788 return m_uSizeX;
789 }
790
791 uint16 GetSizeY() {
792 return m_uSizeY;
793 }
794
795 bool HitTest(uint16 auCoordX, uint16 auCoordY) {
798 }
799
800 const char* GetBitmap() {
801 if (m_uCharacteristics&DF_SIOTFTEXP_CHAR_ACTIVE) {
802 return m_pBitmapActive;
803 } else {
804 return m_pBitmapInactive;
805 }
806 }
807
808 void Call();
809
810 protected:
811 CINOSSioTftExpTab* m_pParent;
815 const char* m_pName;
817 CINCOProcedure* m_pProc;
826 const char* m_pBitmapActive;
827 const char* m_pBitmapInactive;
830};
831
834
835
836//------------------------------------------------------------------------------
837// CINOSSioTftExpTab
838//------------------------------------------------------------------------------
839
849{
851 friend class CINOSSioTftExp;
852
853 public:
859
863
868
873
878
883
887 const char* GetDefaultName() {
888 return m_xTabNode.getAttribute(XML_ATTR_NAME_NAME);
889 }
890
896
902
908 CINOSSioTftExpTab* FindTab(const char* const apTab, bool abSelect);
909
910 CTFTIncoMember* FindMember(const char* const apPath);
911
912 TINOSSioTftExpProc FindProc(const char* const apPath);
913
919
926 void SelLanguage(const char* apLangName, bool abRecursive,
927 const char* apLangFile, const char* apLangFileEnd);
928
933 bool RepaintNeeded();
934
939 return m_uCharacteristics;
940 }
941
947
948 uint8 GetForeColor() {
949 if (m_uColFore!=255) {
950 return m_uColFore;
951 }
952 return m_pParent->GetForeColor();
953 }
954
955 uint8 GetBackColor() {
956 if (m_uColBack!=255) {
957 return m_uColBack;
958 }
959 return m_pParent->GetBackColor();
960 }
961
962 virtual uint16 GetCoordX() {
963 return m_uCoordX;
964 }
965
966 virtual uint16 GetCoordY() {
967 return m_uCoordY;
968 }
969
970 virtual void SetCoordX(uint16 auCoordX) {
971 m_uCoordX=auCoordX;
972 }
973
974 virtual void SetCoordY(uint16 auCoordY) {
975 m_uCoordY=auCoordY;
976 }
977
978 virtual uint16 GetSizeX() {
979 return m_uSizeX;
980 }
981
982 virtual uint16 GetSizeY() {
983 return m_uSizeY;
984 }
985
986 bool HitTest(uint16 auCoordX, uint16 auCoordY) {
987 return ((m_uCoordX<=auCoordX)&&(auCoordX<(m_uCoordX+m_uSizeX))&&
988 (m_uCoordY<=auCoordY)&&(auCoordY<(m_uCoordY+m_uSizeY)));
989 }
990
991 private:
993 XMLNode m_xTabNode;
995 const char* m_pName;
997 CINOSSioTftExpTab* m_pChildrenHead;
999 CINOSSioTftExpTab* m_pPrev;
1001 CINOSSioTftExpTab* m_pNext;
1003 CINOSSioTftExpTab* m_pParent;
1005 CINOSSioTftExpTab* m_pActive;
1007 uint32 m_uTabCount;
1009 uint32 m_uActualColumns;
1011 uint32 m_uCharacteristics;
1013 uint16 m_uWidth;
1015 uint8 m_uFirstVisibleChild;
1016
1018 uint16 m_uCoordX;
1020 uint16 m_uCoordY;
1021// uint16 m_uCfgWidth;
1022// uint16 m_uCfgHeight;
1023 uint16 m_uSizeX;
1024 uint16 m_uSizeY;
1025 uint8 m_uColFore;
1026 uint8 m_uColBack;
1027 const char* m_pBitmapActive;
1028 const char* m_pBitmapInactive;
1029
1031 TINOSSioTftExpProc m_pProcs[DF_SIOTFTEXP_MAX_PROCS];
1034
1035};
1036
1037
1038//------------------------------------------------------------------------------
1039// CTFTIEuint8
1040//------------------------------------------------------------------------------
1041
1047class CTFTIELuint8:public CINCOuint8
1048{
1049 // constructor
1050 public:
1063 char* aName, // object name
1064 void* aData, // pointer to object data
1065 CINOSSioTftExp* apExplorer, // pointer to my var exp
1066 uint32 aLower, // lower bound
1067 uint32 aUpper, // upper bound
1068 char* aUnit=0, // unit of object
1069 unsigned short aChar=defCharShowDec,// characteristics of object
1070 uint16 aKeyLevel=cKeyLevelMin, // keylevel of object
1071 unsigned short aArrayLength=1 // array length of object
1072 );
1073
1081 char* aName,
1082 void* aData,
1083 CINOSSioTftExp* apExplorer, // pointer to my var exp
1085 );
1086
1087
1088 // public member functions
1089 public:
1097 virtual long Put(void* aSource, long aIndex=0, long aOffset=0);
1098
1099 protected:
1102
1103 // allow dynamic object handling (new/delete)
1105};
1106
1107
1108//------------------------------------------------------------------------------
1109// CINOSSioTftExp
1110//------------------------------------------------------------------------------
1111
1118{
1119 typedef void (*InitDoneFunc)(CINOSSioTftExp* apExp, void* apContext);
1120 typedef void (*OnTabChangeFunc)(void* apContext);
1121
1122 //--------------------------------------------------------------------------
1123 // user interface
1124 //--------------------------------------------------------------------------
1125 public:
1126 static CINOSSioTftExp* Find(const char* apExplorer);
1127
1134
1138
1143
1148
1153
1158
1164 void GetActualTab(char* apTab, uint32 auLength, bool abFullPath=false);
1165
1169 void SetActualTab(char* apTab);
1170
1176
1182
1188
1193 bool RepaintNeeded();
1194 void Refresh ();
1195
1203 void HardCopy (int16 aiXX1 = -1, int16 aiYY1 = -1,
1204 int16 aiXX2 = -1, int16 aiYY2 = -1,
1205 bool abUseRLE = true);
1206
1211 return m_uUserKeys;
1212 }
1213
1218 return m_uFlags;
1219 }
1220
1225 return m_pTopTab;
1226 }
1227
1228 void EnableRefresh(bool abRefresh) {
1229 if (abRefresh) {
1230 m_uFlags&=~DF_SIOTFTEXP_FLAG_REFRESH_BLOCKED;
1231 } else {
1232 m_uFlags|=DF_SIOTFTEXP_FLAG_REFRESH_BLOCKED;
1233 }
1234 }
1235
1241 void SetTabCharacteristics(const char* const acTabPath,
1242 uint32 auCharacteristics, ETFTCharCmd aeCmd);
1243
1249 bool SetVarCharacteristics(const char* const acVarPath,
1250 uint32 auCharacteristics, ETFTCharCmd aeCmd);
1251
1252 bool SetProcCharacteristics(const char* const acPath,
1253 uint32 auCharacteristics, ETFTCharCmd aeCmd);
1254
1257 void Reset();
1258
1262 void SetInitDoneCallback(InitDoneFunc callback, void* apContext);
1263
1266 void SetTabChangeCallback(OnTabChangeFunc callback, void* apContext);
1267
1268 //--------------------------------------------------------------------------
1269 // for internal use only, not documented by Doxygen
1270 //--------------------------------------------------------------------------
1271#ifndef DOXYGEN_USER_BUILD
1272
1273 friend class CINOSSioTftExpTab;
1274 friend class CTFTIELuint8;
1275
1276 public:
1283 static void MakeFloatValue(char* apBuf, void* apValue, char acFormat, uint16 auDigits);
1284
1292
1297 static void AppendSpaces(char* apText, uint32 auSize);
1298
1299 protected:
1302 void Init();
1303
1309 ASSERT_ALWAYS(arInfo.m_uHeight!=0);
1310 ASSERT_ALWAYS(arInfo.m_uZoomY!=0);
1311 return m_pSioTft->GetHeight()/arInfo.GetRealHeight();
1312 }
1313
1319 ASSERT_ALWAYS(arInfo.m_iWidth!=0);
1320 ASSERT_ALWAYS(arInfo.m_uZoomX!=0);
1321 return m_pSioTft->GetWidth()/(arInfo.m_iWidth*arInfo.m_uZoomX);
1322 }
1323
1330
1337
1342
1347
1354
1360
1371
1372 void TextOutFix(uint16 auStartCoordX, uint16 auStartCoordY,
1375 uint32 auFlags=0);
1376
1380
1385 return m_pNext;
1386 }
1387
1391
1394 virtual void Action();
1395
1399
1403 void ProcessLangFile(char* apFile);
1404
1408
1409 protected:
1425 const char* m_pConfig;
1429 const char** m_ppLangFile;
1431 const char** m_ppLangFileEnd;
1433 const char** m_ppLangFiles;
1434
1439 CTFTIncoMember* m_TouchMembers[DF_SIOTFTEXP_MAX_VARS];
1442
1451
1487 const char* m_pTFTProject;
1489 const char* m_pMacroFile;
1495 OnTabChangeFunc m_pTabChangeCallback;
1498
1499 public:
1502
1503#endif // DOXYGEN_USER_BUILD
1504
1505 // end CINOSSioTftExp
1506};
1507
1508
1509//------------------------------------------------------------------------------
1513inline void SkipText(const char*& apText)
1514{
1515 while (*apText) {
1516 apText++;
1517 }
1518}
1519
1520
1521//------------------------------------------------------------------------------
1525inline void SkipNull(const char*& apText)
1526{
1527 while (!*apText) {
1528 apText++;
1529 }
1530}
1531
1532
1533//------------------------------------------------------------------------------
1534// global defs
1535//------------------------------------------------------------------------------
1536
1537
1538
1539//------------------------------------------------------------------------------
1540
1541#endif // _CINOSSIOTFTEXP
1542
1543
1544//------------------------------------------------------------------------------
1545// end of file
#define DECLARE_DYNAMIC(aClass)
Definition cinospartitionmemory.h:328
EA eDIPTFT43-A display declaration.
EBlockTextAlignment
Define text alignment in block text output.
Definition cinossiotft.h:134
Definition cinosmcmodule.h:1900
Definition cinosmutex.h:36
Definition inos_syn.h:456
Definition cinossiotftexp.h:731
uint32 m_uCharacteristics
Characteristics of the proc.
Definition cinossiotftexp.h:829
uint16 m_uSizeY
Y size of proc.
Definition cinossiotftexp.h:825
CINCOProcedure * GetProc()
Get inco item of registered procedure.
Definition cinossiotftexp.h:775
bool UpdateInco()
Update inco item pointer e.g. after new registrations.
uint16 m_uCoordY
Y coordinate of proc.
Definition cinossiotftexp.h:821
void SelLanguage(const char *apLangName, const char *apLangFile, const char *apLangFileEnd)
Set name according to selected language (or default).
CINOSSioTftExpProc(CINOSSioTftExpTab *apParent, XMLNode axConfigNode, CINCOProcedure *apProcItem)
Constructor.
const char * m_pName
Pointer to current name (depending on language).
Definition cinossiotftexp.h:815
uint16 m_uSizeX
X size of proc.
Definition cinossiotftexp.h:823
uint16 m_uCoordX
X coordinate of proc.
Definition cinossiotftexp.h:819
const char * GetName()
Get current name of member (depends on selected language).
Definition cinossiotftexp.h:743
CINCOProcedure * m_pProc
Inco item of registered procedure.
Definition cinossiotftexp.h:817
XMLNode m_xProcNode
Config node for procedure.
Definition cinossiotftexp.h:813
Tabulator, holds all necessary info in a explorer tabulator.
Definition cinossiotftexp.h:849
void AddVar(XMLNode axVarNode)
Add new variable to tab.
void SelLanguage(const char *apLangName, bool abRecursive, const char *apLangFile, const char *apLangFileEnd)
Set name according to selected language (or default).
virtual ~CINOSSioTftExpTab()
Destructor.
CINOSSioTftExpTab * GetTabAt(uint32 auIndex)
Get tab by index.
const char * GetDefaultName()
Get default name of tab.
Definition cinossiotftexp.h:887
void AddProc(XMLNode axProcNode)
Add new procedure to tab.
CINOSSioTftExpTab(XMLNode axTabNode, CINOSSioTftExpTab *apParent)
Constructor.
void InheritProcs(TINOSSioTftExpProc *apProcs)
Inherit procedures from parent tab to me.
CINOSSioTftExpTab * FindAndSelectTab(char *apTab)
Find tab by name and make it active.
void AddTab(CINOSSioTftExpTab *apSubTab)
Add new tab to list of children.
uint32 GetCharacteristics()
Get characteristics of tab.
Definition cinossiotftexp.h:938
bool SetCharacteristics(uint32 auChar, ETFTCharCmd aeCmd)
Change characteristics.
CINOSSioTftExpTab * FindTab(const char *const apTab, bool abSelect)
Find tab by name and make it active if desired.
void ReadTab(XMLNode axNode, uint32 auLevel=0)
Read in definition of a tab.
bool UpdateInco()
Update inco item pointers of items e.g. after new registrations.
Main inco explorer class for TFT display.
Definition cinossiotftexp.h:1118
CINOSSioTftExpTab * m_pVisibleTabs[256]
Mapping of all possible return values to the currently visible tabs.
Definition cinossiotftexp.h:1438
void GetActualVar(char *apVar, uint32 auLength)
Get default name of currently selected variable.
void * m_pInitDoneContext
Context for init done notification.
Definition cinossiotftexp.h:1493
void HandleHardcopy()
Handle hardcopy request.
uint16 m_uHeight
Height of display.
Definition cinossiotftexp.h:1455
const char * m_pConfig
Name of explorer config.
Definition cinossiotftexp.h:1425
STFTFontInfo m_VarFont
Font definition for members (variables).
Definition cinossiotftexp.h:1446
CINOSSioTftExpTab * m_pActiveTab
Pointer to active tab that is shown with variables.
Definition cinossiotftexp.h:1419
uint32 m_uFlags
General flags.
Definition cinossiotftexp.h:1481
void SetTabChangeCallback(OnTabChangeFunc callback, void *apContext)
Register callback for tab change notification.
STouchButton m_DefButton
Default button definition.
Definition cinossiotftexp.h:1436
uint8 m_uUnitColumn
Column where units start.
Definition cinossiotftexp.h:1469
CINOSSioTftExp * m_pNext
Next explorer in list.
Definition cinossiotftexp.h:1413
uint32 ShowTabFix(CINOSSioTftExpTab *apTab, uint32 auLevel)
Show tab with all elements.
const char * GetLangFileName(uint32 auLangIndex) const
Check if language file by index available.
uint32 m_uUserKeys
Pattern of pressed user (matrix) keys.
Definition cinossiotftexp.h:1483
STFTHardcopy m_HardCopyInstruction
Hardcopy command settings.
Definition cinossiotftexp.h:1479
const char * m_pMacroFile
The name of the macro file containing display bitmaps, fonts etc.
Definition cinossiotftexp.h:1489
STFTFontInfo m_VarFontBig
Font definition for big members (variables).
Definition cinossiotftexp.h:1448
void GetActualTab(char *apTab, uint32 auLength, bool abFullPath=false)
Get currently selected tab.
static void MakeFloatValue(char *apBuf, void *apValue, char acFormat, uint16 auDigits)
Format float value (for no-float targets).
uint8 m_uVarColumns
Columns of display.
Definition cinossiotftexp.h:1465
uint32 GetFlags()
Get internal flags (e.g. shift mode).
Definition cinossiotftexp.h:1217
static uint32 ReplaceNewLines(char *apText, uint32 auSize, bool abEscaping)
Replace ' ' in a string with '|' for display, give count of newlines.
InitDoneFunc m_pInitDoneCallback
Callback for init done notification.
Definition cinossiotftexp.h:1491
const char * m_pTFTProject
The name of the display project.
Definition cinossiotftexp.h:1487
uint8 m_uUserLevel
User level for editing variables.
Definition cinossiotftexp.h:1463
uint32 m_uTime
Metering time how much we needed to handle events.
Definition cinossiotftexp.h:1485
void ShowProcsFix(CINOSSioTftExpTab *apTab)
Show procedures of given tab.
uint32 GetLanguage()
Get selected language to display.
uint32 GetRows(STFTFontInfo &arInfo)
Get number of rows for this font.
Definition cinossiotftexp.h:1308
uint32 ShowTab(CINOSSioTftExpTab *apTab, uint32 auLevel)
Show tab with all elements.
CINOSSioTftExp(const char *acName, CINOSSioTft *apDisplay, const char *acConfig)
Constructor.
uint32 GetColumns(STFTFontInfo &arInfo)
Get number of columns for this font.
Definition cinossiotftexp.h:1318
void * m_pTabChangeContext
Context for init done notification.
Definition cinossiotftexp.h:1497
CINOSSioTftExpTab * GetTopTab() const
To get the top tab pointer.
Definition cinossiotftexp.h:1224
STFTFontInfo m_TabFont
Font definition for tab buttons.
Definition cinossiotftexp.h:1444
OnTabChangeFunc m_pTabChangeCallback
Callback for init done notification.
Definition cinossiotftexp.h:1495
STFTFontInfo m_ProcFont
Font definition for procedure buttons.
Definition cinossiotftexp.h:1450
CINOSTime m_ThrobberTime
Timer for selecting next throbber image.
Definition cinossiotftexp.h:1441
static CINOSMutex m_mMutex
Make CINOSSioTftExp thread safe.
Definition cinossiotftexp.h:1501
void SetActualTab(char *apTab)
Set current tab.
const char ** m_ppLangFileEnd
Pointers to end of language file texts.
Definition cinossiotftexp.h:1431
void ResetDisplay()
Reset display, necessary after link problems.
void ShowVarsFix(CINOSSioTftExpTab *apTab, bool abNames=false)
Show vars, values with/without names at fixed positions.
uint16 m_uWidth
Width of display.
Definition cinossiotftexp.h:1453
CINOSSioTftExpTab * m_pTopTab
Pointer to upmost tab that holds the rest (never displayed).
Definition cinossiotftexp.h:1417
virtual ~CINOSSioTftExp()
Destructor.
CINOSSioTft * m_pSioTft
Pointer to display that outputs all our stuff.
Definition cinossiotftexp.h:1415
void SetInitDoneCallback(InitDoneFunc callback, void *apContext)
Register callback for notification about when the explorer is completely initialized.
uint32 GetPressedKeys()
Get pattern of pressed user keys (matrix).
Definition cinossiotftexp.h:1210
CINOSSioTftExp * GetNext()
Get next explorer inlist.
Definition cinossiotftexp.h:1384
uint8 m_uTabBtnSize
General size for tab buttons.
Definition cinossiotftexp.h:1471
uint8 m_uThrobberSize
Minimal space required for throbber (excluded from procedures)
Definition cinossiotftexp.h:1477
void GetActualVarValue(char *apVal, uint32 auLength)
Get value of actual selected variable.
void ActivateFirstChild()
Recursively activate the first child of the active tab.
void ShowProcs(CINOSSioTftExpTab *apTab)
Show procedures of given tab.
void ShowVars(uint32 auCoordY, CINOSSioTftExpTab *apTab, bool abNames=false)
Show vars, values with/without names.
static void AppendSpaces(char *apText, uint32 auSize)
Appends spaces to a string to fill the remaining part of the buffer.
void Init()
Init explorer depending on display size.
void SetUserLevel(uint32 auLevel)
Set user level.
void TextOut(uint16 auCoordX, uint16 auCoordY, char *pText, STFTFontInfo &arFontInfo, int16 aiStrLength=-1, uint32 auFlags=0)
Print a text with given font at given coordinates.
void HandleCommands()
Handle user commands and display events (key presses).
CINOSSemaphore m_CKeySemaphore
Semaphore to handle key presses and other actions.
Definition cinossiotftexp.h:1423
void HardCopy(int16 aiXX1=-1, int16 aiYY1=-1, int16 aiXX2=-1, int16 aiYY2=-1, bool abUseRLE=true)
bool UpdateInco()
Update inco item pointers of items e.g. after new registrations.
virtual void Action()
Main task function.
uint16 m_uTopDivider
Line of top divider (may be different on every tab).
Definition cinossiotftexp.h:1457
void SetTabCharacteristics(const char *const acTabPath, uint32 auCharacteristics, ETFTCharCmd aeCmd)
Set (add/remove) characteristics of a tab.
uint16 m_uLangCount
Number of available language files.
Definition cinossiotftexp.h:1427
uint16 m_uBottomDivider
Line of bottom divider.
Definition cinossiotftexp.h:1459
uint8 m_uThrobber
Index of throbber picture.
Definition cinossiotftexp.h:1475
CTFTIncoMember * m_pActiveVar
Pointer to active var that is selected for editing.
Definition cinossiotftexp.h:1421
uint8 m_uActLanguage
Index of actual language.
Definition cinossiotftexp.h:1461
static CINOSSioTftExp * m_pFirst
Start of linked list of explorers.
Definition cinossiotftexp.h:1411
const char ** m_ppLangFile
Pointers to processed language file texts.
Definition cinossiotftexp.h:1429
uint8 m_uProcBtnSize
General size for procedure buttons.
Definition cinossiotftexp.h:1473
void GetActualVarLang(char *apVar, uint32 auLength)
Get actual selected variable in selected language.
uint8 m_uValueColumn
Column where values start.
Definition cinossiotftexp.h:1467
bool SetVarCharacteristics(const char *const acVarPath, uint32 auCharacteristics, ETFTCharCmd aeCmd)
Set (add/remove) characteristics of a variable.
void Reset()
Manually reset display.
void SelLanguage(uint32 auLangIndex)
Select language to display.
void ProcessLangFile(char *apFile)
Terminate all strings with 0 so they can be used directly.
const char ** m_ppLangFiles
Pointers to available language file names.
Definition cinossiotftexp.h:1433
Definition cinossiotft.h:355
uint16 GetWidth()
Get number of horizontal pixels.
Definition cinossiotft.h:420
uint16 GetHeight()
Get number of vertical pixels.
Definition cinossiotft.h:427
Definition cinostask.h:52
Class for setting new language in a CINOSSioTftExp.
Definition cinossiotftexp.h:1048
CTFTIELuint8(char *aName, void *aData, CINOSSioTftExp *apExplorer, CINCOintConfig *aConfig=0)
Constructor.
CINOSSioTftExp * m_pExplorer
Pointer to my explorer to update language (in case of several displays).
Definition cinossiotftexp.h:1101
virtual long Put(void *aSource, long aIndex=0, long aOffset=0)
Put new value to item.
CTFTIELuint8(char *aName, void *aData, CINOSSioTftExp *apExplorer, uint32 aLower, uint32 aUpper, char *aUnit=0, unsigned short aChar=defCharShowDec, uint16 aKeyLevel=cKeyLevelMin, unsigned short aArrayLength=1)
Constructor.
Definition cinossiotftexp.h:681
CTFTIncoBitmap(CINOSSioTftExpTab *apParent, XMLNode axVarNode, void *apData, uint16 auSize)
Constructor.
Definition cinossiotftexp.h:687
virtual const char * FindName(const char *apLangName=NULL)
Get string form of current value.
uint8 * m_pData
Pointer to bitmap data.
Definition cinossiotftexp.h:722
virtual ~CTFTIncoBitmap()
Destructor.
Definition cinossiotftexp.h:696
Definition cinossiotftexp.h:211
uint16 m_uCoordY
Y coordinate of member (to check for touches).
Definition cinossiotftexp.h:386
virtual bool RepaintNeeded()
Update member and check if anything requires a repaint.
virtual void GetUnit(char *apBuf, uint32 auSize)
Get unit of member.
bool SetCharacteristics(uint32 auChar, ETFTCharCmd aeCmd)
Change characteristics.
virtual const char * GetName()
Get current name of member (depends on selected language).
uint16 m_uCoordX
X coordinate of member (to check for touches).
Definition cinossiotftexp.h:384
virtual void GetDefaultName(char *apBuf, uint32 auSize)
Get default name independent of language.
Definition cinossiotftexp.h:299
uint8 m_uKeyboard
required keyboard
Definition cinossiotftexp.h:398
CTFTIncoMember(CINOSSioTftExpTab *apParent, XMLNode axVarNode)
Constructor.
virtual ~CTFTIncoMember()
Destructor.
STFTFontInfo m_Font
Font for this member.
Definition cinossiotftexp.h:404
virtual void SetValue(char *apBuf)
Set new value.
bool m_bUserReadOnly
Flag indicating if the user is not allowed to change the member in this state.
Definition cinossiotftexp.h:402
uint32 m_uType
Type of member.
Definition cinossiotftexp.h:380
uint16 m_uColumns
Column setting (value, unit) for this member.
Definition cinossiotftexp.h:382
uint16 m_uSizeX
X size of member.
Definition cinossiotftexp.h:390
const char * m_pName
Pointer to current name (depending on language).
Definition cinossiotftexp.h:378
uint16 m_uSizeY
Y size of member.
Definition cinossiotftexp.h:392
virtual void GetValueLimited(char *apBuf, uint32 auSize)
Get string form of current value.
XMLNode m_xVarNode
Config node for this member.
Definition cinossiotftexp.h:376
virtual const char * FindName(const char *apLangName=NULL)
Find member name according to given language.
Definition cinossiotftexp.h:293
void SetBackColor(uint8 auColor)
bool m_bReadOnly
Flag indicating if the user is not allowed to change the member.
Definition cinossiotftexp.h:400
virtual uint32 GetCharacteristics()
Get characteristics of member.
virtual bool CanToggle()
Returns true if the member can be toggled.
Definition cinossiotftexp.h:306
virtual bool UpdateInco()
Update inco item pointer if member has one.
virtual bool IsWritable(uint32 auUserLevel)
Check if member is writable for editing with given level.
virtual void SelLanguage(const char *apLangName, const char *apLangFile, const char *apLangFileEnd)
Set name according to selected language (or default).
virtual void GetValue(char *apBuf, uint32 auSize)
Get string form of current value.
uint8 m_uHeight
Height of this member.
Definition cinossiotftexp.h:388
virtual void Toggle()
Toggles the value of this member.
Definition cinossiotftexp.h:310
Definition cinossiotftexp.h:621
virtual bool IsWritable(uint32 auUserLevel)
Check if member is writable for editing with given level.
virtual const char * FindName(const char *apLangName=NULL)
Find member name according to given language.
void SetAdr(uint32 auAdr)
Set memory address to show content of.
Definition cinossiotftexp.h:666
uintptr m_uAdr
Memory address to display content of.
Definition cinossiotftexp.h:672
virtual void GetValue(char *apBuf, uint32 auSize)
Get string form of current value.
virtual ~CTFTIncoMemory()
Destructor.
Definition cinossiotftexp.h:633
virtual uint32 GetCharacteristics()
Get characteristics of member.
virtual void SetValue(char *apBuf)
Set new value.
CTFTIncoMemory(CINOSSioTftExpTab *apParent, XMLNode axVarNode)
Constructor.
Definition cinossiotftexp.h:625
Definition cinossiotftexp.h:538
CTFTIncoNop(XMLNode axVarNode)
Constructor.
Definition cinossiotftexp.h:542
virtual ~CTFTIncoNop()
Destructor.
Definition cinossiotftexp.h:549
Definition cinossiotftexp.h:583
CTFTIncoStatic(CINOSSioTftExpTab *apParent, XMLNode axVarNode)
Constructor.
Definition cinossiotftexp.h:589
virtual void GetValue(char *apBuf, uint32 auSize)
Get string form of current value.
virtual const char * FindName(const char *apLangName=NULL)
Find member name according to given language.
virtual ~CTFTIncoStatic()
Destructor.
Definition cinossiotftexp.h:597
const char * m_pValue
Pointer to value string.
Definition cinossiotftexp.h:613
Definition cinossiotftexp.h:557
virtual ~CTFTIncoTitle()
Destructor.
Definition cinossiotftexp.h:569
virtual const char * FindName(const char *apLangName=NULL)
Find member name according to given language.
CTFTIncoTitle(CINOSSioTftExpTab *apParent, XMLNode axVarNode)
Constructor.
Definition cinossiotftexp.h:561
Definition cinossiotftexp.h:412
real64 m_dMin
Range restriction.
Definition cinossiotftexp.h:528
virtual bool IsWritable(uint32 auUserLevel)
Check if member is writable for editing with given level.
static OnValueChanged s_pValueChangedFunc
on value change callback
Definition cinossiotftexp.h:524
void ValueChanged(const double value)
Invokes the value change callback.
void(* OnValueChanged)(CTFTIncoVariable *, void *, const double)
Callback used to inform about a value change.
Definition cinossiotftexp.h:420
virtual void GetUnit(char *apBuf, uint32 auSize)
Get unit of member.
uint16 m_uIndex
Inco index if member is an array's element.
Definition cinossiotftexp.h:518
virtual uint32 GetCharacteristics()
Get characteristics of member.
CTFTIncoVariable(CINOSSioTftExpTab *apParent, XMLNode axVarNode)
Constructor.
virtual const char * FindName(const char *apLangName=NULL)
Find member name according to given language.
CINCOItem * m_pItem
Inco item of registered variable.
Definition cinossiotftexp.h:516
virtual bool RepaintNeeded()
Update member and check if anything requires a repaint.
double(* OnValueConversion)(CTFTIncoVariable *, void *, const double, bool)
Callback used to specify a conversion upon Get/PutVariables, e.g. to display values in inch while the...
Definition cinossiotftexp.h:425
static void * s_pContext
Context for callback functions.
Definition cinossiotftexp.h:526
virtual void GetValue(char *apBuf, uint32 auSize)
Get string form of current value.
static void setConversionFunc(OnValueConversion func, void *apContext)
Setter for conversion function called upon Get/PutVariable to convert values between display and inte...
static OnValueConversion s_pConversionFunc
Conversion callback.
Definition cinossiotftexp.h:522
int8 m_iDigits
Stores the defined digits, negative values mean 'undefined'.
Definition cinossiotftexp.h:520
virtual void GetValueLimited(char *apBuf, uint32 auSize)
Get string form of current value but limits the text length for string types, if required.
virtual void Toggle()
Toggles the value of this member.
virtual ~CTFTIncoVariable()
Destructor.
Definition cinossiotftexp.h:434
virtual void SetValue(char *apBuf)
Set new value.
virtual CINCOItem * GetItem() const
Returns the pointer to the INCO-tree item.
static void setValueChangeFunc(OnValueChanged func, void *apContext)
Setter for callback function called at value change.
virtual bool UpdateInco()
Update inco item pointer e.g. after new registrations.
virtual void SetDigits(int8 aiDigits)
To change or set the required number of digits for the value representation (see GetValue)
virtual bool CanToggle()
Returns true if the member can be toggled.
General xml functions.
const char XML_ATTR_NAME_NAME[]
String for xml attribute name Name.
#define ASSERT_ALWAYS(f)
Definition inosmacro.h:696
Information about a system font.
Definition cinossiotft.h:276
Definition cinossiotft.h:219
All information defining a touch button.
Definition cinossiotft.h:264