r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / plugins / invertvideo / invertwindow.C
blobc4b2241d49e253c5dd45bbc163c2f1b10ed6baa2
1 #include "invertwindow.h"
3 #include <libintl.h>
4 #define _(String) gettext(String)
5 #define gettext_noop(String) String
6 #define N_(String) gettext_noop (String)
9 InvertThread::InvertThread(InvertMain *client)
10  : Thread()
12         this->client = client;
13         synchronous = 1; // make thread wait for join
14         gui_started.lock();
17 InvertThread::~InvertThread()
20         
21 void InvertThread::run()
23         window = new InvertWindow(client);
24         window->create_objects();
25         gui_started.unlock();
26         window->run_window();
27         delete window;
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()
41         delete invert;
44 int InvertWindow::create_objects()
46         int x = 10, y = 10;
47         add_tool(new BC_Title(x, y, _("Invert")));
48         y += 20;
49         add_tool(invert = new InvertToggle(client, &(client->invert), x, y));
52 int InvertWindow::close_event()
54         hide_window();
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();