Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TFileList Class Reference

Implements a sorted two-column list box of file names; you can select a file name by mouse or keyboard cursor actions. More...

#include <stddlg.h>

Inheritance diagram for TFileList::

TSortedListBox TListBox TListViewer TView TObject TStreamable List of all members.

Public Methods

 TFileList (const TRect &bounds, TScrollBar *aScrollBar)
 ~TFileList ()
virtual void focusItem (short item)
virtual void selectItem (short item)
virtual void getText (char *dest, short item, short maxLen)
void newList (TFileCollection *aList)
void readDirectory (const char *dir, const char *wildCard)
void readDirectory (const char *wildCard)
virtual ushort dataSize ()
virtual void getData (void *rec)
virtual void setData (void *rec)
TFileCollectionlist ()

Static Public Methods

TStreamablebuild ()

Static Public Attributes

const char* const name

Protected Methods

 TFileList (StreamableInit)

Detailed Description

TFileList implements a sorted two-column list box of file names (held in a TFileCollection object). You can select (highlight) a file name by mouse or keyboard cursor actions.

TFileList inherits most of its functionality from TSortedListBox. The following commands are broadcast by TFileList:

 Constant            Value Meaning

 cmFileFocused       102   A new file was focused in object
 cmFileDoubleClicked 103   A file was selected in the TFileList object
 

Definition at line 491 of file stddlg.h.


Constructor & Destructor Documentation

TFileList::TFileList ( const TRect & bounds,
TScrollBar * aScrollBar )
 

Calls the TSortedListBox constructor to create a two-column TFileList object with the given bounds and, if `aScrollBar' is non-zero, a vertical scrollbar.

See also:
TSortedListBox::TSortedListBox

TFileList::~TFileList ( )
 

Deletes the file list.

TFileList::TFileList ( StreamableInit ) [inline, protected]
 

Undocumented.

Definition at line 575 of file stddlg.h.


Member Function Documentation

TStreamable * TFileList::build ( ) [static]
 

Called to create an object in certain stream-reading situations.

Reimplemented from TSortedListBox.

ushort TFileList::dataSize ( ) [virtual]
 

Undocumented.

Reimplemented from TListBox.

void TFileList::focusItem ( short item ) [virtual]
 

Focuses the given item in the list. Calls TSortedListBox::focusItem() and broadcasts a cmFileFocused event.

Reimplemented from TListViewer.

void TFileList::getData ( void * rec ) [virtual]
 

Undocumented.

Reimplemented from TListBox.

void TFileList::getText ( char * dest,
short item,
short maxLen ) [virtual]
 

Grabs the TSearchRec object at `item' and sets the file name in `dest'. "\" is appended if the name is a directory.

Reimplemented from TListBox.

TFileCollection * TFileList::list ( ) [inline]
 

Returns the private items data member, a pointer to the TFileCollection object currently associated with this file list box.

Reimplemented from TSortedListBox.

Definition at line 614 of file stddlg.h.

void TFileList::newList ( TFileCollection * f ) [inline]
 

Calls TSortedListBox::newList() to delete the existing TFileCollection object associated with this list box and replace it with the file collection given by `aList'.

The first item of the new collection will receive the focus.

Definition at line 609 of file stddlg.h.

void TFileList::readDirectory ( const char * wildCard )
 

Expands the `wildCard' string to generate the file collection associated with this file list. The resulting TFileCollection object (a sorted set of TSearchRec objects) is assigned to the private items data member (accessible via the list() member function).

If too many files are generated, a warning message box appears. readDirectory() knows about file attributes and will not generate hidden file names.

void TFileList::readDirectory ( const char * dir,
const char * wildCard )
 

Allows the separate submission of a relative or absolute path in the `dir' argument. Either "/" or "\" can be used as subdirectory separators (but "\" is converted to "/" for output).

void TFileList::selectItem ( short item ) [virtual]
 

Undocumented.

Reimplemented from TListViewer.

void TFileList::setData ( void * rec ) [virtual]
 

Undocumented.

Reimplemented from TListBox.


Member Data Documentation

const char *const TFileList::name [static]
 

Undocumented.

Reimplemented from TSortedListBox.

Definition at line 580 of file stddlg.h.


The documentation for this class was generated from the following file:
Generated at Sat Sep 22 20:19:25 2001 for TVision by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001