Documentation

  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  ]
 

class Fl_File_Browser


Class Hierarchy

Include Files

    #include <FL/Fl_File_Browser.H>
    

Description

The Fl_File_Browser widget displays a list of filenames, optionally with file-specific icons.

Methods

Fl_File_Browser(int xx, int yy, int ww, int hh, const char *l = 0)

The constructor creates the Fl_File_Browser widget at the specified position and size.

~Fl_File_Browser()

The destructor destroys the widget and frees all memory that has been allocated.

void iconsize(uchar s)
uchar iconsize() const

Sets or gets the size of the icons. The default size is 20 pixels.

void filter(const char *pattern)
const char *filter() const

Sets or gets the filename filter. The pattern matching uses the fl_filename_match() function in FLTK.

void filetype(int type)
int filetype() const

Sets or gets the file browser type, FILES or DIRECTORIES. When set to FILES, both files and directories are shown. Otherwise only directories are shown.

int load(const char *directory, Fl_File_Sort_F *sort = fl_numeric_sort)

Loads the specified directory into the browser. If icons have been loaded then the correct icon is associated with each file in the list.

The sort argument specifies a sort function to be used with fl_filename_list().


User Comments [ Add Comment ]

From Anonymous, 10:37 Jan 13, 2003 (score=1)

Cocern: Fl_File_Brwoser

The doc state ------------------------------------- void filetype(int type) int filetype() const

Sets or gets the file browser type, FILES or DIRECTORIES. When set to FILES, both files and directories are shown. Otherwise only directories are shown. ------------------------------------- It will be nice to have a mode which show only files.

Jean-Jacques Sarton
Reply ]

From Anonymous, 23:08 Sep 27, 2003 (score=1)

But if it only showed files, how would you navigate to a file that is inside a directory?
Reply ]

From XLoom, 08:52 Mar 19, 2004 (score=4)

Suppose you wanted to have two browsers, one to display files and other to display directories?
Reply ]

From Anonymous, 07:57 Jul 22, 2004 (score=1)

There are more uses for software than general-purpose programs for the masses.  There are innumerable situations that I can imagine where the user should NOT BE ALLOWED to navigate to another directory!   It certainly increases security on a public computer such as in a kiosk.  It can also make programs much less confusing for those who don't know computers (of which there are still BILLIONS).  Why allow them to navigate to other directories if the only things USEFUL are in the current directory?  How about a manufacturing environment where the operator has to choose the script to run next on his milling machine?  If he/she is building engines and wants to run "rough shaping", should it be possible to find the script maned "rough shaping" for building dashboards?
Reply ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2015 by Bill Spitzak and others. This project is hosted by Seriss Corporation. Please report site problems to 'erco@seriss.com'.