summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_gui.h24
-rw-r--r--libs/win32/mir_core.libbin318808 -> 320624 bytes
-rw-r--r--libs/win64/mir_core.libbin320008 -> 321888 bytes
-rw-r--r--src/mir_core/src/hyperlink.cpp3
-rw-r--r--src/mir_core/src/mir_core.def7
-rw-r--r--src/mir_core/src/mir_core64.def7
-rw-r--r--src/mir_core/src/miranda.cpp1
-rw-r--r--src/mir_core/src/miranda.h1
-rw-r--r--src/mir_core/src/ui_utils.cpp53
9 files changed, 96 insertions, 0 deletions
diff --git a/include/m_gui.h b/include/m_gui.h
index b1b30af2ae..88aa96ecd3 100644
--- a/include/m_gui.h
+++ b/include/m_gui.h
@@ -564,6 +564,9 @@ public:
CCallback<CCtrlButton> OnClick;
};
+/////////////////////////////////////////////////////////////////////////////////////////
+// CCtrlMButton
+
class MIR_CORE_EXPORT CCtrlMButton : public CCtrlButton
{
typedef CCtrlButton CSuper;
@@ -583,6 +586,27 @@ protected:
const char* m_toolTip;
};
+/////////////////////////////////////////////////////////////////////////////////////////
+// CSplitter
+
+class MIR_CORE_EXPORT CSplitter : public CCtrlBase
+{
+ typedef CCtrlBase CSuper;
+
+public:
+ CSplitter(CDlgBase *dlg, int ctrlId);
+
+ __forceinline int GetPos() const { return m_iPosition; }
+
+protected:
+ virtual LRESULT CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
+
+ int m_iPosition;
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// CCtrlHyperlink
+
class MIR_CORE_EXPORT CCtrlHyperlink : public CCtrlBase
{
typedef CCtrlBase CSuper;
diff --git a/libs/win32/mir_core.lib b/libs/win32/mir_core.lib
index b81f24ec24..cef06fbcd7 100644
--- a/libs/win32/mir_core.lib
+++ b/libs/win32/mir_core.lib
Binary files differ
diff --git a/libs/win64/mir_core.lib b/libs/win64/mir_core.lib
index f36c3720d3..0c4b9f9b3a 100644
--- a/libs/win64/mir_core.lib
+++ b/libs/win64/mir_core.lib
Binary files differ
diff --git a/src/mir_core/src/hyperlink.cpp b/src/mir_core/src/hyperlink.cpp
index 8810757f83..c985afe216 100644
--- a/src/mir_core/src/hyperlink.cpp
+++ b/src/mir_core/src/hyperlink.cpp
@@ -264,6 +264,9 @@ static LRESULT CALLBACK HyperlinkWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA
void InitHyperlink(void)
{
+ g_hCursorNS = LoadCursor(NULL, IDC_SIZENS);
+ g_hCursorWE = LoadCursor(NULL, IDC_SIZEWE);
+
WNDCLASS wcl = { 0 };
wcl.lpfnWndProc = HyperlinkWndProc;
wcl.cbWndExtra = sizeof(struct HyperlinkWndData*);
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def
index cf69ac4029..2d0e961b20 100644
--- a/src/mir_core/src/mir_core.def
+++ b/src/mir_core/src/mir_core.def
@@ -1056,3 +1056,10 @@ CallFunctionSync @1170
?length@MBinBuffer@@QBEIXZ @1213 NONAME
?remove@MBinBuffer@@QAEXI@Z @1214 NONAME
??ACDlgBase@@QAEPAVCCtrlBase@@H@Z @1215 NONAME
+??0CSplitter@@QAE@ABV0@@Z @1216 NONAME
+??0CSplitter@@QAE@PAVCDlgBase@@H@Z @1217 NONAME
+??1CSplitter@@UAE@XZ @1218 NONAME
+??4CSplitter@@QAEAAV0@ABV0@@Z @1219 NONAME
+??_7CSplitter@@6B@ @1220 NONAME
+?CustomWndProc@CSplitter@@MAEJIIJ@Z @1221 NONAME
+?GetPos@CSplitter@@QBEHXZ @1222 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def
index e8c65808b9..985e595c74 100644
--- a/src/mir_core/src/mir_core64.def
+++ b/src/mir_core/src/mir_core64.def
@@ -1056,3 +1056,10 @@ CallFunctionSync @1170
?length@MBinBuffer@@QEBA_KXZ @1213 NONAME
?remove@MBinBuffer@@QEAAX_K@Z @1214 NONAME
??ACDlgBase@@QEAAPEAVCCtrlBase@@H@Z @1215 NONAME
+??0CSplitter@@QEAA@AEBV0@@Z @1216 NONAME
+??0CSplitter@@QEAA@PEAVCDlgBase@@H@Z @1217 NONAME
+??1CSplitter@@UEAA@XZ @1218 NONAME
+??4CSplitter@@QEAAAEAV0@AEBV0@@Z @1219 NONAME
+??_7CSplitter@@6B@ @1220 NONAME
+?CustomWndProc@CSplitter@@MEAA_JI_K_J@Z @1221 NONAME
+?GetPos@CSplitter@@QEBAHXZ @1222 NONAME
diff --git a/src/mir_core/src/miranda.cpp b/src/mir_core/src/miranda.cpp
index c74812d541..fdd553dd2c 100644
--- a/src/mir_core/src/miranda.cpp
+++ b/src/mir_core/src/miranda.cpp
@@ -43,6 +43,7 @@ void InitWinver();
int hLangpack = 0;
HINSTANCE g_hInst = 0;
+HCURSOR g_hCursorNS, g_hCursorWE;
HANDLE hStackMutex, hThreadQueueEmpty;
DWORD mir_tls = 0;
diff --git a/src/mir_core/src/miranda.h b/src/mir_core/src/miranda.h
index ac912282ec..03c0a9b52d 100644
--- a/src/mir_core/src/miranda.h
+++ b/src/mir_core/src/miranda.h
@@ -40,6 +40,7 @@ HINSTANCE ProtoGetInstance(const char *szModuleName);
extern HINSTANCE g_hInst;
extern HWND hAPCWindow;
extern HANDLE hStackMutex, hThreadQueueEmpty;
+extern HCURSOR g_hCursorNS, g_hCursorWE;
extern MIDatabase *currDb;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp
index 66078c8c66..ade3c68e86 100644
--- a/src/mir_core/src/ui_utils.cpp
+++ b/src/mir_core/src/ui_utils.cpp
@@ -2571,6 +2571,59 @@ void CCtrlPages::OnDestroy()
}
/////////////////////////////////////////////////////////////////////////////////////////
+// CSplitter
+
+CSplitter::CSplitter(CDlgBase *wnd, int idCtrl)
+ : CCtrlBase(wnd, idCtrl),
+ m_iPosition(0)
+{
+}
+
+LRESULT CSplitter::CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ RECT rc;
+
+ switch (msg) {
+ case WM_NCHITTEST:
+ return HTCLIENT;
+
+ case WM_SETCURSOR:
+ GetClientRect(m_hwnd, &rc);
+ SetCursor(rc.right > rc.bottom ? g_hCursorNS : g_hCursorWE);
+ return TRUE;
+
+ case WM_LBUTTONDOWN:
+ SetCapture(m_hwnd);
+ return 0;
+
+ case WM_MOUSEMOVE:
+ if (GetCapture() == m_hwnd) {
+ POINT pt = { 0, 0 };
+ GetClientRect(m_hwnd, &rc);
+ if (rc.right > rc.bottom) {
+ pt.y = HIWORD(GetMessagePos()) + rc.bottom / 2;
+ ScreenToClient(m_parentWnd->GetHwnd(), &pt);
+ m_iPosition = pt.y;
+ }
+ else {
+ pt.x = LOWORD(GetMessagePos()) + rc.right / 2;
+ ScreenToClient(m_parentWnd->GetHwnd(), &pt);
+ m_iPosition = pt.x;
+ }
+
+ OnChange(this);
+ }
+ return 0;
+
+ case WM_LBUTTONUP:
+ ReleaseCapture();
+ return 0;
+ }
+
+ return CSuper::CustomWndProc(msg, wParam, lParam);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
// CCtrlBase
CCtrlBase::CCtrlBase(CDlgBase *wnd, int idCtrl)