aboutsummaryrefslogtreecommitdiff
path: root/Src/Plugins/General/gen_ml/skinnededit.h
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Plugins/General/gen_ml/skinnededit.h
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/Plugins/General/gen_ml/skinnededit.h')
-rw-r--r--Src/Plugins/General/gen_ml/skinnededit.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/Src/Plugins/General/gen_ml/skinnededit.h b/Src/Plugins/General/gen_ml/skinnededit.h
new file mode 100644
index 00000000..d56eaed6
--- /dev/null
+++ b/Src/Plugins/General/gen_ml/skinnededit.h
@@ -0,0 +1,54 @@
+#ifndef NULLOSFT_MEDIALIBRARY_SKINNED_EDIT_HEADER
+#define NULLOSFT_MEDIALIBRARY_SKINNED_EDIT_HEADER
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+#include "./skinnedwnd.h"
+
+
+class SkinnedEdit : public SkinnedWnd
+{
+protected:
+ SkinnedEdit(void);
+ virtual ~SkinnedEdit(void);
+
+protected:
+ virtual BOOL Attach(HWND hwndEdit);
+ virtual LRESULT WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam); // treat this as dialog proc
+ virtual void OnPaint(void);
+ virtual void OnSkinUpdated(BOOL bNotifyChildren, BOOL bRedraw);
+ virtual void OnWindowPosChanged(WINDOWPOS *pwp);
+ virtual void OnSetFont(HFONT hFont, BOOL fRedraw);
+ void FontChanged();
+
+private:
+ friend BOOL SkinWindowEx(HWND hwndToSkin, INT type, UINT style);
+ void EraseBckGnd(HDC hdc, RECT *prc, RECT *prcText, BOOL fEraseAll, HBRUSH hBrush);
+ void DrawText(HDC hdc, RECT *prc, RECT *prcText, LPCWSTR pszText, INT cchText);
+ LRESULT OverrideDefault(UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+ typedef struct __SELECTION
+ {
+ INT first;
+ INT last;
+ LONG leftX;
+ LONG rightX;
+ } SELECTION;
+
+ BOOL GetSelection(SELECTION *selection, INT cchText, const RECT *clientRect);
+
+protected:
+ int firstVisible;
+ int lastVisible;
+ int firstSelected;
+ int lastSelected;
+ INT maxCharWidth;
+ WPARAM mouseWParam;
+ LPARAM mouseLParam;
+ int cx;
+ int cy;
+};
+
+#endif // NULLOSFT_MEDIALIBRARY_SKINNED_EDIT_HEADER \ No newline at end of file