uMenuItemFileSelection Class Reference

#include <uMenu.h>

Inheritance diagram for uMenuItemFileSelection:

Inheritance graph
[legend]
Collaboration diagram for uMenuItemFileSelection:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 uMenuItemFileSelection (uMenu *m, char *tit, const char *help, tString &targ, const char *dir, const char *fileSpec, int getFilesFlag=0, bool formatName=true)
 uMenuItemFileSelection (uMenu *m, char *tit, const char *help, tString &targ, const char *dir, const char *fileSpec, const char *defaultFileName, const char *defaultFilePath, int getFilesFlag=0, bool formatName=true)
virtual ~uMenuItemFileSelection ()
void SetDir (const char *dir)
const void SetFileSpec (const char *fileSpec)
const void SetFormatName (bool formatName)
const void SetGetFilesFlag (int getFilesFlag)
const void SetDefaultFileName (const char *defaultFileName)
const void SetDefaultFilePath (const char *defaultFilePath)
const void SetParams (const char *dir, const char *fileSpec, int getFilesFlag, bool formatName, const char *defaultFileName, const char *defaultFilePath)
void Reload ()
void LoadDirectory (const char *dir, const char *fileSpec, bool formatName=true)
void AddFile (const char *fileName, const char *filePath, bool formatName=true)

Protected Attributes

tString dir_
tString fileSpec_
int getFilesFlag_
bool formatName_
tString defaultFileName_
tString defaultFilePath_

Private Member Functions

void NewChoice (uSelectItem< bool > *)
void NewChoice (char *, bool)


Detailed Description

Definition at line 530 of file uMenu.h.


Constructor & Destructor Documentation

uMenuItemFileSelection::uMenuItemFileSelection ( uMenu m,
char *  tit,
const char *  help,
tString targ,
const char *  dir,
const char *  fileSpec,
int  getFilesFlag = 0,
bool  formatName = true 
) [inline]

Definition at line 542 of file uMenu.h.

References Reload(), and SetParams().

00544             :uMenuItemSelection<tString>( m, tit, help, targ )
00545     {
00546         SetParams( dir, fileSpec, getFilesFlag, formatName, "", "" );
00547         Reload();
00548     }

Here is the call graph for this function:

uMenuItemFileSelection::uMenuItemFileSelection ( uMenu m,
char *  tit,
const char *  help,
tString targ,
const char *  dir,
const char *  fileSpec,
const char *  defaultFileName,
const char *  defaultFilePath,
int  getFilesFlag = 0,
bool  formatName = true 
) [inline]

Definition at line 550 of file uMenu.h.

References Reload(), and SetParams().

00554             :uMenuItemSelection<tString>( m, tit, help, targ )
00555     {
00556         SetParams( dir, fileSpec, getFilesFlag, formatName, defaultFileName, defaultFilePath );
00557         Reload();
00558     }

Here is the call graph for this function:

virtual uMenuItemFileSelection::~uMenuItemFileSelection (  )  [inline, virtual]

Definition at line 560 of file uMenu.h.

00560 {};


Member Function Documentation

void uMenuItemFileSelection::NewChoice ( uSelectItem< bool > *   )  [private]

Definition at line 1267 of file uMenu.cpp.

void uMenuItemFileSelection::NewChoice ( char *  ,
bool   
) [private]

Definition at line 1268 of file uMenu.cpp.

void uMenuItemFileSelection::SetDir ( const char *  dir  )  [inline]

Definition at line 562 of file uMenu.h.

References dir_.

Referenced by SetParams().

00562 { dir_ = dir; }; const

Here is the caller graph for this function:

const void uMenuItemFileSelection::SetFileSpec ( const char *  fileSpec  )  [inline]

Definition at line 563 of file uMenu.h.

References fileSpec_.

Referenced by SetParams().

00563 { fileSpec_ = fileSpec; }; const

Here is the caller graph for this function:

const void uMenuItemFileSelection::SetFormatName ( bool  formatName  )  [inline]

Definition at line 564 of file uMenu.h.

References formatName_.

Referenced by SetParams().

00564 { formatName_ = formatName; }; const

Here is the caller graph for this function:

const void uMenuItemFileSelection::SetGetFilesFlag ( int  getFilesFlag  )  [inline]

Definition at line 565 of file uMenu.h.

References getFilesFlag_.

Referenced by SetParams().

00565 { getFilesFlag_ = getFilesFlag; } const

Here is the caller graph for this function:

const void uMenuItemFileSelection::SetDefaultFileName ( const char *  defaultFileName  )  [inline]

Definition at line 566 of file uMenu.h.

References defaultFileName_.

Referenced by SetParams().

00566 { defaultFileName_ = defaultFileName; }; const

Here is the caller graph for this function:

const void uMenuItemFileSelection::SetDefaultFilePath ( const char *  defaultFilePath  )  [inline]

Definition at line 567 of file uMenu.h.

References defaultFilePath_.

Referenced by SetParams().

00567 { defaultFilePath_ = defaultFilePath; }; const

Here is the caller graph for this function:

const void uMenuItemFileSelection::SetParams ( const char *  dir,
const char *  fileSpec,
int  getFilesFlag,
bool  formatName,
const char *  defaultFileName,
const char *  defaultFilePath 
) [inline]

Definition at line 569 of file uMenu.h.

References SetDefaultFileName(), SetDefaultFilePath(), SetDir(), SetFileSpec(), SetFormatName(), and SetGetFilesFlag().

Referenced by uMenuItemFileSelection().

00571     {
00572         SetDir( dir );
00573         SetFileSpec( fileSpec );
00574         SetGetFilesFlag( getFilesFlag );
00575         SetFormatName( formatName );
00576         SetDefaultFileName( defaultFileName );
00577         SetDefaultFilePath( defaultFilePath );
00578     }

Here is the call graph for this function:

Here is the caller graph for this function:

void uMenuItemFileSelection::Reload (  ) 

Definition at line 1270 of file uMenu.cpp.

Referenced by uMenuItemFileSelection().

01270                                                      {}
01271 
01272 void uMenuItemFileSelection::Reload()
01273 {
01274     Clear();
01275     if ( defaultFileName_.Len() > 1 && defaultFilePath_.Len() > 1 )
01276         AddFile( defaultFileName_, defaultFilePath_, formatName_ );

Here is the caller graph for this function:

void uMenuItemFileSelection::LoadDirectory ( const char *  dir,
const char *  fileSpec,
bool  formatName = true 
)

Definition at line 1278 of file uMenu.cpp.

01282 {
01283     tArray <tString> files;
01284     tString filePath ( dir );
01285     tDirectories::GetFiles( tString( dir ), tString( fileSpec ), files, getFilesFlag_ );
01286     for ( int i = 0; i < files.Len(); i++ )
01287     {
01288         AddFile( files( i ), filePath + files( i ), formatName );

void uMenuItemFileSelection::AddFile ( const char *  fileName,
const char *  filePath,
bool  formatName = true 
)

Definition at line 1290 of file uMenu.cpp.

01294 {
01295     tString menuName ( fileName );
01296     if ( formatName )
01297         tDirectories::FileNameToMenuName( fileName, menuName );


Member Data Documentation

tString uMenuItemFileSelection::dir_ [protected]

Definition at line 535 of file uMenu.h.

Referenced by SetDir().

tString uMenuItemFileSelection::fileSpec_ [protected]

Definition at line 536 of file uMenu.h.

Referenced by SetFileSpec().

int uMenuItemFileSelection::getFilesFlag_ [protected]

Definition at line 537 of file uMenu.h.

Referenced by SetGetFilesFlag().

bool uMenuItemFileSelection::formatName_ [protected]

Definition at line 538 of file uMenu.h.

Referenced by SetFormatName().

tString uMenuItemFileSelection::defaultFileName_ [protected]

Definition at line 539 of file uMenu.h.

Referenced by SetDefaultFileName().

tString uMenuItemFileSelection::defaultFilePath_ [protected]

Definition at line 540 of file uMenu.h.

Referenced by SetDefaultFilePath().


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 00:01:09 2008 for Armagetron Advanced by  doxygen 1.5.4