void AppendClipboardImage(const Image& img) { GuiLock __; if(img.IsEmpty()) return; AppendClipboard(ClipFmt<Image>(), img, sImage); AppendClipboard("dib", img, sDib); }
void AppendClipboard(const char *format, const byte *data, int length) { GuiLock __; Vector<String> f = Split(format, ';'); for(int i = 0; i < f.GetCount(); i++) AppendClipboard(GetClipboardFormatCode(f[i]), data, length); }
void AppendClipboardUnicodeText(const WString& s) { #ifndef PLATFORM_WINCE AppendClipboardText(s.ToString()); #endif AppendClipboard("wtext", (byte *)~s, 2 * s.GetLength()); }
void AppendClipboardText(const String& s) { #ifdef PLATFORM_WINCE AppendClipboardUnicodeText(s.ToWString()); #else AppendClipboard("text", ToSystemCharset(s)); #endif }
void AppendClipboard(const char *format, const Value& data, String (*render)(const Value&)) { GuiLock __; Vector<String> f = Split(format, ';'); for(int i = 0; i < f.GetCount(); i++) { int c = GetClipboardFormatCode(f[i]); sClipMap().GetAdd(c) = ClipData(data, render); AppendClipboard(c, NULL, 0); } }
void ShowQTF(const String& qtf, const char *title) { RichText txt = ParseQTF(qtf); ClearClipboard(); AppendClipboard(ParseQTF(qtf)); WithStatLayout<TopWindow> dlg; CtrlLayoutOK(dlg, title); dlg.stat = qtf; dlg.Sizeable().Zoomable(); dlg.Run(); }
void AppendClipboardUnicodeText(const WString& s) { AppendClipboard("wtext", (byte *)~s, 2 * s.GetLength()); }
void AppendClipboard(const char *format, const String& data) { GuiLock __; AppendClipboard(format, data, data.GetLength()); }