FLTK 1.4.4

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
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 int handle(int event) FL_OVERRIDE;
61
62 protected:
63 void draw() FL_OVERRIDE;
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) {(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
Fl_Color
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition Enumerations.H:1120
Fl_Boxtype
Fl_Boxtype
FLTK standard box types.
Definition Enumerations.H:644
Fl_File_Input::down_box
void down_box(Fl_Boxtype b)
Sets the box type to use for the navigation bar.
Definition Fl_File_Input.H:69
Fl_File_Input::value
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_File_Input::errorcolor
void errorcolor(Fl_Color c)
Sets the current error color to c.
Definition Fl_File_Input.H:90
Fl_File_Input::errorcolor
Fl_Color errorcolor() const
Gets the current error color.
Definition Fl_File_Input.H:80
Fl_File_Input::down_box
Fl_Boxtype down_box() const
Gets the box type used for the navigation bar.
Definition Fl_File_Input.H:67
Fl_File_Input::Fl_File_Input
Fl_File_Input(int X, int Y, int W, int H, const char *L=0)
Creates a new Fl_File_Input widget using the given position, size, and label string.
Definition Fl_File_Input.cxx:48
Fl_Input_::value
const char * value() const
Returns the text displayed in the widget.
Definition Fl_Input_.H:263
Fl_Input::Fl_Input
Fl_Input(int, int, int, int, const char *=0)
Creates a new Fl_Input widget using the given position, size, and label string.
Definition Fl_Input.cxx:786
Fl_Input::handle
int handle(int) FL_OVERRIDE
Handles the specified event.
Definition Fl_Input.cxx:575
Fl_Input::draw
void draw() FL_OVERRIDE
Draws the widget.
Definition Fl_Input.cxx:61
FL_OVERRIDE
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
uchar
unsigned char uchar
unsigned char
Definition fl_types.h:30