// matwin.hpp -- the material window // // Written by Frederic Bouvier, started September 2003. // // Copyright (C) 2003 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: matwin.hpp,v 1.5 2005/05/09 07:02:10 fredb Exp $ #ifndef _matwin_hpp_ #define _matwin_hpp_ #include "window.hpp" #include #include #include class FGSD_MaterialWindow { public: FGSD_MaterialWindow( const std::string ¤t ); ~FGSD_MaterialWindow(); bool exec(); std::string material() const; 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_Window *_window; Flu_Combo_List *_material; Fl_Button *_ok; Fl_Button *_cancel; }; inline bool FGSD_MaterialWindow::exec() { bool ret = false; if ( _window ) ret = _window->exec(); return ret; } inline std::string FGSD_MaterialWindow::material() const { const char *ret = _material->value(); return std::string( ret ); } #endif