Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

labelnavigate.C

Go to the documentation of this file.
00001 #include "labelnavigate.h"
00002 #include "mbuttons.h"
00003 #include "mwindow.h"
00004 #include "theme.h"
00005 
00006 #include <libintl.h>
00007 #define _(String) gettext(String)
00008 #define gettext_noop(String) String
00009 #define N_(String) gettext_noop (String)
00010 
00011 LabelNavigate::LabelNavigate(MWindow *mwindow, MButtons *gui, int x, int y)
00012 {
00013         this->mwindow = mwindow;
00014         this->gui = gui;
00015         this->x = x;
00016         this->y = y;
00017 }
00018 
00019 LabelNavigate::~LabelNavigate()
00020 {
00021         delete prev_label;
00022         delete next_label;
00023 }
00024 
00025 void LabelNavigate::create_objects()
00026 {
00027         gui->add_subwindow(prev_label = new PrevLabel(mwindow, 
00028                 this, 
00029                 x, 
00030                 y));
00031         gui->add_subwindow(next_label = new NextLabel(mwindow, 
00032                 this, 
00033                 x + prev_label->get_w(), 
00034                 y));
00035 }
00036 
00037 
00038 PrevLabel::PrevLabel(MWindow *mwindow, LabelNavigate *navigate, int x, int y)
00039  : BC_Button(x, y, mwindow->theme->get_image_set("prevlabel"))
00040 { 
00041         this->mwindow = mwindow; 
00042         this->navigate = navigate;
00043         set_tooltip(_("Previous label"));
00044 }
00045 
00046 PrevLabel::~PrevLabel() {}
00047 
00048 int PrevLabel::handle_event()
00049 {
00050         mwindow->prev_label();
00051         return 1;
00052 }
00053 
00054 
00055 
00056 NextLabel::NextLabel(MWindow *mwindow, LabelNavigate *navigate, int x, int y)
00057  : BC_Button(x, y, mwindow->theme->get_image_set("nextlabel"))
00058 { 
00059         this->mwindow = mwindow; 
00060         this->navigate = navigate; 
00061         set_tooltip(_("Next label"));
00062 }
00063 
00064 NextLabel::~NextLabel() {}
00065 
00066 int NextLabel::handle_event()
00067 {
00068         mwindow->next_label();
00069         return 1;
00070 }
00071 
00072 

Generated on Sun Jan 8 13:38:56 2006 for Cinelerra-svn by  doxygen 1.4.4