//
//   The interface for a cs4731app. Provides GUI interfaces
//   Copyright (C) 1999,2000  Mark R. Stevens
//
//   This program is free software; you can redistribute it and/or modify
//   it under the terms of the GNU General Public License as published by
//   the Free Software Foundation; either version 2 of the License, or
//   (at your option) any later version.
//
//   This program 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 General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//   along with this program; if not, write to the Free Software
//   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 //

#ifndef CS4731APP
#define CS4731APP

// forward declaration
class minigl;
class miniglut;



// The main class definition
class cs4731app {

 public:

  // initialize
  virtual void init(minigl &mgl, miniglut &mglut) = 0;

  // redraw the screen
  virtual void draw(minigl &mgl, miniglut &mglut) = 0;

  // change the window size 
  virtual void reshape(minigl &mgl, miniglut &mglut, int width, int height) = 0;

  // outputs the usage to the screen to show what the keys do
  virtual void usage() = 0;

  // receive keyboard events
  virtual void key    (minigl &mgl, miniglut &mglut, unsigned char k, int x, int y) = 0;

  // receive mouse events
  virtual void mouse (minigl &mgl, miniglut &mglut, int button, int state, int x, int y) = 0;

  // receive special keyboard events (arrow keys, etc.)
  virtual void special(minigl &mgl, miniglut &mglut, int k, int x, int y) = 0;

 protected:

  // used for counting frames
  int T0;
  int Frames;

};

#endif



