Gruppe.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. #ifndef Gruppe_H
  2. #define Gruppe_H
  3. #include <Klient.h>
  4. #include <Thread.h>
  5. #include <Array.h>
  6. #include <Knopf.h>
  7. #include <Scroll.h>
  8. #include <Fenster.h>
  9. #include <KSGScript.h>
  10. using namespace Framework;
  11. using namespace KSGScript;
  12. class GruppeEinladungAccount
  13. {
  14. private:
  15. LRahmen *rahmen;
  16. AlphaFeld *auswahl;
  17. TextFeld *name;
  18. Knopf *nachrichtSenden;
  19. Knopf *erneutSenden;
  20. Knopf *einladungAbbrechen;
  21. int status;
  22. int br;
  23. int knopfX;
  24. double tickVal;
  25. bool mausIn;
  26. bool remove;
  27. int accountId;
  28. int gruppeId;
  29. int admin;
  30. int höhe;
  31. int animation;
  32. bool rend;
  33. int ref;
  34. public:
  35. // Konstruktor
  36. GruppeEinladungAccount( Schrift *zSchrift );
  37. // Destruktor
  38. ~GruppeEinladungAccount();
  39. // nicht constant
  40. void setGruppeId( int gruppeId );
  41. void setAccountId( int id );
  42. void setSize( int br );
  43. void setAbgelehnt();
  44. void setAngenommen();
  45. void setRemove();
  46. void setAdmin( int admin );
  47. bool tick( double tickVal );
  48. void doMausEreignis( MausEreignis &me );
  49. void render( int yOff, Bild &zrObj );
  50. // constant
  51. bool getRemove() const;
  52. int getAccountId() const;
  53. int getHeight() const;
  54. // Reference Counting
  55. GruppeEinladungAccount *getThis();
  56. GruppeEinladungAccount *release();
  57. };
  58. class GruppeEinladungListe
  59. {
  60. private:
  61. Punkt pos;
  62. Punkt gr;
  63. LRahmen *rahmen;
  64. TextFeld *einladenName;
  65. Knopf *einladen;
  66. VScrollBar *scroll;
  67. RCArray< GruppeEinladungAccount > *accounts;
  68. Schrift *schrift;
  69. int einladungHöhe;
  70. double tickVal;
  71. int anzahl;
  72. int gruppeId;
  73. int admin;
  74. bool rend;
  75. int ref;
  76. public:
  77. // Konstruktor
  78. GruppeEinladungListe( Schrift *zSchrift );
  79. // Destruktor
  80. ~GruppeEinladungListe();
  81. // nicht constant
  82. void reset();
  83. void setGruppeId( int gruppeId );
  84. void addAccount( int id );
  85. void setAbgelehnt( int id );
  86. void setAngenommen( int id );
  87. void remove( int id );
  88. void setAdmin( int admin );
  89. bool tick( double tickVal );
  90. void doMausEreignis( MausEreignis &me );
  91. void doTastaturEreignis( TastaturEreignis &te );
  92. void render( Bild &zRObj );
  93. // constant
  94. // Reference Counting
  95. GruppeEinladungListe *getThis();
  96. GruppeEinladungListe *release();
  97. };
  98. class GruppeAccountDaten
  99. {
  100. private:
  101. LRahmen *rahmen;
  102. AlphaFeld *auswahl;
  103. TextFeld *name;
  104. TextFeld *punkte;
  105. Knopf *nachrichtSenden;
  106. Knopf *accountAnsehen;
  107. Knopf *freundEinladung;
  108. Knopf *kick;
  109. int br;
  110. double tickVal;
  111. bool mausIn;
  112. bool remove;
  113. int gruppeId;
  114. int accountId;
  115. int admin;
  116. int höhe;
  117. int animation;
  118. bool rend;
  119. int ref;
  120. public:
  121. // Konstruktor
  122. GruppeAccountDaten( Schrift *zSchrift );
  123. // Destruktor
  124. ~GruppeAccountDaten();
  125. // nicht constant
  126. void setGruppeId( int gruppeId );
  127. void setAccountId( int id );
  128. void setAdmin( int admin );
  129. void setSize( int x );
  130. void entfernen();
  131. bool tick( double tickVal );
  132. void doMausEreignis( MausEreignis &me );
  133. void render( int y, Bild &zrObj );
  134. // constant
  135. bool getRemove() const;
  136. int getAccountId() const;
  137. int getHeight() const;
  138. // Reference Counting
  139. GruppeAccountDaten *getThis();
  140. GruppeAccountDaten *release();
  141. };
  142. class GruppeAccountListe
  143. {
  144. private:
  145. Punkt pos;
  146. Punkt gr;
  147. LRahmen *rahmen;
  148. VScrollBar *scroll;
  149. RCArray< GruppeAccountDaten > *accounts;
  150. Schrift *schrift;
  151. int anzahl;
  152. int gruppeId;
  153. int admin;
  154. bool rend;
  155. int ref;
  156. public:
  157. // Konstruktor
  158. GruppeAccountListe( Schrift *zSchrift );
  159. // Destruktor
  160. ~GruppeAccountListe();
  161. // nicht constant
  162. void reset();
  163. void setGruppeId( int gruppeId );
  164. void addAccount( int id );
  165. void removeAccount( int id );
  166. void setAdmin( int admin );
  167. bool tick( double tickVal );
  168. void doMausEreignis( MausEreignis &me );
  169. void render( Bild &zRObj );
  170. // constant
  171. // Reference Counting
  172. GruppeAccountListe *getThis();
  173. GruppeAccountListe *release();
  174. };
  175. class GruppeChat
  176. {
  177. private:
  178. Punkt pos;
  179. Punkt gr;
  180. LRahmen *rahmen;
  181. TextFeld *nachricht;
  182. Knopf *senden;
  183. TextFeld *verlauf;
  184. int gruppeId;
  185. bool rend;
  186. int ref;
  187. public:
  188. // Konstruktor
  189. GruppeChat( Schrift *zSchrift );
  190. // Destruktor
  191. ~GruppeChat();
  192. // nicht constant
  193. void reset();
  194. void setGruppeId( int gruppeId );
  195. void gruppeNachricht( const char *nachricht );
  196. bool tick( double tickVal );
  197. void doMausEreignis( MausEreignis &me );
  198. void doTastaturEreignis( TastaturEreignis &te );
  199. void render( Bild &zRObj );
  200. // constant
  201. // Reference Counting
  202. GruppeChat *getThis();
  203. GruppeChat *release();
  204. };
  205. class GruppeAnmeldung
  206. {
  207. private:
  208. Punkt pos;
  209. Punkt gr;
  210. LRahmen *rahmen;
  211. KontrollKnopf *spielerHinzufügen;
  212. KontrollKnopf *angemeldet;
  213. TextFeld *zeit;
  214. Knopf *gruppeVerlassen;
  215. int admin;
  216. double time;
  217. int gruppeId;
  218. bool rend;
  219. int ref;
  220. public:
  221. // Konstruktor
  222. GruppeAnmeldung( Schrift *zSchrift );
  223. // Destruktor
  224. ~GruppeAnmeldung();
  225. // nicht constant
  226. void reset();
  227. void setGruppeId( int gruppeId );
  228. void setSpielerHinzufügen( bool spielerHinzufügen );
  229. void setAngemeldet( bool angemeldet );
  230. void zurückInWarteschlange( int stunden, int minuten, int sekunden );
  231. void spielGefunden();
  232. void setAdmin( int admin );
  233. bool tick( double tickVal );
  234. void doMausEreignis( MausEreignis &me );
  235. void render( Bild &zRObj );
  236. // constant
  237. // Reference Counting
  238. GruppeAnmeldung *getThis();
  239. GruppeAnmeldung *release();
  240. };
  241. class GruppeKarte : public Thread
  242. {
  243. private:
  244. Punkt pos;
  245. Punkt gr;
  246. LRahmen *rahmen;
  247. Bild *hintergrund;
  248. KSGScriptObj *info;
  249. HINSTANCE ksgs;
  250. TextFeld *fehler;
  251. Schrift *schrift;
  252. unsigned char alpha1;
  253. unsigned char alpha2;
  254. double tickVal;
  255. double ladenZeit;
  256. int ladeBild;
  257. int karteId;
  258. int gruppeId;
  259. bool exit;
  260. bool geladen;
  261. bool rend;
  262. int ref;
  263. public:
  264. // Konstruktor
  265. GruppeKarte( Schrift *zSchrift );
  266. // Destruktor
  267. ~GruppeKarte();
  268. // nicht constant
  269. void reset();
  270. void ksgsAktion( RCArray< KSGSVariable > *parameter, KSGSVariable **retVal );
  271. void setGruppeId( int gruppeId );
  272. bool tick( double tickVal );
  273. void doMausEreignis( MausEreignis &me );
  274. void render( Bild &zrObj );
  275. virtual void thread();
  276. // constant
  277. int getKarteId() const;
  278. // Reference Counting
  279. GruppeKarte *getThis();
  280. GruppeKarte *release();
  281. };
  282. class GruppeSpielGefunden
  283. {
  284. private:
  285. Punkt pos;
  286. Punkt gr;
  287. Fenster *spielGefunden;
  288. TextFeld *zeit;
  289. TextFeld *warte;
  290. Knopf *annehmen;
  291. unsigned char alpha;
  292. double time;
  293. double tickVal;
  294. bool sichtbar;
  295. bool rend;
  296. int ref;
  297. public:
  298. // Konstruktor
  299. GruppeSpielGefunden( Schrift *zSchrift );
  300. // Destruktor
  301. ~GruppeSpielGefunden();
  302. // nicht constant
  303. void reset();
  304. void setSichtbar( bool sichtbar );
  305. void setVerbleibendeZeit( int sekunden );
  306. bool tick( double tickVal );
  307. void doMausEreignis( MausEreignis &me );
  308. void render( Bild &zRObj );
  309. // constant
  310. bool istSichtbar() const;
  311. // Reference Counting
  312. GruppeSpielGefunden *getThis();
  313. GruppeSpielGefunden *release();
  314. };
  315. class GruppeFenster
  316. {
  317. private:
  318. Punkt pos;
  319. Punkt gr;
  320. GruppeAnmeldung *anmeldung;
  321. GruppeChat *chat;
  322. GruppeAccountListe *accounts;
  323. GruppeEinladungListe *einladungen;
  324. GruppeKarte *karte;
  325. GruppeSpielGefunden *spiel;
  326. bool sichtbar;
  327. unsigned char alpha;
  328. int gruppeId;
  329. double tickVal;
  330. bool rend;
  331. int ref;
  332. public:
  333. // Konstruktor
  334. GruppeFenster( Schrift *zSchrift );
  335. // Destruktor
  336. ~GruppeFenster();
  337. // nicht constant
  338. void setGruppeId( int id );
  339. void setSichtbar( bool sichtbar );
  340. void chatNachricht( const char *nachricht );
  341. void neuerSpieler( int accountId );
  342. void spielerVerlässt( int accountId );
  343. void neueEinladung( int accountId );
  344. void einladungEntfernt( int accountId );
  345. void einladungAbgelehnt( int accountId );
  346. void setSpielerHinzufügen( bool sh );
  347. void setAngemeldet( bool angemeldet );
  348. void spielGefunden();
  349. void verbleibendeZeit( int sekunden );
  350. void spielGefundenAbbruch();
  351. void zurückInWarteschlange( int stunden, int minuten, int sekunden );
  352. void setAdmin( int accountId );
  353. void kick();
  354. void reset();
  355. bool tick( double tickVal );
  356. void doMausEreignis( MausEreignis &me );
  357. void doTastaturEreignis( TastaturEreignis &te );
  358. void render( Bild &zRObj );
  359. // constant
  360. int getGruppeId() const;
  361. int getKarteId() const;
  362. // Reference ounting
  363. GruppeFenster *getThis();
  364. GruppeFenster *release();
  365. };
  366. #endif