X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fcanvas%2Felements%2FCanvasText.hxx;h=aba96319173d6220be31c8d42b79db502ef3ea7d;hb=fd51518d9214f8e152e16ae46392501b95bab28a;hp=22596c57b80fb910550f6e5fd3ad868c7e321139;hpb=b99f53fda3b06378668bdccd4a9d07161f263366;p=simgear.git diff --git a/simgear/canvas/elements/CanvasText.hxx b/simgear/canvas/elements/CanvasText.hxx index 22596c57..aba96319 100644 --- a/simgear/canvas/elements/CanvasText.hxx +++ b/simgear/canvas/elements/CanvasText.hxx @@ -33,24 +33,26 @@ namespace canvas 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 _text; - virtual void childChanged(SGPropertyNode * child); - - void handleHit(float x, float y); - }; } // namespace canvas