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

RgbSliderDialog.h

Go to the documentation of this file.
00001 //345678901234567890123456789012345678901234567890123456789012345678901234567890
00002 // Author: Richard van Balen, for University of Amsterdam
00004 
00005 #ifndef OglGui_RgbSliderDialog_h
00006 #define OglGui_RgbSliderDialog_h
00007 
00008 #include "OglGui/RgbSlider.h"
00009 
00010 namespace OglGui {
00011 
00012 class RgbSliderDialog : public Window
00013 {
00014 public:
00015     const static int    PREF_W = RgbSlider::PREF_W+8;
00016     const static int    PREF_H = RgbSlider::PREF_H+48;
00017 
00018     RgbSliderDialog(int x, int y, int w, int h, bool shaded=false) :
00019         Window(x,y,w,h)
00020     {
00021         Init(w,h,shaded);
00022     }
00023 
00024     RgbSliderDialog(Window* parent, int w, int h, bool shaded=false) :
00025         Window(parent,w,h)
00026     {
00027         Init(w,h,shaded);
00028     }
00029 
00030     RgbSliderDialog(Window* parent,int x,int y,int w,int h,bool shaded=false) :
00031         Window(parent,x,y,w,h)
00032     {
00033         Init(w,h,shaded);
00034     }
00035 
00036     RgbSlider*  ColSlider()          { return mRgbSlider; }
00037     Button*     OkBtn()              { return mOkBtn; }
00038     Button*     CancelBtn()          { return mCancelBtn; }
00039 
00040 private:
00041     void Init(int w, int h,bool shaded)
00042     {
00043         SetBorderType(BEV_ETCHED);
00044         SetDimensions(PREF_W, PREF_H);
00045 
00046         mRgbSlider = new RgbSlider(this,0,30,W(),H()-30,shaded);
00047         mRgbSlider->SetBorderType(-1);
00048 
00049         int btnW = W()/2-8;
00050         mOkBtn = new Button(this,4,4,btnW,26,"OK",BEV_ETCHED, true);
00051         int x = W()/2+4;
00052         mCancelBtn = new Button(this,x,4,btnW,26,"Cancel",BEV_ETCHED,true);
00053 
00054         ScaleChildren();
00055         SetAllowChildScaling(false);
00056         SetDimensions(w,h);
00057     }
00058 
00059     RgbSlider* mRgbSlider;
00060     Button*    mOkBtn;
00061     Button*    mCancelBtn;
00062 };
00063 } // namespace OglGui
00064 
00065 #endif

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