Description
Overview
Included files
Included by
Source
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _APPLICATION_HPP_
#define _APPLICATION_HPP_
#include <GL/glew.h>
#include <GL/freeglut.h>
#include <IL/il.h>
#include <IL/ilu.h>
#include <IL/ilut.h>
class Application
{
public:
static Application* TheApplication;
static int Run(int argumentCount, char** argumentValues);
protected:
Application(const char* windowTitle_, int xPosition_, int yPosition_, int width_, int height_);
public:
virtual ~Application();
virtual int main(int argumentCount, char** argumentValues);
int getWindowID() const;
int getXPosition() const;
int getYPosition() const;
int getWidth() const;
int getHeight() const;
const char* getWindowTitle() const;
void setWindowID(int windowID_);
virtual void onEntry();
virtual void onClose();
virtual void onIdle();
virtual void onDisplay();
virtual void onReshape(int width_, int height_);
virtual void onKeyUp(unsigned char key, int x, int y);
virtual void onKeyDown(unsigned char key, int x, int y);
virtual void onSpecialKeyUp(int key, int x, int y);
virtual void onSpecialKeyDown(int key, int x, int y);
virtual void onMouseClick(int button, int upOrDown, int x, int y);
virtual void onMouseWheel(int wheel, int direction, int x, int y);
virtual void onMotion(int x, int y);
virtual void onPassiveMotion(int x, int y);
protected:
int windowID;
int xPosition;
int yPosition;
int width;
int height;
const char* windowTitle;
} ;
#include "Application.inl"
#include "Application.mcr"
#endif