#ifndef NachrichtenListe_H #define NachrichtenListe_H #include #include #include #include #include #include "..\..\Aktionen\AktionsThread.h" using namespace Framework; using namespace Network; namespace NachrichtType { const char nachricht = 0; const char freundEntfernen = 1; const char freundEinladung = 2; const char spielEinladung = 3; const char chatroomEinladung = 4; const char logout = 5; const char close = 6; } struct SpielEinladungParam { int vonAccount; int gruppeId; }; struct ChatroomEinladungParam { int vonAccount; int chatroomId; }; class Nachricht { private: TextFeld *titel; TextFeld *text; Knopf *close; Knopf *positiv; Knopf *negativ; LRahmen *rahmen; int höhe; int maxHöhe; bool ausgewählt; int animation; double tickVal; char typ; void *param; bool rend; int ref; public: // Konstruktor Nachricht( Schrift *zSchrift, Text *titel, Text *nachricht, Text *positiv, Text *negativ, char type, void *param ); // Destruktor ~Nachricht(); // nicht constant void entfernen(); void setAusgewählt( bool ausgewählt ); void doMausEreignis( MausEreignis &me ); bool tick( double tickVal ); void render( int y, Bild &zRObj ); // contant bool istAusgewählt() const; int getHeight() const; // Reference Counting Nachricht *getThis(); Nachricht *release(); }; class NachrichtenListeObj : public Zeichnung { private: RCArray< Nachricht > *members; VScrollBar *vsb; Schrift *schrift; Punkt bildschirmGröße; int anzahl; int ref; public: // Konstruktor NachrichtenListeObj( Schrift *zSchrift ); // Destruktor ~NachrichtenListeObj(); // nicht constant void addNachricht( Text *titel, Text *nachricht, Text *positiv, Text *negativ, char type, void *param ); void removeNachricht( Nachricht *zNachricht ); void removeAll(); bool tick( double tickVal ) override; void doMausEreignis( MausEreignis &me ) override; void render( Bild &zRObj ) override; // contant // Reference Counting NachrichtenListeObj *getThis(); NachrichtenListeObj *release(); }; class NachrichtenListe { private: Fenster *fenster; Knopf *minMax; NachrichtenListeObj *nachrichtenListe; Punkt bildschirmGröße; TextFeld *überschrift; Bild *minimierenBild; Bild *maximierenBild; GSL::GSLSoundV *msgSound; GSL::GSLSoundV *errSound; double tickVal; int animation; bool rend; int ref; public: // Konstruktor NachrichtenListe( Schrift *zSchrift, Fenster *zNachLoginFenster ); // Destruktor ~NachrichtenListe(); // nicht constant void addNachricht( Text *titel, Text *nachricht, Text *positiv = 0, Text *negativ = 0, char type = NachrichtType::nachricht, void *param = 0 ); void removeNachricht( Nachricht *zNachricht ); void removeAll(); bool druckMinMax( MausEreignis &me ); bool tick( double tickVal ); // contant // Reference Counting NachrichtenListe *getThis(); NachrichtenListe *release(); }; // Nachrichten bool NachrichtenListeMinMaxME( void *p, void *obj, MausEreignis me ); #endif