Class TCastleRecentFiles

Unit

Declaration

type TCastleRecentFiles = class(TRecentFiles)

Description

Manage a list of recently opened files, and show a menu in Lazarus.

Source: lcl/castlelclrecentfiles.pas (line 28).

Hierarchy

  • TObject
  • TPersistent
  • TComponent
  • TRecentFiles
  • TCastleRecentFiles
Show Additional Members:

Overview

Constants

Public DefaultMaxCount = 5;

Methods

Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure Add(const Url: String); overload; virtual;
Public procedure Add(const Url: String; const Ignored: Boolean); overload; deprecated 'use Add(Url)';
Public procedure Remove(const Url: String);
Public procedure LoadFromConfig(const Config: TCastleConfig);
Public procedure SaveToConfig(const Config: TCastleConfig);
Protected procedure MenuCreate; override;
Protected procedure MenuDestroy; override;

Properties

Public property Urls: TStringList read FUrls;
Published property OnOpenRecent: TOnOpenRecent read FOnOpenRecent write FOnOpenRecent;
Published property MaxCount: Cardinal read FMaxCount write FMaxCount default DefaultMaxCount;
Public property NextMenuItem: TMenuItem read FNextMenuItem write SetNextMenuItem;

Description

Constants

Public DefaultMaxCount = 5;

This item is declared in ancestor TRecentFiles.

This item has no description.

Source: files/castlerecentfiles.pas (line 47).

Methods

Public constructor Create(AOwner: TComponent); override;

This item is declared in ancestor TRecentFiles.

This item has no description.

Source: files/castlerecentfiles.pas (line 49).

Public destructor Destroy; override;

This item is declared in ancestor TRecentFiles.

This item has no description.

Source: files/castlerecentfiles.pas (line 50).

Public procedure Add(const Url: String); overload; virtual;

This item is declared in ancestor TRecentFiles.

Adds as the most recent file Url.

Note that we want to store only absolute URLs. So this method will always call AbsoluteURI (which will eventually call ExpandFileName on filename inside, and make sure it has appropriate protocol) on the given URL.

Source: files/castlerecentfiles.pas (line 58).

Public procedure Add(const Url: String; const Ignored: Boolean); overload; deprecated 'use Add(Url)';

This item is declared in ancestor TRecentFiles.

Warning: this symbol is deprecated: use Add(Url)

This item has no description.

Source: files/castlerecentfiles.pas (line 60).

Public procedure Remove(const Url: String);

This item is declared in ancestor TRecentFiles.

Remove URL.

Source: files/castlerecentfiles.pas (line 63).

Public procedure LoadFromConfig(const Config: TCastleConfig);

This item is declared in ancestor TRecentFiles.

Load and save recently opened files list to/from the Config file.

Source: files/castlerecentfiles.pas (line 70).

Public procedure SaveToConfig(const Config: TCastleConfig);

This item is declared in ancestor TRecentFiles.

This item has no description.

Source: files/castlerecentfiles.pas (line 71).

Protected procedure MenuCreate; override;

This item has no description. Showing description inherited from TRecentFiles.MenuCreate.

Create and destroy menu (or anything else that mirrors Urls contents).

Source: lcl/castlelclrecentfiles.pas (line 34).

Protected procedure MenuDestroy; override;

Destroy the menu. Internal (do not call this directly, it's only called by parent class). Note that it doesn't read Urls list at all, it only depends on FirstSeparator value.

Source: lcl/castlelclrecentfiles.pas (line 40).

Properties

Public property Urls: TStringList read FUrls;

This item is declared in ancestor TRecentFiles.

List of currently stored URLs. This is readonly.

Source: files/castlerecentfiles.pas (line 66).

Published property OnOpenRecent: TOnOpenRecent read FOnOpenRecent write FOnOpenRecent;

This item is declared in ancestor TRecentFiles.

This item has no description.

Source: files/castlerecentfiles.pas (line 74).

Published property MaxCount: Cardinal read FMaxCount write FMaxCount default DefaultMaxCount;

This item is declared in ancestor TRecentFiles.

This item has no description.

Source: files/castlerecentfiles.pas (line 76).

Public property NextMenuItem: TMenuItem read FNextMenuItem write SetNextMenuItem;

Determines the placement of "recent files" list inside your menu.

If this is not Nil then each update to the recent files list (for example by Add method) will result in the menu items right before NextMenuItem to be updated.

Also changing the value of this property will result in one-time update of the menu. Menu at the place of old NextMenuItem will be removed and menu at the place of new NextMenuItem will get created.

Usually NextMenuItem should be the separator that divides the print and properties menu sections and the close menu sections. That's consistent with other GNOME programs, and this is what we usually try to follow.

Source: lcl/castlelclrecentfiles.pas (line 57).


Generated by PasDoc 0.17.0.snapshot.