1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (c) 2003 by Andreas Kapust <info@akinstaller.de>; <http://www.codeproject.com/Articles/2607/AutoComplete-without-IAutoComplete>
4 // Copyright (C) 2009,2012-2013 - TortoiseGit
6 // Licensed under: The Code Project Open License (CPOL); <http://www.codeproject.com/info/cpol10.aspx>
8 #if !defined(AFX_ACWND_H__5CED9BF8_C1CB_4A74_B022_ABA25680CC42__INCLUDED_)
9 #define AFX_ACWND_H__5CED9BF8_C1CB_4A74_B022_ABA25680CC42__INCLUDED_
13 #endif // _MSC_VER > 1000
14 // ACWnd.h : Header-Datei
17 /*********************************************************************
20 * Copyright (c) 200 by Andreas Kapust
21 * All rights reserved.
24 *********************************************************************/
26 #include <afxtempl.h> // CArray
27 #define ENAC_UPDATE WM_USER + 1200
28 /////////////////////////////////////////////////////////////////////////////
30 #define IDTimerInstall 10
31 class CACListWnd
: public CWnd
36 void Init(CWnd
*pWnd
);
37 bool EnsureVisible(int item
,bool m_bWait
);
38 bool SelectItem(int item
);
39 int FindString(int nStartAfter
, LPCTSTR lpszString
, bool m_bDisplayOnly
= false);
40 int FindStringExact( int nIndexStart
, LPCTSTR lpszFind
);
41 int SelectString(LPCTSTR lpszString
);
42 bool GetText(int item
, CString
& m_Text
);
43 void AddSearchString(LPCTSTR lpszString
){m_SearchList
.Add(lpszString
);}
44 void RemoveAll(){m_SearchList
.RemoveAll(); m_DisplayList
.RemoveAll();}
46 CString
GetNextString(int m_iChar
);
49 void SortSearchList(){SortList(m_SearchList
);}
58 CStringArray m_SearchList
;
60 // Vom Klassen-Assistenten generierte virtuelle Funktionsüberschreibungen
61 //{{AFX_VIRTUAL(CACListWnd)
66 virtual ~CACListWnd();
67 void DrawItem(CDC
* pDC
,long m_lItem
,long width
);
69 // Generierte Nachrichtenzuordnungsfunktionen
71 //{{AFX_MSG(CACListWnd)
72 afx_msg
void OnPaint();
73 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
74 afx_msg BOOL
OnEraseBkgnd(CDC
* pDC
);
75 afx_msg
void OnNcPaint();
76 afx_msg
void OnKeyDown(UINT nChar
, UINT nRepCnt
, UINT nFlags
);
77 afx_msg
void OnNcCalcSize(BOOL bCalcValidRects
, NCCALCSIZE_PARAMS FAR
* lpncsp
);
78 afx_msg
void OnVScroll(UINT nSBCode
, UINT nPos
, CScrollBar
* pScrollBar
);
79 afx_msg
void OnActivateApp(BOOL bActive
, DWORD dwThreadID
);
80 afx_msg LRESULT
OnNcHitTest(CPoint point
);
81 afx_msg
void OnLButtonDown(UINT nFlags
, CPoint point
);
82 afx_msg
void OnRButtonDown(UINT nFlags
, CPoint point
);
83 afx_msg BOOL
OnSetCursor(CWnd
* pWnd
, UINT nHitTest
, UINT message
);
84 afx_msg
void OnShowWindow(BOOL bShow
, UINT nStatus
);
85 afx_msg
void OnNcLButtonDown(UINT nHitTest
, CPoint point
);
86 afx_msg
void OnMouseMove(UINT nFlags
, CPoint point
);
87 afx_msg
void OnTimer(UINT_PTR nIDEvent
);
88 afx_msg
void OnGetMinMaxInfo(MINMAXINFO FAR
* lpMMI
);
92 CStringArray m_DisplayList
;
93 CScrollBar m_VertBar
, m_HoriBar
;
94 CRect m_LastSize
, m_ParentRect
;
96 CFont fontDC
, boldFontDC
;
101 long m_lTopIndex
,m_lCount
,m_ItemHeight
,m_VisibleItems
,m_lSelItem
;
103 int HitTest(CPoint point
);
106 long ScrollBarWidth();
107 void InvalidateAndScroll();
108 void SortList(CStringArray
& m_List
);
109 static int CompareString(const void* p1
, const void* p2
);
112 /////////////////////////////////////////////////////////////////////////////
114 //{{AFX_INSERT_LOCATION}}
115 // Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein.
117 #endif // AFX_ACWND_H__5CED9BF8_C1CB_4A74_B022_ABA25680CC42__INCLUDED_