// exportwin.hpp -- the export option window // // Written by Frederic Bouvier, started September 2004. // // Copyright (C) 2004 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: exportwin.hpp,v 1.2 2005/05/09 07:01:51 fredb Exp $ #ifndef _exportwin_hpp_ #define _exportwin_hpp_ #include #include #include "window.hpp" #include #include class FGSD_Preferences; class FGSD_ExportWindow { public: FGSD_ExportWindow( FGSD_Preferences &__prefs ); ~FGSD_ExportWindow(); bool exec(); void button_cb( Fl_Widget *o, int n ); static void timeout_cb( void *v ); static void combo_cb( Fl_Widget *o, void *v ); static void input_cb( Fl_Widget *o, void *v ); static void ok_cb( Fl_Widget *o, void *v ); static void cancel_cb( Fl_Widget *o, void *v ); void button_cb( bool __ok ); void combo_cb(); void input_cb(); void timeout_cb(); std::string outputPath() const; std::string format() const; bool objectBase() const; bool object() const; bool objectStatic() const; bool objectShared() const; bool force() const; private: FGSD_Preferences &_prefs; FGSD_Window *_window; Fl_Button *_ok; Fl_Button *_cancel; Flu_Combo_List *_outputPath; Flu_Combo_List *_format; Fl_Check_Button *_objectBase; Fl_Check_Button *_object; Fl_Check_Button *_objectStatic; Fl_Check_Button *_objectShared; Fl_Check_Button *_force; std::string _dirname; std::list _dirlist; }; inline bool FGSD_ExportWindow::exec() { bool ret = false; if ( _window ) ret = _window->exec(); return ret; } inline std::string FGSD_ExportWindow::outputPath() const { return _dirname; } inline std::string FGSD_ExportWindow::format() const { return _format->value(); } inline bool FGSD_ExportWindow::objectBase() const { return _objectBase->value(); } inline bool FGSD_ExportWindow::object() const { return _object->value(); } inline bool FGSD_ExportWindow::objectStatic() const { return _objectStatic->value(); } inline bool FGSD_ExportWindow::objectShared() const { return _objectShared->value(); } inline bool FGSD_ExportWindow::force() const { return _force->value(); } #endif