|
fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) ![]() |
This widget displays a pathname in a text input field. More...
#include <Fl_File_Input.H>


Public Member Functions | |
| Fl_File_Input (int X, int Y, int W, int H, const char *L=0) | |
| virtual int | handle (int event) |
| Fl_Boxtype | down_box () const |
| void | down_box (Fl_Boxtype b) |
| Fl_Color | errorcolor () const |
| void | errorcolor (Fl_Color c) |
| int | value (const char *str) |
| int | value (const char *str, int len) |
| const char * | value () |
Protected Member Functions | |
| virtual void | draw () |
This widget displays a pathname in a text input field.
A navigation bar located above the input field allows the user to navigate upward in the directory tree. You may want to handle FL_WHEN_CHANGED events for tracking text changes and also FL_WHEN_RELEASE for button release when changing to parent dir. FL_WHEN_RELEASE callback won't be called if the directory clicked is the same that the current one.
Definition at line 54 of file Fl_File_Input.H.
| 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. The default boxtype is FL_DOWN_BOX.
| [in] | X,Y,W,H | position and size of the widget |
| [in] | L | widget label, default is no label |
Definition at line 58 of file Fl_File_Input.cxx.
References down_box(), FL_RED, and FL_UP_BOX.
| Fl_Boxtype Fl_File_Input::down_box | ( | ) | const [inline] |
Gets the box type used for the navigation bar.
Definition at line 77 of file Fl_File_Input.H.
Referenced by Fl_File_Input().
| void Fl_File_Input::down_box | ( | Fl_Boxtype | b | ) | [inline] |
Sets the box type to use for the navigation bar.
Definition at line 79 of file Fl_File_Input.H.
References b.
| void Fl_File_Input::draw | ( | void | ) | [protected, virtual] |
Draws the file input widget
Reimplemented from Fl_Input.
Definition at line 171 of file Fl_File_Input.cxx.
References b, Fl_Widget::box(), Fl::box_dh(), Fl::box_dw(), Fl::box_dx(), Fl::box_dy(), Fl_Widget::color(), Fl_Widget::damage(), DIR_HEIGHT, Fl_Widget::draw_box(), Fl_Input_::drawtext(), FL_DAMAGE_ALL, FL_DAMAGE_BAR, Fl::focus(), Fl_Widget::h(), Fl_Input_::size(), Fl_Widget::w(), Fl_Widget::x(), and Fl_Widget::y().
| Fl_Color Fl_File_Input::errorcolor | ( | ) | const [inline] |
Gets the current error color.
Definition at line 85 of file Fl_File_Input.H.
| void Fl_File_Input::errorcolor | ( | Fl_Color | c | ) | [inline] |
Sets the current error color to c
Definition at line 87 of file Fl_File_Input.H.
| int Fl_File_Input::handle | ( | int | event | ) | [virtual] |
Handle events in the widget. Return non zero if event is handled.
| [in] | event |
Reimplemented from Fl_Input.
Definition at line 192 of file Fl_File_Input.cxx.
References Fl_Widget::active_r(), Fl_Window::cursor(), Fl_Widget::damage(), DIR_HEIGHT, Fl::event_y(), Fl_Widget_Tracker::exists(), FL_CURSOR_DEFAULT, FL_CURSOR_INSERT, FL_DAMAGE_BAR, FL_DRAG, FL_ENTER, FL_MOVE, FL_PUSH, FL_RELEASE, Fl_Input::handle(), Fl_Widget::window(), and Fl_Widget::y().
| int Fl_File_Input::value | ( | const char * | str | ) |
Sets the value of the widget given a new string value. Returns non 0 on success.
| [in] | str | new string value |
Reimplemented from Fl_Input_.
Definition at line 162 of file Fl_File_Input.cxx.
References Fl_Widget::damage(), FL_DAMAGE_BAR, and value().
Referenced by Fl_File_Chooser::count(), Fl_File_Chooser::rescan(), Fl_File_Chooser::rescan_keep_filename(), Fl_File_Chooser::value(), and Fl_File_Input_Type::widget().
| int Fl_File_Input::value | ( | const char * | str, |
| int | len | ||
| ) |
Sets the value of the widget given a new string value and its length. Returns non 0 on success.
| [in] | str | new string value |
| [in] | len | lengh of value |
Reimplemented from Fl_Input_.
Definition at line 149 of file Fl_File_Input.cxx.
References Fl_Widget::damage(), FL_DAMAGE_BAR, and value().
| const char* Fl_File_Input::value | ( | ) | [inline] |
Returns the current value, which is a pointer to an internal buffer and is valid only until the next event is handled.
Definition at line 96 of file Fl_File_Input.H.
References value.
Referenced by value().