#ifndef AccountSuchen_H
#define AccountSuchen_H

#include <Knopf.h>
#include <Tabelle.h>
#include <AuswahlBox.h>
#include <Animation.h>
#include <Thread.h>

using namespace Framework;

class AccountSuchen : private Thread
{
private:
	Schrift *schrift;
	Punkt pos;
	Punkt gr;
	Animation2D *laden;
	TextFeld *accountName;
	Knopf *suchen;
	AuswahlBox *sortSpalte;
	AuswahlBox *sortRichtung;
	Knopf *zur�ck;
	TextFeld *seite;
	Knopf *vor;
	ObjTabelle *liste;
	Critical cs;
	int auswahl;
	double tickVal;
	bool sichtbar;
	int jetztSeite;
	int maxSeite;
	unsigned char alpha;
	bool rend;
	int ref;
	// privat
	void lock();
	void unlock();
	void tabelleLehren( bool �berschrift );

public:
	// Konstruktor
	AccountSuchen( Schrift *schrift );
	// Destruktor
	~AccountSuchen();
	// nicht constant
	void setSichtbar( bool sichtbar );
	void thread();
	bool detailsKlick( Knopf *zKnopf, MausEreignis &me );
	void doMausEreignis( MausEreignis &me );
	void doTastaturEreignis( TastaturEreignis &te );
	bool tick( double tickVal );
	void render( Bild &zRObj );
	int getAuswahlAccountId();
	// constant
	// Reference Counting
	AccountSuchen *getThis();
	AccountSuchen *release();
};

// Nachrichten
bool accountSuchenDetailsKlick( void *p, void *obj, MausEreignis me );

#endif