FLTK 1.3.2
Fl_File_Input Class Reference

This widget displays a pathname in a text input field. More...

#include <Fl_File_Input.H>

Inheritance diagram for Fl_File_Input:
Fl_Input Fl_Input_ Fl_Widget

List of all members.

Public Member Functions

Fl_Boxtype down_box () const
 Gets the box type used for the navigation bar.
void down_box (Fl_Boxtype b)
 Sets the box type to use for the navigation bar.
Fl_Color errorcolor () const
 Gets the current error color.
void errorcolor (Fl_Color c)
 Sets the current error color to c.
 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.
virtual int handle (int event)
 Handle events in the widget.
int value (const char *str)
 Sets the value of the widget given a new string value.
int value (const char *str, int len)
 Sets the value of the widget given a new string value and its length.
const char * value ()
 Returns the current value, which is a pointer to an internal buffer and is valid only until the next event is handled.

Protected Member Functions

virtual void draw ()
 Draws the file input widget.

Detailed Description

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 as the current one.

Fl_File_Input.png
Note:
As all Fl_Input derived objects, Fl_File_Input may call its callback when losing focus (see FL_UNFOCUS) to update its state like its cursor shape. One resulting side effect is that you should call clear_changed() early in your callback to avoid reentrant calls if you plan to show another window or dialog box in the callback.

Constructor & Destructor Documentation

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.

Parameters:
[in]X,Y,W,Hposition and size of the widget
[in]Lwidget label, default is no label

Member Function Documentation

Fl_Boxtype Fl_File_Input::down_box ( ) const [inline]

Gets the box type used for the navigation bar.

void Fl_File_Input::down_box ( Fl_Boxtype  b) [inline]

Sets the box type to use for the navigation bar.

Fl_Color Fl_File_Input::errorcolor ( ) const [inline]

Gets the current error color.

Todo:
Better docs for Fl_File_Input::errorcolor() - is it even used?
int Fl_File_Input::handle ( int  event) [virtual]

Handle events in the widget.

Return non zero if event is handled.

Parameters:
[in]event

Reimplemented from Fl_Input.

int Fl_File_Input::value ( const char *  str)

Sets the value of the widget given a new string value.

Returns non 0 on success.

Parameters:
[in]strnew string value

Reimplemented from Fl_Input_.

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.

Parameters:
[in]strnew string value
[in]lenlengh of value

Reimplemented from Fl_Input_.


The documentation for this class was generated from the following files: