r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / labelnavigate.C
blob06dc4c03cae8eb92916eafd6b19a933d9eb385ae
1 #include "labelnavigate.h"
2 #include "mbuttons.h"
3 #include "mwindow.h"
4 #include "theme.h"
6 #include <libintl.h>
7 #define _(String) gettext(String)
8 #define gettext_noop(String) String
9 #define N_(String) gettext_noop (String)
11 LabelNavigate::LabelNavigate(MWindow *mwindow, MButtons *gui, int x, int y)
13         this->mwindow = mwindow;
14         this->gui = gui;
15         this->x = x;
16         this->y = y;
19 LabelNavigate::~LabelNavigate()
21         delete prev_label;
22         delete next_label;
25 void LabelNavigate::create_objects()
27         gui->add_subwindow(prev_label = new PrevLabel(mwindow, 
28                 this, 
29                 x, 
30                 y));
31         gui->add_subwindow(next_label = new NextLabel(mwindow, 
32                 this, 
33                 x + prev_label->get_w(), 
34                 y));
38 PrevLabel::PrevLabel(MWindow *mwindow, LabelNavigate *navigate, int x, int y)
39  : BC_Button(x, y, mwindow->theme->prevlabel_data)
40
41         this->mwindow = mwindow; 
42         this->navigate = navigate;
43         set_tooltip(_("Previous label"));
46 PrevLabel::~PrevLabel() {}
48 int PrevLabel::handle_event()
50         mwindow->prev_label();
51         return 1;
56 NextLabel::NextLabel(MWindow *mwindow, LabelNavigate *navigate, int x, int y)
57  : BC_Button(x, y, mwindow->theme->nextlabel_data)
58
59         this->mwindow = mwindow; 
60         this->navigate = navigate; 
61         set_tooltip(_("Next label"));
64 NextLabel::~NextLabel() {}
66 int NextLabel::handle_event()
68         mwindow->next_label();
69         return 1;