// tilewin.hpp -- the tile import window // // Written by Frederic Bouvier, started April 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: tilewin.hpp,v 1.5 2005/05/09 07:02:16 fredb Exp $ #ifndef _tilewin_hpp_ #define _tilewin_hpp_ 1 #include #include "window.hpp" #include #include class FGSD_TileWindow { public: FGSD_TileWindow( double __minx, double __miny, double __maxx, double __maxy ); ~FGSD_TileWindow(); bool exec(); SGBucket minBucket() const; SGBucket maxBucket() const; private: static void topUp_cb(Fl_Widget *o, void *v); static void topDown_cb(Fl_Widget *o, void *v); static void leftUp_cb(Fl_Widget *o, void *v); static void leftDown_cb(Fl_Widget *o, void *v); static void rightUp_cb(Fl_Widget *o, void *v); static void rightDown_cb(Fl_Widget *o, void *v); static void bottomUp_cb(Fl_Widget *o, void *v); static void bottomDown_cb(Fl_Widget *o, void *v); void button_cb( Fl_Input *b, bool up, bool __max, bool __lon, Fl_Input *o ); 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; Fl_Input *_top; Fl_Button *_topUp; Fl_Button *_topDown; Fl_Input *_bottom; Fl_Button *_bottomUp; Fl_Button *_bottomDown; Fl_Input *_left; Fl_Button *_leftUp; Fl_Button *_leftDown; Fl_Input *_right; Fl_Button *_rightUp; Fl_Button *_rightDown; Fl_Button *_ok; Fl_Button *_cancel; SGBucket _minBucket; SGBucket _maxBucket; }; inline bool FGSD_TileWindow::exec() { bool ret = false; if ( _window ) ret = _window->exec(); return ret; } inline SGBucket FGSD_TileWindow::minBucket() const { return _minBucket; } inline SGBucket FGSD_TileWindow::maxBucket() const { return _maxBucket; } #endif