From 3a56ba391bf176c11cc5bde6f860759a3ce4477c Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Thu, 5 Jul 2012 13:27:02 +0000 Subject: BasicHistory: folder structure change git-svn-id: http://svn.miranda-ng.org/main/trunk@773 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BasicHistory/src/HistoryWindow.h | 95 ++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 plugins/BasicHistory/src/HistoryWindow.h (limited to 'plugins/BasicHistory/src/HistoryWindow.h') diff --git a/plugins/BasicHistory/src/HistoryWindow.h b/plugins/BasicHistory/src/HistoryWindow.h new file mode 100644 index 0000000000..8a31d9194a --- /dev/null +++ b/plugins/BasicHistory/src/HistoryWindow.h @@ -0,0 +1,95 @@ +/* +Basic History plugin +Copyright (C) 2011-2012 Krzysztof Kral + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once +#include "Searcher.h" + +class HistoryWindow : public SearchContext +{ +private: + HistoryWindow(HANDLE _hContact); + void Initialise(); + void Destroy(); + void SplitterMoved(HWND splitter, LONG pos, bool screenPos); + static INT_PTR CALLBACK DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); + static LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + static int HistoryDlgResizer(HWND, LPARAM, UTILRESIZECONTROL *urc); + static void FillHistoryThread(void* param); + static void Close(HistoryWindow* historyWindow); + static void ChangeToFreeWindow(HistoryWindow* historyWindow); + void ReplaceIcons(HWND hwndDlg, int selStart, BOOL isSent); + void EnableWindows(BOOL enable); + void ReloadContacts(); + bool DoHotkey(UINT msg, LPARAM lParam, WPARAM wParam, int window); + void RestorePos(); + void SavePos(bool all); + void FindToolbarClicked(LPNMTOOLBAR lpnmTB); + void ConfigToolbarClicked(LPNMTOOLBAR lpnmTB); + void DeleteToolbarClicked(LPNMTOOLBAR lpnmTB); + void Delete(int what); + bool ContactChanged(bool sync = false); + void GroupImagesChanged(); + void FormatQuote(std::wstring& quote, const MessageData& md, const std::wstring& msg); + void FontsChanged(); + void ReloadMainOptions(); + void DoImport(IImport::ImportType type); + + static std::map windows; + static std::vector freeWindows; + bool isDestroyed; + LONG splitterY; + LONG splitterOrgY; + LONG splitterX; + LONG splitterOrgX; + HICON *eventIcoms; + int allIconNumber; + HICON plusIco, minusIco, findNextIco, findPrevIco, configIco, deleteIco; + WNDPROC OldSplitterProc; + bool isContactList; + LONG listOryginalPos; + bool isLoading; + Searcher searcher; + bool isGroupImages; + HIMAGELIST himlSmall, himlNone; + HBRUSH bkBrush; + HBRUSH bkFindBrush; + HANDLE hSystem; + HWND splitterXhWnd, splitterYhWnd; +protected: + virtual void AddGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText, int ico); +public: + ~HistoryWindow(); + static void Deinit(); + static void Open(HANDLE hContact); + static void Close(HANDLE hContact); + static void RebuildEvents(HANDLE hContact); + static bool IsInList(HWND hWnd); + static int FontsChanged(WPARAM wParam, LPARAM lParam); + static INT_PTR DeleteAllUserHistory(WPARAM wParam, LPARAM lParam); + static void OptionsMainChanged(); + static void OptionsGroupChanged(); + static void OptionsSearchingChanged(); + void Show(); + void Focus(); + + // SearchContext interface + virtual void SelectEventGroup(int sel); + virtual HANDLE GetNextContact(HANDLE hContact, int adder); + virtual void SelectContact(HANDLE _hContact); +}; + -- cgit v1.2.3