FLTK
Fl_File_Input.H
1 //
2 // File_Input header file for the Fast Light Tool Kit (FLTK).
3 //
4 // Copyright 1998-2010 by Bill Spitzak and others.
5 // Original version Copyright 1998 by Curtis Edwards.
6 //
7 // This library is free software. Distribution and use rights are outlined in
8 // the file "COPYING" which should have been included with this file. If this
9 // file is missing or damaged, see the license at:
10 //
11 // https://www.fltk.org/COPYING.php
12 //
13 // Please see the following page on how to report bugs and issues:
14 //
15 // https://www.fltk.org/bugs.php
16 //
17 
18 /* \file
19  Fl_File_Input widget . */
20 
21 #ifndef Fl_File_Input_H
22 # define Fl_File_Input_H
23 
24 # include <FL/Fl_Input.H>
25 
45 class FL_EXPORT Fl_File_Input : public Fl_Input {
46 
47  char ok_entry_;
48  uchar down_box_;
49  short buttons_[200];
50  short pressed_;
51 
52  void draw_buttons();
53  int handle_button(int event);
54  void update_buttons();
55 
56 public:
57 
58  Fl_File_Input(int X, int Y, int W, int H, const char *L=0);
59 
60  virtual int handle(int event);
61 
62 protected:
63  virtual void draw();
64 
65 public:
67  Fl_Boxtype down_box() const { return (Fl_Boxtype)down_box_; }
69  void down_box(Fl_Boxtype b) { down_box_ = b; }
70 
80  Fl_Color errorcolor() const { return FL_RED; }
81 
90  void errorcolor(Fl_Color c) {}
91 
92  int value(const char *str);
93  int value(const char *str, int len);
94 
99  const char *value() { return Fl_Input_::value(); }
100 };
101 
102 #endif // !Fl_File_Input_H
const char * value() const
Returns the text displayed in the widget.
Definition: Fl_Input_.H:243
Fl_Color errorcolor() const
Gets the current error color.
Definition: Fl_File_Input.H:80
const char * value()
Returns the current value, which is a pointer to an internal buffer and is valid only until the next ...
Definition: Fl_File_Input.H:99
Fl_Boxtype
FLTK standard box types.
Definition: Enumerations.H:598
This is the FLTK text input widget.
Definition: Fl_Input.H:220
This widget displays a pathname in a text input field.
Definition: Fl_File_Input.H:45
Fl_Boxtype down_box() const
Gets the box type used for the navigation bar.
Definition: Fl_File_Input.H:67
void errorcolor(Fl_Color c)
Sets the current error color to c.
Definition: Fl_File_Input.H:90
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition: Enumerations.H:1042
void draw()
Draws the widget.
Definition: Fl_Input.cxx:47
void down_box(Fl_Boxtype b)
Sets the box type to use for the navigation bar.
Definition: Fl_File_Input.H:69
int handle(int)
Handles the specified event.
Definition: Fl_Input.cxx:457
unsigned char uchar
unsigned char
Definition: fl_types.h:28