public Element
{
public:
+ static const std::string TYPE_NAME;
+ static void staticInit();
+
Text( const CanvasWeakPtr& canvas,
- SGPropertyNode_ptr node,
- const Style& parent_style );
+ const SGPropertyNode_ptr& node,
+ const Style& parent_style,
+ Element* parent = 0 );
~Text();
void setText(const char* text);
void setFont(const char* name);
void setAlignment(const char* align);
+ osg::Vec2 getNearestCursor(const osg::Vec2& pos) const;
+
protected:
class TextOSG;
osg::ref_ptr<TextOSG> _text;
- virtual void childChanged(SGPropertyNode * child);
-
- void handleHit(float x, float y);
-
};
} // namespace canvas