/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ### File Specific: main-programmer: Benjamin Grauer ToDO: way to start gui without GTK (textmode) curl interface to Download cool stuff chain all the windows when starting the GUI (DANGER: performance!!) widgets save themselves good way to step through all the Widgets ... many more ... label -> protected : getlabel function */ #include "orxonox_gui.h" #include "orxonox_gui_video.h" #include "orxonox_gui_audio.h" #include "orxonox_gui_exec.h" #include "orxonox_gui_flags.h" #include "orxonox_gui_banner.h" #include "orxonox_gui_keys.h" Window* orxonoxGUI; OrxonoxGuiVideo* video; OrxonoxGuiAudio* audio; OrxonoxGuiExec* exec; OrxonoxGuiFlags* flags; OrxonoxGuiBanner* banner; OrxonoxGuiKeys* keys; int main( int argc, char *argv[] ) { OrxonoxGui* orxonoxgui = new OrxonoxGui(argc, argv); return 0; } /* ORXONOXGUI */ /** \brief Initializes the Gui */ OrxonoxGui::OrxonoxGui (int argc, char *argv[]) { #ifdef HAVE_GTK2 initGTK(argc, argv); #endif orxonoxGUI = new Window( "Grafical OrxOnoX loader, "PACKAGE_VERSION); #ifdef HAVE_GTK2 orxonoxGUI->connectSignal ("destroy", orxonoxGUI->orxonox_gui_quit); orxonoxGUI->connectSignal ("delete_event", orxonoxGUI->orxonox_gui_quit); #endif /* HAVE_GTK2 */ Box* windowBox = new Box ('h'); banner = new OrxonoxGuiBanner(); windowBox->fill (banner->getWidget()); Box* optionBox = new Box ('v'); Box* avBox = new Box ('h'); video = new OrxonoxGuiVideo (); avBox->fill (video->getWidget ()); audio = new OrxonoxGuiAudio (); avBox->fill (audio->getWidget ()); optionBox->fill (avBox); keys = new OrxonoxGuiKeys (); optionBox->fill (keys->getWidget ()); exec = new OrxonoxGuiExec (orxonoxGUI); optionBox->fill (exec->getWidget ()); flags = new OrxonoxGuiFlags (orxonoxGUI); optionBox->fill (flags->getWidget ()); windowBox->fill (optionBox); orxonoxGUI->fill (windowBox); flags->setTextFromFlags (orxonoxGUI); exec->setFilename ("~/.orxonox.conf"); exec->readFromFile (orxonoxGUI); orxonoxGUI->walkThrough(orxonoxGUI->listOptions); orxonoxGUI->showall (); #ifdef HAVE_GTK2 mainloopGTK(); #endif }