nsIClipboardCommands

by 3 contributors:

An interface for embedding clients who wish to interact with the system-wide OS clipboard. Mozilla does not use a private clipboard, instead it places its data directly onto the system clipboard. The webshell implements this interface.
Inherits from: nsISupports Last changed in Gecko 1.7

Method overview

boolean canCopyImageContents();
boolean canCopyImageLocation();
boolean canCopyLinkLocation();
boolean canCopySelection();
boolean canCutSelection();
boolean canPaste();
void copyImageContents();
void copyImageLocation();
void copyLinkLocation();
void copySelection();
void cutSelection();
void paste();
void selectAll();
void selectNone();

Methods

canCopyImageContents()

Returns whether we can copy an image's contents.

boolean canCopyImageContents();
Parameters

None.

Return value

true if an image is selected, false otherwise.

canCopyImageLocation()

Returns whether we can copy an image location.

boolean canCopyImageLocation();
Parameters

None.

Return value

true if an image is selected, false otherwise.

canCopyLinkLocation()

Returns whether we can copy a link location.

boolean canCopyLinkLocation();
Parameters

None.

Return value

true if a link is selected, false otherwise.

canCopySelection()

Returns whether there is a selection and it is copyable.

boolean canCopySelection();
Parameters

None.

Return value

true if there is a selection, false otherwise.

canCutSelection()

Returns whether there is a selection and it is not read-only.

boolean canCutSelection();
Parameters

None.

Return value

true if the current selection can be cut, false otherwise.

canPaste()

Returns whether the current contents of the clipboard can be pasted and if the current selection is not read-only.

boolean canPaste();
Parameters

None.

Return value

true if there is data to paste on the clipboard and the current selection is not read-only, false otherwise.

copyImageContents()

Copy the contents of the selected image.

void copyImageContents();
Parameters

None.

copyImageLocation()

Copy the location of the selected image.

void copyImageLocation();
Parameters

None.

copyLinkLocation()

Copy the link location of the current selection (For example the |href| attribute of a selected |a| tag).

void copyLinkLocation();
Parameters

None.

copySelection()

Copy the current selection onto the clipboard.

void copySelection();
Parameters

None.

cutSelection()

Cut the current selection onto the clipboard.

void cutSelection();
Parameters

None.

paste()

Paste the contents of the clipboard into the current selection.

void paste();
Parameters

None.

selectAll()

Select the entire contents.

void selectAll();
Parameters

None.

selectNone()

Clear the current selection (if any). Insertion point ends up at beginning of current selection.

void selectNone();
Parameters

None.

See also

Document Tags and Contributors

Contributors to this page: Sheppy, trevorh, Ayhfung
Last updated by: Sheppy,