-
Notifications
You must be signed in to change notification settings - Fork 1
/
main_window.cxx
89 lines (84 loc) · 4.3 KB
/
main_window.cxx
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
// generated by Fast Light User Interface Designer (fluid) version 1.0308
#include "main_window.h"
void main_window::cb_OpenUpdatePage_i(Fl_Button*, void*) {
fl_open_uri("https://github.com/asolidtime/nomoreleeches/releases");
}
void main_window::cb_OpenUpdatePage(Fl_Button* o, void* v) {
((main_window*)(o->parent()->user_data()))->cb_OpenUpdatePage_i(o,v);
}
void main_window::cb_OpenAboutPage_i(Fl_Button*, void*) {
fl_open_uri("https://github.com/asolidtime/nomoreleeches/");
}
void main_window::cb_OpenAboutPage(Fl_Button* o, void* v) {
((main_window*)(o->parent()->user_data()))->cb_OpenAboutPage_i(o,v);
}
Fl_Menu_Item main_window::menu_ColorThemeChooser[] = {
{"Dark", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"Black", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"Gray", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"Tan", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{"Shake", 0, 0, 0, 0, (uchar)FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0}
};
main_window::main_window() {
{ NMLRootWindow = new Fl_Window(315, 555, "NoMoreLeeches v0.1");
NMLRootWindow->labelfont(4);
NMLRootWindow->user_data((void*)(this));
{ ToggleNMLButton = new Fl_Button(10, 10, 140, 60, "Enable NML\n(currently disabled)");
ToggleNMLButton->tooltip("Disable or enable NML.");
} // Fl_Button* ToggleNMLButton
{ BlockedWindownamesEdit = new Fl_Text_Editor(10, 150, 295, 140, "Blocked Window Classes (one per line)");
BlockedWindownamesEdit->tooltip("If a window\'s class is in this list, it\'ll be blocked.");
BlockedWindownamesEdit->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Text_Editor* BlockedWindownamesEdit
{ BlockedWildcardsEdit = new Fl_Text_Editor(10, 312, 295, 130, "Blocked Wildcards (one per line)");
BlockedWildcardsEdit->tooltip("If any of these strings are found in a window\'s name, that window will be bl\
ocked.");
BlockedWildcardsEdit->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Text_Editor* BlockedWildcardsEdit
{ OpenUpdatePage = new Fl_Button(165, 10, 140, 20, "Open Update Page");
OpenUpdatePage->tooltip("Opens NML\'s download page. Make sure to get the newest version!");
OpenUpdatePage->callback((Fl_Callback*)cb_OpenUpdatePage);
} // Fl_Button* OpenUpdatePage
{ OpenAboutPage = new Fl_Button(165, 30, 140, 20, "GitHub page");
OpenAboutPage->tooltip("Show information about NML.");
OpenAboutPage->callback((Fl_Callback*)cb_OpenAboutPage);
} // Fl_Button* OpenAboutPage
{ SaveBlocklistButton = new Fl_Button(165, 50, 140, 20, "Save Block Options");
} // Fl_Button* SaveBlocklistButton
{ Fl_Text_Display* o = new Fl_Text_Display(10, 457, 50, 30, "Window Name:");
o->box(FL_NO_BOX);
o->labelsize(13);
o->align(Fl_Align(FL_ALIGN_BOTTOM_LEFT));
} // Fl_Text_Display* o
{ Fl_Text_Display* o = new Fl_Text_Display(10, 486, 50, 30, "Window Class:");
o->box(FL_NO_BOX);
o->labelsize(13);
o->align(Fl_Align(FL_ALIGN_BOTTOM_LEFT));
} // Fl_Text_Display* o
{ CurrentWindowNameOutput = new Fl_Output(115, 483, 189, 28);
CurrentWindowNameOutput->labeltype(FL_NO_LABEL);
CurrentWindowNameOutput->labelfont(4);
CurrentWindowNameOutput->textfont(4);
CurrentWindowNameOutput->textsize(10);
} // Fl_Output* CurrentWindowNameOutput
{ CurrentWindowClassOutput = new Fl_Output(115, 512, 189, 28);
CurrentWindowClassOutput->labeltype(FL_NO_LABEL);
CurrentWindowClassOutput->labelfont(4);
CurrentWindowClassOutput->textfont(4);
CurrentWindowClassOutput->textsize(10);
} // Fl_Output* CurrentWindowClassOutput
{ ColorThemeChooser = new Fl_Choice(105, 107, 200, 20, "Color Theme:");
ColorThemeChooser->down_box(FL_BORDER_BOX);
ColorThemeChooser->menu(menu_ColorThemeChooser);
} // Fl_Choice* ColorThemeChooser
{ LockdownButton = new Fl_Button(10, 75, 295, 25, "ENTER LOCKDOWN MODE");
} // Fl_Button* LockdownButton
{ BlockedWindowDelayInput = new Fl_Int_Input(170, 448, 135, 28, "Blocked window delay:");
BlockedWindowDelayInput->tooltip("The amount of time you\'ll need to wait before a blocked window is shown. Set\
this to a negative number to hide them forever.");
BlockedWindowDelayInput->type(2);
} // Fl_Int_Input* BlockedWindowDelayInput
NMLRootWindow->end();
} // Fl_Window* NMLRootWindow
}