Table.h 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  1. #ifndef Tabelle_H
  2. #define Tabelle_H
  3. #include "Array.h"
  4. #include "Drawing.h"
  5. namespace Framework
  6. {
  7. class Rahmen; //! Border.h
  8. class AlphaFeld; //! AlphaField.h
  9. class VScrollBar; //! Scroll.h
  10. class HScrollBar; //! Scroll.h
  11. class Text; //! Text.h
  12. class ObjTabelle; //! from this file
  13. //! Manages a table of drawings
  14. class ObjTabelle : public ZeichnungHintergrund
  15. {
  16. public:
  17. class Style : public ZeichnungHintergrund::Style
  18. {
  19. public:
  20. //! If this flag is set, the user can resize the columns
  21. //! with the mouse
  22. static const __int64 SpaltenBreiteChangeable = 0x00001000;
  23. //! If this flag is set, the user can resize the rows
  24. //! with the mouse
  25. static const __int64 ZeilenHeightChangeable = 0x00002000;
  26. //! If this flag is set, the user cannot make the column
  27. //! width smaller than a certain limit despite the
  28. //! SpaltenBreiteChangeable flag
  29. static const __int64 SpaltenBreiteMin = 0x00004000;
  30. //! If this flag is set, the user cannot make the column
  31. //! width larger than a certain limit despite the
  32. //! SpaltenBreiteChangeable flag
  33. static const __int64 SpaltenBreiteMax = 0x00008000;
  34. //! If this flag is set, the user cannot make the row
  35. //! height smaller than a certain limit despite the
  36. //! ZeilenHeightChangeable flag
  37. static const __int64 ZeilenHeightMin = 0x00010000;
  38. //! If this flag is set, the user cannot make the row
  39. //! height larger than a certain limit despite the
  40. //! ZeilenHeightChangeable flag
  41. static const __int64 ZeilenHeightMax = 0x00020000;
  42. //! If this flag is set, the user can reorder the columns
  43. //! by dragging and dropping them
  44. static const __int64 SpaltenBeweglich = 0x00040000;
  45. //! If this flag is set, the user can reorder the rows
  46. //! by dragging and dropping them
  47. static const __int64 ZeilenBeweglich = 0x00800000;
  48. //! If this flag is set, the field that the user can select
  49. //! with the Erlaubt flag gets a different border
  50. static const __int64 AuswahlRahmen = 0x0080000;
  51. //! If this flag is set, the field that the user can select
  52. //! with the Erlaubt flag gets a different AlphaFeld
  53. static const __int64 AuswahlBuffer = 0x00100000;
  54. //! If this flag is set, each field can have different
  55. //! borders and AlphaFelds when selected
  56. static const __int64 AuswahlMultistyled = 0x00200000;
  57. //! If this flag is set, lines are drawn between the fields
  58. static const __int64 Raster = 0x00400000;
  59. //! Combines the flags: SpaltenBreiteChangeable,
  60. //! ZeilenHeightChangeable, SpaltenBeweglich,
  61. //! ZeilenBeweglich
  62. static const __int64 beweglich = SpaltenBreiteChangeable
  63. | ZeilenHeightChangeable
  64. | SpaltenBeweglich | ZeilenBeweglich;
  65. //! Combines the flags: SpaltenBreiteMax,
  66. //! SpaltenBreiteMin, ZeilenHeightMax,
  67. //! ZeilenHeightMax
  68. static const __int64 min_max = SpaltenBreiteMax | SpaltenBreiteMin
  69. | ZeilenHeightMax | ZeilenHeightMax;
  70. //! Combines the flags: VScroll, HScroll
  71. static const __int64 scroll = VScroll | HScroll;
  72. //! Combines the flags: Rahmen, Erlaubt,
  73. //! Sichtbar, SpaltenBeweglich,
  74. //! AuswahlBuffer, AuswahlRahmen, Raster
  75. static const __int64 normal
  76. = Rahmen | Erlaubt | Sichtbar | AuswahlBuffer | AuswahlRahmen
  77. | Raster | MEIgnoreInside | MEIgnoreParentInside
  78. | MEIgnoreSichtbar | MEIgnoreVerarbeitet;
  79. };
  80. private:
  81. RCArray<RCArray<Zeichnung>>* members;
  82. RCArray<Text>* spaltenNamen;
  83. RCArray<Text>* zeilenNamen;
  84. Array<int>* spaltenBreite;
  85. Array<int>* zeilenHeight;
  86. Array<int>* minSpaltenBreite;
  87. Array<int>* maxSpaltenBreite;
  88. Array<int>* minZeilenHeight;
  89. Array<int>* maxZeilenHeight;
  90. int spaltenAnzahl, zeilenAnzahl;
  91. int klickSpalte;
  92. int klickZeile;
  93. double mSpalte, mZeile;
  94. int mx, my;
  95. Punkt selected;
  96. int rasterFarbe;
  97. int rasterBreite;
  98. Rahmen* aRam;
  99. AlphaFeld* aAf;
  100. RCArray<RCArray<Rahmen>>* msaRam;
  101. RCArray<RCArray<AlphaFeld>>* msaAf;
  102. RCArray<Array<__int64>>* styles;
  103. //! Processes mouse messages
  104. //! \param me The event triggered by the mouse input
  105. DLLEXPORT void doMausEreignis(MausEreignis& me, bool userRet) override;
  106. public:
  107. //! Constructor
  108. DLLEXPORT ObjTabelle();
  109. //! Destructor
  110. DLLEXPORT virtual ~ObjTabelle();
  111. //! Adds a column to the table
  112. //! \param name The name of the column
  113. DLLEXPORT void addSpalte(const char* name);
  114. //! Adds a column to the table
  115. //! \param name The name of the column
  116. DLLEXPORT void addSpalte(Text* name);
  117. //! Adds a column to the table at a specific position
  118. //! \param sNum The index of the new column
  119. //! \param name The name of the new column
  120. DLLEXPORT void addSpalte(int sNum, const char* name);
  121. //! Adds a column to the table at a specific position
  122. //! \param sNum The index of the new column
  123. //! \param name The name of the new column
  124. DLLEXPORT void addSpalte(int sNum, Text* name);
  125. //! Adds a row to the table
  126. //! \param name The name of the row
  127. DLLEXPORT void addZeile(const char* name);
  128. //! Adds a row to the table
  129. //! \param name The name of the row
  130. DLLEXPORT void addZeile(Text* name);
  131. //! Adds a row to the table at a specific position
  132. //! \param zNum The index of the new row
  133. //! \param name The name of the new row
  134. DLLEXPORT void addZeile(int zNum, const char* name);
  135. //! Adds a row to the table at a specific position
  136. //! \param sNum The index of the new row
  137. //! \param name The name of the new row
  138. DLLEXPORT void addZeile(int zNum, Text* name);
  139. //! Removes a column
  140. //! \param sNum The index of the column
  141. DLLEXPORT void removeSpalte(int sNum);
  142. //! Removes a column
  143. //! \param name The name of the column
  144. DLLEXPORT void removeSpalte(const char* name);
  145. //! Removes a column
  146. //! \param name The name of the column
  147. DLLEXPORT void removeSpalte(Text* name);
  148. //! Removes a row
  149. //! \param zNum The index of the row
  150. DLLEXPORT void removeZeile(int zNum);
  151. //! Removes a row
  152. //! \param name The name of the row
  153. DLLEXPORT void removeZeile(const char* name);
  154. //! Removes a row
  155. //! \param name The name of the row
  156. DLLEXPORT void removeZeile(Text* name);
  157. //! Sets the index of a column
  158. //! \param name The name of the column
  159. //! \param pos The new index of the column
  160. DLLEXPORT void setSpaltePosition(const char* name, int pos);
  161. //! Sets the index of a column
  162. //! \param name The name of the column
  163. //! \param pos The new index of the column
  164. DLLEXPORT void setSpaltePosition(Text* name, int pos);
  165. //! Sets the index of a column
  166. //! \param sNum The old index of the column
  167. //! \param pos The new index of the column
  168. DLLEXPORT void setSpaltePosition(int sNum, int pos);
  169. //! Sets the index of a row
  170. //! \param name The name of the row
  171. //! \param pos The new index of the row
  172. DLLEXPORT void setZeilePosition(const char* name, int pos);
  173. //! Sets the index of a row
  174. //! \param name The name of the row
  175. //! \param pos The new index of the row
  176. DLLEXPORT void setZeilePosition(Text* name, int pos);
  177. //! Sets the index of a row
  178. //! \param zNum The old index of the row
  179. //! \param pos The new index of the row
  180. DLLEXPORT void setZeilePosition(int zNum, int pos);
  181. //! Sets a drawing to be placed in a specific cell.
  182. //! If a drawing already exists in the cell, it will be overwritten.
  183. //! \param sNum The index of the column
  184. //! \param zNum The index of the row
  185. //! \param obj The drawing to place in the cell
  186. DLLEXPORT void setZeichnungZ(int sNum, int zNum, Zeichnung* obj);
  187. //! Sets a drawing to be placed in a specific cell.
  188. //! If a drawing already exists in the cell, it will be overwritten.
  189. //! \param spaltenName The name of the column
  190. //! \param zeilenName The name of the row
  191. //! \param obj The drawing to place in the cell
  192. DLLEXPORT void setZeichnungZ(
  193. const char* spaltenName, const char* zeilenName, Zeichnung* obj);
  194. //! Sets a drawing to be placed in a specific cell.
  195. //! If a drawing already exists in the cell, it will be overwritten.
  196. //! \param spaltenName The name of the column
  197. //! \param zeilenName The name of the row
  198. //! \param obj The drawing to place in the cell
  199. DLLEXPORT void setZeichnungZ(
  200. Text* spaltenName, Text* zeilenName, Zeichnung* obj);
  201. //! Sets the column width
  202. //! \param sNum The index of the column
  203. //! \param br The width in pixels
  204. DLLEXPORT void setSpaltenBreite(int sNum, int br);
  205. //! Sets the column width
  206. //! \param name The name of the column
  207. //! \param br The width in pixels
  208. DLLEXPORT void setSpaltenBreite(const char* name, int br);
  209. //! Sets the column width
  210. //! \param name The name of the column
  211. //! \param br The width in pixels
  212. DLLEXPORT void setSpaltenBreite(Text* name, int br);
  213. //! Sets the row height
  214. //! \param zNum The index of the row
  215. //! \param hi The height in pixels
  216. DLLEXPORT void setZeilenHeight(int zNum, int hi);
  217. //! Sets the row height
  218. //! \param name The name of the row
  219. //! \param hi The height in pixels
  220. DLLEXPORT void setZeilenHeight(const char* name, int hi);
  221. //! Sets the row height
  222. //! \param name The name of the row
  223. //! \param hi The height in pixels
  224. DLLEXPORT void setZeilenHeight(Text* name, int hi);
  225. //! Sets the minimum column width (requires flags:
  226. //! SpaltenBreiteChangeable, SpaltenBreiteMin) \param sNum The index of
  227. //! the column \param minBr The minimum width in pixels
  228. DLLEXPORT void setMinSpaltenBreite(int sNum, int minBr);
  229. //! Sets the minimum column width (requires flags:
  230. //! SpaltenBreiteChangeable, SpaltenBreiteMin) \param name The name of
  231. //! the column \param minBr The minimum width in pixels
  232. DLLEXPORT void setMinSpaltenBreite(const char* name, int minBr);
  233. //! Sets the minimum column width (requires flags:
  234. //! SpaltenBreiteChangeable, SpaltenBreiteMin) \param name The name of
  235. //! the column \param minBr The minimum width in pixels
  236. DLLEXPORT void setMinSpaltenBreite(Text* name, int minBr);
  237. //! Sets the maximum column width (requires flags:
  238. //! SpaltenBreiteChangeable, SpaltenBreiteMax) \param sNum The index of
  239. //! the column \param maxBr The maximum width in pixels
  240. DLLEXPORT void setMaxSpaltenBreite(int sNum, int maxBr);
  241. //! Sets the maximum column width (requires flags:
  242. //! SpaltenBreiteChangeable, SpaltenBreiteMax) \param name The name of
  243. //! the column \param maxBr The maximum width in pixels
  244. DLLEXPORT void setMaxSpaltenBreite(const char* name, int maxBr);
  245. //! Sets the maximum column width (requires flags:
  246. //! SpaltenBreiteChangeable, SpaltenBreiteMax) \param name The name of
  247. //! the column \param maxBr The maximum width in pixels
  248. DLLEXPORT void setMaxSpaltenBreite(Text* name, int maxBr);
  249. //! Sets the minimum row height (requires flags:
  250. //! ZeilenHeightChangeable, ZeilenHeightMin) \param zNum The index of
  251. //! the row \param minHi The minimum height in pixels
  252. DLLEXPORT void setMinZeilenHeight(int zNum, int minHi);
  253. //! Sets the minimum row height (requires flags:
  254. //! ZeilenHeightChangeable, ZeilenHeightMin) \param name The name of
  255. //! the row \param minHi The minimum height in pixels
  256. DLLEXPORT void setMinZeilenHeight(const char* name, int minHi);
  257. //! Sets the minimum row height (requires flags:
  258. //! ZeilenHeightChangeable, ZeilenHeightMin) \param name The name of
  259. //! the row \param minHi The minimum height in pixels
  260. DLLEXPORT void setMinZeilenHeight(Text* name, int minHi);
  261. //! Sets the maximum row height (requires flags:
  262. //! ZeilenHeightChangeable, ZeilenHeightMax) \param zNum The index of
  263. //! the row \param maxHi The maximum height in pixels
  264. DLLEXPORT void setMaxZeilenHeight(int zNum, int maxHi);
  265. //! Sets the maximum row height (requires flags:
  266. //! ZeilenHeightChangeable, ZeilenHeightMax) \param name The name of
  267. //! the row \param maxHi The maximum height in pixels
  268. DLLEXPORT void setMaxZeilenHeight(const char* name, int maxHi);
  269. //! Sets the maximum row height (requires flags:
  270. //! ZeilenHeightChangeable, ZeilenHeightMax) \param name The name of
  271. //! the row \param maxHi The maximum height in pixels
  272. DLLEXPORT void setMaxZeilenHeight(Text* name, int maxHi);
  273. //! Sets which cell is selected (requires flag: Erlaubt)
  274. //! \param sNum The index of the column
  275. //! \param zNum The index of the row
  276. DLLEXPORT void setAuswahl(int sNum, int zNum);
  277. //! Sets which cell is selected (requires flag: Erlaubt)
  278. //! \param spaltenName The name of the column
  279. //! \param zeilenName The name of the row
  280. DLLEXPORT void setAuswahl(
  281. const char* spaltenName, const char* zeilenName);
  282. //! Sets which cell is selected (requires flag: Erlaubt)
  283. //! \param spaltenName The name of the column
  284. //! \param zeilenName The name of the row
  285. DLLEXPORT void setAuswahl(Text* spaltenName, Text* zeilenName);
  286. //! Sets the color of the grid displayed between cells
  287. //! \param f The color in A8R8G8B8 format
  288. DLLEXPORT void setRasterFarbe(int f);
  289. //! Sets the width of the grid displayed between cells
  290. //! \param br The width in pixels
  291. DLLEXPORT void setRasterBreite(int br);
  292. //! Sets a pointer to the border drawn around the selected cell
  293. //! \param ram The border
  294. DLLEXPORT void setARahmenZ(Rahmen* ram);
  295. //! Sets the color of the border drawn around the selected cell
  296. //! \param f The color in A8R8G8B8 format
  297. DLLEXPORT void setARFarbe(int f);
  298. //! Sets the width of the border drawn around the selected cell
  299. //! \param br The width in pixels
  300. DLLEXPORT void setARBreite(int br);
  301. //! Sets a pointer to the AlphaFeld used for the selected cell
  302. //! \param af The AlphaFeld
  303. DLLEXPORT void setAAlphaFeldZ(AlphaFeld* af);
  304. //! Sets the color of the AlphaFeld used for the selected cell
  305. //! \param f The color in A8R8G8B8 format
  306. DLLEXPORT void setAAfFarbe(int f);
  307. //! Sets the strength of the AlphaFeld used for the selected cell
  308. //! \param st The strength
  309. DLLEXPORT void setAAfStrength(int st);
  310. //! Sets a pointer to a border used with the AuswahlMultistyled flag
  311. //! when selecting a specific cell \param sNum The index of the column
  312. //! \param zNum The index of the row \param ram The border
  313. DLLEXPORT void setARahmenZ(int sNum, int zNum, Rahmen* ram);
  314. //! Sets a pointer to a border used with the AuswahlMultistyled flag
  315. //! when selecting a specific cell \param spaltenName The name of the
  316. //! column \param zeilenName The name of the row
  317. //! \param ram The border
  318. DLLEXPORT void setARahmenZ(
  319. const char* spaltenName, const char* zeilenName, Rahmen* ram);
  320. //! Sets a pointer to a border used with the AuswahlMultistyled flag
  321. //! when selecting a specific cell \param spaltenName The name of the
  322. //! column \param zeilenName The name of the row
  323. //! \param ram The border
  324. DLLEXPORT void setARahmenZ(
  325. Text* spaltenName, Text* zeilenName, Rahmen* ram);
  326. //! Sets the color of a border used with the AuswahlMultistyled flag
  327. //! when selecting a specific cell \param sNum The index of the column
  328. //! \param zNum The index of the row \param f The color in A8R8G8B8
  329. //! format
  330. DLLEXPORT void setARFarbe(int sNum, int zNum, int f);
  331. //! Sets the color of a border used with the AuswahlMultistyled flag
  332. //! when selecting a specific cell \param spaltenName The name of the
  333. //! column \param zeilenName The name of the row
  334. //! \param f The color in A8R8G8B8 format
  335. DLLEXPORT void setARFarbe(
  336. const char* spaltenName, const char* zeilenName, int f);
  337. //! Sets the color of a border used with the AuswahlMultistyled flag
  338. //! when selecting a specific cell \param spaltenName The name of the
  339. //! column \param zeilenName The name of the row
  340. //! \param f The color in A8R8G8B8 format
  341. DLLEXPORT void setARFarbe(Text* spaltenName, Text* zeilenName, int f);
  342. //! Sets the width of a border used with the AuswahlMultistyled flag
  343. //! when selecting a specific cell \param sNum The index of the column
  344. //! \param zNum The index of the row \param br The width in pixels
  345. DLLEXPORT void setARBreite(int sNum, int zNum, int br);
  346. //! Sets the width of a border used with the AuswahlMultistyled flag
  347. //! when selecting a specific cell \param spaltenName The name of the
  348. //! column \param zeilenName The name of the row
  349. //! \param br The width in pixels
  350. DLLEXPORT void setARBreite(
  351. const char* spaltenName, const char* zeilenName, int br);
  352. //! Sets the width of a border used with the AuswahlMultistyled flag
  353. //! when selecting a specific cell \param spaltenName The name of the
  354. //! column \param zeilenName The name of the row
  355. //! \param br The width in pixels
  356. DLLEXPORT void setARBreite(Text* spaltenName, Text* zeilenName, int br);
  357. //! Sets the color gradient used with the AuswahlMultistyled flag
  358. //! when selecting a specific cell \param sNum The index of the column
  359. //! \param zNum The index of the row \param af The color gradient
  360. DLLEXPORT void setAAlphaFeldZ(int sNum, int zNum, AlphaFeld* af);
  361. //! Sets the color gradient used with the AuswahlMultistyled flag
  362. //! when selecting a specific cell \param spaltenName The name of the
  363. //! column \param zeilenName The name of the row \param af The color
  364. //! gradient
  365. DLLEXPORT void setAAlphaFeldZ(
  366. const char* spaltenName, const char* zeilenName, AlphaFeld* af);
  367. //! Sets the color gradient used with the AuswahlMultistyled flag
  368. //! when selecting a specific cell \param spaltenName The name of the
  369. //! column \param zeilenName The name of the row \param af The color
  370. //! gradient
  371. DLLEXPORT void setAAlphaFeldZ(
  372. Text* spaltenName, Text* zeilenName, AlphaFeld* af);
  373. //! Sets the color of the color gradient used with the
  374. //! AuswahlMultistyled flag when selecting a specific cell
  375. //! \param sNum The index of the column \param zNum The index of the
  376. //! row \param f The color in A8R8G8B8 format
  377. DLLEXPORT void setAAfFarbe(int sNum, int zNum, int f);
  378. //! Sets the color of the color gradient used with the
  379. //! AuswahlMultistyled flag when selecting a specific cell
  380. //! \param spaltenName The name of the column
  381. //! \param zeilenName The name of the row
  382. //! \param f The color in A8R8G8B8 format
  383. DLLEXPORT void setAAfFarbe(
  384. const char* spaltenName, const char* zeilenName, int f);
  385. //! Sets the color of the color gradient used with the
  386. //! AuswahlMultistyled flag when selecting a specific cell
  387. //! \param spaltenName The name of the column
  388. //! \param zeilenName The name of the row
  389. //! \param f The color in A8R8G8B8 format
  390. DLLEXPORT void setAAfFarbe(Text* spaltenName, Text* zeilenName, int f);
  391. //! Sets the strength of the color gradient used with the
  392. //! AuswahlMultistyled flag when selecting a specific cell
  393. //! \param sNum The index of the column \param zNum The index of the
  394. //! row \param st The strength
  395. DLLEXPORT void setAAfStrength(int sNum, int zNum, int st);
  396. //! Sets the strength of the color gradient used with the
  397. //! AuswahlMultistyled flag when selecting a specific cell
  398. //! \param spaltenName The name of the column
  399. //! \param zeilenName The name of the row
  400. //! \param st The strength
  401. DLLEXPORT void setAAfStrength(
  402. const char* spaltenName, const char* zeilenName, int st);
  403. //! Sets the strength of the color gradient used with the
  404. //! AuswahlMultistyled flag when selecting a specific cell
  405. //! \param spaltenName The name of the column
  406. //! \param zeilenName The name of the row
  407. //! \param st The strength
  408. DLLEXPORT void setAAfStrength(
  409. Text* spaltenName, Text* zeilenName, int st);
  410. //! Adds styles used with the AuswahlMultistyled flag when selecting
  411. //! a specific cell \param sNum The index of the column
  412. //! \param zNum The index of the row \param style The style to add
  413. DLLEXPORT void addMsStyle(int sNum, int zNum, __int64 style);
  414. //! Adds styles used with the AuswahlMultistyled flag when selecting
  415. //! a specific cell \param spaltenName The name of the column
  416. //! \param zeilenName The name of the row \param style The style to add
  417. DLLEXPORT void addMsStyle(
  418. const char* spaltenName, const char* zeilenName, __int64 style);
  419. //! Adds styles used with the AuswahlMultistyled flag when selecting
  420. //! a specific cell \param spaltenName The name of the column
  421. //! \param zeilenName The name of the row \param style The style to add
  422. DLLEXPORT void addMsStyle(
  423. Text* spaltenName, Text* zeilenName, __int64 style);
  424. //! Sets the styles used with the AuswahlMultistyled flag when selecting
  425. //! a specific cell \param sNum The index of the column
  426. //! \param zNum The index of the row \param style The style to use
  427. DLLEXPORT void setMsStyle(int sNum, int zNum, __int64 style);
  428. //! Sets the styles used with the AuswahlMultistyled flag when selecting
  429. //! a specific cell \param spaltenName The name of the column
  430. //! \param zeilenName The name of the row \param style The style to use
  431. DLLEXPORT void setMsStyle(
  432. const char* spaltenName, const char* zeilenName, __int64 style);
  433. //! Sets the styles used with the AuswahlMultistyled flag when selecting
  434. //! a specific cell \param spaltenName The name of the column
  435. //! \param zeilenName The name of the row \param style The style to use
  436. DLLEXPORT void setMsStyle(
  437. Text* spaltenName, Text* zeilenName, __int64 style);
  438. //! Sets the styles used with the AuswahlMultistyled flag when selecting
  439. //! a specific cell \param sNum The index of the column
  440. //! \param zNum The index of the row \param style The style to use
  441. //! add_remove: 1 if the given styles should be added.
  442. //! 0 if they should be removed
  443. DLLEXPORT void setMsStyle(
  444. int sNum, int zNum, __int64 style, bool add_remove);
  445. //! Sets the styles used with the AuswahlMultistyled flag when selecting
  446. //! a specific cell \param spaltenName The name of the column
  447. //! \param zeilenName The name of the row \param style The style to use
  448. //! add_remove: 1 if the given styles should be added.
  449. //! 0 if they should be removed
  450. DLLEXPORT void setMsStyle(const char* spaltenName,
  451. const char* zeilenName,
  452. __int64 style,
  453. bool add_remove);
  454. //! Sets the styles used with the AuswahlMultistyled flag when selecting
  455. //! a specific cell \param spaltenName The name of the column
  456. //! \param zeilenName The name of the row \param style The style to use
  457. //! add_remove: 1 if the given styles should be added.
  458. //! 0 if they should be removed
  459. DLLEXPORT void setMsStyle(Text* spaltenName,
  460. Text* zeilenName,
  461. __int64 style,
  462. bool add_remove);
  463. //! Removes styles from the styles used with the AuswahlMultistyled flag
  464. //! when selecting a specific cell \param sNum The index of the column
  465. //! \param zNum The index of the row \param style The style to remove
  466. DLLEXPORT void removeMsStyle(int sNum, int zNum, __int64 style);
  467. //! Removes styles from the styles used with the AuswahlMultistyled flag
  468. //! when selecting a specific cell \param spaltenName The name of the
  469. //! column \param zeilenName The name of the row \param style The style
  470. //! to remove
  471. DLLEXPORT void removeMsStyle(
  472. const char* spaltenName, const char* zeilenName, __int64 style);
  473. //! Removes styles from the styles used with the AuswahlMultistyled flag
  474. //! when selecting a specific cell \param spaltenName The name of the
  475. //! column \param zeilenName The name of the row \param style The style
  476. //! to remove
  477. DLLEXPORT void removeMsStyle(
  478. Text* spaltenName, Text* zeilenName, __int64 style);
  479. //! Updates the object. Called by the framework
  480. //! \param tickVal The time in seconds since the last call of this
  481. //! function \return 1 if something changed and the image needs to be
  482. //! redrawn. 0 otherwise
  483. DLLEXPORT bool tick(double tickVal) override;
  484. //! Processes keyboard messages
  485. //! \param me The event triggered by the keyboard input
  486. DLLEXPORT void doTastaturEreignis(TastaturEreignis& te) override;
  487. //! Draws the object to zRObj if it is visible
  488. //! \param zRObj The image to draw into
  489. DLLEXPORT void render(Bild& zRObj) override;
  490. //! Returns the number of columns
  491. DLLEXPORT int getSpaltenAnzahl() const;
  492. //! Returns the number of rows
  493. DLLEXPORT int getZeilenAnzahl() const;
  494. //! Returns the index of a column
  495. //! \param name The name of the column
  496. DLLEXPORT int getSpaltenNummer(const char* name) const;
  497. //! Returns the index of a column
  498. //! \param name The name of the column
  499. DLLEXPORT int getSpaltenNummer(Text* name) const;
  500. //! Returns the name of a column
  501. //! \param num The index of the column
  502. DLLEXPORT Text* getSpaltenName(int num) const;
  503. //! Returns the name of a column without increased reference counter
  504. //! \param num The index of the column
  505. DLLEXPORT Text* zSpaltenName(int num) const;
  506. //! Returns the index of a row
  507. //! \param name The name of the row
  508. DLLEXPORT int getZeilenNummer(const char* name) const;
  509. //! Returns the index of a row
  510. //! \param name The name of the row
  511. DLLEXPORT int getZeilenNummer(Text* name) const;
  512. //! Returns the name of a row
  513. //! \param num The index of the row
  514. DLLEXPORT Text* getZeilenName(int num) const;
  515. //! Returns the name of a row without increased reference counter
  516. //! \param num The index of the row
  517. DLLEXPORT Text* zZeilenName(int num) const;
  518. //! Searches for a drawing in the table and returns the column index
  519. //! as x and the row index as y. (-1, -1) if the object was not found
  520. //! \param zObj The drawing (without increased reference counter)
  521. DLLEXPORT Punkt getZeichnungPosition(Zeichnung* zObj) const;
  522. //! Returns the drawing in a specific cell of the table
  523. //! (without increased reference counter) \param sNum The index of
  524. //! the column \param zNum The index of the row
  525. DLLEXPORT Zeichnung* zZeichnung(int sNum, int zNum) const;
  526. //! Returns the drawing in a specific cell of the table
  527. //! (without increased reference counter) \param spaltenName The name
  528. //! of the column \param zeilenName The name of the row
  529. DLLEXPORT Zeichnung* zZeichnung(
  530. const char* spaltenName, const char* zeilenName) const;
  531. //! Returns the drawing in a specific cell of the table
  532. //! (without increased reference counter) \param spaltenName The name
  533. //! of the column \param zeilenName The name of the row
  534. DLLEXPORT Zeichnung* zZeichnung(
  535. Text* spaltenName, Text* zeilenName) const;
  536. //! Returns the drawing in a specific cell of the table
  537. //! \param sNum The index of the column \param zNum The index of the row
  538. DLLEXPORT Zeichnung* getZeichnung(int sNum, int zNum) const;
  539. //! Returns the drawing in a specific cell of the table
  540. //! \param spaltenName The name of the column
  541. //! \param zeilenName The name of the row
  542. DLLEXPORT Zeichnung* getZeichnung(
  543. const char* spaltenName, const char* zeilenName) const;
  544. //! Returns the drawing in a specific cell of the table
  545. //! \param spaltenName The name of the column
  546. //! \param zeilenName The name of the row
  547. DLLEXPORT Zeichnung* getZeichnung(
  548. Text* spaltenName, Text* zeilenName) const;
  549. //! Returns the width of a column in pixels
  550. //! \param num The index of the column
  551. DLLEXPORT int getSpaltenBreite(int num) const;
  552. //! Returns the width of a column in pixels
  553. //! \param name The name of the column
  554. DLLEXPORT int getSpaltenBreite(const char* name) const;
  555. //! Returns the width of a column in pixels
  556. //! \param name The name of the column
  557. DLLEXPORT int getSpaltenBreite(Text* name) const;
  558. //! Returns the height of a row in pixels
  559. //! \param num The index of the row
  560. DLLEXPORT int getZeilenHeight(int num) const;
  561. //! Returns the height of a row in pixels
  562. //! \param name The name of the row
  563. DLLEXPORT int getZeilenHeight(const char* name) const;
  564. //! Returns the height of a row in pixels
  565. //! \param name The name of the row
  566. DLLEXPORT int getZeilenHeight(Text* name) const;
  567. //! Returns the minimum column width in pixels
  568. //! \param num The index of the column
  569. DLLEXPORT int getMinSpaltenBreite(int num) const;
  570. //! Returns the minimum column width in pixels
  571. //! \param name The name of the column
  572. DLLEXPORT int getMinSpaltenBreite(const char* name) const;
  573. //! Returns the minimum column width in pixels
  574. //! \param name The name of the column
  575. DLLEXPORT int getMinSpaltenBreite(Text* name) const;
  576. //! Returns the maximum column width in pixels
  577. //! \param num The index of the column
  578. DLLEXPORT int getMaxSpaltenBreite(int num) const;
  579. //! Returns the maximum column width in pixels
  580. //! \param name The name of the column
  581. DLLEXPORT int getMaxSpaltenBreite(const char* name) const;
  582. //! Returns the maximum column width in pixels
  583. //! \param name The name of the column
  584. DLLEXPORT int getMaxSpaltenBreite(Text* name) const;
  585. //! Returns the minimum row height in pixels
  586. //! \param num The index of the row
  587. DLLEXPORT int getMinZeilenHeight(int num) const;
  588. //! Returns the minimum row height in pixels
  589. //! \param name The name of the row
  590. DLLEXPORT int getMinZeilenHeight(const char* name) const;
  591. //! Returns the minimum row height in pixels
  592. //! \param name The name of the row
  593. DLLEXPORT int getMinZeilenHeight(Text* name) const;
  594. //! Returns the maximum row height in pixels
  595. //! \param num The index of the row
  596. DLLEXPORT int getMaxZeilenHeight(int num) const;
  597. //! Returns the maximum row height in pixels
  598. //! \param name The name of the row
  599. DLLEXPORT int getMaxZeilenHeight(const char* name) const;
  600. //! Returns the maximum row height in pixels
  601. //! \param name The name of the row
  602. DLLEXPORT int getMaxZeilenHeight(Text* name) const;
  603. //! Returns the index of the column the mouse points to
  604. //! \param mx The x coordinate of the mouse position relative to the
  605. //! left edge of the table in pixels
  606. DLLEXPORT double getMausSpalte(int mx) const;
  607. //! Returns the name of the column the mouse points to
  608. //! \param mx The x coordinate of the mouse position relative to the
  609. //! left edge of the table in pixels
  610. DLLEXPORT Text* getMausSpaltenName(int mx) const;
  611. //! Returns the name of the column the mouse points to without increased
  612. //! reference counter \param mx The x coordinate of the mouse position
  613. //! relative to the left edge of the table in pixels
  614. DLLEXPORT Text* zMausSpaltenName(int mx) const;
  615. //! Returns the index of the row the mouse points to
  616. //! \param my The Y coordinate of the mouse position relative to the
  617. //! top edge of the table in pixels
  618. DLLEXPORT double getMausZeile(int my) const;
  619. //! Returns the name of the row the mouse points to
  620. //! \param my The Y coordinate of the mouse position relative to the
  621. //! top edge of the table in pixels
  622. DLLEXPORT Text* getMausZeilenName(int my) const;
  623. //! Returns the name of the row the mouse points to without increased
  624. //! reference counter \param my The Y coordinate of the mouse position
  625. //! relative to the top edge of the table in pixels
  626. DLLEXPORT Text* zMausZeilenName(int my) const;
  627. //! Returns the column index as x and the row index as y of the
  628. //! selected field
  629. DLLEXPORT const Punkt& getAuswahlPosition() const;
  630. //! Returns the color of the grid in A8R8G8B8 format
  631. DLLEXPORT int getRasterFarbe() const;
  632. //! Returns the width of the grid in pixels
  633. DLLEXPORT int getRasterBreite() const;
  634. //! Returns a pointer to the border used for the selected field
  635. DLLEXPORT Rahmen* getARahmen() const;
  636. //! Returns a pointer to the border without increased reference counter
  637. //! used for the selected field
  638. DLLEXPORT Rahmen* zARahmen() const;
  639. //! Returns a pointer to the color gradient used for the selected field
  640. DLLEXPORT AlphaFeld* getAAlphaFeld() const;
  641. //! Returns a pointer to the color gradient without increased reference
  642. //! counter used for the selected field
  643. DLLEXPORT AlphaFeld* zAAlphaFeld() const;
  644. //! Returns a pointer to the border used with the AuswahlMultistyled
  645. //! flag when selecting a specific cell \param sNum The index of the
  646. //! column \param zNum The index of the row
  647. DLLEXPORT Rahmen* getARahmen(int sNum, int zNum) const;
  648. //! Returns a pointer to the border without increased reference counter
  649. //! used with the AuswahlMultistyled flag when selecting a specific cell
  650. //! \param sNum The index of the column \param zNum The index of the row
  651. DLLEXPORT Rahmen* zARahmen(int sNum, int zNum) const;
  652. //! Returns a pointer to the color gradient used with the
  653. //! AuswahlMultistyled flag when selecting a specific cell
  654. //! \param sNum The index of the column \param zNum The index of the row
  655. DLLEXPORT AlphaFeld* getAAlphaFeld(int sNum, int zNum) const;
  656. //! Returns a pointer to the color gradient without increased reference
  657. //! counter used with the AuswahlMultistyled flag when selecting a
  658. //! specific cell \param sNum The index of the column
  659. //! \param zNum The index of the row
  660. DLLEXPORT AlphaFeld* zAAlphaFeld(int sNum, int zNum) const;
  661. //! Returns a pointer to the border used with the AuswahlMultistyled
  662. //! flag when selecting a specific cell \param spaltenName The name of
  663. //! the column \param zeilenName The name of the row
  664. DLLEXPORT Rahmen* getARahmen(
  665. const char* spaltenName, const char* zeilenName) const;
  666. //! Returns a pointer to the border without increased reference counter
  667. //! used with the AuswahlMultistyled flag when selecting a specific cell
  668. //! \param spaltenName The name of the column
  669. //! \param zeilenName The name of the row
  670. DLLEXPORT Rahmen* zARahmen(
  671. const char* spaltenName, const char* zeilenName) const;
  672. //! Returns a pointer to the color gradient used with the
  673. //! AuswahlMultistyled flag when selecting a specific cell
  674. //! \param spaltenName The name of the column
  675. //! \param zeilenName The name of the row
  676. DLLEXPORT AlphaFeld* getAAlphaFeld(
  677. const char* spaltenName, const char* zeilenName) const;
  678. //! Returns a pointer to the color gradient without increased reference
  679. //! counter used with the AuswahlMultistyled flag when selecting a
  680. //! specific cell \param spaltenName The name of the column
  681. //! \param zeilenName The name of the row
  682. DLLEXPORT AlphaFeld* zAAlphaFeld(
  683. const char* spaltenName, const char* zeilenName) const;
  684. //! Returns a pointer to the border used with the AuswahlMultistyled
  685. //! flag when selecting a specific cell \param spaltenName The name of
  686. //! the column \param zeilenName The name of the row
  687. DLLEXPORT Rahmen* getARahmen(Text* spaltenName, Text* zeilenName) const;
  688. //! Returns a pointer to the border without increased reference counter
  689. //! used with the AuswahlMultistyled flag when selecting a specific cell
  690. //! \param spaltenName The name of the column
  691. //! \param zeilenName The name of the row
  692. DLLEXPORT Rahmen* zARahmen(Text* spaltenName, Text* zeilenName) const;
  693. //! Returns a pointer to the color gradient used with the
  694. //! AuswahlMultistyled flag when selecting a specific cell
  695. //! \param spaltenName The name of the column
  696. //! \param zeilenName The name of the row
  697. DLLEXPORT AlphaFeld* getAAlphaFeld(
  698. Text* spaltenName, Text* zeilenName) const;
  699. //! Returns a pointer to the color gradient without increased reference
  700. //! counter used with the AuswahlMultistyled flag when selecting a
  701. //! specific cell \param spaltenName The name of the column
  702. //! \param zeilenName The name of the row
  703. DLLEXPORT AlphaFeld* zAAlphaFeld(
  704. Text* spaltenName, Text* zeilenName) const;
  705. //! Checks whether a specific style is set for a specific cell with the
  706. //! AuswahlMultistyled flag \param sNum The index of the column
  707. //! \param zNum The index of the row
  708. //! \param style The style to check
  709. DLLEXPORT inline bool hatMsStyle(
  710. int sNum, int zNum, __int64 style) const;
  711. //! Checks whether a specific style is not set for a specific cell with
  712. //! the AuswahlMultistyled flag \param sNum The index of the column
  713. //! \param zNum The index of the row \param style The style to check
  714. DLLEXPORT inline bool hatMsStyleNicht(
  715. int sNum, int zNum, __int64 style) const;
  716. //! Checks whether a specific style is set for a specific cell with the
  717. //! AuswahlMultistyled flag \param spaltenName The name of the column
  718. //! \param zeilenName The name of the row \param style The style
  719. //! to check
  720. DLLEXPORT inline bool hatMsStyle(const char* spaltenName,
  721. const char* zeilenName,
  722. __int64 style) const;
  723. //! Checks whether a specific style is not set for a specific cell with
  724. //! the AuswahlMultistyled flag \param spaltenName The name of the column
  725. //! \param zeilenName The name of the row \param style The style
  726. //! to check
  727. DLLEXPORT inline bool hatMsStyleNicht(const char* spaltenName,
  728. const char* zeilenName,
  729. __int64 style) const;
  730. //! Checks whether a specific style is set for a specific cell with the
  731. //! AuswahlMultistyled flag \param spaltenName The name of the column
  732. //! \param zeilenName The name of the row \param style The style
  733. //! to check
  734. DLLEXPORT inline bool hatMsStyle(
  735. Text* spaltenName, Text* zeilenName, __int64 style) const;
  736. //! Checks whether a specific style is not set for a specific cell with
  737. //! the AuswahlMultistyled flag \param spaltenName The name of the column
  738. //! \param zeilenName The name of the row \param style The style
  739. //! to check
  740. DLLEXPORT inline bool hatMsStyleNicht(
  741. Text* spaltenName, Text* zeilenName, __int64 style) const;
  742. //! Creates a copy of the table that can be modified without
  743. //! affecting the original
  744. DLLEXPORT Zeichnung* dublizieren() const override;
  745. };
  746. } // namespace Framework
  747. #endif