1 #include "bcdisplayinfo.h"
3 #include "translatewin.h"
6 #define _(String) gettext(String)
7 #define gettext_noop(String) String
8 #define N_(String) gettext_noop (String)
16 PLUGIN_THREAD_OBJECT(TranslateMain, TranslateThread, TranslateWin)
23 TranslateWin::TranslateWin(TranslateMain *client, int x, int y)
24 : BC_Window(client->gui_string,
35 this->client = client;
38 TranslateWin::~TranslateWin()
42 int TranslateWin::create_objects()
46 add_tool(new BC_Title(x, y, _("In X:")));
48 in_x = new TranslateCoord(this, client, x, y, &client->config.in_x);
49 in_x->create_objects();
52 add_tool(new BC_Title(x, y, _("In Y:")));
54 in_y = new TranslateCoord(this, client, x, y, &client->config.in_y);
55 in_y->create_objects();
58 add_tool(new BC_Title(x, y, _("In W:")));
60 in_w = new TranslateCoord(this, client, x, y, &client->config.in_w);
61 in_w->create_objects();
64 add_tool(new BC_Title(x, y, _("In H:")));
66 in_h = new TranslateCoord(this, client, x, y, &client->config.in_h);
67 in_h->create_objects();
73 add_tool(new BC_Title(x, y, _("Out X:")));
75 out_x = new TranslateCoord(this, client, x, y, &client->config.out_x);
76 out_x->create_objects();
79 add_tool(new BC_Title(x, y, _("Out Y:")));
81 out_y = new TranslateCoord(this, client, x, y, &client->config.out_y);
82 out_y->create_objects();
85 add_tool(new BC_Title(x, y, _("Out W:")));
87 out_w = new TranslateCoord(this, client, x, y, &client->config.out_w);
88 out_w->create_objects();
91 add_tool(new BC_Title(x, y, _("Out H:")));
93 out_h = new TranslateCoord(this, client, x, y, &client->config.out_h);
94 out_h->create_objects();
104 int TranslateWin::close_event()
110 TranslateCoord::TranslateCoord(TranslateWin *win,
111 TranslateMain *client,
115 : BC_TumbleTextBox(win,
123 //printf("TranslateWidth::TranslateWidth %f\n", client->config.w);
124 this->client = client;
129 TranslateCoord::~TranslateCoord()
133 int TranslateCoord::handle_event()
135 *value = atof(get_text());
137 client->send_configure_change();