/* Copyright (c) 2005 Victor Pavlychko (nullbyte@sotline.net.ua) Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) 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 . */ #include "stdafx.h" static CMOption g_splitter(MODULENAME, "SplitterY", 100); ///////////////////////////////////////////////////////////////////////////////////////// // Main history dialog enum { HIST_SHOW_IN = 0x001, HIST_SHOW_OUT = 0x002, HIST_SHOW_MSGS = 0x004, HIST_SHOW_FILES = 0x008, HIST_SHOW_URLS = 0x010, HIST_SHOW_STATUS = 0x020, HIST_SHOW_OTHER = 0x040, HIST_AUTO_FILTER = 0x080, }; enum { WND_OPT_TIMETREE = 0x01, WND_OPT_SEARCHBAR = 0x02, WND_OPT_FILTERBAR = 0x04 }; enum { WND_SPACING = 4, TBTN_SIZE = 25, }; struct InfoBarEvents { HWND hwndIco, hwndIcoIn, hwndIcoOut; HWND hwndTxt, hwndTxtIn, hwndTxtOut; }; void LayoutFilterBar(HDWP hDwp, int x, int y, int w, InfoBarEvents *ib) { hDwp = DeferWindowPos(hDwp, ib->hwndIco, 0, x, y, 16, 16, SWP_NOZORDER); hDwp = DeferWindowPos(hDwp, ib->hwndTxt, 0, x + 16 + WND_SPACING, y, w - 16 - WND_SPACING, 16, SWP_NOZORDER); hDwp = DeferWindowPos(hDwp, ib->hwndIcoIn, 0, x + 16, y + 16 + WND_SPACING, 16, 16, SWP_NOZORDER); hDwp = DeferWindowPos(hDwp, ib->hwndTxtIn, 0, x + 32 + WND_SPACING, y + 16 + WND_SPACING, w - WND_SPACING - 32, 16, SWP_NOZORDER); hDwp = DeferWindowPos(hDwp, ib->hwndIcoOut, 0, x + 16, y + (16 + WND_SPACING) * 2, 16, 16, SWP_NOZORDER); DeferWindowPos(hDwp, ib->hwndTxtOut, 0, x + 32 + WND_SPACING, y + (16 + WND_SPACING) * 2, w - WND_SPACING - 32, 16, SWP_NOZORDER); } static const char *pSettings[] = { LPGEN("FirstName"), LPGEN("LastName"), LPGEN("e-mail"), LPGEN("Nick"), LPGEN("Age"), LPGEN("Gender"), LPGEN("City"), LPGEN("State"), LPGEN("Phone"), LPGEN("Homepage"), LPGEN("About") }; class CHistoryDlg : public CDlgBase { HMENU m_hMenu; uint16_t showFlags; bool m_bSearchChanged = false; MCONTACT m_hContact; int lastYear = -1, lastMonth = -1, lastDay = -1; HTREEITEM hLastYear = 0, hLastMonth = 0, hLastDay = 0; bool disableTimeTreeChange = false; bool bAppendOnly; // window flags uint32_t m_dwOptions = 0; // toolbar buttons struct Button { enum { RIGHT = 1, SPACED = 2 }; Button(CCtrlMButton &_1, int _2 = 0) : hwnd(_1), options(_2) {} CCtrlMButton &hwnd; int options; }; std::vector