OSDN Git Service

Initial version of BrowseRefsDlg
[tortoisegit/TortoiseGitJp.git] / src / Utils / ACListWnd.h
1 #if !defined(AFX_ACWND_H__5CED9BF8_C1CB_4A74_B022_ABA25680CC42__INCLUDED_)\r
2 #define AFX_ACWND_H__5CED9BF8_C1CB_4A74_B022_ABA25680CC42__INCLUDED_\r
3 \r
4 #if _MSC_VER > 1000\r
5 #pragma once\r
6 #endif // _MSC_VER > 1000\r
7 // ACWnd.h : Header-Datei\r
8 //\r
9 \r
10 /*********************************************************************\r
11 *\r
12 * CACListWnd\r
13 * Copyright (c) 200 by Andreas Kapust\r
14 * All rights reserved.\r
15 * info@akinstaller.de\r
16 *\r
17 *********************************************************************/\r
18 \r
19 #include <afxtempl.h>           // CArray\r
20 #define ENAC_UPDATE        WM_USER + 1200 \r
21 /////////////////////////////////////////////////////////////////////////////\r
22 // Fenster CACListWnd \r
23 #define IDTimerInstall 10\r
24 class CACListWnd : public CWnd\r
25 {\r
26         // Konstruktion\r
27 public:\r
28         CACListWnd();\r
29         void Init(CWnd *pWnd);\r
30         bool EnsureVisible(int item,bool m_bWait);\r
31         bool SelectItem(int item);\r
32         int FindString(int nStartAfter, LPCTSTR lpszString, bool m_bDisplayOnly = false);\r
33         int FindStringExact( int nIndexStart, LPCTSTR lpszFind );\r
34         int SelectString(LPCTSTR lpszString );\r
35         bool GetText(int item, CString& m_Text);\r
36         void AddSearchString(LPCTSTR lpszString){m_SearchList.Add(lpszString);}\r
37         void RemoveAll(){m_SearchList.RemoveAll(); m_DisplayList.RemoveAll();}\r
38         CString GetString();\r
39         CString GetNextString(int m_iChar);\r
40 \r
41         void CopyList();\r
42         void SortSearchList(){SortList(m_SearchList);}\r
43         // Attribute\r
44 public:\r
45         CListCtrl m_List;\r
46         CString m_DisplayStr;\r
47         TCHAR m_PrefixChar;\r
48         long m_lMode;\r
49         // Operationen\r
50 public:\r
51         CStringArray m_SearchList;\r
52         // Überschreibungen\r
53         // Vom Klassen-Assistenten generierte virtuelle Funktionsüberschreibungen\r
54         //{{AFX_VIRTUAL(CACListWnd)\r
55         //}}AFX_VIRTUAL\r
56 \r
57         // Implementierung\r
58 public:\r
59         virtual ~CACListWnd();\r
60         void DrawItem(CDC* pDC,long m_lItem,long width);\r
61 \r
62         // Generierte Nachrichtenzuordnungsfunktionen\r
63 protected:\r
64         //{{AFX_MSG(CACListWnd)\r
65         afx_msg void OnPaint();\r
66         afx_msg void OnSize(UINT nType, int cx, int cy);\r
67         afx_msg BOOL OnEraseBkgnd(CDC* pDC);\r
68         afx_msg void OnNcPaint();\r
69         afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);\r
70         afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);\r
71         afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);\r
72         afx_msg void OnActivateApp(BOOL bActive, DWORD dwThreadID);\r
73         afx_msg LRESULT OnNcHitTest(CPoint point);\r
74         afx_msg void OnLButtonDown(UINT nFlags, CPoint point);\r
75         afx_msg void OnRButtonDown(UINT nFlags, CPoint point);\r
76         afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);\r
77         afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);\r
78         afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);\r
79         afx_msg void OnMouseMove(UINT nFlags, CPoint point);\r
80         afx_msg void OnTimer(UINT nIDEvent);\r
81         afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);\r
82         //}}AFX_MSG\r
83         DECLARE_MESSAGE_MAP()\r
84 \r
85         CStringArray m_DisplayList;\r
86         CScrollBar m_VertBar, m_HoriBar;\r
87         CRect m_LastSize, m_ParentRect;\r
88         CFont *pFontDC;\r
89         CFont fontDC, boldFontDC;\r
90         CEdit *m_pEditParent;\r
91         LOGFONT logfont;\r
92 \r
93         int m_nIDTimer;\r
94         long m_lTopIndex,m_lCount,m_ItemHeight,m_VisibleItems,m_lSelItem;\r
95 \r
96         int HitTest(CPoint point);\r
97         void SetScroller();\r
98         void SetProp();\r
99         long ScrollBarWidth();\r
100         void InvalidateAndScroll();\r
101         void SortList(CStringArray& m_List);\r
102         static int CompareString(const void* p1, const void* p2);\r
103 };\r
104 \r
105 /////////////////////////////////////////////////////////////////////////////\r
106 \r
107 //{{AFX_INSERT_LOCATION}}\r
108 // Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein.\r
109 \r
110 #endif // AFX_ACWND_H__5CED9BF8_C1CB_4A74_B022_ABA25680CC42__INCLUDED_\r