Class Fox::FXRecentFiles
In: rdoc-sources/FXRecentFiles.rb
lib/fox12/responder2.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   removeFile  

Included Modules

Responder2

Attributes

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

Construct a new FXRecentFiles object with the specified group name, target and message identifier.

Construct a new FXRecentFiles object with the default group name.

Public Instance methods

Append a file to the end of the list.

Clear the list of files.

Remove a file from the list.

[Validate]