4 #define _(String) gettext(String)
5 #define gettext_noop(String) String
6 #define N_(String) gettext_noop (String)
9 OilThread::OilThread(OilMain *client)
12 this->client = client;
13 synchronous = 1; // make thread wait for join
17 OilThread::~OilThread()
23 window = new OilWindow(client);
24 window->create_objects();
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()
44 int OilWindow::create_objects()
47 add_tool(new BC_Title(x, y, _("Oil Painting")));
49 add_tool(radius = new OilRadius(client, x, y));
51 add_tool(new BC_Title(x, y, _("Radius")));
54 add_tool(use_intensity = new OilIntensity(client, x, y));
57 int OilWindow::close_event()
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();