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
23 #include "cwindowgui.h"
27 APanel::APanel(MWindow *mwindow, CWindowGUI *subwindow, int x, int y, int w, int h)
29 this->mwindow = mwindow;
30 this->subwindow = subwindow;
41 void APanel::create_objects()
43 int x = this->x + 5, y = this->y + 10;
44 char string[BCTEXTLEN];
47 subwindow->add_subwindow(new BC_Title(x, y, _("Automation")));
49 for(int i = 0; i < PLUGINS; i++)
51 sprintf(string, _("Plugin %d"), i + 1);
52 subwindow->add_subwindow(new BC_Title(x, y, string, SMALLFONT));
53 subwindow->add_subwindow(plugin_autos[i] = new APanelPluginAuto(mwindow, this, x, y + 20));
56 x += plugin_autos[i]->get_w();
61 y += plugin_autos[i]->get_h() + 20;
65 subwindow->add_subwindow(mute = new APanelMute(mwindow, this, x, y));
67 subwindow->add_subwindow(play = new APanelPlay(mwindow, this, x, y));
73 APanelPluginAuto::APanelPluginAuto(MWindow *mwindow, APanel *gui, int x, int y)
80 this->mwindow = mwindow;
83 int APanelPluginAuto::handle_event()
88 APanelMute::APanelMute(MWindow *mwindow, APanel *gui, int x, int y)
89 : BC_CheckBox(x, y, 0, _("Mute"))
91 this->mwindow = mwindow;
94 int APanelMute::handle_event()
100 APanelPlay::APanelPlay(MWindow *mwindow, APanel *gui, int x, int y)
101 : BC_CheckBox(x, y, 1, _("Play"))
103 this->mwindow = mwindow;
106 int APanelPlay::handle_event()