TVmsFormF.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. //---------------------------------------------------------------------------
  2. #ifndef TVmsFormFH
  3. #define TVmsFormFH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <stdio.h>
  7. #include <ADODB.hpp>
  8. #include <DB.hpp>
  9. #include <SyncObjs.hpp>
  10. #include <ExtCtrls.hpp>
  11. #include <jpeg.hpp>
  12. #include <GIFimg.hpp>
  13. #include "LibSTLF.hpp"
  14. //---------------------------------------------------------------------------
  15. #include "VitzroCommF.h"
  16. #include "ITSLogF.h"
  17. //---------------------------------------------------------------------------
  18. #define MAX_VMS_OBJ_LIST 64 /* 최대 VMS 오브젝트 리스트 갯수 */
  19. class TVmsFormObj
  20. {
  21. public:
  22. TVmsFormObj();
  23. ~TVmsFormObj();
  24. public:
  25. int ObjectKind; /* 객체종류 */
  26. int ObjectType; /* 객체타입 */
  27. int ObjectSize; /* 객체크기 */
  28. int IsBlinking; /* 점멸 여부 */
  29. int PosX; /* 위치 X */
  30. int PosY; /* 위치 Y */
  31. int Width; /* 객체넓이 */
  32. int Height; /* 객체높이 */
  33. int BkColor; /* 객체배경색상 */
  34. int TextFontName; /* 폰트이름 */
  35. int TextFontColor; /* 폰트색상 */
  36. int TextFontSize; /* 폰트크기 */
  37. int TextFontBold; /* 폰트굵기 */
  38. int TextAlign; /* 문자열정열방식 */
  39. //TODO
  40. AnsiString StrTextFontName;
  41. AnsiString TextData; /* 문자열데이터 */
  42. AnsiString ImageId; /* 이미지아이디 */
  43. AnsiString ImageType; /* 이미지 타입 */
  44. //int ObjectId; /* 폼객체ID */
  45. AnsiString IFSC_ID;
  46. TImage *pImageData; /* 이미지데이터 */
  47. TMemoryStream *pImageStream; /* 이미지데이터 버퍼 */
  48. public:
  49. void Clear();
  50. TImage *NewImage();
  51. };
  52. //---------------------------------------------------------------------------
  53. class TVmsForm
  54. {
  55. public:
  56. TVmsForm();
  57. ~TVmsForm();
  58. public:
  59. int ScenarioSeq; /* 폼 표출순서 */
  60. AnsiString FormId; /* 폼 ID */
  61. int DisplayTime; /* 표출시간(초) */
  62. AnsiString DisplayMode; /* 표출기능 */
  63. AnsiString DisplayDir; /* 표출방향 */
  64. int FormKind; /* 폼 종류 */
  65. int BkColor; /* 배경색상 */
  66. int Width; /* 폼넓이 */
  67. int Height; /* 폼높이 */
  68. bool SvcRes; /* 제공결과 */
  69. bool FtpRes; /* 제공결과 */
  70. AnsiString TrfBakImgId;
  71. TCriticalSection *pCriticalSection;
  72. public:
  73. int FTotal;
  74. int FObjects;
  75. IntMap<TVmsFormObj> FLists;
  76. void Lock() { pCriticalSection->Enter(); }
  77. void UnLock() { pCriticalSection->Leave(); };
  78. int Count() { return FObjects; }
  79. int Total() { return FTotal; }
  80. void Clear();
  81. TVmsFormObj *GetItem(int AIdx);
  82. int AddFormObject(TVmsFormObj *AFormObj);
  83. TVmsFormObj *AddFormObject();
  84. void Init(int AWidth, int AHeight);
  85. void FormClear(TColor ABkColor);
  86. Graphics::TBitmap *pBitmap; /* 이미지데이터 */
  87. TMemoryStream *pStream; /* 이미지데이터 버퍼 */
  88. };
  89. //---------------------------------------------------------------------------
  90. //---------------------------------------------------------------------------
  91. class TVmsFormManager
  92. {
  93. public:
  94. TVmsFormManager();
  95. ~TVmsFormManager();
  96. private:
  97. public:
  98. void Lock() { FLists.Lock(); }
  99. void UnLock() { FLists.UnLock(); }
  100. public:
  101. int FormWidth;
  102. int FormHeight;
  103. int FTotal;
  104. int FObjects;
  105. IntMap<TVmsForm> FLists;
  106. int Count() { return FObjects; }
  107. int Total() { return FTotal; }
  108. void Clear();
  109. TVmsForm *GetItem(int AIdx);
  110. int AddForm(TVmsForm *AForm);
  111. TVmsForm *AddForm();
  112. };
  113. //---------------------------------------------------------------------------
  114. //extern TVmsFormManager *VmsFormManager;
  115. //---------------------------------------------------------------------------
  116. #endif