![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXRecentFiles.h>
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. The ID_ANYFILES may be connected to a menu separator to cause automatic hiding of the menu separator when there are no recent files. The number of file names is typically no more than 10. File names should not be empty.
anonymous enum |
FX::FXRecentFiles::FXRecentFiles | ( | ) |
Make new recent files group.
A Settings object and group name must be assigned prior to usage.
FX::FXRecentFiles::FXRecentFiles | ( | FXApp * | a, | |
const FXString & | gp = "Recent Files" , |
|||
FXObject * | tgt = NULL , |
|||
FXSelector | sel = 0 | |||
) |
Make new recent files group, using settings database from application.
An optional target and message may be passed to invoke when one of the list of files is invoked.
FX::FXRecentFiles::FXRecentFiles | ( | FXSettings * | st, | |
const FXString & | gp = "Recent Files" , |
|||
FXObject * | tgt = NULL , |
|||
FXSelector | sel = 0 | |||
) |
Make new recent files group, using given settings database.
An optional target and message may be passed to invoke when one of the list of files is invoked.
virtual FX::FXRecentFiles::~FXRecentFiles | ( | ) | [virtual] |
Destructor.
void FX::FXRecentFiles::setSettings | ( | FXSettings * | s | ) | [inline] |
Change settings database.
FXSettings* FX::FXRecentFiles::getSettings | ( | ) | const [inline] |
Return settings database.
void FX::FXRecentFiles::setMaxFiles | ( | FXuint | mx | ) |
Change number of files we're tracking.
FXuint FX::FXRecentFiles::getMaxFiles | ( | ) | const [inline] |
Return the maximum number of files being tracked.
void FX::FXRecentFiles::setGroupName | ( | const FXString & | name | ) | [inline] |
Set group name.
FXString FX::FXRecentFiles::getGroupName | ( | ) | const [inline] |
Return group name.
void FX::FXRecentFiles::setTarget | ( | FXObject * | t | ) | [inline] |
Change the target.
FXObject* FX::FXRecentFiles::getTarget | ( | ) | const [inline] |
void FX::FXRecentFiles::setSelector | ( | FXSelector | sel | ) | [inline] |
FXSelector FX::FXRecentFiles::getSelector | ( | ) | const [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 void FX::FXRecentFiles::save | ( | FXStream & | store | ) | const [virtual] |
virtual void FX::FXRecentFiles::load | ( | FXStream & | store | ) | [virtual] |
![]() |