-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStringTableViewer.h
More file actions
104 lines (82 loc) · 2.15 KB
/
StringTableViewer.h
File metadata and controls
104 lines (82 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#pragma once
#include <gtkmm.h>
#include <regex>
#include "libInfinite/ContentTable.h"
#include "libInfinite/Item.h"
class StringTableViewer : public Gtk::Box{
public:
StringTableViewer();
~StringTableViewer();
void setItem(Item* item);
private:
Gtk::Box* HBox;
// start easily copyable code
Gtk::Frame* viewFrame;
Gtk::ScrolledWindow* scroller;
Gtk::TreeView* view;
Glib::RefPtr<Gtk::TreeStore> store;
// Columns
Gtk::TreeViewColumn* IndexViewColumn;
Gtk::TreeViewColumn* TypeViewColumn;
Gtk::TreeViewColumn* StringViewColumn;
Gtk::TreeViewColumn* IsValidViewColumn;
// Columns for the TreeStore
Gtk::TreeModelColumn<int> IndexColumn;
Gtk::TreeModelColumn<int> TypeColumn;
Gtk::TreeModelColumn<std::string> StringColumn;
Gtk::TreeModelColumn<bool> IsValidColumn;
enum{
INDEX_COLUMN,
TYPE_COLUMN,
STRING_COLUMN,
ISVALID_COLUMN
};
Item* item;
// settings
Gtk::Separator* settingsSeparator;
Gtk::Box* settingsBox; // contain the different settings for the viewer
Gtk::Label* settingsLabel;
// regex filter
Glib::RefPtr<Gtk::CssProvider> cssProvider;
Gtk::SearchEntry* regexEntry;
Gtk::Label* regexLabel;
Gtk::CheckButton* regexMode;
Gtk::CheckButton* regexExcludeButton;
bool regexFullMatch;
bool regexExclude;
std::regex stringRegex;
// valid/invalid/both indicies
Gtk::ComboBoxText* validIndiciesBox;
Gtk::Label* validIndiciesLabel;
// remove duplicate Entries
Gtk::ToggleButton* showDuplicatesButton;
bool showDuplicates;
enum{
INDEX_VALID,
INDEX_INVALID,
INDEX_BOTH
};
int indexMode;
int page;
int pageSize;
int pageCount;
Gtk::Separator* pageSeparator;
Gtk::Label* pageCountLabel;
Gtk::SpinButton* pageSizeSpinner;
Gtk::Label* pageNumberLabel;
Gtk::SpinButton* pageNumberButton;
// status bar
Gtk::Box* statusBar;
Gtk::Label* statusStringCountLabel;
Gtk::Label* statusStringCount;
Gtk::Separator* statusSeparator1;
Gtk::Label* statusUniqueCountLabel;
Gtk::Label* statusUniqueCount;
std::map<uint32_t,TagRefFieldTableEntry*> uniqueEntries;
uint32_t displayableStrings;
bool regexCheck(std::string str);
void updatePaging();
void calculateCounts();
void updateRecord();
void filterUniqueEntries();
};