Crazy Eddie's GUI System  0.8.3
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
CEGUI::Clipboard Class Reference

Defines a clipboard handling class. More...

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

Public Member Functions

 Clipboard ()
 constructor
 
 ~Clipboard ()
 destructor
 
void setNativeProvider (NativeClipboardProvider *provider)
 sets native clipboard provider More...
 
NativeClipboardProvidergetNativeProvider () const
 retrieves currently set native clipboard provider More...
 
void setData (const String &mimeType, const void *buffer, size_t size)
 sets contents of this clipboard to given raw data More...
 
void getData (String &mimeType, const void *&buffer, size_t &size)
 retrieves contents of this clipboard as raw data More...
 
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!

NativeClipboardProvider* CEGUI::Clipboard::getNativeProvider ( ) const

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
void CEGUI::Clipboard::setNativeProvider ( NativeClipboardProvider provider)

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!)