From cf0e4e6f8c1f325756ce6d4986a64637ca0f4ea3 Mon Sep 17 00:00:00 2001 From: frohlich Date: Wed, 26 Dec 2007 19:19:51 +0000 Subject: [PATCH] Modified Files: Makefile.am SGPickCallback.hxx: add proirities for pick callbacks. --- simgear/scene/util/Makefile.am | 6 +++--- simgear/scene/util/SGPickCallback.hxx | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/simgear/scene/util/Makefile.am b/simgear/scene/util/Makefile.am index 0bdba87f..48218f07 100644 --- a/simgear/scene/util/Makefile.am +++ b/simgear/scene/util/Makefile.am @@ -5,15 +5,15 @@ lib_LIBRARIES = libsgutil.a noinst_HEADERS = include_HEADERS = \ - SGNodeMasks.hxx \ - SGUpdateVisitor.hxx \ - SGEnlargeBoundingBox.hxx \ SGDebugDrawCallback.hxx \ + SGEnlargeBoundingBox.hxx \ + SGNodeMasks.hxx \ SGPickCallback.hxx \ SGSceneFeatures.hxx \ SGSceneUserData.hxx \ SGStateAttributeVisitor.hxx \ SGTextureStateAttributeVisitor.hxx \ + SGUpdateVisitor.hxx \ RenderConstants.hxx \ StateAttributeFactory.hxx \ VectorArrayAdapter.hxx diff --git a/simgear/scene/util/SGPickCallback.hxx b/simgear/scene/util/SGPickCallback.hxx index a8bf82cb..90b720f8 100644 --- a/simgear/scene/util/SGPickCallback.hxx +++ b/simgear/scene/util/SGPickCallback.hxx @@ -30,11 +30,21 @@ // The interface is still under development class SGPickCallback : public SGReferenced { public: + enum Priority { + PriorityGUI = 0, + PriorityPanel = 1, + PriorityOther = 2 + }; + struct Info { SGVec3d wgs84; SGVec3d local; }; + SGPickCallback(Priority priority = PriorityOther) : + _priority(priority) + { } + virtual ~SGPickCallback() {} virtual bool buttonPressed(int button, const Info& info) { return false; } @@ -42,6 +52,12 @@ public: { } virtual void buttonReleased(void) { } + + Priority getPriority() const + { return _priority; } + +private: + Priority _priority; }; struct SGSceneryPick { -- 2.39.5