summaryrefslogtreecommitdiff
path: root/plugins/FloatingContacts/thumbs.h
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-05-17 17:37:22 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-05-17 17:37:22 +0000
commit78d71d2cad6f243c6ff31d41380b8c5b58407de5 (patch)
treed0c05983b315352c5e66d23420da4b8fd8b5aff4 /plugins/FloatingContacts/thumbs.h
parenta9e8daee448c229aa3f8ded0c5f5c0fe7aa42529 (diff)
added some plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@20 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FloatingContacts/thumbs.h')
-rw-r--r--plugins/FloatingContacts/thumbs.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/plugins/FloatingContacts/thumbs.h b/plugins/FloatingContacts/thumbs.h
new file mode 100644
index 0000000000..ee6db80097
--- /dev/null
+++ b/plugins/FloatingContacts/thumbs.h
@@ -0,0 +1,74 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+#define USERNAME_LEN 50
+class CDropTarget;
+
+typedef struct _DockOpt
+{
+ HWND hwndLeft;
+ HWND hwndRight;
+}
+DockOpt;
+
+struct ThumbInfo
+{
+public: // TODO: make private
+ HWND hwnd;
+ TCHAR ptszName[ USERNAME_LEN ];
+ HANDLE hContact;
+ int iIcon;
+ CDropTarget * dropTarget;
+ DockOpt dockOpt;
+ BOOL fTipActive;
+ BOOL fTipTimerActive;
+ POINT ptTipSt;
+
+ BYTE btAlpha;
+ MyBitmap bmpContent;
+
+ POINT ptPos;
+ SIZE szSize;
+
+public:
+ ThumbInfo();
+ ~ThumbInfo();
+
+ void GetThumbRect (RECT *rc);
+ void PositionThumb (short nX, short nY);
+ void PositionThumbWorker (short nX, short nY, POINT *rcNewPos);
+ void ResizeThumb ();
+ void RefreshContactIcon (int iIcon);
+ void RefreshContactStatus (int idStatus);
+ void DeleteContactPos ();
+ void OnLButtonDown (short nX, short nY);
+ void OnLButtonUp ();
+ void OnMouseMove (short nX, short nY, WPARAM wParam);
+ void ThumbSelect (BOOL bMouse);
+ void ThumbDeselect (BOOL bMouse);
+ void SetThumbOpacity (BYTE btAlpha);
+ void KillTip ();
+ void UpdateContent ();
+ void PopUpMessageDialog ();
+ void OnTimer (BYTE idTimer);
+};
+
+void UndockThumbs ( ThumbInfo *pThumb1, ThumbInfo *pThumb2 );
+void DockThumbs ( ThumbInfo *pThumbLeft, ThumbInfo *pThumbRight, BOOL bMoveLeft );
+
+class ThumbList: public LIST<ThumbInfo>
+{
+public:
+ ThumbList();
+ ~ThumbList();
+
+ ThumbInfo* AddThumb (HWND hwnd, TCHAR *ptszName, HANDLE hContact);
+ void RemoveThumb (ThumbInfo *pThumb);
+
+ ThumbInfo* FindThumb (HWND hwnd);
+ ThumbInfo* FindThumbByContact (HANDLE hContact);
+
+private:
+ static int cmp(const ThumbInfo *p1, const ThumbInfo *p2);
+};
+
+extern ThumbList thumbList;