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 ys10 = yS(10), ys20 = yS(20);
44 int x = this->x + xS(5), y = this->y + ys10;
45 char string[BCTEXTLEN];
48 subwindow->add_subwindow(new BC_Title(x, y, _("Automation")));
50 for(int i = 0; i < PLUGINS; i++)
52 sprintf(string, _("Plugin %d"), i + 1);
53 subwindow->add_subwindow(new BC_Title(x, y, string, SMALLFONT));
54 subwindow->add_subwindow(plugin_autos[i] = new APanelPluginAuto(mwindow, this, x, y + ys20));
57 x += plugin_autos[i]->get_w();
62 y += plugin_autos[i]->get_h() + ys20;
66 subwindow->add_subwindow(mute = new APanelMute(mwindow, this, x, y));
68 subwindow->add_subwindow(play = new APanelPlay(mwindow, this, x, y));
74 APanelPluginAuto::APanelPluginAuto(MWindow *mwindow, APanel *gui, int x, int y)
75 : BC_FPot(x, y, 0, -1, 1)
77 this->mwindow = mwindow;
80 int APanelPluginAuto::handle_event()
85 APanelMute::APanelMute(MWindow *mwindow, APanel *gui, int x, int y)
86 : BC_CheckBox(x, y, 0, _("Mute"))
88 this->mwindow = mwindow;
91 int APanelMute::handle_event()
97 APanelPlay::APanelPlay(MWindow *mwindow, APanel *gui, int x, int y)
98 : BC_CheckBox(x, y, 1, _("Play"))
100 this->mwindow = mwindow;
103 int APanelPlay::handle_event()