#include <GlWindow.h>

Public Member Functions | |
| GlWindow (struct screenRes &res, GlRenderer *renderer, bool fullscreen, string titlebar) | |
| Constructor with fullscreen and titlebar support. | |
| GlWindow (enum resId newId, string resDisplayName, GlRenderer *renderer, bool fullscreen, string titlebar) | |
| Constructor with fullscreen and titlebar support. | |
| bool | isFullscreen () |
| Returns if application is in fullscreen mode. | |
| bool | wantsToQuit () |
| Indicates the state (running or ending). | |
| void | setFullscreen (bool fullscreen) |
| Set fullscreen. | |
| void | addSupportedRes (struct screenRes &newRes) |
| Adds a resolution to the list of supported resolutions. | |
| void | addSupportedRes (enum resId newId, string displayName) |
| Adds a resolution to the list of supported resolutions. | |
| void | processEvent (SDL_Event &event) |
| A method to deal with SDL_Event. | |
| virtual string | toString () const |
| Returns a textual representation. | |
| virtual string | className () const |
| Returns the class name of the object. | |
| virtual enum classId | classId () const |
| Returns the class id of the object. | |
Private Member Functions | |
| void | init () |
| Performs first initializatoion. | |
| void | resize () |
| Performs resize operations. | |
| struct screenRes | roundResolution () |
| Finds the next best fullscreen resolution from the list of supported resolutions. | |
| void | checkStandardResolution (enum resId id, GLint &width, GLint &height) |
| check for standard resolution (load standard dimensions) | |
Private Attributes | |
| int | width |
| The width of the window. | |
| int | height |
| The height of the window. | |
| string | titlebar |
| The string for the window's titlebar. | |
| bool | fullscreen |
| Indicates fullscreen mode. | |
| list< struct screenRes > | supportedRes |
| Supported fullscreen resolutions. | |
| struct screenRes * | fsResolution |
| Fullscreen resolution. | |
| bool | quit |
| Indicates end of program. | |
| GlRenderer * | renderer |
| A pointer to the displayed renderer. | |
| GlWindow::GlWindow | ( | struct screenRes & | res, | |
| GlRenderer * | renderer, | |||
| bool | fullscreen, | |||
| string | titlebar | |||
| ) |
Constructor with fullscreen and titlebar support.
Creates a titled OpenGL window that may be set to fullscreen
| res | The width and height of the new window | |
| renderer | A pointer to the displayed renderer | |
| titlebar | The string to be displayed in the titlebar | |
| fullscreen | If the parameter is true, the application will be set to fullscreen mode and to windowed mode otherwise |
| GlWindow::GlWindow | ( | enum resId | newId, | |
| string | resDisplayName, | |||
| GlRenderer * | renderer, | |||
| bool | fullscreen, | |||
| string | titlebar | |||
| ) |
Constructor with fullscreen and titlebar support.
Creates a titled OpenGL window that may be set to fullscreen
| res | The width and height of the new window | |
| renderer | A pointer to the displayed renderer | |
| titlebar | The string to be displayed in the titlebar | |
| fullscreen | If the parameter is true, the application will be set to fullscreen mode and to windowed mode otherwise |
| void GlWindow::init | ( | ) | [private] |
Performs first initializatoion.
| void GlWindow::resize | ( | ) | [private] |
Performs resize operations.
| struct screenRes GlWindow::roundResolution | ( | ) | [read, private] |
Finds the next best fullscreen resolution from the list of supported resolutions.
| void GlWindow::checkStandardResolution | ( | enum resId | id, | |
| GLint & | width, | |||
| GLint & | height | |||
| ) | [private] |
check for standard resolution (load standard dimensions)
| bool GlWindow::isFullscreen | ( | ) |
Returns if application is in fullscreen mode.
| bool GlWindow::wantsToQuit | ( | ) |
Indicates the state (running or ending).
| void GlWindow::setFullscreen | ( | bool | fullscreen | ) |
Set fullscreen.
| If | true the mode is set to fullscreen, if false the window mode is set |
| void GlWindow::addSupportedRes | ( | struct screenRes & | newRes | ) |
Adds a resolution to the list of supported resolutions.
| void GlWindow::addSupportedRes | ( | enum resId | newId, | |
| string | displayName | |||
| ) |
Adds a resolution to the list of supported resolutions.
| void GlWindow::processEvent | ( | SDL_Event & | event | ) | [virtual] |
A method to deal with SDL_Event.
Every EventListener must implement this method to receive and process events. Those will usually be sent by the EventManager which calls this method.
Implements EventListener.
| string GlWindow::toString | ( | ) | const [virtual] |
Returns a textual representation.
Implements EventListener.
| string GlWindow::className | ( | ) | const [virtual] |
Returns the class name of the object.
Implements EventListener.
| enum classId GlWindow::classId | ( | ) | const [virtual] |
int GlWindow::width [private] |
The width of the window.
int GlWindow::height [private] |
The height of the window.
string GlWindow::titlebar [private] |
The string for the window's titlebar.
bool GlWindow::fullscreen [private] |
Indicates fullscreen mode.
list<struct screenRes> GlWindow::supportedRes [private] |
Supported fullscreen resolutions.
struct screenRes* GlWindow::fsResolution [read, private] |
Fullscreen resolution.
bool GlWindow::quit [private] |
Indicates end of program.
GlRenderer* GlWindow::renderer [private] |
A pointer to the displayed renderer.
1.5.6