Gruppe.h 7.9 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. #include <Rahmen.h>
  11. using namespace Framework;
  12. using namespace KSGScript;
  13. class GruppeEinladungAccount
  14. {
  15. private:
  16. LRahmen *rahmen;
  17. AlphaFeld *auswahl;
  18. TextFeld *name;
  19. Knopf *nachrichtSenden;
  20. Knopf *erneutSenden;
  21. Knopf *einladungAbbrechen;
  22. int status;
  23. int br;
  24. int knopfX;
  25. double tickVal;
  26. bool mausIn;
  27. bool remove;
  28. int accountId;
  29. int gruppeId;
  30. int admin;
  31. int höhe;
  32. int animation;
  33. bool rend;
  34. int ref;
  35. public:
  36. // Konstruktor
  37. GruppeEinladungAccount( Schrift *zSchrift );
  38. // Destruktor
  39. ~GruppeEinladungAccount();
  40. // nicht constant
  41. void setGruppeId( int gruppeId );
  42. void setAccountId( int id );
  43. void setSize( int br );
  44. void setAbgelehnt();
  45. void setAngenommen();
  46. void setRemove();
  47. void setAdmin( int admin );
  48. bool tick( double tickVal );
  49. void doPublicMausEreignis( MausEreignis &me );
  50. void render( int yOff, Bild &zrObj );
  51. // constant
  52. bool getRemove() const;
  53. int getAccountId() const;
  54. int getHeight() const;
  55. // Reference Counting
  56. GruppeEinladungAccount *getThis();
  57. GruppeEinladungAccount *release();
  58. };
  59. class GruppeEinladungListe
  60. {
  61. private:
  62. Punkt pos;
  63. Punkt gr;
  64. LRahmen *rahmen;
  65. TextFeld *einladenName;
  66. Knopf *einladen;
  67. VScrollBar *scroll;
  68. RCArray< GruppeEinladungAccount > *accounts;
  69. Schrift *schrift;
  70. int einladungHöhe;
  71. double tickVal;
  72. int anzahl;
  73. int gruppeId;
  74. int admin;
  75. bool rend;
  76. int ref;
  77. public:
  78. // Konstruktor
  79. GruppeEinladungListe( Schrift *zSchrift );
  80. // Destruktor
  81. ~GruppeEinladungListe();
  82. // nicht constant
  83. void reset();
  84. void setGruppeId( int gruppeId );
  85. void addAccount( int id );
  86. void setAbgelehnt( int id );
  87. void setAngenommen( int id );
  88. void remove( int id );
  89. void setAdmin( int admin );
  90. bool tick( double tickVal );
  91. void doPublicMausEreignis( MausEreignis &me );
  92. void doTastaturEreignis( TastaturEreignis &te );
  93. void render( Bild &zRObj );
  94. // constant
  95. // Reference Counting
  96. GruppeEinladungListe *getThis();
  97. GruppeEinladungListe *release();
  98. };
  99. class GruppeAccountDaten
  100. {
  101. private:
  102. LRahmen *rahmen;
  103. AlphaFeld *auswahl;
  104. TextFeld *name;
  105. TextFeld *punkte;
  106. Knopf *nachrichtSenden;
  107. Knopf *accountAnsehen;
  108. Knopf *freundEinladung;
  109. Knopf *kick;
  110. int br;
  111. double tickVal;
  112. bool mausIn;
  113. bool remove;
  114. int gruppeId;
  115. int accountId;
  116. int admin;
  117. int höhe;
  118. int animation;
  119. bool rend;
  120. int ref;
  121. public:
  122. // Konstruktor
  123. GruppeAccountDaten( Schrift *zSchrift );
  124. // Destruktor
  125. ~GruppeAccountDaten();
  126. // nicht constant
  127. void setGruppeId( int gruppeId );
  128. void setAccountId( int id );
  129. void setAdmin( int admin );
  130. void setSize( int x );
  131. void entfernen();
  132. bool tick( double tickVal );
  133. void doPublicMausEreignis( MausEreignis &me );
  134. void render( int y, Bild &zrObj );
  135. // constant
  136. bool getRemove() const;
  137. int getAccountId() const;
  138. int getHeight() const;
  139. // Reference Counting
  140. GruppeAccountDaten *getThis();
  141. GruppeAccountDaten *release();
  142. };
  143. class GruppeAccountListe
  144. {
  145. private:
  146. Punkt pos;
  147. Punkt gr;
  148. LRahmen *rahmen;
  149. VScrollBar *scroll;
  150. RCArray< GruppeAccountDaten > *accounts;
  151. Schrift *schrift;
  152. int anzahl;
  153. int gruppeId;
  154. int admin;
  155. bool rend;
  156. int ref;
  157. public:
  158. // Konstruktor
  159. GruppeAccountListe( Schrift *zSchrift );
  160. // Destruktor
  161. ~GruppeAccountListe();
  162. // nicht constant
  163. void reset();
  164. void setGruppeId( int gruppeId );
  165. void addAccount( int id );
  166. void removeAccount( int id );
  167. void setAdmin( int admin );
  168. bool tick( double tickVal );
  169. void doPublicMausEreignis( MausEreignis &me );
  170. void render( Bild &zRObj );
  171. // constant
  172. // Reference Counting
  173. GruppeAccountListe *getThis();
  174. GruppeAccountListe *release();
  175. };
  176. class GruppeChat
  177. {
  178. private:
  179. Punkt pos;
  180. Punkt gr;
  181. LRahmen *rahmen;
  182. TextFeld *nachricht;
  183. Knopf *senden;
  184. TextFeld *verlauf;
  185. int gruppeId;
  186. bool rend;
  187. int ref;
  188. public:
  189. // Konstruktor
  190. GruppeChat( Schrift *zSchrift );
  191. // Destruktor
  192. ~GruppeChat();
  193. // nicht constant
  194. void reset();
  195. void setGruppeId( int gruppeId );
  196. void gruppeNachricht( const char *nachricht );
  197. bool tick( double tickVal );
  198. void doPublicMausEreignis( MausEreignis &me );
  199. void doTastaturEreignis( TastaturEreignis &te );
  200. void render( Bild &zRObj );
  201. // constant
  202. // Reference Counting
  203. GruppeChat *getThis();
  204. GruppeChat *release();
  205. };
  206. class GruppeAnmeldung
  207. {
  208. private:
  209. Punkt pos;
  210. Punkt gr;
  211. LRahmen *rahmen;
  212. KontrollKnopf *spielerHinzufügen;
  213. KontrollKnopf *angemeldet;
  214. TextFeld *zeit;
  215. Knopf *gruppeVerlassen;
  216. int admin;
  217. double time;
  218. int gruppeId;
  219. bool rend;
  220. int ref;
  221. public:
  222. // Konstruktor
  223. GruppeAnmeldung( Schrift *zSchrift );
  224. // Destruktor
  225. ~GruppeAnmeldung();
  226. // nicht constant
  227. void reset();
  228. void setGruppeId( int gruppeId );
  229. void setSpielerHinzufügen( bool spielerHinzufügen );
  230. void setAngemeldet( bool angemeldet );
  231. void zurückInWarteschlange( int stunden, int minuten, int sekunden );
  232. void spielGefunden();
  233. void setAdmin( int admin );
  234. bool tick( double tickVal );
  235. void doPublicMausEreignis( MausEreignis &me );
  236. void render( Bild &zRObj );
  237. // constant
  238. // Reference Counting
  239. GruppeAnmeldung *getThis();
  240. GruppeAnmeldung *release();
  241. };
  242. class GruppeKarte : public Thread
  243. {
  244. private:
  245. Punkt pos;
  246. Punkt gr;
  247. LRahmen *rahmen;
  248. Bild *hintergrund;
  249. KSGScriptObj *info;
  250. HINSTANCE ksgs;
  251. TextFeld *fehler;
  252. Schrift *schrift;
  253. TextRenderer *tr;
  254. unsigned char alpha1;
  255. unsigned char alpha2;
  256. double tickVal;
  257. double ladenZeit;
  258. int ladeBild;
  259. int karteId;
  260. int gruppeId;
  261. bool exit;
  262. bool geladen;
  263. bool rend;
  264. public:
  265. // Konstruktor
  266. GruppeKarte( Schrift *zSchrift );
  267. // Destruktor
  268. ~GruppeKarte();
  269. // nicht constant
  270. void reset();
  271. void ksgsAktion( RCArray< KSGSVariable > *parameter, KSGSVariable **retVal );
  272. void setGruppeId( int gruppeId );
  273. bool tick( double tickVal );
  274. void doPublicMausEreignis( MausEreignis &me );
  275. void render( Bild &zrObj );
  276. virtual void thread();
  277. // constant
  278. int getKarteId() const;
  279. // löscht das objekt wenn es nicht mehr gebraucht wird und beendet den Thread
  280. Thread *release() override;
  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 doPublicMausEreignis( 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 doPublicMausEreignis( 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