tbx  0.7.6
Public Member Functions | List of all members
tbx::ClipboardBytes Class Reference

Convenience class to create clipboard data for an array of bytes. More...

#include <clipboard.h>

Inheritance diagram for tbx::ClipboardBytes:
tbx::ClipboardData

Public Member Functions

 ClipboardBytes (char *bytes, int size, bool copy=true)
 Construct a clipboard data object to hold an array of bytes. More...
 
int size ()
 The size of the data in bytes. More...
 
const char * data ()
 The data to copy. More...
 
- Public Member Functions inherited from tbx::ClipboardData
virtual void copy_started ()
 Called when data is about to be copied to another application from via clipboard.
 
virtual void copy_finished ()
 Called when a copy of the data has finished.
 

Detailed Description

Convenience class to create clipboard data for an array of bytes.

Constructor & Destructor Documentation

◆ ClipboardBytes()

INTERNAL tbx::ClipboardBytes::ClipboardBytes ( char *  bytes,
int  size,
bool  copy = true 
)

Construct a clipboard data object to hold an array of bytes.

Parameters
bytesthe bytes to store on the clipboard (see copy flag for ownership)
sizenumber of bytes to store on the clipboard
copytrue (the default) to make a copy of the given bytes. false take ownership of the bytes. This class will delete them when no longer required (they must have been allocated with new[].

Member Function Documentation

◆ data()

const char* tbx::ClipboardBytes::data ( )
inlinevirtual

The data to copy.

If the data is created on demand in a subclass, it must be created when this is called.

Implements tbx::ClipboardData.

◆ size()

int tbx::ClipboardBytes::size ( )
inlinevirtual

The size of the data in bytes.

If the data is created on demand in a subclass the size at least must be calculated when this is called.

Implements tbx::ClipboardData.


The documentation for this class was generated from the following files: