diff options
author | George Hazan <ghazan@miranda.im> | 2023-04-14 17:59:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-04-14 17:59:03 +0300 |
commit | f12d6a4000cfce521392200635d1cadc63dba934 (patch) | |
tree | 86d408068682d7b1e239877df857ac95f7f25297 /plugins/TabSRMM/src/msgs.h | |
parent | aa5197082f1567e37b85911752b92a489d6515c3 (diff) |
SRMM code unification
Diffstat (limited to 'plugins/TabSRMM/src/msgs.h')
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 6d05b1a25f..d3bdec4c3d 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -371,42 +371,6 @@ struct TContainerData : public MZeroedObject };
/////////////////////////////////////////////////////////////////////////////////////////
-// CLogWindow - built-in log window
-
-class CLogWindow : public CRtfLogWindow
-{
- typedef CRtfLogWindow CSuper;
-
-public:
- CLogWindow(CMsgDialog &pDlg) :
- CSuper(pDlg)
- {
- }
-
- void Attach() override;
- void LogEvents(MEVENT hDbEventFirst, int count, bool bAppend) override;
- void LogEvents(struct LOGINFO *, bool) override;
- void ScrollToBottom() override;
- void UpdateOptions() override;
-
- void DisableStaticEdge()
- {
- SetWindowLongPtr(m_rtf.GetHwnd(), GWL_EXSTYLE, GetWindowLongPtr(m_rtf.GetHwnd(), GWL_EXSTYLE) & ~WS_EX_STATICEDGE);
- }
-
- char* GetRichTextRtf(bool bText, bool bSelection)
- {
- return m_rtf.GetRichTextRtf(bText, bSelection);
- }
-
- void LogEvents(MEVENT hDbEventFirst, int count, bool bAppend, DBEVENTINFO *dbei);
- void ReplaceIcons(LONG startAt, int fAppend, BOOL isSent);
- void ScrollToBottom(bool, bool);
-
- INT_PTR WndProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
-};
-
-/////////////////////////////////////////////////////////////////////////////////////////
// CMsgDialog - SRMM window class
class CMsgDialog : public CSrmmBaseDialog
@@ -711,6 +675,44 @@ public: extern LIST<void> g_arUnreadWindows;
+/////////////////////////////////////////////////////////////////////////////////////////
+// CLogWindow - built-in log window
+
+class CLogWindow : public CRtfLogWindow
+{
+ typedef CRtfLogWindow CSuper;
+
+public:
+ CLogWindow(CMsgDialog &pDlg) :
+ CSuper(pDlg)
+ {}
+
+ char *CreateRTFFromDbEvent(struct LogStreamData *streamData);
+
+ void AppendUnicodeString(CMStringA &str, const wchar_t *pwszBuf) override;
+ void Attach() override;
+ void LogEvents(MEVENT hDbEventFirst, int count, bool bAppend) override;
+ void LogEvents(struct LOGINFO *, bool) override;
+ void ScrollToBottom() override;
+ void UpdateOptions() override;
+
+ void DisableStaticEdge()
+ {
+ SetWindowLongPtr(m_rtf.GetHwnd(), GWL_EXSTYLE, GetWindowLongPtr(m_rtf.GetHwnd(), GWL_EXSTYLE) & ~WS_EX_STATICEDGE);
+ }
+
+ char *GetRichTextRtf(bool bText, bool bSelection)
+ {
+ return m_rtf.GetRichTextRtf(bText, bSelection);
+ }
+
+ void LogEvents(MEVENT hDbEventFirst, int count, bool bAppend, DBEVENTINFO *dbei);
+ void ReplaceIcons(LONG startAt, int fAppend, BOOL isSent);
+ void ScrollToBottom(bool, bool);
+
+ INT_PTR WndProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
+};
+
#define MESSAGE_WINDOW_DATA_SIZE offsetof(_MessageWindowData, hdbEventFirst);
/*
|