FLTK 1.3.0
|
00001 // 00002 // "$Id$" 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 00054 class FL_EXPORT Fl_File_Input : public Fl_Input { 00055 00056 Fl_Color errorcolor_; 00057 char ok_entry_; 00058 uchar down_box_; 00059 short buttons_[200]; 00060 short pressed_; 00061 00062 void draw_buttons(); 00063 int handle_button(int event); 00064 void update_buttons(); 00065 00066 public: 00067 00068 Fl_File_Input(int X, int Y, int W, int H, const char *L=0); 00069 00070 virtual int handle(int event); 00071 00072 protected: 00073 virtual void draw(); 00074 00075 public: 00077 Fl_Boxtype down_box() const { return (Fl_Boxtype)down_box_; } 00079 void down_box(Fl_Boxtype b) { down_box_ = b; } 00080 00085 Fl_Color errorcolor() const { return errorcolor_; } 00087 void errorcolor(Fl_Color c) { errorcolor_ = c; } 00088 00089 int value(const char *str); 00090 int value(const char *str, int len); 00091 00096 const char *value() { return Fl_Input_::value(); } 00097 }; 00098 00099 #endif // !Fl_File_Input_H 00100 00101 00102 // 00103 // End of "$Id$". 00104 //