1 #include "labelnavigate.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;
19 LabelNavigate::~LabelNavigate()
25 void LabelNavigate::create_objects()
27 gui->add_subwindow(prev_label = new PrevLabel(mwindow,
31 gui->add_subwindow(next_label = new NextLabel(mwindow,
33 x + prev_label->get_w(),
38 PrevLabel::PrevLabel(MWindow *mwindow, LabelNavigate *navigate, int x, int y)
39 : BC_Button(x, y, mwindow->theme->get_image_set("prevlabel"))
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());
56 NextLabel::NextLabel(MWindow *mwindow, LabelNavigate *navigate, int x, int y)
57 : BC_Button(x, y, mwindow->theme->get_image_set("nextlabel"))
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());