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_ACEDIT_H__56D21C13_ECEA_41DF_AADF_55980E861AC2__INCLUDED_)
9 #define AFX_ACEDIT_H__56D21C13_ECEA_41DF_AADF_55980E861AC2__INCLUDED_
13 #endif // _MSC_VER > 1000
14 // ACEdit.h : Header-Datei
17 /*********************************************************************
20 * Copyright (c) 2003 by Andreas Kapust
21 * All rights reserved.
24 *********************************************************************/
27 #define _MODE_ONLY_FILES (1L << 16)
28 #define _MODE_ONLY_DIRS (1L << 17)
30 #define _MODE_STANDARD_ (1L << 0)
31 #define _MODE_SEPARATION_ (1L << 1)
32 #define _MODE_FILESYSTEM_ (1L << 2)
33 #define _MODE_FS_START_DIR_ (1L << 3)
34 #define _MODE_CURSOR_O_LIST_ (1L << 4)
35 #define _MODE_FIND_ALL_ (1L << 5)
37 #define _MODE_FS_ONLY_FILE_ (_MODE_FILESYSTEM_|_MODE_ONLY_FILES)
38 #define _MODE_FS_ONLY_DIR_ (_MODE_FILESYSTEM_|_MODE_ONLY_DIRS)
39 #define _MODE_SD_ONLY_FILE_ (_MODE_FS_START_DIR_|_MODE_ONLY_FILES)
40 #define _MODE_SD_ONLY_DIR_ (_MODE_FS_START_DIR_|_MODE_ONLY_DIRS) //Fix 1.2
42 /////////////////////////////////////////////////////////////////////////////
44 #include "ACListWnd.h"
47 class CACEdit
: public CWnd
//CEdit
52 void SetMode(int iMode
=_MODE_STANDARD_
);
53 void SetSeparator(LPCTSTR lpszString
,TCHAR lpszPrefixChar
= 0)
55 m_SeparationStr
= lpszString
;
56 m_Liste
.m_PrefixChar
= m_PrefixChar
= lpszPrefixChar
;
57 SetMode(_MODE_SEPARATION_
);
61 int AddString( LPCTSTR lpszString
);
62 int GetLBText( int nIndex
, LPTSTR lpszText
);
63 void GetLBText( int nIndex
, CString
& rString
);
64 int SetDroppedWidth(UINT nWidth
);
65 int FindString( int nStartAfter
, LPCTSTR lpszString
);
66 int SelectString( int nStartAfter
, LPCTSTR lpszString
);
67 void ShowDropDown(BOOL bShowIt
= TRUE
);
73 void AddSearchString(LPCTSTR lpszString
);
74 void AddSearchStrings(LPCTSTR Strings
[]);
75 void RemoveSearchAll();
76 void SetStartDirectory(LPCTSTR lpszString
);
81 // Vom Klassen-Assistenten generierte virtuelle Funktionsüberschreibungen
82 //{{AFX_VIRTUAL(CACEdit)
84 virtual BOOL
PreTranslateMessage(MSG
* pMsg
);
91 // Generierte Nachrichtenzuordnungsfunktionen
93 CString m_EditText
, m_SeparationStr
,m_LastDirectory
;
97 afx_msg
void OnKillfocus();
98 afx_msg
void OnKeyDown(UINT nChar
, UINT nRepCnt
, UINT nFlags
);
99 afx_msg
void OnChange();
100 afx_msg
void OnCloseList();
103 afx_msg LRESULT
OnUpdateFromList(WPARAM lParam
, LPARAM wParam
);
104 DECLARE_MESSAGE_MAP()
107 void ReadDirectory(CString m_Dir
);
108 int FindSepLeftPos(int pos
, bool FindSepLeftPos
= false);
109 int FindSepLeftPos2(int pos
);
110 int FindSepRightPos(int pos
);
111 bool HandleKey(UINT nChar
, bool m_bFromChild
);
117 TCHAR m_szDrive
[_MAX_DRIVE
], m_szDir
[_MAX_DIR
],m_szFname
[_MAX_FNAME
], m_szExt
[_MAX_EXT
];
120 /////////////////////////////////////////////////////////////////////////////
122 //{{AFX_INSERT_LOCATION}}
123 // Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein.
125 #endif // AFX_ACEDIT_H__56D21C13_ECEA_41DF_AADF_55980E861AC2__INCLUDED_