FLTK 1.4.0
Loading...
Searching...
No Matches
Fl_File_Input.H
1//
2// File_Input header file for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 1998-2022 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
45class 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
56public:
57
58 Fl_File_Input(int X, int Y, int W, int H, const char *L=0);
59
60 int handle(int event) FL_OVERRIDE;
61
62protected:
63 void draw() FL_OVERRIDE;
64
65public:
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) {(void)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
unsigned int Fl_Color
An FLTK color value; see also Colors
Definition Enumerations.H:1101
Fl_Boxtype
FLTK standard box types.
Definition Enumerations.H:626
This widget displays a pathname in a text input field.
Definition Fl_File_Input.H:45
void down_box(Fl_Boxtype b)
Sets the box type to use for the navigation bar.
Definition Fl_File_Input.H:69
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
void errorcolor(Fl_Color c)
Sets the current error color to c.
Definition Fl_File_Input.H:90
Fl_Color errorcolor() const
Gets the current error color.
Definition Fl_File_Input.H:80
Fl_Boxtype down_box() const
Gets the box type used for the navigation bar.
Definition Fl_File_Input.H:67
const char * value() const
Returns the text displayed in the widget.
Definition Fl_Input_.H:263
This is the FLTK text input widget.
Definition Fl_Input.H:220
int handle(int) FL_OVERRIDE
Handles the specified event.
Definition Fl_Input.cxx:558
void draw() FL_OVERRIDE
Draws the widget.
Definition Fl_Input.cxx:61
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
unsigned char uchar
unsigned char
Definition fl_types.h:30