![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
#include <FXRecentFiles.h>
Public Types | |
| enum | { ID_CLEAR, ID_ANYFILES, ID_FILE_1, ID_FILE_2, ID_FILE_3, ID_FILE_4, ID_FILE_5, ID_FILE_6, ID_FILE_7, ID_FILE_8, ID_FILE_9, ID_FILE_10, ID_LAST } |
Public Member Functions | |
| FXRecentFiles () | |
| FXRecentFiles (FXApp *a) | |
| FXRecentFiles (FXApp *a, const FXString &gp, FXObject *tgt=NULL, FXSelector sel=0) | |
| FXApp * | getApp () const |
| void | setMaxFiles (FXint mx) |
| FXint | getMaxFiles () const |
| void | setGroupName (const FXString &name) |
| FXString | getGroupName () const |
| void | setTarget (FXObject *t) |
| FXObject * | getTarget () const |
| void | setSelector (FXSelector sel) |
| FXSelector | getSelector () const |
| FXString | getFile (FXint index) const |
| void | setFile (FXint index, const FXString &filename) |
| void | appendFile (const FXString &filename) |
| void | removeFile (const FXString &filename) |
| void | clear () |
| virtual void | save (FXStream &store) const |
| virtual void | load (FXStream &store) |
| virtual | ~FXRecentFiles () |
Public Member Functions inherited from FX::FXObject | |
| virtual long | onDefault (FXObject *, FXSelector, void *) |
| const FXchar * | getClassName () const |
| bool | isMemberOf (const FXMetaClass *metaclass) const |
| virtual long | tryHandle (FXObject *sender, FXSelector sel, void *ptr) |
| virtual | ~FXObject () |
The recent files object manages a most recently used (MRU) file list by means of the standard system registry.
When connected to a widget, like a menu command, the recent files object updates the menu commands label to the associated recent file name; when the menu command is invoked, the recent file object sends its target a SEL_COMMAND message with the message data set to the associated file name, of the type const char*. When adding or removing file names, the recent files object automatically updates the system registry to record these changes.
| anonymous enum |
| FX::FXRecentFiles::FXRecentFiles | ( | ) |
Make new recent files group, using global application instance.
| FX::FXRecentFiles::FXRecentFiles | ( | FXApp * | a | ) |
Make new recent files group with default groupname.
| FX::FXRecentFiles::FXRecentFiles | ( | FXApp * | a, |
| const FXString & | gp, | ||
| FXObject * | tgt = NULL, |
||
| FXSelector | sel = 0 |
||
| ) |
Make new recent files group with groupname gp.
|
virtual |
Destructor.
|
inline |
Get application.
|
inline |
Change number of files we're tracking.
|
inline |
Return the maximum number of files being tracked.
|
inline |
Set group name.
References FX::FXSystem::group(), and FX::FXPath::name().
|
inline |
Return group name.
References FX::FXSystem::group().
|
inline |
Change the target.
|
inline |
Get the target.
|
inline |
Change the message.
|
inline |
Return the message id.
Change the filename at index.
| void FX::FXRecentFiles::appendFile | ( | const FXString & | filename | ) |
Append a file.
| void FX::FXRecentFiles::removeFile | ( | const FXString & | filename | ) |
Remove a file.
| void FX::FXRecentFiles::clear | ( | ) |
Clear the list of files.
|
virtual |
Save to a stream.
Reimplemented from FX::FXObject.
|
virtual |
Load from a stream.
Reimplemented from FX::FXObject.
|
|