// optwin.hpp -- the option window // // Written by Frederic Bouvier, started February 2002. // // Copyright (C) 2002 Frederic Bouvier - fredb@users.sourceforge.net // // 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. // // $Id: optwin.hpp,v 1.8 2005/06/25 16:31:14 fredb2 Exp $ #ifndef _optwin_hpp_ #define _optwin_hpp_ #include "window.hpp" #include #include #include class FGSD_NumInput; class FGSD_Preferences; class FGSD_OptionWindow { public: FGSD_OptionWindow( FGSD_Preferences &__prefs ); ~FGSD_OptionWindow(); bool exec(); private: static void ok_cb( Fl_Widget *o, void *v ); static void cancel_cb( Fl_Widget *o, void *v ); void button_cb( bool __ok ); private: FGSD_Preferences &_prefs; FGSD_Window *_window; Fl_Tabs *_tabs; Fl_Group *_general; Fl_Input *_outPath; FGSD_NumInput *_histLen; Fl_Group *_flightgear; Fl_Input *_fgRoot; Fl_Input *_fgScenery; Fl_Input *_fgCmdLine; Fl_Group *_view; Fl_Check_Button *_showConstraints; Fl_Check_Button *_showVertices; Fl_Check_Button *_showInfiniteEdges; Fl_Button *_ok; Fl_Button *_cancel; }; inline bool FGSD_OptionWindow::exec() { bool ret = false; if ( _window ) ret = _window->exec(); return ret; } #endif