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

void down_box (Fl_Boxtype b)
 Sets the box type to use for the navigation bar.
Fl_Boxtype down_box () const
 Gets the box type used for the navigation bar.
void errorcolor (Fl_Color c)
 Sets the current error color to c.
Fl_Color errorcolor () const
 Gets the current error color.
 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.
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.
int value (const char *str, int len)
 Sets the value of the widget given a new string value and its length.
int value (const char *str)
 Sets the value of the widget given a new string value.

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,H position and size of the widget
[in] L widget label, default is no label

Member Function Documentation

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

Sets the box type to use for the navigation bar.

Fl_Boxtype Fl_File_Input::down_box (  )  const [inline]

Gets the box type used 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,
int  len 
)

Sets the value of the widget given a new string value and its length.

Returns non 0 on success.

Parameters:
[in] str new string value
[in] len lengh of value

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] str new string value

Reimplemented from Fl_Input_.


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