00001 #pragma once
00002
00003 #include "LinearGrid.h"
00004 #include "RootGrid.h"
00005 #include "Texture.h"
00006 #include "glui.h"
00007
00008 #define GRID_WIDTH 70
00009 #define GRID_HEIGHT 70
00010
00011 #define ESC 27
00012
00013 class Program
00014 {
00015 public:
00016 Program(int _windowId);
00017 ~Program();
00018 Program(const Program& other) {}
00019
00020 void InitGlui(GLUI* _glui);
00021
00022 void HandleReshape (int w, int h);
00023 void HandleDisplay (void);
00024 void HandleKeyboard (unsigned char key, int x, int y);
00025 void HandleSpecialKey(int key, int x, int y);
00026 void HandleMouse(int button, int state, int x, int y);
00027 void HandleMouseMotion(int x, int y);
00028 void HandleIdle(void);
00029
00030 private:
00031 void InitProjection();
00032 void UpdateState();
00033
00034 private:
00035 GLenum polygonMode;
00036
00037 int windowWidth, windowHeight;
00038
00039 LinearGrid* linearGrid;
00040 RootGrid* rootGrid;
00041
00042 int mouseButton;
00043 int oldX, oldY;
00044
00045 float rootRes;
00046
00047 private:
00048 GLUI *glui;
00049 int windowId;
00050
00051 int gluiWireframe;
00052 int gluiGridSize;
00053
00054 int fileNumber;
00055
00056 GLUI_RadioGroup * gluiRadioGroup;
00057 };
00058