1 #include "invertwindow.h"
4 #define _(String) gettext(String)
5 #define gettext_noop(String) String
6 #define N_(String) gettext_noop (String)
9 InvertThread::InvertThread(InvertMain *client)
12 this->client = client;
13 synchronous = 1; // make thread wait for join
17 InvertThread::~InvertThread()
21 void InvertThread::run()
23 window = new InvertWindow(client);
24 window->create_objects();
35 InvertWindow::InvertWindow(InvertMain *client)
36 : BC_Window("", MEGREY, client->gui_string, 100, 60, 100, 60, 0, !client->show_initially)
37 { this->client = client; }
39 InvertWindow::~InvertWindow()
44 int InvertWindow::create_objects()
47 add_tool(new BC_Title(x, y, _("Invert")));
49 add_tool(invert = new InvertToggle(client, &(client->invert), x, y));
52 int InvertWindow::close_event()
55 client->send_hide_gui();
58 InvertToggle::InvertToggle(InvertMain *client, int *output, int x, int y)
59 : BC_CheckBox(x, y, 16, 16, *output)
61 this->client = client;
62 this->output = output;
64 InvertToggle::~InvertToggle()
67 int InvertToggle::handle_event()
69 *output = get_value();
70 client->send_configure_change();