//** bogwin.h ********************************************************* // // Boggle Window class // #ifndef BOGWIN_H #define BOGWIN_H class TBogWindow; //forward declare this class #include "common.hpp" #include #include /* IPaintHandler */ #include /* IPaintEvent */ #include /* IMenu Stuff */ #include /* ICommandHandler */ #include /* Mouse commands */ #include #include #include /* Canvas class stuff */ #include /* Multicell Canvas class */ #include /* Menu accelerator stuff */ #include /* push button stuff */ #include #include #include "sound.hpp" #include "board.hpp" #include "menu.hpp" #include "square.hpp" #include "wlist.hpp" #include "timer.hpp" #include "wip.hpp" class TBogWindow : public IFrameWindow, public ICommandHandler, public IPaintHandler, public IMouseClickHandler { private: IHelpWindow help; IHelpHandler helpHandler; IMenuBar menuBar; IMultiCellCanvas Client; IStaticText gameTitle; IFont myfont; IColor color; TBogBoard *pboard; TBogWordList *plist; TBogTimer *ptimer; TBogWIP *pwip; TBogScore *pscore; Sound *psound; IStaticText st_wip; IStaticText st_list; IStaticText st_timer; IStaticText st_score; Boolean GameOn; long TickDuration; Boolean bSound; protected: /* -------------------------------------------------------- */ /* declare the event handlers. These event handlers are all */ /* pure virtual functions in their respective base classes */ /* -------------------------------------------------------- */ virtual Boolean command(ICommandEvent&); virtual Boolean paintWindow(IPaintEvent &); virtual Boolean mouseClicked(IMouseClickEvent &); void settings(); void aboutBox(); void resumeGame(); void pauseGame(); void resetGame(ICommandEvent& event); public : TBogWindow (const char *title, unsigned long id); ~TBogWindow(); Boolean isGameOn() {return (GameOn); } void gameOver(); void SetTickDuration(long time) {TickDuration = time; } long GetTickDuration() {return TickDuration; } void SetSoundFlag(Boolean flag) {bSound = flag; } Boolean GetSoundFlag() {return bSound; } } ; #endif