| 1 |
////////////////////////////////////////////////////////////////////////////// |
| 2 |
////////////////////////////////////////////////////////////////////////////// |
| 3 |
// |
| 4 |
// copyright : (C) 2014 Eran Ifrah |
| 5 |
// file name : gitDiffDlg.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 __gitDiffDlg__ |
| 34 |
#define __gitDiffDlg__ |
| 35 |
|
| 36 |
#include "cl_command_event.h" |
| 37 |
#include "gitui.h" |
| 38 |
#include "macros.h" |
| 39 |
#include <map> |
| 40 |
|
| 41 |
class GitCommitEditor; |
| 42 |
class IProcess; |
| 43 |
class GitPlugin; |
| 44 |
|
| 45 |
class GitDiffDlg : public GitDiffDlgBase |
| 46 |
{ |
| 47 |
wxStringMap_t m_diffMap; |
| 48 |
wxString m_workingDir; |
| 49 |
wxString m_commits; // Empty unless the ChooseCommits dialog is used |
| 50 |
wxString m_commandOutput; |
| 51 |
GitPlugin* m_plugin; |
| 52 |
IProcess* m_process; |
| 53 |
|
| 54 |
public: |
| 55 |
GitDiffDlg(wxWindow* parent, const wxString& workingDir, GitPlugin* plugin); |
| 56 |
~GitDiffDlg(); |
| 57 |
|
| 58 |
private: |
| 59 |
void OnChangeFile(wxCommandEvent& e); |
| 60 |
|
| 61 |
DECLARE_EVENT_TABLE(); |
| 62 |
|
| 63 |
protected: |
| 64 |
virtual void OnOptionsChanged(wxCommandEvent& event); |
| 65 |
wxString PrepareCommand() const; |
| 66 |
void CreateDiff(); |
| 67 |
void SetDiff(const wxString& diff); |
| 68 |
void OnProcessTerminated(clProcessEvent& event); |
| 69 |
void OnProcessOutput(clProcessEvent& event); |
| 70 |
|
| 71 |
virtual void OnChoseCommits(wxCommandEvent& event); |
| 72 |
}; |
| 73 |
|
| 74 |
#endif //__gitDiffDlg__ |