]> git.mxchange.org Git - flightgear.git/blobdiff - src/Canvas/elements/text.hxx
Fix a Clang warning in Shiva.
[flightgear.git] / src / Canvas / elements / text.hxx
index 38c7f13350d6a401502db15dc8f9ccf79a2c3cb4..42e79f9472e3dac69fa4b9ba5dc39faa3d986e82 100644 (file)
@@ -32,31 +32,21 @@ namespace canvas
     public Element
   {
     public:
-      Text(SGPropertyNode_ptr node);
-      virtual ~Text();
-
-      virtual void update(double dt);
+      Text(SGPropertyNode_ptr node, const Style& parent_style);
+      ~Text();
 
+      void setText(const char* text);
       void setFont(const char* name);
-
       void setAlignment(const char* align);
-      const char* getAlignment() const;
 
     protected:
 
-      enum TextAttributes
-      {
-        FONT_SIZE       = LAST_ATTRIBUTE << 1, // Font size and aspect ration
-      };
-
-      osg::ref_ptr<osgText::Text>   _text;
-
-      SGPropertyNode_ptr  _font_size,
-                          _font_aspect;
+      class TextOSG;
+      osg::ref_ptr<TextOSG> _text;
 
       virtual void childChanged(SGPropertyNode * child);
-      virtual void colorChanged(const osg::Vec4& color);
-      virtual void colorFillChanged(const osg::Vec4& color);
+
+      void handleHit(float x, float y);
 
       typedef osg::ref_ptr<osgText::Font> font_ptr;
       static font_ptr getFont(const std::string& name);