Unit 'Clipbrd' Package
[Overview][Types][Classes][Procedures and functions][Index] [#lcl]

TClipboard

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TClipboard - area for holding information that has been cut or copied, ready for pasting.

Declaration

Source position: clipbrd.pp line 152

type TClipboard = class(TPersistent)

public

  function AddFormat();

  

Acquires ownership of the Clipboard and adds a format.

  procedure Assign(); override;

  

Copies properties from the specified persistent object to the clipboard.

  procedure AssignTo(); override;

  

Copies property values into the specified persistent object.

  procedure Clear;

  

Clear the clipboard.

  procedure Close;

  

Close down the clipboard.

  constructor Create();

  

Create - Constructor: make a new instance of a clipboard.

  destructor Destroy; override;

  

Destructor for the class instance.

  function FindPictureFormatID;

  

FindPictureFormatID - search for the first format ID that is a graphic.

  function FindFormatID();

  

FindFormatID - find a Format ID that has the specified name.

  function GetAsHtml();

  

Retrieves the HTML content of the clipboard (if available).

  function GetComponent();

  

GetComponent - reads a component from the clipboard.

  procedure GetComponentAsText();

  

GetComponentAsText - read the component as text, if supported.

  function GetFormat();

  

GetFormat - read information on format from the clipboard.

  procedure SupportedFormats();

  

SupportedFormats - fills a stringlist with the names of the supported MIME types.

  function GetTextBuf();

  

GetTextBuf - reads text from the clipboard and returns the number of characters.

  function HasFormat();

  

HasFormat - look up the list to see if the format is supported. If a TPicture format is specified, all graphic formats are searched.

  function HasFormatName();

  

HasFormatName - checks if data have format with specified name.

  function HasPictureFormat;

  

HasPictureFormat - checks whether data are formatted as a picture.

  procedure Open;

  

Open the clipboard to receive and transmit data.

  procedure SetAsHtml();

  

Puts a HTML string on the clipboard.

  function SetComponent();

  

Write specified component to the Clipboard.

  function SetComponentAsText();

  

Stores the specified Component in the clipboard.

  function SetFormat();

  

Sets the clipboard format to the specified identifier and copies the value in Stream.

  function SetSupportedFormats();

  

SetSupportedFormats - set all supported formats at once.

  procedure SetTextBuf();

  

Loads the clipboard buffer using the text in the specified PChar value.

  property AsText: string; [rw]

  

AsText - holds the textual data in the clipboard as a string.

  property ClipboardType: TClipboardType; [r]

  

ClipboardType - ctPrimarySelection, ctSecondarySelection, ctClipboard.

  property FormatCount: Integer; [r]

  

FormatCount - the number of formats available.

  property Formats []: PtrUInt; [r]

  

Formats - the formats being used in the current clipboard.

  property OnRequest: TClipboardRequestEvent; [rw]

  

OnRequest - event handler for a request for clipboard data.

end;

Inheritance

TClipboard

  

TClipboard - area for holding information that has been cut or copied, ready for pasting.

|

TObject

Description

TClipboard - area for holding information that has been cut or copied, ready for pasting.

The clipboard object encapsulates the Windows clipboard and the three standard Gtk selections. For each of the three clipboards/selections there is an object: PrimarySelection, SecondarySelection and Clipboard. There is no difference between the three objects except their type.

A lot of information about Clipboard Formats, including predefined formats for Delphi/Kylix compatibility, is found in the LCLType unit, at TClipboardFormat, TClipboardType, ClipboardTypeName, TPredefinedClipboardFormat, PredefinedClipboardMimeTypes

See also

TClipboardFormat

  

Alias for the PtrUInt type.

TClipboardType

  

Represents the sources or dispositions for clipboard data.

ClipboardTypeName

  

Contains the names associated with the clipboard types accessed using the enumeration values.

TPredefinedClipboardFormat

  

Represents predefined clipboard formats used in the LCL.

PredefinedClipboardMimeTypes

  

Contains MIME types for the values in the TPredefinedClipboardFormat enumeration.