PasteClip basic formats support functions.
|
|
const char *ClipFmtsText()
Returns a list of format ids associated with plain text (actually, returns "text;wtext").
bool AcceptText(PasteClip& clip)
Accepts clip if it is text (returns true for drop).
String GetString(PasteClip& clip)
WString GetWString(PasteClip& clip)
Gets text from clip.
String GetTextClip(const String& text, const String& fmt)
String GetTextClip(const WString& text, const String& fmt)
Created ClipData binary data for text based on fmt.
void Append(VectorMap<String, ClipData>& data, const String& text)
void Append(VectorMap<String, ClipData>& data, const WString& text)
Appends text as "text" and "wtext" formats to data.
const char *ClipFmtsImage()
Returns host platform specific semicolon separated list of format ids associated with raster images.
bool AcceptImage(PasteClip& clip)
Accepts clip if it contains an raster image (returns true for drop).
Image GetImage(PasteClip& clip)
Extracts Image from clip.
String GetImageClip(const Image& m, const String& fmt)
Constructs binary clip data from m of format fmt.
void Append(VectorMap<String, ClipData>& data, const Image& img)
Appends platform specific raster image formats of img to data.
bool IsAvailableFiles(PasteClip& clip)
Returns true if clip.contains a list of OS shell files (drag operation from OS shell filelist to U++ application).
bool AcceptFiles(PasteClip& clip)
Accepts clip.if it contains a list of OS shell files.
Vector<String> GetClipFiles(const String& data)
Extracts a list of OS shell files from raw Clipboard data (result of ClipData::Get call).
Vector<String> GetFiles(PasteClip& clip)
Extracts a list of OS shell files from clip.
template <class T> String ClipFmt()
Constructs a special clip format id based on type. Useful when transferring data between U++ applications
template <class T> bool Accept(PasteClip& clip)
Accepts clip if it contains a format id based on ClipFmt.
template <class T> VectorMap<String, ClipData> InternalClip(const T& x, const char *id = "")
Creates 'internal' clip for variable x. Internal clips only work within single process as they are using simple pointers to objects. x must exists as long as clip is available.
template <class T> bool IsAvailableInternal(PasteClip& d, const char *id = "")
Returns true if there is internal clip of required type and id in d.
template <class T> bool AcceptInternal(PasteClip& d, const char *id = "")
Accepts internal clip of required type and id.
template <class T> const T& GetInternal(PasteClip& d)
Returns a reference to internal clip.
template <class T> const T *GetInternalPtr(PasteClip& d, const char *id = "")
If internal clip of required type and id is available, returns a pointer to it, NULL otherwise.
|