VR-Forces 4.0.4 Class Documentation
include/vrvOsg/DtOsgWindowTextInstance.h
Go to the documentation of this file.
00001 /****************************************************************************** 
00002 ** Copyright (c) 2009 MAK Technologies, Inc. 
00003 ** All rights reserved. 
00004 ******************************************************************************/ 
00005 /****************************************************************************** 
00006 ** $RCSfile: DtOsgWindowTextInstance.h,v $ $Revision: 1.17 $ $State: Exp $ 
00007 ******************************************************************************/ 
00008  
00012  
00013 #ifndef DtOsgWindowTextInstance_H_ 
00014 #define DtOsgWindowTextInstance_H_ 
00015  
00016 #include <vrvOsg/vrvOsg.h>
00017 #include <vrvCore/DtWindowTextInstance.h>
00018 #include <vrvGraphics/DtFont.h>
00019 #include <osg/Vec2>
00020 
00021 namespace makVrv 
00022 {
00023    class DtDe;
00024    class DtTextProxy;
00025 
00029    class DT_DLL_VRVOSG DtOsgWindowTextInstance : public DtWindowTextInstance
00030    {
00031    public:
00033       DtOsgWindowTextInstance(DtDe& de);
00034 
00036       virtual ~DtOsgWindowTextInstance();
00037 
00039       virtual void setTopLeftCorner(float x, float y) ;
00040 
00042       virtual void setVisible(bool isVisible);
00043 
00045       virtual void setColor(float r,float g,float b,float a);
00046 
00048       virtual void setText(const std::string& textString);
00049 
00051       virtual void setFont(const std::string& fontFile, float sizeInPoints);
00052 
00054       virtual void setTextBoxWidth(unsigned int widthInPixels);
00055 
00057       virtual void setAlignment(DtWindowText::TextAlignment alignment);
00058       
00060       virtual bool visible() const;
00061 
00062    protected:
00063 
00065       void createText();
00066 
00067       DtDe& myDe;
00068       float myColorR, myColorG, myColorB, myColorA;
00069       std::string myFontFile;
00070       std::string myTextString;
00071       float mySize;
00072       float myWidth;
00073       float myTopLeftX;
00074       float myTopLeftY;
00075       DtFont::TextAlignement myAlignment;
00076       DtTextProxy* myText;
00077    }; 
00078 } 
00079  
00080 #endif 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)