Debian Codegraph @

git/gitdiffchoosecommitishdlg.h

raw
1 //////////////////////////////////////////////////////////////////////////////
2 //////////////////////////////////////////////////////////////////////////////
3 //
4 // copyright : (C) 2017 Eran Ifrah
5 // file name : gitdiffchoosecommitishdlg.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 #ifndef GITDIFFCHOOSECOMMITISHDLG_H
26 #define GITDIFFCHOOSECOMMITISHDLG_H
27 #include "gitui.h"
28
29 class GitPlugin;
30 class IProcess;
31
32 class GitDiffChooseCommitishDlg : public GitDiffChooseCommitishDlgBase
33 {
34 public:
35 GitDiffChooseCommitishDlg(wxWindow* parent, GitPlugin* plugin);
36 virtual ~GitDiffChooseCommitishDlg();
37
38 wxString GetFirstCommit() const { return m_textFirst->GetValue() + GetAncestorSetting(m_spinCtrl1); }
39 wxString GetSecondCommit() const { return m_textSecond->GetValue() + GetAncestorSetting(m_spinCtrl2); }
40 wxString GetJoiner() const { return m_checkTripleDot->GetValue() ? "..." : " "; }
41
42 protected:
43 GitPlugin* m_plugin;
44 IProcess* m_process;
45
46 int m_selectedRadio1;
47 int m_selectedRadio2;
48 wxItemContainerImmutable* m_activeChoice1; // May be a wxChoice or a wxComboBox
49 wxItemContainerImmutable* m_activeChoice2;
50
51 wxString GetAncestorSetting(wxSpinCtrl* spin) const; // Returns any '~5' setting
52
53 virtual void OnBranch1Changed(wxCommandEvent& event);
54 virtual void OnBranch2Changed(wxCommandEvent& event);
55 virtual void OnRadioBranch1Selected(wxCommandEvent& event);
56 virtual void OnRadioBranch2Selected(wxCommandEvent& event);
57 virtual void OnRadioCommit1Selected(wxCommandEvent& event);
58 virtual void OnRadioCommit2Selected(wxCommandEvent& event);
59 virtual void OnRadioTag1Selected(wxCommandEvent& event);
60 virtual void OnRadioTag2Selected(wxCommandEvent& event);
61 virtual void OnRadioUser1Selected(wxCommandEvent& event);
62 virtual void OnRadioUser2Selected(wxCommandEvent& event);
63 virtual void OnUpdateUIBranch1(wxUpdateUIEvent& event);
64 virtual void OnUpdateUIBranch2(wxUpdateUIEvent& event);
65 virtual void OnUpdateUICommit1(wxUpdateUIEvent& event);
66 virtual void OnUpdateUICommit2(wxUpdateUIEvent& event);
67 virtual void OnUpdateUICommitish1(wxUpdateUIEvent& event);
68 virtual void OnUpdateUICommitish2(wxUpdateUIEvent& event);
69 virtual void OnUpdateUITags1(wxUpdateUIEvent& event);
70 virtual void OnUpdateUITags2(wxUpdateUIEvent& event);
71 virtual void OnTextFirstUI(wxUpdateUIEvent& event);
72 virtual void OnTextSecondUI(wxUpdateUIEvent& event);
73 };
74 #endif // GITDIFFCHOOSECOMMITISHDLG_H