A simple Clipboard wrapper.
This offers basic access to the clipboard under windows, and serves as a plain global storage for a string on all other platforms. This class is intended to be used internally by Guiliani controls.
The following code demonstrates a basic Copy&Paste implementation which uses the CGUIClipboard class.
eC_Bool CDemoObject::DoKeyDown(
const GUIKeyIdentifier_t &eKeyIdentifier,
const eC_UInt &uiModifiers)
{
switch (eKeyIdentifier)
{
case GK_PASTE:
{
m_pTextObject->SetText(GET_CLIPBOARD.GetString());
}
break;
case GK_COPY:
{
GET_CLIPBOARD.PutString(m_pTextObject->GetText());
}
}
return false;
}
GUIKeyIdentifier_t
Platform independent key identifiers.
Definition: GUIEventTypeResource.h:205