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

StatusBar.h

Go to the documentation of this file.
00001 #ifndef OglGui_StatusBar_h
00002 #define OglGui_StatusBar_h
00003 
00004 #ifndef OglGui_SideBar_h
00005 #include "OglGui/SideBar.h"
00006 #endif
00007 
00008 #ifndef OglGui_StaticText_h
00009 #include "OglGui/StaticText.h"
00010 #endif
00011 
00012 namespace OglGui
00013 {
00014 
00015 class StatusBar : public SideBar
00016 {
00017 public:
00018 
00019     StatusBar(Window* parent, int h=24, int txtW=-1,
00020               int lMargin=0, int rMargin=0, int bMargin=0) :
00021         SideBar(parent, South, h, lMargin, 0, rMargin, bMargin)
00022     {
00023         Init(h, txtW);
00024     }
00025 
00026     void SetText(strconst txt)
00027     {
00028         mStaticTxt->SetText(txt);
00029     }
00030 
00031     std::string GetText() const
00032     {
00033         if (mStaticTxt)
00034             return mStaticTxt->GetText();
00035         return 0;
00036     }
00037 
00038     StaticText* GetSText() const
00039     {
00040         return mStaticTxt;
00041     }
00042 
00043 private :
00044 
00045     StaticText*   mStaticTxt;
00046 
00047     void Init(int h, int txtW)
00048     {
00049         if (txtW)
00050         {
00051             txtW = (txtW==-1) ? WndWidth() : txtW;
00052             mStaticTxt = new StaticText(this, 2, 2, txtW, 20, "");
00053             mStaticTxt->SetAlign(oglLeftAlign, oglBottomAlign);
00054             mStaticTxt->ConnectTo(this, L2L | R2R | B2B | T2B | TPARENT);
00055         }
00056         SetAllowScaling(false);
00057         SetBorderBackground(oglTrLIGHTGREY);
00058     }
00059 };
00060 
00061 } // namespace OglGui
00062 #endif

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