AccountSpielPartner.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. #ifndef AccountSpielPartner_H
  2. #define AccountSpielPartner_H
  3. #include <Fortschritt.h>
  4. #include <Fenster.h>
  5. #include <Knopf.h>
  6. #include <AuswahlBox.h>
  7. #include <Thread.h>
  8. #include <Rahmen.h>
  9. using namespace Framework;
  10. namespace ASPLEDStyle
  11. {
  12. const int SpielArt = 1;
  13. const int Karte = 2;
  14. const int Spieler = 4;
  15. const int Ausklappbar = 8;
  16. }
  17. struct AccountSPListeEintragDaten
  18. {
  19. int style;
  20. int id;
  21. Text *name;
  22. int anzahl;
  23. int prozent;
  24. };
  25. class AccountSPListeEintrag : public virtual ReferenceCounter
  26. {
  27. private:
  28. LRahmen *ram;
  29. RCArray< AccountSPListeEintrag > *members;
  30. TextFeld *name;
  31. TextFeld *anzahl;
  32. FBalken *prozent;
  33. Knopf *details;
  34. Bild *ausklappen;
  35. Bild *einklappen;
  36. AccountSPListeEintragDaten *daten;
  37. Text *sortSpalte;
  38. bool sortAbsteigend;
  39. double tickVal;
  40. bool rend;
  41. // privat
  42. int getReihenfolge( int *arr );
  43. public:
  44. // Konstruktor
  45. AccountSPListeEintrag( AccountSPListeEintragDaten *daten );
  46. // Destruktor
  47. ~AccountSPListeEintrag();
  48. // nicht constant
  49. void addMember( AccountSPListeEintrag *e );
  50. void setSortSpalte( char *sp );
  51. void setSortRichtung( bool absteigend );
  52. bool tick( double tickVal );
  53. void doPublicMausEreignis( MausEreignis &me );
  54. void render( int xOff, int yOff, int breite, Bild &zRObj );
  55. // constant
  56. int getHeight() const;
  57. AccountSPListeEintragDaten *zDaten() const;
  58. };
  59. class AccountSPListe : public Zeichnung
  60. {
  61. private:
  62. LRahmen *ram;
  63. VScrollBar *scroll;
  64. RCArray< AccountSPListeEintrag > *skp;
  65. RCArray< AccountSPListeEintrag > *spk;
  66. RCArray< AccountSPListeEintrag > *psk;
  67. Text *gruppierung;
  68. Text *sortSpalte;
  69. bool sortAbsteigend;
  70. bool rend;
  71. // privat
  72. int getReihenfolge( int *arr );
  73. public:
  74. // Konstruktor
  75. AccountSPListe();
  76. // Destruktor
  77. ~AccountSPListe();
  78. // nicht constant
  79. void reset();
  80. void ladeDaten( int accId );
  81. void setGruppierung( char *gp );
  82. void setSortSpalte( char *sp );
  83. void setSortRichtung( bool absteigend );
  84. bool tick( double tickVal ) override;
  85. void doPublicMausEreignis( MausEreignis &me ) override;
  86. void render( Bild &zRObj ) override;
  87. };
  88. class AccountSpielPartner : public Thread
  89. {
  90. private:
  91. Fenster *spielPartnerF;
  92. AuswahlBox *gruppAusw;
  93. AuswahlBox *sortSpalte;
  94. AuswahlBox *sortRichtung;
  95. AccountSPListe *liste;
  96. int status;
  97. int accId;
  98. int animation;
  99. unsigned char alpha;
  100. double tickVal;
  101. bool rend;
  102. public:
  103. // Konstruktor
  104. AccountSpielPartner();
  105. // Destruktor
  106. ~AccountSpielPartner();
  107. // nicht constant
  108. void reset();
  109. void ladeStatistik( int accId );
  110. virtual void thread();
  111. void setSichtbar( bool sichtbar, bool nachRechts );
  112. bool tick( double zeit );
  113. void doPublicMausEreignis( MausEreignis &me );
  114. void render( Bild &zRObj );
  115. // constant
  116. int getStatus() const;
  117. };
  118. #endif;