Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CtrlMatchTip.h

Go to the documentation of this file.
00001 //
00002 // CtrlMatchTip.h
00003 //
00004 // Copyright (c) Shareaza Development Team, 2002-2005.
00005 // This file is part of SHAREAZA (www.shareaza.com)
00006 //
00007 // Shareaza is free software; you can redistribute it
00008 // and/or modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2 of
00010 // the License, or (at your option) any later version.
00011 //
00012 // Shareaza is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with Shareaza; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 //
00021 
00022 #if !defined(AFX_CTRLMATCHTIP_H__7464D5F3_15C5_4D17_BCCC_DC8B3728565B__INCLUDED_)
00023 #define AFX_CTRLMATCHTIP_H__7464D5F3_15C5_4D17_BCCC_DC8B3728565B__INCLUDED_
00024 
00025 #pragma once
00026 
00027 #include "MetaList.h"
00028 
00029 class CMatchFile;
00030 class CQueryHit;
00031 class CSchema;
00032 
00033 
00034 class CMatchTipCtrl : public CWnd
00035 {
00036 // Construction
00037 public:
00038         CMatchTipCtrl();
00039         virtual ~CMatchTipCtrl();
00040 
00041 // Attributes
00042 protected:
00043         CWnd*                   m_pOwner;
00044         BOOL                    m_bVisible;
00045         CMatchFile*             m_pFile;
00046         CQueryHit*              m_pHit;
00047         CPoint                  m_pOpen;
00048         DWORD                   m_tOpen;
00049 protected:
00050         CString                 m_sName;
00051         CString                 m_sUser;
00052         CString                 m_sSHA1;
00053         CString                 m_sTiger;
00054         CString                 m_sED2K;
00055         CString                 m_sType;
00056         CString                 m_sSize;
00057         CString                 m_sBusy; // Busy status message
00058         CString                 m_sPush; // Firewalled status message
00059         CString                 m_sUnstable; // Unstable status message
00060         int                             m_nIcon;
00061         CString                 m_sStatus;
00062         COLORREF                m_crStatus;
00063         CString                 m_sPartial;
00064         CString                 m_sQueue;
00065         CSchema*                m_pSchema;
00066         CMetaList               m_pMetadata;
00067         int                             m_nKeyWidth;
00068         int                             m_nRating;
00069 protected:
00070         HINSTANCE m_hUser32;
00071         BOOL (WINAPI *m_pfnSetLayeredWindowAttributes)(HWND, COLORREF, BYTE, DWORD);
00072 protected:
00073         static LPCTSTR  m_hClass;
00074         static CBrush   m_brBack;
00075         static COLORREF m_crBack;
00076         static COLORREF m_crText;
00077         static COLORREF m_crBorder;
00078         static COLORREF m_crWarnings; // Colour of warning messages
00079 
00080 // Operations
00081 public:
00082         void            Show(CMatchFile* pFile, CQueryHit* pHit);
00083         void            Hide();
00084 protected:
00085         void            ShowInternal();
00086         void            LoadFromFile();
00087         void            LoadFromHit();
00088         BOOL            LoadTypeInfo();
00089         CSize           ComputeSize();
00090         void            ExpandSize(CDC& dc, CSize& sz, LPCTSTR pszText, int nBase = 0);
00091         void            DrawText(CDC& dc, CPoint& pt, LPCTSTR pszText);
00092 
00093 // Overrides
00094 public:
00095         //{{AFX_VIRTUAL(CMatchTipCtrl)
00096         public:
00097         virtual BOOL Create(CWnd* pParentWnd);
00098         //}}AFX_VIRTUAL
00099 
00100 // Implementation
00101 protected:
00102         //{{AFX_MSG(CMatchTipCtrl)
00103         afx_msg void OnTimer(UINT nIDEvent);
00104         afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00105         afx_msg void OnPaint();
00106         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00107         afx_msg void OnDestroy();
00108         afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00109         afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00110         //}}AFX_MSG
00111         DECLARE_MESSAGE_MAP()
00112 };
00113 
00114 
00115 //{{AFX_INSERT_LOCATION}}
00116 
00117 #define IDC_MATCH_TIP   111
00118 
00119 #endif // !defined(AFX_CTRLMATCHTIP_H__7464D5F3_15C5_4D17_BCCC_DC8B3728565B__INCLUDED_)

Generated on Thu Dec 15 10:39:37 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2