Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages | Examples

fgl::FGFileDialog Class Reference

#include <widgets.h>

Inheritance diagram for fgl::FGFileDialog:

Inheritance graph
[legend]
Collaboration diagram for fgl::FGFileDialog:

Collaboration graph
[legend]
List of all members.

Detailed Description

A nice widget intended for the file selection by user for various things. filename length max. 511 chars max. visible is ~30 chars
See also:
FGFont FGFontManager
fdialog.png
Examples:

fdialog.cpp, and widget.cpp.


Public Types

enum  { name_width = 200, max_pathlen = 512 }

Public Member Functions

 FGFileDialog (FileDialogCallBack filesel, char *dir=0, char *flt=0, char *namewnd="File Dialog", int m=FDIALOG_OPEN, int ink=0, int paper=PM)
char *__fastcall GetDir (void)
char *__fastcall GetName (void)
void __fastcall BuildFullPathname (char *buffer)
void __fastcall BuildRelativePathname (char *buffer)
void __fastcall SetDir (char *d)
void __fastcall SetFilter (char *f)
void __fastcall SetMode (int m)
bool TestForOverwrite (void)


Constructor & Destructor Documentation

fgl::FGFileDialog::FGFileDialog FileDialogCallBack  filesel,
char *  dir = 0,
char *  flt = 0,
char *  namewnd = "File Dialog",
int  m = FDIALOG_OPEN,
int  ink = 0,
int  paper = PM
 

Creates visual object for the file selection by user.

Parameters:
filesel your callback, it is called when you enter or click a filename
dir the start directory, default is current app's directory or last used (with flag FDIALOG_SAVEDIR)
flt text string that contains file extension patterns separated by space, ".exe .com" by example
namewnd the caption
m mode of operation (SAVE or OPEN). See to SetMode()
ink the FGWindow foreground color
paper the FGWindow background color


Member Function Documentation

void __fastcall fgl::FGFileDialog::BuildFullPathname char *  buffer  ) 
 

Makes full path && name string into user defined buffer

void __fastcall fgl::FGFileDialog::BuildRelativePathname char *  buffer  ) 
 

Makes relative path && name string into user defined buffer

char* __fastcall fgl::FGFileDialog::GetDir void   )  [inline]
 

Returns the current browsed directory.

char* __fastcall fgl::FGFileDialog::GetName void   )  [inline]
 

this filename is passed to the callback directly.

void __fastcall fgl::FGFileDialog::SetDir char *  d  )  [inline]
 

Change the current directory and reload it.

void __fastcall fgl::FGFileDialog::SetFilter char *  f  )  [inline]
 

Change the current input filter mask (".cpp .h" by example) and reload it.

void __fastcall fgl::FGFileDialog::SetMode int  m  )  [inline]
 

Sets object's mode:

  • FDIALOG_OPEN
  • FDIALOG_SAVE
  • FDIALOG_MODAL
  • FDIALOG_SAVEDIR

bool fgl::FGFileDialog::TestForOverwrite void   ) 
 

Shows dialog to ask to overwrite the selected file. Is it possible to call this function from user callback (on file select)

Returns:
true if file can be replaced.


Generated on Wed Feb 9 11:31:58 2005 for OpenGUI by  doxygen 1.4.0