NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
revisiondialog.hpp
Go to the documentation of this file.
1/*****************************************************************************
2 NumeRe: Framework fuer Numerische Rechnungen
3 Copyright (C) 2019 Erik Haenel et al.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17******************************************************************************/
18
19
20#ifndef REVISIONDIALOG_HPP
21#define REVISIONDIALOG_HPP
22
23#include <wx/wx.h>
24#include "../../common/filerevisions.hpp"
25#include "../controls/treelistctrl.h"
26
27class NumeReWindow;
28
34class RevisionDialog : public wxDialog
35{
36 private:
38 wxcode::wxTreeListCtrl* revisionList;
39 wxTreeItemId clickedItem;
43
45 void showRevision(const wxString& revString);
46 void compareRevisions(const wxString& rev1, const wxString& rev2);
47
48 // Event handling functions
49 void OnRightClick(wxTreeEvent& event);
50 void OnItemActivated(wxTreeEvent& event);
51 void OnMenuEvent(wxCommandEvent& event);
52
53 public:
54 RevisionDialog(wxWindow* parent, FileRevisions* rev, const wxString& fileNameAndPath);
55
57 {
58 if (revisions)
59 delete revisions;
60 }
61
63};
64
65
66
67#endif // REVISIONDIALOG_HPP
68
69
This class is the actual NumeRe main frame. The application's logic is implemented here.
Definition: NumeReWindow.h:177
This class represents the dialog listing the file revisions of the current selected file.
void compareRevisions(const wxString &rev1, const wxString &rev2)
This method compares two defined revisions and opens them as a diff file in the editor.
void OnMenuEvent(wxCommandEvent &event)
This method handles the menu events emitted from the context menu.
void OnRightClick(wxTreeEvent &event)
This method displays the context menu containing the actions.
FileRevisions * revisions
wxTreeItemId clickedItem
void OnItemActivated(wxTreeEvent &event)
This method displays the double-clicked revision.
wxString currentFileName
wxcode::wxTreeListCtrl * revisionList
void populateRevisionList()
This method pupulates the tree list ctrl.
wxString currentFilePath
void showRevision(const wxString &revString)
This method displays the selected revision in the editor.
NumeReWindow * mainWindow
RevisionDialog(wxWindow *parent, FileRevisions *rev, const wxString &fileNameAndPath)
Constructor. Creates the window and populates the tree list ctrl.