/
GotoFileDlg.h
67 lines (55 loc) · 1.68 KB
/
GotoFileDlg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*******************************************************************************
*
* Copyright (C) 2009, Alexander Stigsen, e-texteditor.com
*
* This software is licensed under the Open Company License as described
* in the file license.txt, which you should have received as part of this
* distribution. The terms are also available at http://opencompany.org/license.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
******************************************************************************/
#ifndef __GOTOFILEDLG_H__
#define __GOTOFILEDLG_H__
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#include <vector>
class ProjectInfoHandler;
class cxProjectInfo;
class GotoFileList;
class FileEntry;
class DirState;
class GotoFileDlg : public wxDialog {
public:
GotoFileDlg(wxWindow *parent, ProjectInfoHandler& project);
~GotoFileDlg();
const wxString& GetSelection() const;
const wxString GetTrigger() const;
private:
void BuildFileList(const wxString& path);
void UpdateStatusbar();
// Event handlers
void OnSearch(wxCommandEvent& event);
void OnAction(wxCommandEvent& event);
void OnListSelection(wxCommandEvent& event);
void OnSearchChar(wxKeyEvent& event);
void OnSize(wxSizeEvent& event);
void OnIdle(wxIdleEvent& event);
DECLARE_EVENT_TABLE();
// Member variables
ProjectInfoHandler& m_project;
std::vector<FileEntry*> m_files;
bool m_isDone;
// Dir traversing state
bool m_filesLoaded;
std::vector<DirState*> m_dirStack;
std::vector<cxProjectInfo*> m_filters;
// Ctrls
wxTextCtrl* m_searchCtrl;
GotoFileList* m_cmdList;
wxStaticText* m_pathStatic;
};
#endif // __GOTOFILEDLG_H__