00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_CTRLLIBRARYMETAPANEL_H__A50ED736_E285_4656_903C_8C32D565ABD5__INCLUDED_)
00023 #define AFX_CTRLLIBRARYMETAPANEL_H__A50ED736_E285_4656_903C_8C32D565ABD5__INCLUDED_
00024
00025 #pragma once
00026
00027 #include "CtrlLibraryPanel.h"
00028 #include "MetaPanel.h"
00029
00030 class CSchema;
00031 class CLibraryFile;
00032
00033
00034 class CLibraryMetaPanel : public CLibraryPanel
00035 {
00036
00037 public:
00038 CLibraryMetaPanel();
00039 virtual ~CLibraryMetaPanel();
00040
00041 DECLARE_DYNCREATE(CLibraryMetaPanel)
00042
00043
00044 protected:
00045 int m_nSelected;
00046 DWORD m_nIndex;
00047 BOOL m_bNewFile;
00048 CString m_sName;
00049 CString m_sPath;
00050 CString m_sFolder;
00051 CString m_sType;
00052 CString m_sSize;
00053 int m_nIcon32;
00054 int m_nIcon48;
00055 int m_nRating;
00056 CSchema* m_pSchema;
00057 CMetaPanel m_pMetadata;
00058 CRect m_rcFolder;
00059 CRect m_rcRating;
00060 int m_nScrollWheelLines;
00061 protected:
00062 CCriticalSection m_pSection;
00063 CEvent m_pWakeup;
00064 HANDLE m_hThread;
00065 BOOL m_bThread;
00066 CSize m_szThumb;
00067 CBitmap m_bmThumb;
00068 COLORREF m_crLight;
00069 int m_nThumbSize;
00070 CString m_sThumb;
00071
00072
00073 public:
00074 virtual BOOL CheckAvailable(CLibraryTreeItem* pFolders, CLibraryList* pObjects);
00075 virtual void Update();
00076 protected:
00077 void DrawText(CDC* pDC, int nX, int nY, LPCTSTR pszText, RECT* pRect = NULL);
00078 void DrawThumbnail(CDC* pDC, CRect& rcClient, CRect& rcWork);
00079 void DrawThumbnail(CDC* pDC, CRect& rcThumb);
00080 protected:
00081 static UINT ThreadStart(LPVOID pParam);
00082 void OnRun();
00083
00084
00085 public:
00086
00087
00088
00089
00090 protected:
00091
00092 afx_msg void OnPaint();
00093 afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
00094 afx_msg void OnSize(UINT nType, int cx, int cy);
00095 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00096 afx_msg void OnDestroy();
00097 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00098 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00099 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00100 afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
00101
00102
00103 DECLARE_MESSAGE_MAP()
00104
00105 };
00106
00107
00108
00109 #endif // !defined(AFX_CTRLLIBRARYMETAPANEL_H__A50ED736_E285_4656_903C_8C32D565ABD5__INCLUDED_)