Class Fox::FXRecentFiles
In: rdoc-sources/FXRecentFiles.rb
Parent: FXObject

The recent files object manages a most recently used 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 (a String). When adding or removing file names, the recent files object automatically updates the system registry to record these changes.

Events

The following messages are sent by FXRecentFiles to its target:

SEL_COMMAND:sent when one of the recent files in this list is selected, usually as a result of being selected from a menu command. The message data is a String containing the name of the file.

Message identifiers

ID_CLEAR:Clear the list of files
ID_ANYFILES:x
ID_FILE_1:x
ID_FILE_2:x
ID_FILE_3:x
ID_FILE_4:x
ID_FILE_5:x
ID_FILE_6:x
ID_FILE_7:x
ID_FILE_8:x
ID_FILE_9:x
ID_FILE_10:x

Methods

appendFile   clear   new   new   new   removeFile  

Attributes

app  [R]  Application associated with this recent files group [FXApp]
groupName  [RW]  Group name [String]
maxFiles  [RW]  Maximum number of files to track [Integer]
selector  [RW]  Message identifier [Integer]
target  [RW]  Message target [FXObject]

Public Class methods

Make new recent files group with groupname gp

Make new recent files group with default groupname

Construct a new FXRecentFiles group, using the global application instance.

Public Instance methods

Append a file to the end of the list.

Clear the list of files.

Remove a file from the list.

[Validate]