4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "bcdisplayinfo.h"
25 #include "translate.h"
26 #include "translatewin.h"
40 TranslateWin::TranslateWin(TranslateMain *client)
41 : PluginClientWindow(client,
48 this->client = client;
51 TranslateWin::~TranslateWin()
55 void TranslateWin::create_objects()
59 add_tool(new BC_Title(x, y, _("In X:")));
61 in_x = new TranslateCoord(this, client, x, y, &client->config.in_x);
62 in_x->create_objects();
65 add_tool(new BC_Title(x, y, _("In Y:")));
67 in_y = new TranslateCoord(this, client, x, y, &client->config.in_y);
68 in_y->create_objects();
71 add_tool(new BC_Title(x, y, _("In W:")));
73 in_w = new TranslateCoord(this, client, x, y, &client->config.in_w);
74 in_w->create_objects();
77 add_tool(new BC_Title(x, y, _("In H:")));
79 in_h = new TranslateCoord(this, client, x, y, &client->config.in_h);
80 in_h->create_objects();
86 add_tool(new BC_Title(x, y, _("Out X:")));
88 out_x = new TranslateCoord(this, client, x, y, &client->config.out_x);
89 out_x->create_objects();
92 add_tool(new BC_Title(x, y, _("Out Y:")));
94 out_y = new TranslateCoord(this, client, x, y, &client->config.out_y);
95 out_y->create_objects();
98 add_tool(new BC_Title(x, y, _("Out W:")));
100 out_w = new TranslateCoord(this, client, x, y, &client->config.out_w);
101 out_w->create_objects();
104 add_tool(new BC_Title(x, y, _("Out H:")));
106 out_h = new TranslateCoord(this, client, x, y, &client->config.out_h);
107 out_h->create_objects();
118 TranslateCoord::TranslateCoord(TranslateWin *win,
119 TranslateMain *client,
123 : BC_TumbleTextBox(win,
131 //printf("TranslateWidth::TranslateWidth %f\n", client->config.w);
132 this->client = client;
137 TranslateCoord::~TranslateCoord()
141 int TranslateCoord::handle_event()
143 *value = atof(get_text());
145 client->send_configure_change();