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)  

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:
Collaboration diagram for Fl_File_Input:

List of all members.

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 ()

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

Fl_File_Input.png
Note:
As all Fl_Input derived objects, Fl_File_Input may call its callback when loosing 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.

Definition at line 54 of file Fl_File_Input.H.


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

Definition at line 58 of file Fl_File_Input.cxx.

References down_box(), FL_RED, and FL_UP_BOX.


Member Function Documentation

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.

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?

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.

Parameters:
[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.

Parameters:
[in]strnew 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.

Parameters:
[in]strnew string value
[in]lenlengh 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().


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