summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-08-02 14:11:40 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-08-02 14:11:40 +0300
commit16dae6bd7df08d11cf9175239fb9b27f88c6f12c (patch)
tree4a1f2976ff1256ea807108ece5c2df95b8732bf2 /include
parent3b014e321cb0b4fd9ff761cf145b94f71576fdd8 (diff)
fixes #2373 (NewStory: не работают фильтры)
Diffstat (limited to 'include')
-rw-r--r--include/m_srmm_int.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h
index 767fbe3d13..8f824846dc 100644
--- a/include/m_srmm_int.h
+++ b/include/m_srmm_int.h
@@ -103,6 +103,7 @@ MIR_APP_DLL(void) Srmm_ClickToolbarIcon(MCONTACT hContact, int idFrom, HWND hwnd
// SRMM log window container
class CMsgDialog;
+struct LOGINFO;
class MIR_APP_EXPORT CSrmmLogWindow
{
@@ -112,7 +113,7 @@ class MIR_APP_EXPORT CSrmmLogWindow
protected:
CMsgDialog &m_pDlg;
- CSrmmLogWindow(CMsgDialog &pDlg) :
+ __forceinline CSrmmLogWindow(CMsgDialog &pDlg) :
m_pDlg(pDlg)
{}
@@ -128,14 +129,14 @@ public:
virtual HWND GetHwnd() = 0;
virtual wchar_t* GetSelection() = 0;
virtual void LogEvents(MEVENT hDbEventFirst, int count, bool bAppend) = 0;
- virtual void LogEvents(const struct LOGINFO *lin) = 0;
+ virtual void LogChatEvents(const LOGINFO *lin) = 0;
virtual void Resize() = 0;
virtual void ScrollToBottom() = 0;
virtual void UpdateOptions() {};
virtual INT_PTR Notify(WPARAM, LPARAM) { return 0; }
- __inline CMsgDialog& GetDialog() const
+ __forceinline CMsgDialog& GetDialog() const
{ return m_pDlg;
}
};
@@ -146,6 +147,24 @@ MIR_APP_DLL(HANDLE) RegisterSrmmLog(CMPlugin *pPlugin, const char *pszShortName,
MIR_APP_DLL(void) UnregisterSrmmLog(HANDLE);
/////////////////////////////////////////////////////////////////////////////////////////
+// Simple single-event based logger
+
+class MIR_APP_EXPORT CSimpleLogWindow : public CSrmmLogWindow
+{
+ CSimpleLogWindow(const CSimpleLogWindow &) = delete;
+ CSimpleLogWindow &operator=(const CSimpleLogWindow &) = delete;
+
+ void LogChatEvents(const struct LOGINFO *lin) override;
+
+protected:
+ __forceinline CSimpleLogWindow(CMsgDialog &pDlg) :
+ CSrmmLogWindow(pDlg)
+ {}
+
+ virtual void LogChatEvent(const LOGINFO &lin) = 0;
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
// Standard built-in RTF logger class
struct RtfLogStreamBase
@@ -300,6 +319,7 @@ public:
CTimer timerFlash, timerType, timerNickList, timerRedraw;
void ClearLog();
+ bool IsSuitableEvent(const LOGINFO &lin) const;
void RedrawLog();
void ScheduleRedrawLog();
void ShowColorChooser(int iCtrlId);