123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- #ifndef NachrichtenListe_H
- #define NachrichtenListe_H
- #include <Klient.h>
- #include <Array.h>
- #include <Fenster.h>
- #include <Knopf.h>
- #include <GSLSoundV.h>
- #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 schließen = 6;
- }
- struct SpielEinladungParam
- {
- int vonAccount;
- int gruppeId;
- };
- struct ChatroomEinladungParam
- {
- int vonAccount;
- int chatroomId;
- };
- class Nachricht
- {
- private:
- TextFeld *titel;
- TextFeld *text;
- Knopf *schließen;
- 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 getHöhe() 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
|