r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / plugins / oilpainting / oilwindow.C
blob31a3d342457223fc0f19dd4a07ade5fff89f1121
1 #include "oilwindow.h"
3 #include <libintl.h>
4 #define _(String) gettext(String)
5 #define gettext_noop(String) String
6 #define N_(String) gettext_noop (String)
9 OilThread::OilThread(OilMain *client)
10  : Thread()
12         this->client = client;
13         synchronous = 1; // make thread wait for join
14         gui_started.lock();
17 OilThread::~OilThread()
20         
21 void OilThread::run()
23         window = new OilWindow(client);
24         window->create_objects();
25         gui_started.unlock();
26         window->run_window();
27         delete window;
35 OilWindow::OilWindow(OilMain *client)
36  : BC_Window("", MEGREY, client->gui_string, 150, 130, 150, 130, 0, !client->show_initially)
37 { this->client = client; }
39 OilWindow::~OilWindow()
41         delete radius;
44 int OilWindow::create_objects()
46         int x = 10, y = 10;
47         add_tool(new BC_Title(x, y, _("Oil Painting")));
48         y += 20;
49         add_tool(radius = new OilRadius(client, x, y));
50         x += 50;
51         add_tool(new BC_Title(x, y, _("Radius")));
52         y += 50;
53         x = 10;
54         add_tool(use_intensity = new OilIntensity(client, x, y));
57 int OilWindow::close_event()
59         hide_window();
60         client->send_hide_gui();
63 OilRadius::OilRadius(OilMain *client, int x, int y)
64  : BC_IPot(x, y, 35, 35, client->radius, 1, 45, DKGREY, BLACK)
66         this->client = client;
68 OilRadius::~OilRadius()
71 int OilRadius::handle_event()
73         client->radius = get_value();
74         client->send_configure_change();
78 OilIntensity::OilIntensity(OilMain *client, int x, int y)
79  : BC_CheckBox(x, y, 16, 16, client->use_intensity, _("Use Intensity"))
81         this->client = client;
83 OilIntensity::~OilIntensity()
86 int OilIntensity::handle_event()
88         client->use_intensity = get_value();
89         client->send_configure_change();