class MASKING_DLL_DECLSPEC Clipboard

Wrapper for the platform specific clipboard.

Public Fields

[more]char* buffer
Pointer to the text buffer copied from the clipboard.
[more]unsigned long bufSize
Length of the buffer.

Public Methods

[more]bool GetText( HWND hWnd = NULL )
Retrieves text from the clipboard.
[more]bool GetTextLength( HWND hWnd = NULL )
Retrieves length of text on the clipboard
[more]bool SetText( const char* lpszBuffer, HWND hWND = NULL )
Places text on the clipboard
[more]bool GetText( void )
Retrieves text from the clipboard.
[more]bool SetText( const char* lpszBuffer )
Places text on the clipboard

Protected Fields

[more]void* display
Pointer to the X display (for accessing the X clipboard)


Documentation

Wrapper for the platform specific clipboard. Currently only allows copying text to and from the clipboard and is implemented only on Windows and Linux. On other platforms the class works as an internal clipboard only. To use the clipboard, create a Clipboard object and call either GetText() or SetText(). After calling GetText(), the retrieved text is stored in the buffer member variable and its length is stored in bufSize.
ovoid* display
Pointer to the X display (for accessing the X clipboard)

ochar* buffer
Pointer to the text buffer copied from the clipboard. Invalid when GetText() returns false.

ounsigned long bufSize
Length of the buffer. Invalid when GetText() returns false.

obool GetText( HWND hWnd = NULL )
Retrieves text from the clipboard.

Parameters:
hWnd - window handle to be used by clipboard

Returns:
TRUE - Text was successfully copied from clipboard
FALSE - No text on the clipboard

obool GetTextLength( HWND hWnd = NULL )
Retrieves length of text on the clipboard

Parameters:
hWnd - window handle to be used by clipboard

Returns:
TRUE - Text length was successfully returned.
FALSE - No text on the clipboard

obool SetText( const char* lpszBuffer, HWND hWND = NULL )
Places text on the clipboard

Parameters:
lpszBuffer - pointer to a string where the text is to be put
hWnd - window handle to be used by clipboard

Returns:
TRUE - Text was successfully copied from clipboard
FALSE - No text on the clipboard

obool GetText( void )
Retrieves text from the clipboard.

Returns:
TRUE - Text was successfully copied from clipboard
FALSE - No text on the clipboard

obool SetText( const char* lpszBuffer )
Places text on the clipboard

Parameters:
lpszBuffer - pointer to a string where the text is to be put

Returns:
TRUE - Text was successfully copied from clipboard
FALSE - No text on the clipboard


This class has no child classes.

Alphabetic index Hierarchy of classes


Back to front page   |   page generated with DOC++