diff options
author | George Hazan <ghazan@miranda.im> | 2017-04-05 20:14:14 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-04-05 20:14:14 +0300 |
commit | 4164d60646b408abf62bc8170165aedcc574d088 (patch) | |
tree | 531de09ce40e5b9c9dc527c9e2548407b72e3255 /include | |
parent | a81a0f3e536ebcd46b1bacf3539cd8d8fe0e0ccd (diff) |
more methods for CCtrlRichEdit: GetRichTextRtf, GetRichTextUtf, GetRichText, SetRichText, SetRichTextRtf
Diffstat (limited to 'include')
-rw-r--r-- | include/m_gui.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/m_gui.h b/include/m_gui.h index da0d1e49b5..e94d43f3d3 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -800,7 +800,17 @@ class MIR_CORE_EXPORT CCtrlRichEdit : public CCtrlEdit public:
CCtrlRichEdit(CDlgBase *dlg, int ctrlId);
- int GetRichTextLength() const;
+ // returns text length in bytes if a parameter is omitted or in symbols, if not
+ int GetRichTextLength(int iCodePage = CP_ACP) const;
+
+ // returns a buffer that should be freed using mir_free() or ptrA/ptrW
+ char* GetRichTextRtf(bool bText = false, bool bSelection = false) const; // returns text with formatting
+ char* GetRichTextUtf() const; // returns only text in utf8
+ wchar_t* GetRichText() const; // returns only text in ucs2
+
+ // these methods return text length in Unicode chars
+ int SetRichText(const wchar_t *text);
+ int SetRichTextRtf(const char *text);
};
/////////////////////////////////////////////////////////////////////////////////////////
|