37 lines
899 B
C
37 lines
899 B
C
|
#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_;
|
|||
|
|
|||
|
};
|
|||
|
|