Update editorconfig
[TortoiseGit.git] / src / Utils / ACEdit.h
blob72a69b2b56d5c4a9fce5908a9eb0337412b1a6fa
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_
11 #if _MSC_VER > 1000
12 #pragma once
13 #endif // _MSC_VER > 1000
14 // ACEdit.h : Header-Datei
17 /*********************************************************************
19 * CACEdit
20 * Copyright (c) 2003 by Andreas Kapust
21 * All rights reserved.
22 * info@akinstaller.de
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 /////////////////////////////////////////////////////////////////////////////
43 // Fenster CACEdit
44 #include "ACListWnd.h"
47 class CACEdit : public CWnd //CEdit
49 // Konstruktion
50 public:
51 CACEdit();
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_);
60 // CComboBox
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 );
68 void ResetContent();
69 int GetCurSel();
70 // Attribute
71 public:
72 void Init();
73 void AddSearchString(LPCTSTR lpszString);
74 void AddSearchStrings(LPCTSTR Strings[]);
75 void RemoveSearchAll();
76 void SetStartDirectory(LPCTSTR lpszString);
77 // Operationen
78 public:
80 // Überschreibungen
81 // Vom Klassen-Assistenten generierte virtuelle Funktionsüberschreibungen
82 //{{AFX_VIRTUAL(CACEdit)
83 public:
84 virtual BOOL PreTranslateMessage(MSG* pMsg);
85 //}}AFX_VIRTUAL
87 // Implementierung
88 public:
89 virtual ~CACEdit();
90 CACListWnd m_Liste;
91 // Generierte Nachrichtenzuordnungsfunktionen
92 protected:
93 CString m_EditText, m_SeparationStr,m_LastDirectory;
94 TCHAR m_PrefixChar;
95 int m_iMode;
96 //{{AFX_MSG(CACEdit)
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();
101 //}}AFX_MSG
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);
113 bool m_CursorMode;
114 int m_iType;
115 CEdit *m_pEdit;
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_