-
Notifications
You must be signed in to change notification settings - Fork 0
/
FindFile.hpp
142 lines (99 loc) · 3.01 KB
/
FindFile.hpp
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#ifndef WAYROUND_I2P_20241125_061830_589717
#define WAYROUND_I2P_20241125_061830_589717
#include <filesystem>
#include <memory>
#include <gtkmm.h>
#include "forward_declarations.hpp"
#include "utils.hpp"
#include "FindTables.hpp"
#include "FindText.hpp"
#include "FindTypes.hpp"
namespace wayround_i2p::ccedit
{
class FindFile
{
public:
static FindFile_shared create(
ProjectCtl_shared p_ctl
);
~FindFile();
protected:
FindFile(ProjectCtl_shared p_ctl);
public:
void setTargetEditor(CodeEditorAbstract_shared editor);
void unsetTargetEditor();
CodeEditorAbstract_shared getTargetEditor();
void start();
void stop();
void show();
void destroy();
FindFileQuery getFindFileQuery();
int setFindFileQuery(FindFileQuery q);
private:
RunOnce destroyer;
FindFile_shared own_ptr;
ProjectCtl_shared p_ctl;
CodeEditorAbstract_weak target_editor;
Gtk::Window win;
// -----------
Gtk::Box main_box;
// -----------
Gtk::Frame editors_frame;
Gtk::Grid editors_grid;
// -----------
Gtk::Label filemask_l;
Gtk::Entry filemask_w;
Gtk::Label subpath_l;
Gtk::Entry subpath_w;
// -----------
Gtk::Frame files_settings_frame;
Gtk::FlowBox files_settings_box;
// -----------
Gtk::CheckButton use_fnmatch_on_path_part_cb;
Gtk::CheckButton recurcive_cb;
Gtk::CheckButton delve_hidden_cb;
Gtk::Box max_depth_box;
Gtk::CheckButton max_depth_cb;
Gtk::SpinButton max_depth_sb;
Gtk::CheckButton fnmatch_cs_cb;
// -----------
Gtk::Frame search_contents_frame;
Gtk::Box search_contents_box;
Gtk::CheckButton search_contents_cb;
Gtk::Frame find_text_widget_frame;
// Gtk::ScrolledWindow find_text_widget_sw;
FindTextWidget find_text_widget;
Gtk::CheckButton dont_show_files_with_0_contents_match_cb;
// -----------
Gtk::Frame button_frame;
Gtk::Box button_box;
Gtk::Button start_btn;
Gtk::ProgressBar progress_bar;
Gtk::Button stop_btn;
Gtk::Paned results_pan;
Gtk::ScrolledWindow result_files_sw;
Gtk::ListView result_files;
Gtk::ScrolledWindow result_lines_sw;
Gtk::ListView result_lines;
void setup_result_filelist();
void setup_result_linelist();
FindFileQuery work_time_query;
bool search_stop_flag = false;
bool search_working = false;
int start_search_thread();
void stop_search_thread();
void search_thread();
int search_thread_search_contents(FindFileResultTreeItemP item);
void updateProgressbar(
unsigned int dirs_count,
unsigned int dirs_done,
unsigned int files_count,
unsigned int files_done
);
void on_filelist_activate(gint);
void on_start_btn();
void on_stop_btn();
void on_destroy_sig();
};
} // namespace wayround_i2p::ccedit
#endif