add 1:1 convert, add es.po: thx sergio, cwdw zoom tweak, add done beep pots, bd forma...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / apanel.C
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
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.
10  *
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.
15  *
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
19  *
20  */
21
22 #include "apanel.h"
23 #include "cwindowgui.h"
24 #include "language.h"
25
26
27 APanel::APanel(MWindow *mwindow, CWindowGUI *subwindow, int x, int y, int w, int h)
28 {
29         this->mwindow = mwindow;
30         this->subwindow = subwindow;
31         this->x = x;
32         this->y = y;
33         this->w = w;
34         this->h = h;
35 }
36
37 APanel::~APanel()
38 {
39 }
40
41 void APanel::create_objects()
42 {
43         int ys10 = yS(10), ys20 = yS(20);
44         int x = this->x + xS(5), y = this->y + ys10;
45         char string[BCTEXTLEN];
46         int x1 = x;
47
48         subwindow->add_subwindow(new BC_Title(x, y, _("Automation")));
49         y += ys20;
50         for(int i = 0; i < PLUGINS; i++)
51         {
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));
55                 if(x == x1)
56                 {
57                         x += plugin_autos[i]->get_w();
58                 }
59                 else
60                 {
61                         x = x1;
62                         y += plugin_autos[i]->get_h() + ys20;
63                 }
64         }
65
66         subwindow->add_subwindow(mute = new APanelMute(mwindow, this, x, y));
67         y += mute->get_h();
68         subwindow->add_subwindow(play = new APanelPlay(mwindow, this, x, y));
69 }
70
71
72
73
74 APanelPluginAuto::APanelPluginAuto(MWindow *mwindow, APanel *gui, int x, int y)
75  : BC_FPot(x, y, 0, -1, 1)
76 {
77         this->mwindow = mwindow;
78         this->gui = gui;
79 }
80 int APanelPluginAuto::handle_event()
81 {
82         return 1;
83 }
84
85 APanelMute::APanelMute(MWindow *mwindow, APanel *gui, int x, int y)
86  : BC_CheckBox(x, y, 0, _("Mute"))
87 {
88         this->mwindow = mwindow;
89         this->gui = gui;
90 }
91 int APanelMute::handle_event()
92 {
93         return 1;
94 }
95
96
97 APanelPlay::APanelPlay(MWindow *mwindow, APanel *gui, int x, int y)
98  : BC_CheckBox(x, y, 1, _("Play"))
99 {
100         this->mwindow = mwindow;
101         this->gui = gui;
102 }
103 int APanelPlay::handle_event()
104 {
105         return 1;
106 }
107
108