GuiWrapper Class Reference

#include <GuiWrapper.h>

Collaboration diagram for GuiWrapper:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 GuiWrapper (GUIEventListener *eventHandler)
 ~GuiWrapper ()
bool MouseClicked (int button, bool isDown, int x, int y)
bool MouseMoved (int x, int y)
bool AsciiKeyDown (unsigned char key)
bool SpecialKeyDown (int key)
bool Init (const char *dataPath)
void SetDimensions (int width, int height)
void RenderScene ()
void Update (double dt)
bool IsActive ()
void SetActive (bool active)

Private Member Functions

void Enter2DMode (int width, int height)
void Exit2DMode ()

Private Attributes

GUIEventListenerhandler
GUILabelfpsDisplay
GUIFrameguiFrame
bool isActive
double dt
double elapsed
double fps
int frames


Detailed Description

Definition at line 10 of file GuiWrapper.h.


Constructor & Destructor Documentation

GuiWrapper::GuiWrapper ( GUIEventListener eventHandler  ) 

Definition at line 7 of file GuiWrapper.cpp.

References dt, elapsed, fpsDisplay, frames, guiFrame, handler, and isActive.

GuiWrapper::~GuiWrapper (  ) 

Definition at line 18 of file GuiWrapper.cpp.

References TexturesManager::flushAllTextures().


Member Function Documentation

bool GuiWrapper::MouseClicked ( int  button,
bool  isDown,
int  x,
int  y 
)

Definition at line 48 of file GuiWrapper.cpp.

References GUIPanel::checkMouseEvents(), GUIRectangle::getHeight(), guiFrame, MB_BUTTON1, MB_BUTTON2, MB_BUTTON3, ME_CLICKED, and ME_RELEASED.

Referenced by main(), MouseClicked(), and MyCallback().

bool GuiWrapper::MouseMoved ( int  x,
int  y 
)

Definition at line 59 of file GuiWrapper.cpp.

References GUIPanel::checkMouseEvents(), GUIRectangle::getHeight(), guiFrame, MB_UNKNOWN_BUTTON, and ME_MOVED.

Referenced by main(), MouseMoved(), and MyCallback().

bool GuiWrapper::AsciiKeyDown ( unsigned char  key  ) 

Definition at line 66 of file GuiWrapper.cpp.

References GUIPanel::checkKeyboardEvents(), guiFrame, KE_PRESSED, and SetActive().

Referenced by KeyTyped(), main(), and MyCallback().

bool GuiWrapper::SpecialKeyDown ( int  key  ) 

Definition at line 74 of file GuiWrapper.cpp.

Referenced by InputKey().

bool GuiWrapper::Init ( const char *  dataPath  ) 

Initializes GLWX

Parameters:
dataPath A character string to the data directory containing the Layouts and Textures directories.
Returns:
true if success

Definition at line 28 of file GuiWrapper.cpp.

References Logger::flush(), fpsDisplay, GUIPanel::getWidgetByCallbackString(), guiFrame, handler, Logger::initialize(), MediaPathManager::registerPath(), and GUIFrame::setGUIEventListener().

Referenced by main().

void GuiWrapper::SetDimensions ( int  width,
int  height 
)

Definition at line 80 of file GuiWrapper.cpp.

References GUIFrame::forceUpdate(), guiFrame, and GUIRectangle::setDimensions().

Referenced by main(), ResizeWindow(), and SetPerspective().

void GuiWrapper::RenderScene (  ) 

Definition at line 86 of file GuiWrapper.cpp.

References dt, Enter2DMode(), Exit2DMode(), fps, fpsDisplay, GUIRectangle::getHeight(), GUIRectangle::getWidth(), guiFrame, GUIFrame::render(), and GUIAlphaElement::setLabelString().

Referenced by glwxWidgetMapper::RenderGui(), and RenderScene().

void GuiWrapper::Update ( double  dt  ) 

Definition at line 103 of file GuiWrapper.cpp.

References elapsed, fps, and frames.

Referenced by glwxWidgetMapper::RenderGui(), and RenderScene().

bool GuiWrapper::IsActive (  ) 

Definition at line 117 of file GuiWrapper.cpp.

References isActive.

Referenced by glwxWidgetMapper::RenderGui(), and RenderScene().

void GuiWrapper::SetActive ( bool  active  ) 

Definition at line 122 of file GuiWrapper.cpp.

References isActive.

Referenced by AsciiKeyDown().

void GuiWrapper::Enter2DMode ( int  width,
int  height 
) [private]

Definition at line 128 of file GuiWrapper.cpp.

Referenced by RenderScene().

void GuiWrapper::Exit2DMode (  )  [private]

Definition at line 148 of file GuiWrapper.cpp.

Referenced by RenderScene().


Member Data Documentation

GUIEventListener* GuiWrapper::handler [private]

Definition at line 34 of file GuiWrapper.h.

Referenced by GuiWrapper(), and Init().

GUILabel* GuiWrapper::fpsDisplay [private]

Definition at line 35 of file GuiWrapper.h.

Referenced by GuiWrapper(), Init(), and RenderScene().

GUIFrame* GuiWrapper::guiFrame [private]

Definition at line 36 of file GuiWrapper.h.

Referenced by AsciiKeyDown(), GuiWrapper(), Init(), MouseClicked(), MouseMoved(), RenderScene(), and SetDimensions().

bool GuiWrapper::isActive [private]

Definition at line 38 of file GuiWrapper.h.

Referenced by GuiWrapper(), IsActive(), and SetActive().

double GuiWrapper::dt [private]

Definition at line 39 of file GuiWrapper.h.

Referenced by GuiWrapper(), and RenderScene().

double GuiWrapper::elapsed [private]

Definition at line 40 of file GuiWrapper.h.

Referenced by GuiWrapper(), and Update().

double GuiWrapper::fps [private]

Definition at line 41 of file GuiWrapper.h.

Referenced by RenderScene(), and Update().

int GuiWrapper::frames [private]

Definition at line 42 of file GuiWrapper.h.

Referenced by GuiWrapper(), and Update().


The documentation for this class was generated from the following files:
Generated on Wed Dec 5 20:32:03 2007 for GLWX by  doxygen 1.5.3