00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __SIMPLEPANEL_H__
00021 #define __SIMPLEPANEL_H__
00022
00023 #include <vrs/shape.h>
00024 #include <vrs/opengl/imagetexture2dgl.h>
00025
00026 #include <vrs/text/vrs_textprerequisites.h>
00027
00028 #include <vrs/text/abstracttext.h>
00029
00030
00032 namespace VRS
00033 {
00034 namespace TEXT
00035 {
00036 class SimplePanelPainterGl;
00037
00040 class VRS_CORE_API SimplePanel : public Shape
00041 {
00042 public:
00043 friend class SimplePanelPainterGl;
00044
00046 SimplePanel( SO<AbstractText> text );
00048 SimplePanel( SO<AbstractText> text, SO<SimplePanel> other );
00050 virtual ~SimplePanel();
00051
00052
00053
00055 virtual SO<AbstractText> getText() const;
00057 virtual void setText( SO<AbstractText> at );
00058
00059
00061 virtual float getPadding() const;
00063 virtual void setPadding( float pad );
00064
00066 virtual void setBackgroundColor( const Color& color, bool use = true );
00068 virtual Color getBackgroundColor() const;
00070 virtual bool useBackgroundColor() const;
00071
00072
00073
00074
00097 virtual void setFrame( SO<ImageTexture2DGL> texture,
00098 const Bounds& topLeft, const Bounds& topCenter, const Bounds& topRight,
00099 const Bounds& middleLeft, const Bounds& middleCenter, const Bounds& middleRight,
00100 const Bounds& bottomLeft, const Bounds& bottomCenter, const Bounds& bottomRight,
00101 bool scaleFrameBorders = true );
00103 virtual void removeFrame();
00104
00105
00106
00107
00109 virtual Bounds boundingBox() const;
00111 virtual Bounds getLocalBounds() const;
00112
00113 VRS_TYPEINFO(SimplePanel, Shape);
00114 private:
00116 SimplePanel( );
00117
00119 SO<AbstractText> m_Text;
00120
00122 float m_Padding;
00124 Color m_BackgroundColor;
00126 bool m_UseBackgroundColor;
00127
00129 SO<ImageTexture2DGL> m_FrameTexture;
00130
00132 Bounds m_FrameTopLeft;
00133 Bounds m_FrameTopCenter;
00134 Bounds m_FrameTopRight;
00135 Bounds m_FrameMiddleLeft;
00136 Bounds m_FrameMiddleCenter;
00137 Bounds m_FrameMiddleRight;
00138 Bounds m_FrameBottomLeft;
00139 Bounds m_FrameBottomCenter;
00140 Bounds m_FrameBottomRight;
00141
00142 bool m_ScaleFrameBorders;
00143 };
00144 }
00145 }
00146
00147 #endif