NTK 1.3.0
Fl_File_Input.H
1//
2// "$Id: Fl_File_Input.H 8712 2011-05-22 09:45:40Z AlbrechtS $"
3//
4// File_Input header file for the Fast Light Tool Kit (FLTK).
5//
6// Copyright 1998-2010 by Bill Spitzak and others.
7// Original version Copyright 1998 by Curtis Edwards.
8//
9// This library is free software; you can redistribute it and/or
10// modify it under the terms of the GNU Library General Public
11// License as published by the Free Software Foundation; either
12// version 2 of the License, or (at your option) any later version.
13//
14// This library is distributed in the hope that it will be useful,
15// but WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17// Library General Public License for more details.
18//
19// You should have received a copy of the GNU Library General Public
20// License along with this library; if not, write to the Free Software
21// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22// USA.
23//
24// Please report all bugs and problems on the following page:
25//
26// http://www.fltk.org/str.php
27//
28
29/* \file
30 Fl_File_Input widget . */
31
32#ifndef Fl_File_Input_H
33# define Fl_File_Input_H
34
35# include <FL/Fl_Input.H>
36
56class FL_EXPORT Fl_File_Input : public Fl_Input {
57
58 Fl_Color errorcolor_;
59 char ok_entry_;
60 uchar down_box_;
61 short buttons_[200];
62 short pressed_;
63
64 void draw_buttons();
65 int handle_button(int event);
66 void update_buttons();
67
68public:
69
70 Fl_File_Input(int X, int Y, int W, int H, const char *L=0);
71
72 virtual int handle(int event);
73
74protected:
75 virtual void draw();
76
77public:
79 Fl_Boxtype down_box() const { return (Fl_Boxtype)down_box_; }
81 void down_box(Fl_Boxtype b) { down_box_ = b; }
82
87 Fl_Color errorcolor() const { return errorcolor_; }
89 void errorcolor(Fl_Color c) { errorcolor_ = c; }
90
91 int value(const char *str);
92 int value(const char *str, int len);
93
98 const char *value() { return Fl_Input_::value(); }
99};
100
101#endif // !Fl_File_Input_H
102
103
104//
105// End of "$Id: Fl_File_Input.H 8712 2011-05-22 09:45:40Z AlbrechtS $".
106//
unsigned int Fl_Color
an FLTK color value
Definition: Enumerations.H:764
Fl_Boxtype
Definition: Enumerations.H:472
This widget displays a pathname in a text input field.
Definition: Fl_File_Input.H:56
void down_box(Fl_Boxtype b)
Sets the box type to use for the navigation bar.
Definition: Fl_File_Input.H:81
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:98
void errorcolor(Fl_Color c)
Sets the current error color to c.
Definition: Fl_File_Input.H:89
Fl_Color errorcolor() const
Gets the current error color.
Definition: Fl_File_Input.H:87
Fl_Boxtype down_box() const
Gets the box type used for the navigation bar.
Definition: Fl_File_Input.H:79
const char * value() const
Returns the text displayed in the widget.
Definition: Fl_Input_.H:252
This is the FLTK text input widget.
Definition: Fl_Input.H:230
void draw()
Draws the widget.
Definition: Fl_Input.cxx:57
int handle(int)
Handles the specified event.
Definition: Fl_Input.cxx:595
unsigned char uchar
unsigned char
Definition: fl_types.h:39