FLTK 1.3.0
Fl_File_Input.H
00001 //
00002 // "$Id: Fl_File_Input.H 8712 2011-05-22 09:45:40Z AlbrechtS $"
00003 //
00004 // File_Input header file for the Fast Light Tool Kit (FLTK).
00005 //
00006 // Copyright 1998-2010 by Bill Spitzak and others.
00007 // Original version Copyright 1998 by Curtis Edwards.
00008 //
00009 // This library is free software; you can redistribute it and/or
00010 // modify it under the terms of the GNU Library General Public
00011 // License as published by the Free Software Foundation; either
00012 // version 2 of the License, or (at your option) any later version.
00013 //
00014 // This library is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 // Library General Public License for more details.
00018 //
00019 // You should have received a copy of the GNU Library General Public
00020 // License along with this library; if not, write to the Free Software
00021 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00022 // USA.
00023 //
00024 // Please report all bugs and problems on the following page:
00025 //
00026 //     http://www.fltk.org/str.php
00027 //
00028 
00029 /* \file
00030    Fl_File_Input widget . */
00031 
00032 #ifndef Fl_File_Input_H
00033 #  define Fl_File_Input_H
00034 
00035 #  include <FL/Fl_Input.H>
00036 
00056 class FL_EXPORT Fl_File_Input : public Fl_Input {
00057   
00058   Fl_Color      errorcolor_;
00059   char          ok_entry_;
00060   uchar         down_box_;
00061   short         buttons_[200];
00062   short         pressed_;
00063 
00064   void          draw_buttons();
00065   int           handle_button(int event);
00066   void          update_buttons();
00067 
00068 public:
00069 
00070   Fl_File_Input(int X, int Y, int W, int H, const char *L=0);
00071 
00072   virtual int handle(int event);
00073 
00074 protected:
00075   virtual void draw();
00076 
00077 public:
00079   Fl_Boxtype    down_box() const { return (Fl_Boxtype)down_box_; }
00081   void          down_box(Fl_Boxtype b) { down_box_ = b; }
00082 
00087   Fl_Color      errorcolor() const { return errorcolor_; }
00089   void          errorcolor(Fl_Color c) { errorcolor_ = c; }
00090 
00091   int   value(const char *str);
00092   int   value(const char *str, int len);
00093 
00098   const char    *value() { return Fl_Input_::value(); }
00099 };
00100 
00101 #endif // !Fl_File_Input_H
00102 
00103 
00104 //
00105 // End of "$Id: Fl_File_Input.H 8712 2011-05-22 09:45:40Z AlbrechtS $".
00106 //