Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

VideoPlayerButtons.h

Go to the documentation of this file.
00001 /*
00002 12345678901234567890123456789012345678901234567890123456789012345678901234567890
00003 */
00004 #ifndef Impala_Visualization_VideoPlayerButtons_h
00005 #define Impala_Visualization_VideoPlayerButtons_h
00006 
00007 #ifndef OglGui_RadioGroup_h
00008 #include "OglGui/RadioGroup.h"
00009 #endif
00010 
00011 namespace Impala {
00012 namespace Visualization {
00013 
00014 class VideoPlayerButtons : public OglGui::RadioGroup
00015 {
00016 public:
00017     typedef OglGui::Window      Window;
00018     typedef OglGui::RadioGroup  RadioGroup;
00019     typedef OglGui::Button      Button;
00020 
00021     static const int PREF_H = 30;
00022     static const int PREF_W = 174+68;
00023 
00024     static const int PLAY   = 0;
00025     static const int STOP   = 1;
00026     static const int RESET  = 2;
00027     static const int DECR   = 3;
00028     static const int INCR   = 4;
00029     static const int FBWD   = 5;
00030     static const int FFWD   = 6;
00031 
00032     VideoPlayerButtons(int x, int y, int w, int h) :
00033         RadioGroup(x, y, w, h)
00034     {
00035        Init(w, h);
00036     }
00037 
00038     VideoPlayerButtons(Window* parent, int w, int h) :
00039         RadioGroup(parent, w, h)
00040     {
00041        Init(w, h);
00042     }
00043 
00044     VideoPlayerButtons(Window* parent, int x, int y, int w, int h) :
00045         RadioGroup(parent, x, y, w, h)
00046     {
00047        Init(w, h);
00048     }
00049 
00050     Button* GetButton(int idx)
00051     {
00052         if (idx<0 || idx>7)
00053             return 0;
00054         return mButtons[idx];
00055     }
00056 
00057 private:
00058     void Init(int w, int h)
00059     {
00060         SetDimensions(PREF_W, PREF_H);
00061         Add(mButtons[PLAY] = new Button(this,4,4,30,22,">",BEV_ETCHED,true));
00062         Add(mButtons[STOP] = new Button(this,38,4,30,22,"[]",BEV_ETCHED,true));
00063         Add(mButtons[RESET]= new Button(this,72,4,30,22,"<<",BEV_ETCHED,true));
00064         Add(mButtons[DECR] = new Button(this,106,4,30,22,"-",BEV_ETCHED,true));
00065         Add(mButtons[INCR] = new Button(this,140,4,30,22,"+",BEV_ETCHED,true));
00066         Add(mButtons[FBWD] = new Button(this,174,4,30,22,"FB",BEV_ETCHED,true));
00067         Add(mButtons[FFWD] = new Button(this,208,4,30,22,"FF",BEV_ETCHED,true));
00068         ScaleChildren();
00069         SetAllowChildScaling(false);
00070         SetDimensions(w, h);
00071 
00072         mButtons[INCR]->SetRepeatMode(true);
00073         mButtons[DECR]->SetRepeatMode(true);
00074     }
00075 
00076 protected:
00077     Button*         mButtons[7];
00078 };
00079 
00080 } // namespace Impala
00081 } //namespace Visualization
00082 #endif

Generated on Fri Mar 19 09:31:55 2010 for ImpalaSrc by  doxygen 1.5.1