Application.cpp
Default mainpageApplicationApplication.cpp
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
 */

#include "Application.hpp"

// Set the application to null for the linker
Application* Application::TheApplication = 0;

Application::Application(const char* windowTitle_, int xPosition_, int yPosition_, int width_, int height_)
: windowTitle(windowTitle_)
{
    xPosition = xPosition_;
    yPosition = yPosition_;

    width  = width_;
    height = height_;
}

Application::~Application()
{

}

int Application::Run(int argumentCount, char** argumentValues)
{
    Application* app = (Application*)Application::TheApplication;

    return(app->main(argumentCount, argumentValues));
}

void Application::onEntry()
{

}

void Application::onClose()
{

}

void Application::onDisplay()
{

}

void Application::onIdle()
{

}

void Application::onReshape(int width_, int height_)
{
    width = width_;
    height = height_;
}

void Application::onKeyUp(unsigned char key, int x, int y)
{

}

void Application::onKeyDown(unsigned char key, int x, int y)
{

}

void Application::onSpecialKeyUp(int key, int x, int y)
{

}

void Application::onSpecialKeyDown(int key, int x, int y)
{

}

void Application::onMouseClick(int button, int upOrDown, int x, int y)
{

}

void Application::onMouseWheel(int wheel, int direction, int x, int y)
{

}

void Application::onMotion(int x, int y)
{

}

void Application::onPassiveMotion(int x, int y)
{

}