r956: README.BUILD - add more library recommendations
[cinelerra_cv/ct.git] / cinelerra / labelnavigate.C
blob972755c2cb6a68233befe82bdfb459cebff2584a
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->get_image_set("prevlabel"))
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(shift_down());
51         return 1;
56 NextLabel::NextLabel(MWindow *mwindow, LabelNavigate *navigate, int x, int y)
57  : BC_Button(x, y, mwindow->theme->get_image_set("nextlabel"))
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(shift_down());
69         return 1;