Hauptseite | Liste aller Namensbereiche | Klassenhierarchie | Alphabetische Liste | Datenstrukturen | Auflistung der Dateien | Datenstruktur-Elemente | Datei-Elemente

Window.h

gehe zur Dokumentation dieser Datei
00001 /*
00002 Autor: $Author: kunkel $ State: $State: Exp $
00003 Datum: $Date: 2005/05/30 12:35:25 $
00004 Version: $Revision: 1.1 $
00005 */
00006 
00012 #ifndef MENU_H
00013 #define MENU_H
00014 
00015 #include "config.h"
00016 #include "glui/glui.h"
00017 #include "Object.h"
00018 
00028 class Window {
00029 public:
00033     enum CONSTRUCT_MODE{
00034         NONE,MOVEXY, MOVEZ, SPEEDXY,SPEEDZ
00035     };
00036 private:
00044     enum callbackMain{
00045         TOGGLE_VIEW_OPTIONS, TOGGLE_CONSTRUCT_MODE,
00046         HIDE_MENU, OBJECT_SELECT, TRANSLATION_XY,TRANSLATION_Z,
00047         PAUSE,CONTINUE,SINGLESTEP, LOADCAMERA, SAVECAMERA, ZOOM_OBJECT
00048     };
00049 
00054     enum callbackOption {
00055         SAVE,LOAD,FILE_SELECTOR_LIST, INTEGRATOR,INTEGRATOROPTION,
00056         AUTOSCALING,AUTOADAPTION,CHANGE_SCALEFAKTOR
00057     };
00058 
00065     enum callbackConstruction{
00066         DELETE = 1000, ADD_MOON = 1001,CREATE_SYSTEM=1002,CLEAR_SYSTEM=1003
00067     };
00068 
00069     /*
00070      * GLUI Fenster  
00071      */
00072     static GLUI* optionWindow;
00073     static GLUI * subWindow;
00074     static GLUI * constructWindow;
00075 
00079     static int mainWindow;
00080 
00081     /*
00082      * Fr einige Kontrollen werden statische Variablen verwendet um den
00083      * Zugriff auf die GLUI funktionen dieser Kontrollen zu ermoeglichen
00084      */
00085     //  Fuer das Hauptfenster:
00086 
00087     //Objekt auswahl
00088     static GLUI_Listbox * objectSelector;
00089 
00093     static int objectCount;
00094 
00095     static GLUI_Button * bAnimationForward;
00096     static GLUI_Button * bToggleConstructMode;
00097     static GLUI_Spinner * sCameraSave;
00098 
00099     //Bewegungsm�lichkeiten
00100     static GLUI_Translation * tz;
00101     static GLUI_Translation * txy;
00102 
00103     //Rendering Details:
00104     static GLUI_StaticText * txtRenderDetails;
00105     static char * txt;
00106 
00107     //  Fr das Optionenfenster:
00108     //  Datei auswahl box
00109     static GLUI_Listbox * fileSelector;
00110     static GLUI_Listbox * intSelector;
00111     static int fileCount;
00112 
00113     //Fr das Konstruktionsfenster
00114     //in welchem Interaktiven Modus befinden wir uns gerade:
00115     static CONSTRUCT_MODE move_mode;
00116     static Vector constructVectorBackup;
00117 
00118     //Fr das Halbautomatische Platzieren der Satteliten Objekte:
00119     static GLUI_Panel * pSelectedObject;
00120     static GLUI_Spinner * sSemimajor;
00121     static GLUI_Spinner * sSemiminor;
00122     static GLUI_Spinner * sMass;
00123     static GLUI_Spinner * sRadius;
00124     static GLUI_Spinner * sScaleFactor;
00125 
00126     //Fr die Zuf�lige erzeugung von einem Sonnensystem:
00127     static GLUI_Spinner * sCSMaxMass;
00128     static GLUI_Spinner * sCSMaxV;
00129     static GLUI_Spinner * sCSMaxR;
00130     static GLUI_Spinner * sCSMaxPos;
00131     static GLUI_Spinner * sCSPlanets;
00132     static GLUI_Spinner * sCSSuns;
00133 
00134     //Speichern der Maus Eigenschaften / Position:
00135     static int count_mouse_buttons;
00136     static int xlast, ylast;
00137 
00138     // Callback Funktionen fr GLU bzw. GLUI:
00139     static void HandleMouse(int button, int state, int x, int y);
00140     static void HandleMouseMotion(int x, int y);
00141     static void HandlePassiveMouseMotion(int x, int y);
00142     static void HandleKeyboard(unsigned char key, int x, int y);
00143     static void HandleSpecialKeyboard(int key, int x, int y) ;
00144 
00145     //GLUI Kontrollen Callback (bspw. bei Button bet�igung):
00146     static void MenuMainCallback(callbackMain b);
00147     static void MenuOptionCallback(callbackOption b);
00148     static void MenuConstructionCallback(callbackConstruction b);
00149 
00150     //Erzeugung von Fenstern:
00151     static void CreateMainWindow(int mainWindow);
00152     static void CreateOptionWindow();
00153     static void CreateConstructWindow();
00154 
00155     //Datei Auswahl im Optionen Fenster:
00156     static void FillFileSelector();
00157     static void ClearFileSelector();
00158 
00159     static void setSatelliteProperties();
00160     static void loadObjectSelector(bool load);
00161 
00162 public:
00163     static void reloadObjectSelector();
00164     static void load();
00165 
00166     static void setConstructMode(CONSTRUCT_MODE m);
00167     static CONSTRUCT_MODE getConstructMode();
00168 
00169     static void showConstructMenu(bool show);
00170     static void showMenu();
00171     static void CreateWindows(int mainWin);
00172     static void selectObject(Object * obj);
00173 
00174     static int getMainWindow();
00175 
00176     static void setRenderDetails(const string & s);
00177     static void setAnimationControls(bool disable);
00178 };
00179 
00180 #endif

Erzeugt am Mon May 30 14:31:16 2005 für Sunsystembuildingandsimulation von doxygen 1.3.6