DYTSrouce/src/scene/ui/QueryElevationWidget.h

37 lines
899 B
C
Raw Normal View History

2025-01-12 17:35:51 +00:00
#pragma once
#include <osgGA/GUIEventHandler>
#include <osgWidget/Box>
#include <osgWidget/Label>
#include <osgEarth/MapNode>
class QueryElevationWidget : public osgWidget::Box {
class QueryElevationEventHandler : public osgGA::GUIEventHandler {
public:
QueryElevationEventHandler(osgEarth::MapNode* mapNode, QueryElevationWidget* widget);
~QueryElevationEventHandler() override;
bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa) override;
private:
osgEarth::MapNode* mapNode_;
QueryElevationWidget* widget_;
};
public:
QueryElevationWidget(class OEScene* oeScene);
~QueryElevationWidget() override;
void AttachViewUI(class OsgViewUI* ui);
void OnUpdateGeoPoint(double x, double y, double z);
void ResetCanvasPosition(double width, double height);
private:
class OEScene* oeScene_;
osg::ref_ptr<osgWidget::Label> label_;
};