class MASKING_DLL_DECLSPEC FileSelect

The standard fileselector dialog.

Inheritance:

FileSelect - Window - Dialog - Widget - Rect


Public Methods

[more] FileSelect(const char* title = "Select file", const char* startDir = NULL, const char* mask = "All files (*.*)", int flags = 0xFF)
File selector constructor.
[more]virtual char* Popup(Dialog* p, int = MAXINT, int = MAXINT)
[more]virtual char* Popup(Dialog* p, const Point &pos)
Pops up a file selector at the given position.
[more]void HandleEvent(Widget &obj, int msg, int arg1=0, int arg2=0)
Handles various events such as list box selections, check box clicks, button clicks, etc


Documentation

The standard fileselector dialog. A file selector is a dialog that allows you to browse your file system and select a single file from it.

Note: currently the file selector has "issues" and may not always work properly.

o FileSelect(const char* title = "Select file", const char* startDir = NULL, const char* mask = "All files (*.*)", int flags = 0xFF)
File selector constructor. Sets up a file selector dialog. All parameters are optional but you can pass a title string for the dialog, the initial path, and the file mask string and flags to determine which files should be visible initially. If the initial path is NULL the current working directory will be used. The file mask string should be a list of file types separated with vertical pipes (the '|' character). Every file type should have two parts: a short description and a semicolon spearated list of extensions surrounded by round braces. The flags should be a combination of standard Allegro FA_* flags. For example:
      FileSelect dlg("Open file...",
                     NULL,
                        "All bitmaps (*.bmp;*.pcx;*.tga)|
                         BMP files (*.bmp)|
                         PCX files (*.pcx)|
                         TGA files (*.tga)|
                         All files (*.*)",
                     FA_ARCH);
will create an "open file" dialog that will start in the current working directory and will be able to list archives with either all known bitmap extensions, all bmp files, all pcx files, all tga files or all files.

ovirtual char* Popup(Dialog* p, int = MAXINT, int = MAXINT)

ovirtual char* Popup(Dialog* p, const Point &pos)
Pops up a file selector at the given position. Returns the full path to the selected file or NULL if the dialog is canceled or escaped.

ovoid HandleEvent(Widget &obj, int msg, int arg1=0, int arg2=0)
Handles various events such as list box selections, check box clicks, button clicks, etc


This class has no child classes.

Alphabetic index Hierarchy of classes


Back to front page   |   page generated with DOC++