Main Page | Class Hierarchy | Class List | File List | Class Members

Flu_Float_Input.h

00001 // $Id: Flu_Float_Input.h,v 1.10 2004/03/29 23:13:19 jbryan Exp $
00002 
00003 /***************************************************************
00004  *                FLU - FLTK Utility Widgets 
00005  *  Copyright (C) 2002 Ohio Supercomputer Center, Ohio State University
00006  *
00007  * This file and its content is protected by a software license.
00008  * You should have received a copy of this license with this file.
00009  * If not, please contact the Ohio Supercomputer Center immediately:
00010  * Attn: Jason Bryan Re: FLU 1224 Kinnear Rd, Columbus, Ohio 43212
00011  * 
00012  ***************************************************************/
00013 
00014 
00015 
00016 #ifndef _FLU_FLOAT_INPUT_H
00017 #define _FLU_FLOAT_INPUT_H
00018 
00019 #include <FL/Fl_Float_Input.H>
00020 
00021 #include <stdlib.h>
00022 #include <string.h>
00023 #include <stdio.h>
00024 
00025 #include "FLU/Flu_Enumerations.h"
00026 
00028 class FLU_EXPORT Flu_Float_Input : public Fl_Float_Input
00029 {
00030  public:
00031 
00033   Flu_Float_Input( int X,int Y,int W,int H,const char *l = 0 );
00034 
00036   ~Flu_Float_Input();
00037 
00039   inline void format( const char *f )
00040     { _format = f; }
00041 
00043   inline const char *format() const
00044     { return _format; }
00045 
00047   inline float fvalue() const { return atof( value() ); }
00048 
00050   inline void fvalue( float v, const char *format = 0 )
00051     { char buf[32]; sprintf(buf,format?format:_format,v); value(buf); }
00052 
00053  private:
00054   const char *_format;
00055 
00056 };
00057 
00058 #endif

Generated on Fri Nov 5 12:41:32 2004 for FLTK Utility Library and Widget Collection (FLU) by doxygen 1.3.5