Cadabra
Computer algebra system for field theory problems
Toggle main menu visibility
Loading...
Searching...
No Matches
frontend
gtkmm
DiffViewer.hh
Go to the documentation of this file.
1
#pragma once
2
3
#include <gtkmm.h>
4
#include <gtkmm/frame.h>
5
#include <string>
6
#include <istream>
7
8
class
DiffTextView
:
public
Gtk::TextView {
9
public
:
10
DiffTextView
();
11
};
12
13
class
CellDiff
:
public
Gtk::Frame {
14
public
:
15
CellDiff
(
const
std::string& a,
const
std::string& b);
16
17
protected
:
18
void
compare
(
const
std::string& a_str,
const
std::string& b_str);
19
Gtk::Grid
grid
;
20
DiffTextView
tv_lhs
,
tv_rhs
;
21
Gtk::ScrolledWindow
sw_lhs
,
sw_rhs
;
22
};
23
24
class
DiffViewer
:
public
Gtk::Dialog {
25
public
:
26
DiffViewer
(std::istream& a, std::istream& b, Gtk::Window& parent);
27
void
run_noblock
();
28
protected
:
29
using
Cells
= std::pair<std::vector<std::string>, std::vector<std::string>>;
30
31
void
populate
(std::istream& a, std::istream& b);
32
Cells
make_cells
(std::istream& stream);
33
34
Gtk::Box
box
;
35
Gtk::ScrolledWindow
scrolled_window
;
36
std::vector<CellDiff>
cells
;
37
};
CellDiff::tv_lhs
DiffTextView tv_lhs
Definition
DiffViewer.hh:20
CellDiff::compare
void compare(const std::string &a_str, const std::string &b_str)
Definition
DiffViewer.cc:52
CellDiff::grid
Gtk::Grid grid
Definition
DiffViewer.hh:19
CellDiff::sw_rhs
Gtk::ScrolledWindow sw_rhs
Definition
DiffViewer.hh:21
CellDiff::tv_rhs
DiffTextView tv_rhs
Definition
DiffViewer.hh:20
CellDiff::sw_lhs
Gtk::ScrolledWindow sw_lhs
Definition
DiffViewer.hh:21
CellDiff::CellDiff
CellDiff(const std::string &a, const std::string &b)
Definition
DiffViewer.cc:24
DiffTextView
Definition
DiffViewer.hh:8
DiffTextView::DiffTextView
DiffTextView()
Definition
DiffViewer.cc:12
DiffViewer::populate
void populate(std::istream &a, std::istream &b)
Definition
DiffViewer.cc:156
DiffViewer::box
Gtk::Box box
Definition
DiffViewer.hh:34
DiffViewer::cells
std::vector< CellDiff > cells
Definition
DiffViewer.hh:36
DiffViewer::DiffViewer
DiffViewer(std::istream &a, std::istream &b, Gtk::Window &parent)
Definition
DiffViewer.cc:128
DiffViewer::make_cells
Cells make_cells(std::istream &stream)
Definition
DiffViewer.cc:184
DiffViewer::Cells
std::pair< std::vector< std::string >, std::vector< std::string > > Cells
Definition
DiffViewer.hh:29
DiffViewer::run_noblock
void run_noblock()
Definition
DiffViewer.cc:147
DiffViewer::scrolled_window
Gtk::ScrolledWindow scrolled_window
Definition
DiffViewer.hh:35
Generated by
1.17.0