Debian Codegraph @

git/gitCommitListDlg.h

raw
1 //////////////////////////////////////////////////////////////////////////////
2 //////////////////////////////////////////////////////////////////////////////
3 //
4 // copyright : (C) 2014 Eran Ifrah
5 // file name : gitCommitListDlg.h
6 //
7 // -------------------------------------------------------------------------
8 // A
9 // _____ _ _ _ _
10 // / __ \ | | | | (_) |
11 // | / \/ ___ __| | ___| | _| |_ ___
12 // | | / _ \ / _ |/ _ \ | | | __/ _ )
13 // | \__/\ (_) | (_| | __/ |___| | || __/
14 // \____/\___/ \__,_|\___\_____/_|\__\___|
15 //
16 // F i l e
17 //
18 // This program is free software; you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation; either version 2 of the License, or
21 // (at your option) any later version.
22 //
23 //////////////////////////////////////////////////////////////////////////////
24 //////////////////////////////////////////////////////////////////////////////
25
26 //////////////////////////////////////////////////////////////////////////////
27 //////////////////////////////////////////////////////////////////////////////
28 //
29 // copyright : (C) 2011 by René Kraus (aka upCASE)
30 //
31 //////////////////////////////////////////////////////////////////////////////
32
33 #ifndef __gitCommitListDlg__
34 #define __gitCommitListDlg__
35
36 #include "cl_command_event.h"
37 #include "gitui.h"
38 #include "macros.h"
39 #include <map>
40
41 class IProcess;
42 class GitPlugin;
43 class GitCommitListDlg : public GitCommitListDlgBase
44 {
45 GitPlugin* m_git;
46 wxStringMap_t m_diffMap;
47 wxString m_workingDir;
48 wxString m_commandOutput;
49 IProcess* m_process;
50 wxString m_commitList;
51 wxString m_Filter;
52 int m_skip;
53 std::map<int, wxString> m_history;
54
55 protected:
56 virtual void OnCharHook(wxKeyEvent& event);
57 virtual void OnBtnClose(wxCommandEvent& event);
58 virtual void OnNextUpdateUI(wxUpdateUIEvent& event);
59 virtual void OnExtraArgsTextEnter(wxCommandEvent& event);
60 virtual void OnNext(wxCommandEvent& event);
61 virtual void OnPrevious(wxCommandEvent& event);
62 virtual void OnPreviousUI(wxUpdateUIEvent& event);
63 virtual void OnSearchCommitList(wxCommandEvent& event);
64 void DoLoadCommits(const wxString& filter);
65 void ClearAll(bool includingCommitlist = true);
66 wxString GetFilterString() const;
67
68 public:
69 GitCommitListDlg(wxWindow* parent, const wxString& workingDir, GitPlugin* git);
70 ~GitCommitListDlg();
71
72 void SetCommitList(const wxString& commits);
73
74 private:
75 void OnChangeFile(wxCommandEvent& e);
76
77 // Event handlers
78 void OnProcessTerminated(clProcessEvent& event);
79 void OnProcessOutput(clProcessEvent& event);
80
81 protected:
82 virtual void OnOK(wxCommandEvent& event);
83 virtual void OnClose(wxCloseEvent& event);
84 virtual void OnContextMenu(wxDataViewEvent& event);
85 virtual void OnSelectionChanged(wxDataViewEvent& event);
86 void OnRevertCommit(wxCommandEvent& e);
87 void OnCopyCommitHashToClipboard(wxCommandEvent& e);
88 };
89
90 #endif //__gitCommitListDlg__