1 #include "bcdisplayinfo.h"
2 #include "rgb601window.h"
6 #define _(String) gettext(String)
7 #define gettext_noop(String) String
8 #define N_(String) gettext_noop (String)
13 PLUGIN_THREAD_OBJECT(RGB601Main, RGB601Thread, RGB601Window)
20 RGB601Window::RGB601Window(RGB601Main *client, int x, int y)
21 : BC_Window(client->gui_string,
32 this->client = client;
35 RGB601Window::~RGB601Window()
39 int RGB601Window::create_objects()
43 add_tool(forward = new RGB601Direction(this, x, y, &client->config.direction, 1, _("RGB -> 601")));
45 add_tool(reverse = new RGB601Direction(this, x, y, &client->config.direction, 2, _("601 -> RGB")));
52 void RGB601Window::update()
54 forward->update(client->config.direction == 1);
55 reverse->update(client->config.direction == 2);
58 int RGB601Window::close_event()
60 // Set result to 1 to indicate a client side close
65 RGB601Direction::RGB601Direction(RGB601Window *window, int x, int y, int *output, int true_value, char *text)
66 : BC_CheckBox(x, y, *output == true_value, text)
68 this->output = output;
69 this->true_value = true_value;
70 this->window = window;
72 RGB601Direction::~RGB601Direction()
76 int RGB601Direction::handle_event()
78 *output = get_value() ? true_value : 0;
80 window->client->send_configure_change();