2007-01-13 02:40:33 +00:00
|
|
|
/***************************************************************************
|
|
|
|
|
* Copyright (C) 2006 by FThauer FHammer *
|
|
|
|
|
* f.thauer@web.de *
|
|
|
|
|
* *
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
|
* (at your option) any later version. *
|
|
|
|
|
* *
|
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
|
* *
|
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
#ifndef GUIINTERFACE_H
|
|
|
|
|
#define GUIINTERFACE_H
|
|
|
|
|
|
2007-02-18 13:45:56 +00:00
|
|
|
#include <net/clientcallback.h>
|
2007-03-20 02:20:50 +00:00
|
|
|
#include <net/servercallback.h>
|
2007-09-26 11:48:33 +00:00
|
|
|
#include <net/irccallback.h>
|
2007-05-11 12:01:13 +00:00
|
|
|
#include <game_defs.h>
|
2007-01-13 02:40:33 +00:00
|
|
|
#include <string>
|
2007-05-12 22:00:59 +00:00
|
|
|
#include <boost/shared_ptr.hpp>
|
2007-05-11 12:01:13 +00:00
|
|
|
|
2010-07-13 19:13:38 +00:00
|
|
|
class Log;
|
2007-01-14 13:23:04 +00:00
|
|
|
class Session;
|
2008-09-03 22:29:28 +00:00
|
|
|
class gameTableImpl;
|
2007-01-13 02:40:33 +00:00
|
|
|
|
2007-09-26 11:48:33 +00:00
|
|
|
class GuiInterface : public ClientCallback, public ServerCallback, public IrcCallback {
|
2007-01-13 02:40:33 +00:00
|
|
|
public:
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual ~GuiInterface();
|
2007-01-13 02:40:33 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual void initGui(int speed) =0;
|
2007-05-11 12:01:13 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual boost::shared_ptr<Session> getSession() =0;
|
|
|
|
|
virtual void setSession(boost::shared_ptr<Session> session) =0;
|
2007-05-11 12:01:13 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual gameTableImpl *getMyW() const=0;
|
2010-07-13 19:13:38 +00:00
|
|
|
virtual Log* getMyLog() const=0;
|
|
|
|
|
|
2008-09-03 22:29:28 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
//refresh-Funktionen
|
|
|
|
|
virtual void refreshSet() const=0;
|
|
|
|
|
virtual void refreshCash() const=0;
|
|
|
|
|
virtual void refreshAction(int =-1, int =-1) const=0;
|
|
|
|
|
virtual void refreshChangePlayer() const=0;
|
|
|
|
|
virtual void refreshPot() const=0;
|
|
|
|
|
virtual void refreshGroupbox(int =-1, int =-1) const=0;
|
|
|
|
|
virtual void refreshAll() const=0;
|
|
|
|
|
virtual void refreshPlayerName() const=0;
|
|
|
|
|
virtual void refreshButton() const =0;
|
|
|
|
|
virtual void refreshGameLabels(GameState state) const=0;
|
2007-01-13 14:27:56 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual void setPlayerAvatar(int myUniqueID, const std::string &myAvatar) const=0;
|
|
|
|
|
virtual void waitForGuiUpdateDone() const=0;
|
2007-01-13 02:40:33 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
// Karten-Funktionen
|
|
|
|
|
virtual void dealBeRoCards(int) =0;
|
|
|
|
|
virtual void dealHoleCards()=0;
|
|
|
|
|
virtual void dealFlopCards()=0;
|
|
|
|
|
virtual void dealTurnCard()=0;
|
|
|
|
|
virtual void dealRiverCard()=0;
|
2007-01-13 02:40:33 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual void nextPlayerAnimation()=0;
|
2007-08-07 13:07:39 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual void beRoAnimation2(int)=0;
|
2007-01-13 02:40:33 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual void preflopAnimation1()=0;
|
|
|
|
|
virtual void preflopAnimation2()=0;
|
2007-01-13 02:40:33 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual void flopAnimation1()=0;
|
|
|
|
|
virtual void flopAnimation2()=0;
|
2007-01-13 02:40:33 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual void turnAnimation1()=0;
|
|
|
|
|
virtual void turnAnimation2()=0;
|
2007-01-13 02:40:33 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual void riverAnimation1()=0;
|
|
|
|
|
virtual void riverAnimation2()=0;
|
2007-01-13 14:27:56 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual void postRiverAnimation1()=0;
|
|
|
|
|
virtual void postRiverRunAnimation1()=0;
|
|
|
|
|
virtual void flipHolecardsAllIn()=0;
|
2007-04-20 23:14:08 +00:00
|
|
|
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual void nextRoundCleanGui()=0;
|
|
|
|
|
virtual void meInAction()=0;
|
|
|
|
|
virtual void updateMyButtonsState()=0;
|
|
|
|
|
virtual void disableMyButtons()=0;
|
|
|
|
|
virtual void startTimeoutAnimation(int playerNum, int timeoutSec) =0;
|
|
|
|
|
virtual void stopTimeoutAnimation(int playerNum) =0;
|
|
|
|
|
|
|
|
|
|
virtual void startVoteOnKick(unsigned playerId, unsigned voteStarterPlayerId, int timeoutSec, int numVotesNeededToKick) =0;
|
|
|
|
|
virtual void changeVoteOnKickButtonsState(bool showHide) =0;
|
|
|
|
|
virtual void refreshVotesMonitor(int currentVotes, int numVotesNeededToKick) =0;
|
|
|
|
|
virtual void endVoteOnKick() =0;
|
|
|
|
|
|
|
|
|
|
//log.cpp
|
2010-05-29 14:05:41 +00:00
|
|
|
virtual void logPlayerActionMsg(std::string playName, int playerID, int action, int setValue) =0;
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual void logNewGameHandMsg(int gameID, int HandID) =0;
|
|
|
|
|
virtual void logPlayerWinsMsg(std::string playerName, int pot, bool main) = 0;
|
|
|
|
|
virtual void logPlayerSitsOut(std::string playerName) = 0;
|
|
|
|
|
virtual void logNewBlindsSetsMsg(int sbSet, int bbSet, std::string sbName, std::string bbName) =0;
|
|
|
|
|
virtual void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) = 0;
|
2010-05-29 14:05:41 +00:00
|
|
|
virtual void logFlipHoleCardsMsg(std::string playerName, int playerID, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") = 0;
|
2010-03-30 12:25:30 +00:00
|
|
|
virtual void logPlayerWinGame(std::string playerName, int gameID) =0;
|
|
|
|
|
virtual void flushLogAtGame(int gameID) =0;
|
|
|
|
|
virtual void flushLogAtHand() =0;
|
2008-11-11 22:45:11 +00:00
|
|
|
|
2007-06-15 21:46:02 +00:00
|
|
|
|
2007-01-13 02:40:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|