Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Application Class Reference

#include <Application.h>

Inherited by OpenGLApp.

Inheritance diagram for Application:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Application ()
virtual ~Application ()
void toggleFullscreen ()
bool resetDisplayMode ()
virtual bool createWindow (HINSTANCE hInstance)
virtual bool drawFrame ()
virtual void flush ()=0
virtual void destroyWindow ()=0
virtual void setViewport (unsigned int width, unsigned int height)=0
virtual bool update ()
virtual bool initialize ()
virtual bool deInitialize ()
virtual bool load ()
virtual bool unload ()
void setKey (unsigned int key, bool value)
virtual void keyDown (unsigned int key)
virtual void handleChar (char ch)
void setCursorPos (int x, int y)
void setMouseButton (unsigned int button, bool value)
void checkMouse ()
void captureMouse (bool value)
void showCursor (bool value)

Public Attributes

HWND hWnd
Rendererrenderer
bool keys [65536]
Mouse mouse
Camera camera
OpenGLFontdefaultFont

Detailed Description

Definition at line 26 of file Application.h.


Constructor & Destructor Documentation

Application::Application  ) 
 

Application.cpp

Author: Petter Alstermark, petter@alstermark.com

Definition at line 12 of file Application.cpp.

References Mouse::capture, defaultFont, Mouse::dx, Mouse::dy, keys, Mouse::left, mouse, Mouse::right, and Mouse::visible.

Application::~Application  )  [virtual]
 

Definition at line 27 of file Application.cpp.


Member Function Documentation

void Application::captureMouse bool  value  ) 
 

Definition at line 107 of file Application.cpp.

References Mouse::capture, g_middleX, g_middleY, mouse, setCursorPos(), showCursor(), and Mouse::visible.

Here is the call graph for this function:

void Application::checkMouse  ) 
 

Definition at line 130 of file Application.cpp.

References Mouse::capture, Mouse::dx, Mouse::dy, g_middleX, g_middleY, mouse, setCursorPos(), Mouse::x, and Mouse::y.

Referenced by WinMain().

Here is the call graph for this function:

virtual bool Application::createWindow HINSTANCE  hInstance  )  [inline, virtual]
 

Reimplemented in OpenGLApp.

Definition at line 34 of file Application.h.

Referenced by WinMain().

virtual bool Application::deInitialize  )  [inline, virtual]
 

Reimplemented in MainApp.

Definition at line 42 of file Application.h.

Referenced by WinMain().

virtual void Application::destroyWindow  )  [pure virtual]
 

Implemented in OpenGLApp.

Referenced by WinMain().

virtual bool Application::drawFrame  )  [inline, virtual]
 

Reimplemented in MainApp.

Definition at line 35 of file Application.h.

Referenced by WinMain().

virtual void Application::flush  )  [pure virtual]
 

Implemented in OpenGLApp.

void Application::handleChar char  ch  )  [virtual]
 

Reimplemented in MainApp.

Definition at line 54 of file Application.cpp.

Referenced by WndProc().

virtual bool Application::initialize  )  [inline, virtual]
 

Reimplemented in MainApp.

Definition at line 41 of file Application.h.

Referenced by WinMain().

void Application::keyDown unsigned int  key  )  [virtual]
 

Reimplemented in MainApp.

Definition at line 61 of file Application.cpp.

References hWnd, setKey(), and toggleFullscreen().

Referenced by WndProc().

Here is the call graph for this function:

virtual bool Application::load  )  [inline, virtual]
 

Reimplemented in MainApp.

Definition at line 43 of file Application.h.

Referenced by WinMain().

bool Application::resetDisplayMode  ) 
 

Definition at line 40 of file Application.cpp.

Referenced by OpenGLApp::destroyWindow().

void Application::setCursorPos int  x,
int  y
 

Definition at line 80 of file Application.cpp.

Referenced by captureMouse(), and checkMouse().

void Application::setKey unsigned int  key,
bool  value
 

Definition at line 47 of file Application.cpp.

References keys.

Referenced by MainApp::keyDown(), keyDown(), and WndProc().

void Application::setMouseButton unsigned int  button,
bool  value
 

Definition at line 97 of file Application.cpp.

References Mouse::left, mouse, MOUSE_LEFT, and Mouse::right.

Referenced by WndProc().

virtual void Application::setViewport unsigned int  width,
unsigned int  height
[pure virtual]
 

Implemented in OpenGLApp.

Referenced by WndProc().

void Application::showCursor bool  value  ) 
 

Definition at line 87 of file Application.cpp.

References mouse, and Mouse::visible.

Referenced by captureMouse(), OpenGLApp::destroyWindow(), and MainApp::load().

void Application::toggleFullscreen  ) 
 

Definition at line 33 of file Application.cpp.

References hWnd, and WM_TOGGLEFULLSCREEN.

Referenced by MainApp::keyDown(), and keyDown().

virtual bool Application::unload  )  [inline, virtual]
 

Reimplemented in MainApp.

Definition at line 44 of file Application.h.

Referenced by WinMain().

virtual bool Application::update  )  [inline, virtual]
 

Reimplemented in MainApp.

Definition at line 40 of file Application.h.

Referenced by WinMain().


Member Data Documentation

Camera Application::camera
 

Definition at line 65 of file Application.h.

Referenced by Menu::drawCreate(), Play::drawFrame(), Menu::drawFrame(), Join::drawFrame(), Join::drawGalaxies(), Menu::drawJoin(), Menu::drawMain(), Play::drawParticleSystems(), Play::drawPlayer(), Menu::drawSettings(), Play::grenadeExplode(), MainApp::initialize(), Menu::load(), Join::load(), Menu::setCamera(), Join::setCamera(), and Play::setPlayerCam().

OpenGLFont* Application::defaultFont
 

Definition at line 67 of file Application.h.

Referenced by Application(), Menu::drawCreate(), Menu::drawCredits(), Scores::drawFrame(), Play::drawFrame(), MainApp::drawFrame(), Join::drawFrame(), Menu::drawJoin(), MainApp::drawLoading(), MainApp::load(), and MainApp::unload().

HWND Application::hWnd
 

Definition at line 59 of file Application.h.

Referenced by OpenGLApp::createWindow(), OpenGLApp::destroyWindow(), keyDown(), Menu::menuMainSelect(), Console::process(), toggleFullscreen(), Menu::updateMain(), and WinMain().

bool Application::keys[65536]
 

Definition at line 63 of file Application.h.

Referenced by Application(), Play::drawFrame(), Play::handleKeys(), setKey(), Scores::update(), Join::update(), Demo::update(), Menu::updateCreate(), Menu::updateCredits(), Menu::updateJoin(), Menu::updateMain(), and Menu::updateSettings().

Mouse Application::mouse
 

Definition at line 64 of file Application.h.

Referenced by Application(), captureMouse(), checkMouse(), setMouseButton(), showCursor(), and Demo::update().

Renderer* Application::renderer
 

Definition at line 62 of file Application.h.

Referenced by MS_Material::activate(), MS_Material::clear(), OpenGLApp::createWindow(), OpenGLApp::destroyWindow(), Explosion::drawAndUpdate(), Play::drawAvatar(), Menu::drawCreate(), Play::drawExplosions(), Play::drawExtras(), Play::drawFrame(), Menu::drawFrame(), Join::drawFrame(), Join::drawGalaxies(), Play::drawGrenades(), Menu::drawJoin(), Menu::drawLabel(), Join::drawLevels(), Play::drawLifebar(), Menu::drawMain(), Play::drawParticleSystems(), Play::drawPlayer(), Play::drawProjectiles(), Menu::drawQuad(), Join::drawQuad(), Menu::drawSelect(), Menu::drawSelection(), Menu::drawSettings(), Play::drawShadow(), Menu::load(), MainApp::load(), Join::load(), Menu::loadMain(), Play::loadObjects(), Play::loadTextures(), MS_Material::reloadTexture(), Join::setGalaxy(), Menu::setModel(), Play::unload(), Menu::unload(), Join::unload(), Join::unloadGalaxies(), and Menu::unloadMain().


Generated on Sun Jun 5 15:49:21 2005 for Defacto by  doxygen 1.4.3