00001 #include "invertwindow.h"
00002 #include "language.h"
00003
00004
00005
00006
00007
00008
00009 InvertWindow::InvertWindow(InvertMain *client)
00010 : BC_Window("", MEGREY, client->gui_string, 100, 60, 100, 60, 0, !client->show_initially)
00011 { this->client = client; }
00012
00013 InvertWindow::~InvertWindow()
00014 {
00015 delete invert;
00016 }
00017
00018 int InvertWindow::create_objects()
00019 {
00020 int x = 10, y = 10;
00021 add_tool(new BC_Title(x, y, _("Invert")));
00022 y += 20;
00023 add_tool(invert = new InvertToggle(client, &(client->invert), x, y));
00024 }
00025
00026 WINDOW_CLOSE_EVENT(InvertWindow)
00027
00028 InvertToggle::InvertToggle(InvertMain *client, int *output, int x, int y)
00029 : BC_CheckBox(x, y, 16, 16, *output)
00030 {
00031 this->client = client;
00032 this->output = output;
00033 }
00034 InvertToggle::~InvertToggle()
00035 {
00036 }
00037 int InvertToggle::handle_event()
00038 {
00039 *output = get_value();
00040 client->send_configure_change();
00041 }