// flnuminput.hpp -- a subclass of Fl_Input // // Written by Frederic Bouvier, started March 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: flnuminput.hpp,v 1.5 2005/05/09 07:01:51 fredb Exp $ #ifndef _flnuminput_hpp_ #define _flnuminput_hpp_ #include "FL/Fl_Input.H" class FGSD_NumInput : public Fl_Input { public: FGSD_NumInput(int x, int y, int w, int h, const char* l); ~FGSD_NumInput(); void int_value( int v ); int int_value() const; void uint_value( unsigned int v ); unsigned int uint_value() const; protected: bool replace(int b, int e, const char* text, int ilen); private: enum { _INT, _UINT } _type; }; #endif