Crazy Eddie's GUI System  0.8.4
CEGUI::Clipboard Class Reference

Defines a clipboard handling class. More...

+ Inheritance diagram for CEGUI::Clipboard:
+ Collaboration diagram for CEGUI::Clipboard:

List of all members.

Public Member Functions

 Clipboard ()
 constructor
 ~Clipboard ()
 destructor
void setNativeProvider (NativeClipboardProvider *provider)
 sets native clipboard provider
NativeClipboardProvidergetNativeProvider () const
 retrieves currently set native clipboard provider
void setData (const String &mimeType, const void *buffer, size_t size)
 sets contents of this clipboard to given raw data
void getData (String &mimeType, const void *&buffer, size_t &size)
 retrieves contents of this clipboard as raw data
void setText (const String &text)
 convenience method that sets contents to given string
String getText ()
 convenience method that retrieves contents as a string

Detailed Description

Defines a clipboard handling class.

Usually, there is just one instance of this class, owned by CEGUI::System, it contains internal CEGUI clipboard that may be (optionally) synchronised with native clipboard if user sets NativeClipboardProvider with: Where customProvider is of course user implemented clipboard provider.

Member Function Documentation

void CEGUI::Clipboard::getData ( String mimeType,
const void *&  buffer,
size_t &  size 
)

retrieves contents of this clipboard as raw data

Parameters:
mimeTypecurrent mime type
bufferthe raw data buffer (can be 0 if size == 0!)
sizesize of the returned buffer

You shan't change the buffer contents, only read from it!

retrieves currently set native clipboard provider

See also:
NativeClipboardProvider
void CEGUI::Clipboard::setData ( const String mimeType,
const void *  buffer,
size_t  size 
)

sets contents of this clipboard to given raw data

Parameters:
mimeTypedescribes type of the data in the clipboard
bufferraw buffer containing data to push into the clipboard
sizesize (in bytes) of given data

sets native clipboard provider

Parameters:
providerthe native clipboard provider to set
See also:
NativeClipboardProvider You are required to deallocate given provider, this class doesn't take ownership!)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends