#include <ExManagerWindow.h>
Graphe d'héritage de la classe ExManagerWindow
Membres publics | |
void | CreateNewWindow (int SizeX, int SizeY, int PosX, int PosY, char *argv) |
void | CreateNewWindow (int SizeX, int SizeY, char *argv) |
void | Move (int Posx, int Posy) |
void | SetResolution (int SizeX, int SizeY) |
void | SetRate (int Rate) |
void | SetBits (int Bits) |
void | SetFullScreen (bool State) |
void | SetWindowTitle (char *Title) |
void | SetIconTitle (char *Title) |
void | SetCursor (int Cursor) |
void | Apply (void) |
int | GetResolutionX (void) |
int | GetResolutionY (void) |
int | GetRate (void) |
int | GetBits (void) |
bool | GetFullScreen (void) |
void | SetGrilleState (bool state) |
bool | GetGrilleState (void) |
void | SetFpsState (bool state) |
bool | GetFpsState (void) |
void | ShowFps (void) |
void | ShowNetStat (void) |
void | Reset (void) |
ExCAction | InputCommand (ExCCommand Command) |
ExCAction | InputAction (ExCAction Action) |
Membres publics statiques | |
ExManagerWindow * | CreateSingleton (void) |
Attributs Publics | |
void(* | GlutCallBack )() |
Membres privés | |
ExManagerWindow (void) | |
~ExManagerWindow (void) | |
Attributs Privés | |
ExCOptions * | options |
int | m_WindowHandler |
int | m_WindowSizeX |
int | m_WindowSizeY |
int | m_WindowSizeXOld |
int | m_WindowSizeYOld |
int | m_WindowPosX |
int | m_WindowPosY |
int | m_Bits |
int | m_Rate |
bool | m_FullScreen |
bool | m_OldMode |
char * | m_Title |
char * | m_IconTitle |
int | m_Cursor |
bool | m_ShowGrille |
bool | m_ShowFps |
int | frame |
int | timeframe |
int | timebase |
char | s [30] |
Attributs Privés Statiques | |
bool | m_flag = false |
ExManagerWindow * | m_instance = NULL |
|
Définition à la ligne 29 du fichier ExManagerWindow.cpp. Références ExManagerWindow(), Guard, m_Bits, m_Cursor, m_FullScreen, m_IconTitle, m_OldMode, m_Rate, m_ShowFps, m_ShowGrille, m_Title, m_WindowPosX, m_WindowPosY, m_WindowSizeX, m_WindowSizeXOld, m_WindowSizeY, m_WindowSizeYOld, et VERSION. Référencé par ExManagerWindow(), et ~ExManagerWindow().
00029 { 00030 Guard(ExManagerWindow::ExManagerWindow(void)) 00031 m_ShowGrille=false; 00032 00033 // m_Antialliasing=true; 00034 00035 /* 00036 options = new ExCOptions; 00037 00038 m_ShowFps = options->getWindowShowfps (); 00039 00040 m_WindowSizeX = options->getWindowResolutionX (); 00041 m_WindowSizeY = options->getWindowResolutionY (); 00042 m_Bits = options->getWindowDepth (); 00043 m_Rate = options->getWindowRate (); 00044 m_FullScreen = options->getWindowFullscreen () ; 00045 */ 00046 m_ShowFps = true; 00047 m_WindowSizeX = 800; 00048 m_WindowSizeY = 600; 00049 m_WindowSizeXOld = m_WindowSizeX; 00050 m_WindowSizeYOld = m_WindowSizeY; 00051 m_WindowPosX=0; 00052 m_WindowPosY=0; 00053 m_Bits = 16; 00054 m_Rate = 75; 00055 m_FullScreen = true ; 00056 m_OldMode=m_FullScreen; 00057 m_Cursor=GLUT_CURSOR_CROSSHAIR; 00058 00059 m_Title=new char[strlen("ExNihilo Engine Version ")+20]; 00060 sprintf(m_Title,"ExNihilo Engine Version %s",VERSION); 00061 00062 m_IconTitle=new char[strlen("ExNihilo Engine Version ")+20]; 00063 sprintf(m_IconTitle,"ExNihilo Engine Version %s",VERSION); 00064 00065 UnGuard 00066 } |
|
Définition à la ligne 68 du fichier ExManagerWindow.cpp. Références ExManagerWindow(), Guard, et m_flag.
00069 { 00070 Guard(ExManagerWindow::~ExManagerWindow(void)) 00071 m_flag=false; 00072 UnGuard 00073 } |
|
Définition à la ligne 160 du fichier ExManagerWindow.cpp. Références Apply(), GlutCallBack, Guard, m_Bits, m_Rate, m_Title, m_WindowHandler, m_WindowPosX, m_WindowPosY, m_WindowSizeX, et m_WindowSizeY. Référencé par Apply(), InitManager(), et InputAction().
00160 { 00161 Guard(ExManagerWindow::Apply(void)) 00162 if(m_FullScreen) 00163 { 00164 char *game; 00165 game=new char[15]; 00166 sprintf(game,"%dx%d:%d@%d",m_WindowSizeX,m_WindowSizeY,m_Bits,m_Rate); 00167 if(m_OldMode) 00168 { 00169 glutDestroyWindow(m_WindowHandler); 00170 } 00171 00172 glutGameModeString(game); 00173 00174 if (glutGameModeGet(GLUT_GAME_MODE_POSSIBLE)) 00175 { 00176 m_WindowHandler=glutEnterGameMode(); 00177 GlutCallBack(); 00178 glutSetWindow(m_WindowHandler); 00179 00180 }else 00181 { 00182 std::cout << "Can not switch to fullscreen error with your graphic card or glut lib " << std::endl; 00183 } 00184 }else 00185 { 00186 if(m_OldMode) 00187 { 00188 glutLeaveGameMode(); 00189 glutInitWindowPosition(m_WindowPosX,m_WindowPosY); 00190 glutInitWindowSize(m_WindowSizeX,m_WindowSizeY); 00191 m_WindowHandler=glutCreateWindow(m_Title); 00192 }else 00193 { 00194 glutReshapeWindow(m_WindowSizeX,m_WindowSizeY); 00195 } 00196 } 00197 UnGuard 00198 } |
|
Définition à la ligne 105 du fichier ExManagerWindow.cpp. Références CreateNewWindow(), Guard, m_Cursor, m_IconTitle, m_Title, m_WindowHandler, m_WindowPosX, m_WindowPosY, m_WindowSizeX, m_WindowSizeXOld, m_WindowSizeY, m_WindowSizeYOld, et SetCursor().
00105 { 00106 Guard(ExManagerWindow::CreateNewWindow(int SizeX,int SizeY,char *argv)) 00107 m_WindowSizeX=SizeX; 00108 m_WindowSizeY=SizeY; 00109 m_WindowSizeXOld=SizeX; 00110 m_WindowSizeYOld=SizeY; 00111 glutInitWindowPosition(m_WindowPosX,m_WindowPosY); 00112 glutInitWindowSize(m_WindowSizeX,m_WindowSizeY); 00113 m_WindowHandler=glutCreateWindow(m_Title); 00114 glutSetIconTitle(m_IconTitle); 00115 SetCursor(m_Cursor); 00116 UnGuard 00117 } |
|
Définition à la ligne 89 du fichier ExManagerWindow.cpp. Références CreateNewWindow(), Guard, m_Cursor, m_IconTitle, m_Title, m_WindowHandler, m_WindowPosX, m_WindowPosY, m_WindowSizeX, m_WindowSizeXOld, m_WindowSizeY, m_WindowSizeYOld, et SetCursor(). Référencé par CreateNewWindow(), et main().
00089 { 00090 Guard(ExManagerWindow::CreateNewWindow(int SizeX,int SizeY,int PosX,int PosY,char *argv)) 00091 m_WindowSizeX=SizeX; 00092 m_WindowSizeY=SizeY; 00093 m_WindowSizeXOld=SizeX; 00094 m_WindowSizeYOld=SizeY; 00095 m_WindowPosX=PosX; 00096 m_WindowPosY=PosY; 00097 glutInitWindowPosition(m_WindowPosX,m_WindowPosY); 00098 glutInitWindowSize(m_WindowSizeX,m_WindowSizeY); 00099 m_WindowHandler=glutCreateWindow(m_Title); 00100 glutSetIconTitle(m_IconTitle); 00101 SetCursor(m_Cursor); 00102 UnGuard 00103 } |
|
Définition à la ligne 75 du fichier ExManagerWindow.cpp. Références CreateSingleton(), Guard, m_flag, et m_instance. Référencé par CreateSingleton(), et main().
00075 { 00076 Guard(ExManagerWindow* ExManagerWindow::CreateSingleton(void)) 00077 if(!m_flag) 00078 { 00079 m_flag = true; // We are creating the error log now, so set flag to true 00080 m_instance = new ExManagerWindow; // Create the error log 00081 }else 00082 { 00083 std::cout<<"Error singleton already created"<<std::endl; 00084 } 00085 return m_instance; 00086 UnGuard 00087 } |
|
Définition à la ligne 92 du fichier ExManagerWindow.h. Références m_Rate.
00092 {return m_Rate;} |
|
Définition à la ligne 99 du fichier ExManagerWindow.h. Références m_ShowFps. Référencé par ExManagerOutput::DrawScene().
00099 {m_ShowFps=state;} |
|
Définition à la ligne 93 du fichier ExManagerWindow.h. Références m_Bits.
00093 {return m_Bits;} |
|
Définition à la ligne 97 du fichier ExManagerWindow.h. Références m_ShowGrille. Référencé par ExManagerOutput::DrawScene(), et InputAction().
00097 {m_ShowGrille=state;} |
|
Définition à la ligne 91 du fichier ExManagerWindow.h. Références m_WindowSizeY.
00091 {return m_WindowSizeY;} |
|
Définition à la ligne 89 du fichier ExManagerWindow.h. Référencé par ExManagerConsole::Draw(), ExCInterface::InputCommand(), et ExManagerOutput::Reshape().
00090 {return m_WindowSizeX;} |
|
Définition à la ligne 90 du fichier ExManagerWindow.h. Références m_WindowSizeX. Référencé par ExManagerConsole::Draw(), ExCInterface::InputCommand(), et ExManagerOutput::Reshape().
00090 {return m_WindowSizeX;} |
|
Redéfinie à partir de ExManager. Définition à la ligne 228 du fichier ExManagerWindow.cpp. Références Apply(), GetGrilleState(), Guard, InputAction(), ExCAction::m_Action, SET_POLYGONMODE_FILL, SET_POLYGONMODE_LINES, SET_POLYGONMODE_POINTS, SetBits(), SetFpsState(), SetFullScreen(), SetGrilleState(), et SetResolution(). Référencé par InputAction(), et ExManagerCommand::ProcesExCAction().
00229 { 00230 Guard(ExManagerWindow::InputAction(ExCAction Action)) 00231 switch(Action.m_Action) 00232 { 00233 case SET_RESOLUTION_800_600_16: 00234 SetResolution(800,600); 00235 SetBits(16); 00236 SetFullScreen(true); 00237 Apply(); 00238 break; 00239 00240 case SET_RESOLUTION_800_600_24: 00241 SetResolution(800,600); 00242 SetBits(24); 00243 SetFullScreen(true); 00244 Apply(); 00245 break; 00246 00247 case SET_RESOLUTION_800_600_32: 00248 SetResolution(800,600); 00249 SetBits(32); 00250 SetFullScreen(true); 00251 Apply(); 00252 break; 00253 00254 case SET_RESOLUTION_1024_768_16: 00255 SetResolution(1024,768); 00256 SetBits(16); 00257 SetFullScreen(true); 00258 Apply(); 00259 break; 00260 00261 case SET_RESOLUTION_1024_768_24: 00262 SetResolution(1024,768); 00263 SetBits(24); 00264 SetFullScreen(true); 00265 Apply(); 00266 break; 00267 00268 case SET_RESOLUTION_1024_768_32: 00269 SetResolution(1024,768); 00270 SetBits(32); 00271 SetFullScreen(true); 00272 Apply(); 00273 break; 00274 00275 case SET_RESOLUTION_1600_1200_16: 00276 SetResolution(1600,1200); 00277 SetBits(16); 00278 SetFullScreen(true); 00279 Apply(); 00280 break; 00281 00282 case SET_RESOLUTION_1600_1200_24: 00283 SetResolution(1600,1200); 00284 SetBits(24); 00285 SetFullScreen(true); 00286 Apply(); 00287 break; 00288 00289 case SET_RESOLUTION_1600_1200_32: 00290 SetResolution(1600,1200); 00291 SetBits(32); 00292 SetFullScreen(true); 00293 Apply(); 00294 break; 00295 00296 case SHOW_FPS_STAT: 00297 SetFpsState(true); 00298 break; 00299 00300 case HIDE_FPS_STAT: 00301 SetFpsState(false); 00302 break; 00303 00304 case ENABLE_GRIDE: 00305 SetGrilleState(true); 00306 break; 00307 00308 case DISABLE_GRIDE: 00309 SetGrilleState(false); 00310 break; 00311 00312 case SWITCH_GRIDE: 00313 if(GetGrilleState()) 00314 { 00315 InputAction(DISABLE_GRIDE); 00316 }else 00317 { 00318 InputAction(ENABLE_GRIDE); 00319 } 00320 break; 00321 case SET_POLYGONMODE_POINTS: 00322 glPolygonMode(GL_FRONT_AND_BACK,GL_POINT); 00323 break; 00324 00325 case SET_POLYGONMODE_LINES: 00326 glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); 00327 break; 00328 00329 case SET_POLYGONMODE_FILL: 00330 glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); 00331 break; 00332 00333 default: return NOTHING; 00334 } 00335 return NOTHING; 00336 UnGuard 00337 } |
|
Redéfinie à partir de ExManager. Définition à la ligne 221 du fichier ExManagerWindow.cpp. Références Guard, et InputCommand(). Référencé par InputCommand().
00222 { 00223 Guard(ExManagerWindow::InputCommand(ExCCommand Command)) 00224 return NOTHING; 00225 UnGuard 00226 } |
|
Définition à la ligne 119 du fichier ExManagerWindow.cpp. Références Guard, m_WindowPosX, m_WindowPosY, et Move(). Référencé par Move().
00119 { 00120 Guard(ExManagerWindow::Move(int Posx,int Posy)) 00121 m_WindowPosX=Posx; 00122 m_WindowPosY=Posy; 00123 glutPositionWindow(Posx,Posy); 00124 UnGuard 00125 } |
|
Redéfinie à partir de ExManager. Définition à la ligne 104 du fichier ExManagerWindow.h.
00105 {return;}
|
|
Définition à la ligne 82 du fichier ExManagerWindow.h. Références m_Rate. Référencé par InputAction().
00082 {m_Rate=Rate;} |
|
Définition à la ligne 153 du fichier ExManagerWindow.cpp. Références Guard, et SetCursor(). Référencé par CreateNewWindow(), et SetCursor().
00153 { 00154 Guard(ExManagerWindow::SetCursor(int Cursor)) 00155 glutSetCursor(Cursor); 00156 UnGuard 00157 } |
|
Définition à la ligne 98 du fichier ExManagerWindow.h. Références m_ShowGrille. Référencé par InputAction().
00098 {return m_ShowGrille;} |
|
Définition à la ligne 83 du fichier ExManagerWindow.h. Références m_Bits. Référencé par InputAction(), et main().
00083 {m_Bits=Bits;} |
|
Définition à la ligne 96 du fichier ExManagerWindow.h. Référencé par InputAction().
00097 {m_ShowGrille=state;} |
|
Définition à la ligne 145 du fichier ExManagerWindow.cpp. Références Guard, m_IconTitle, et SetIconTitle(). Référencé par SetIconTitle().
00145 { 00146 Guard(ExManagerWindow::SetIconTitle(char *Title)) 00147 m_IconTitle=new char[strlen(Title)]; 00148 sprintf(m_IconTitle,"%s",Title); 00149 glutSetIconTitle(m_IconTitle); 00150 UnGuard 00151 } |
|
Définition à la ligne 81 du fichier ExManagerWindow.h.
00082 {m_Rate=Rate;} |
|
Définition à la ligne 128 du fichier ExManagerWindow.cpp. Références Guard, m_WindowSizeX, m_WindowSizeXOld, m_WindowSizeY, m_WindowSizeYOld, et SetResolution(). Référencé par InputAction(), ExManagerOutput::Reshape(), et SetResolution().
00128 { 00129 Guard(ExManagerWindow::SetResolution(int SizeX,int SizeY)) 00130 m_WindowSizeXOld=m_WindowSizeX; 00131 m_WindowSizeYOld=m_WindowSizeY; 00132 m_WindowSizeX=SizeX; 00133 m_WindowSizeY=SizeY; 00134 UnGuard 00135 } |
|
Définition à la ligne 137 du fichier ExManagerWindow.cpp. Références Guard, m_Title, et SetWindowTitle(). Référencé par SetWindowTitle().
00137 { 00138 Guard(ExManagerWindow::SetWindowTitle(char *Title)) 00139 m_Title = new char[strlen(Title)]; 00140 sprintf(m_Title,"%s",Title); 00141 glutSetWindowTitle(m_Title); 00142 UnGuard 00143 } |
|
Définition à la ligne 200 du fichier ExManagerWindow.cpp. Références ExNihilo::DrawCadre(), frame, Guard, m_Title, s, ShowFps(), timebase, timeframe, et ExNihilo::WriteToScreen(). Référencé par ExManagerOutput::DrawScene(), et ShowFps().
00201 { 00202 Guard(void ExManagerWindow::ShowFps(void)) 00203 frame++; 00204 timeframe=glutGet(GLUT_ELAPSED_TIME); 00205 if (timeframe - timebase > 1000) 00206 { 00207 sprintf(s,"FPS:%4.2f",frame*1000.0/(timeframe-timebase)); 00208 timebase = timeframe; 00209 frame = 0; 00210 } 00211 char TimeSinceStart[30]; 00212 sprintf(TimeSinceStart,"Time since start:%f",(double)((double)glutGet(GLUT_ELAPSED_TIME)/1000)); 00213 ExNihilo::DrawCadre(15,10,165,50,0.2f,0.0f,0.6f,0.9f); 00214 ExNihilo::WriteToScreen(18,25,1,1,1,m_Title); 00215 ExNihilo::WriteToScreen(18,40,1,1,1,s); 00216 ExNihilo::WriteToScreen(18,55,1,1,1,TimeSinceStart); 00217 00218 UnGuard 00219 } |
|
|
|
Définition à la ligne 60 du fichier ExManagerWindow.h. Référencé par ShowFps(). |
|
Référencé par Apply(), et InitManager(). |
|
Définition à la ligne 49 du fichier ExManagerWindow.h. Référencé par Apply(), ExManagerWindow(), GetFullScreen(), et SetFullScreen(). |
|
Définition à la ligne 55 du fichier ExManagerWindow.h. Référencé par CreateNewWindow(), et ExManagerWindow(). |
|
Définition à la ligne 26 du fichier ExManagerWindow.cpp. Référencé par CreateSingleton(), et ~ExManagerWindow(). |
|
Définition à la ligne 51 du fichier ExManagerWindow.h. Référencé par ExManagerWindow(). |
|
Définition à la ligne 54 du fichier ExManagerWindow.h. Référencé par CreateNewWindow(), ExManagerWindow(), et SetIconTitle(). |
|
Définition à la ligne 27 du fichier ExManagerWindow.cpp. Référencé par CreateSingleton(). |
|
Définition à la ligne 52 du fichier ExManagerWindow.h. Référencé par ExManagerWindow(). |
|
Définition à la ligne 50 du fichier ExManagerWindow.h. Référencé par Apply(), ExManagerWindow(), GetBits(), et SetBits(). |
|
Définition à la ligne 58 du fichier ExManagerWindow.h. Référencé par ExManagerWindow(), et GetFpsState(). |
|
Définition à la ligne 57 du fichier ExManagerWindow.h. Référencé par ExManagerWindow(), GetGrilleState(), et SetFpsState(). |
|
Définition à la ligne 53 du fichier ExManagerWindow.h. Référencé par Apply(), CreateNewWindow(), ExManagerWindow(), SetWindowTitle(), et ShowFps(). |
|
Définition à la ligne 42 du fichier ExManagerWindow.h. Référencé par Apply(), et CreateNewWindow(). |
|
Définition à la ligne 47 du fichier ExManagerWindow.h. Référencé par Apply(), CreateNewWindow(), ExManagerWindow(), et Move(). |
|
Définition à la ligne 48 du fichier ExManagerWindow.h. Référencé par Apply(), CreateNewWindow(), ExManagerWindow(), et Move(). |
|
Définition à la ligne 43 du fichier ExManagerWindow.h. Référencé par Apply(), CreateNewWindow(), ExManagerWindow(), GetResolutionY(), et SetResolution(). |
|
Définition à la ligne 45 du fichier ExManagerWindow.h. Référencé par CreateNewWindow(), ExManagerWindow(), et SetResolution(). |
|
Définition à la ligne 44 du fichier ExManagerWindow.h. Référencé par Apply(), CreateNewWindow(), ExManagerWindow(), GetRate(), et SetResolution(). |
|
Définition à la ligne 46 du fichier ExManagerWindow.h. Référencé par CreateNewWindow(), ExManagerWindow(), et SetResolution(). |
|
Définition à la ligne 40 du fichier ExManagerWindow.h. |
|
Définition à la ligne 61 du fichier ExManagerWindow.h. Référencé par ShowFps(). |
|
Définition à la ligne 60 du fichier ExManagerWindow.h. Référencé par ShowFps(). |
|
Définition à la ligne 60 du fichier ExManagerWindow.h. Référencé par ShowFps(). |