Google
Web alhem.net
Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

MainWindow.h

Go to the documentation of this file.
00001 00006 /* 00007 Copyright (C) 2004 Anders Hedstrom 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License 00011 as published by the Free Software Foundation; either version 2 00012 of the License, or (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 */ 00023 #ifndef _MAINWINDOW_H 00024 #define _MAINWINDOW_H 00025 00026 //#include <gui/guitypedefs.h> 00027 #include "Grid.h" 00028 #include "DotCursor.h" 00029 00030 //#define USE_IMAGE 00031 00032 using gui::SDLControl; 00033 using gui::Color; 00034 using gui::TTFont; 00035 using gui::Static; 00036 using gui::Edit; 00037 using gui::Surface; 00038 using gui::Button; 00039 using gui::Output; 00040 using gui::surface_event_t; 00041 using gui::coord_t; 00042 00043 class MenuDialog; 00044 class OptionsDialog; 00045 class LoginDialog; 00046 class PlayerDialog; 00047 class TextDialog; 00048 class ConnectThread; 00049 class TestMenu; 00050 class Grid; 00051 class Player; 00052 class DotCursor; 00053 class DotMenu; 00054 00055 00056 typedef struct mapdotstruct 00057 { 00058 int x; 00059 int y; 00060 long cx; 00061 long cy; 00062 } MAPDOT; 00063 00064 typedef std::vector<MAPDOT *> mapdots_t; 00065 00066 class MainWindow : public gui::Surface 00067 { 00068 public: 00069 MainWindow(SDLControl *); 00070 ~MainWindow(); 00071 00072 void Draw(); 00073 void AddLine(const string &); 00074 #ifdef USE_IMAGE 00075 void MoveImage(int,int); 00076 #endif 00077 void ShowMenu(); 00078 void ShowOptions(); 00079 void ShowLogin(Form::Form *); 00080 void ShowPlayers(Form::Form *,vector<string> &); 00081 void ShowText(); 00082 00083 void OnEvent(surface_event_t *); 00084 void OnMouseMove(coord_t,coord_t,coord_t,coord_t); 00085 void OnRightClick(coord_t,coord_t); 00086 00087 void Connect(); 00088 void Disconnect(); 00089 Surface *GetInput(); 00090 void SetAngles(double,double); 00091 void IncreaseBase(); 00092 void DecreaseBase(); 00093 void Redraw(); 00094 00095 static Grid m_grid; 00096 00097 private: 00098 int Get_h(long,long); 00099 int Get_t_left(long,long); 00100 int Get_t_up(long,long); 00101 TTFont courier8; // fonts 00102 Edit m_guiInput; 00103 MenuDialog *m_pclMenuDialog; 00104 OptionsDialog *m_pclOptionsDialog; 00105 LoginDialog *m_pclLoginDialog; 00106 PlayerDialog *m_pclPlayerDialog; 00107 TextDialog *m_pclTextDialog; 00108 ConnectThread *m_pclConnectThread; 00109 TestMenu *m_pclTestMenu; 00110 DotMenu *m_dotMenu; 00111 #ifdef USE_IMAGE 00112 SDL_Surface *m_image; // bmp 00113 int m_image_x; 00114 int m_image_y; 00115 #endif 00116 double m_test_v; 00117 double m_test_v_vertikal; 00118 mapdots_t m_dots; 00119 MAPDOT *m_dot; 00120 DotCursor m_dc; 00121 }; 00122 00123 00124 #endif // _MAINWINDOW_H

Generated for SDL C++ GUI by doxygen 1.3.6