r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / apanel.C
blob2bf875ebd0752520166a725a7c81d7e7ff62440b
1 #include "apanel.h"
2 #include "cwindowgui.h"
4 #include <libintl.h>
5 #define _(String) gettext(String)
6 #define gettext_noop(String) String
7 #define N_(String) gettext_noop (String)
9 APanel::APanel(MWindow *mwindow, CWindowGUI *subwindow, int x, int y, int w, int h)
11         this->mwindow = mwindow;
12         this->subwindow = subwindow;
13         this->x = x;
14         this->y = y;
15         this->w = w;
16         this->h = h;
19 APanel::~APanel()
23 int APanel::create_objects()
25         int x = this->x + 5, y = this->y + 10;
26         char string[BCTEXTLEN];
27         int x1 = x;
29         subwindow->add_subwindow(new BC_Title(x, y, _("Automation")));
30         y += 20;
31         for(int i = 0; i < PLUGINS; i++)
32         {
33                 sprintf(string, _("Plugin %d"), i + 1);
34                 subwindow->add_subwindow(new BC_Title(x, y, string, SMALLFONT));
35                 subwindow->add_subwindow(plugin_autos[i] = new APanelPluginAuto(mwindow, this, x, y + 20));
36                 if(x == x1)
37                 {
38                         x += plugin_autos[i]->get_w();
39                 }
40                 else
41                 {
42                         x = x1;
43                         y += plugin_autos[i]->get_h() + 20;
44                 }
45         }
46         
47         subwindow->add_subwindow(mute = new APanelMute(mwindow, this, x, y));
48         y += mute->get_h();
49         subwindow->add_subwindow(play = new APanelPlay(mwindow, this, x, y));
50         return 0;
56 APanelPluginAuto::APanelPluginAuto(MWindow *mwindow, APanel *gui, int x, int y)
57  : BC_FPot(x, 
58                 y, 
59                 0, 
60                 -1, 
61                 1)
63         this->mwindow = mwindow;
64         this->gui = gui;
66 int APanelPluginAuto::handle_event()
68         return 1;
71 APanelMute::APanelMute(MWindow *mwindow, APanel *gui, int x, int y)
72  : BC_CheckBox(x, y, 0, _("Mute"))
74         this->mwindow = mwindow;
75         this->gui = gui;
77 int APanelMute::handle_event()
79         return 1;
83 APanelPlay::APanelPlay(MWindow *mwindow, APanel *gui, int x, int y)
84  : BC_CheckBox(x, y, 1, _("Play"))
86         this->mwindow = mwindow;
87         this->gui = gui;
89 int APanelPlay::handle_event()
91         return 1;