1 #include "bcdisplayinfo.h"
3 #include "rgb601window.h"
9 PLUGIN_THREAD_OBJECT(RGB601Main, RGB601Thread, RGB601Window)
16 RGB601Window::RGB601Window(RGB601Main *client, int x, int y)
17 : BC_Window(client->gui_string,
28 this->client = client;
31 RGB601Window::~RGB601Window()
35 int RGB601Window::create_objects()
39 add_tool(forward = new RGB601Direction(this, x, y, &client->config.direction, 1, _("RGB -> 601")));
41 add_tool(reverse = new RGB601Direction(this, x, y, &client->config.direction, 2, _("601 -> RGB")));
48 void RGB601Window::update()
50 forward->update(client->config.direction == 1);
51 reverse->update(client->config.direction == 2);
54 WINDOW_CLOSE_EVENT(RGB601Window)
56 RGB601Direction::RGB601Direction(RGB601Window *window, int x, int y, int *output, int true_value, char *text)
57 : BC_CheckBox(x, y, *output == true_value, text)
59 this->output = output;
60 this->true_value = true_value;
61 this->window = window;
63 RGB601Direction::~RGB601Direction()
67 int RGB601Direction::handle_event()
69 *output = get_value() ? true_value : 0;
71 window->client->send_configure_change();