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

SizableStaticText.h

Go to the documentation of this file.
00001 //345678901234567890123456789012345678901234567890123456789012345678901234567890
00002 // SizableStaticText.h
00003 // Author: Richard van Balen
00004 
00005 #ifndef OglGui_SizableStaticText_h
00006 #define OglGui_SizableStaticText_h
00007 
00008 #ifndef OglGui_StaticText_h
00009 #include "OglGui/StaticText.h"
00010 #endif
00011 
00012 #ifndef OglGui_SizableWindow_h
00013 #include "OglGui/SizableWindow.h"
00014 #endif
00015 
00016 namespace OglGui {
00017 
00018 class SizableStaticText : public SizableWindow
00019 {
00020 public:
00021     SizableStaticText(Window* parent, int w, int h, strconst label) :
00022         SizableWindow(parent,w,h)
00023     {
00024         Init(w,h,label);
00025     }
00026 
00027     SizableStaticText(Window* parent,int x,int y,int w,int h, strconst label) :
00028         SizableWindow(parent,x,y,w,h)
00029     {
00030         Init(w,h,label);
00031     }
00032 
00033     StaticText*     GetStaticText()         { return mLabelText; }
00034     std::string     GetText()               { return mLabelText->GetText(); }
00035     void            SetText(strconst txt)   { mLabelText->SetText(txt); }
00036 
00037 private:
00038     void Init(int w, int h, strconst label)
00039     {
00040         mLabelText = new StaticText(this,0,0,w,h,label);
00041         oglSys.SetNoMouseInput(mLabelText->GetOGLWND(),true);
00042         mLabelText->ConnectTo(this);
00043         mLabelText->SetAllowScaling(false);
00044     }
00045 
00046     StaticText*     mLabelText;
00047 };
00048 
00049 } // Namespace OglGui
00050 #endif
00051 

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