/usr/include/rviz/display_context.h is in librviz-dev 1.12.4+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | /*
* Copyright (c) 2012, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Willow Garage, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef DISPLAY_CONTEXT_H
#define DISPLAY_CONTEXT_H
#include <stdint.h> // for uint64_t
#include <QObject>
#include <QString>
class QKeyEvent;
namespace Ogre
{
class SceneManager;
}
namespace ros
{
class CallbackQueueInterface;
}
namespace tf
{
class TransformListener;
}
namespace rviz
{
class BitAllocator;
class DisplayFactory;
class DisplayGroup;
class FrameManager;
class RenderPanel;
class SelectionManager;
class ToolManager;
class ViewController;
class ViewportMouseEvent;
class ViewManager;
class WindowManagerInterface;
/** @brief Pure-virtual base class for objects which give Display
* subclasses context in which to work.
*
* This interface class mainly exists to enable more isolated unit
* tests by enabling small mock objects to take the place of the large
* VisualizationManager implementation class. It also serves to
* define a narrower, more maintainable API for Display plugins. */
class DisplayContext: public QObject
{
Q_OBJECT
public:
/** @brief Returns the Ogre::SceneManager used for the main RenderPanel. */
virtual Ogre::SceneManager* getSceneManager() const = 0;
/** @brief Return the window manager, if any. */
virtual WindowManagerInterface* getWindowManager() const = 0;
/** @brief Return a pointer to the SelectionManager. */
virtual SelectionManager* getSelectionManager() const = 0;
/** @brief Return the FrameManager instance. */
virtual FrameManager* getFrameManager() const = 0;
/** @brief Convenience function: returns getFrameManager()->getTFClient(). */
virtual tf::TransformListener* getTFClient() const = 0;
/** @brief Return the fixed frame name. */
virtual QString getFixedFrame() const = 0;
/** @brief Return the current value of the frame count.
*
* The frame count is just a number which increments each time a
* frame is rendered. This lets clients check if a new frame has
* been rendered since the last time they did something. */
virtual uint64_t getFrameCount() const = 0;
/** @brief Return a factory for creating Display subclasses based on a class id string. */
virtual DisplayFactory* getDisplayFactory() const = 0;
/** @brief Return the CallbackQueue using the main GUI thread. */
virtual ros::CallbackQueueInterface* getUpdateQueue() = 0;
/** @brief Return a CallbackQueue using a different thread than the main GUI one. */
virtual ros::CallbackQueueInterface* getThreadedQueue() = 0;
/** @brief Handle a single key event for a given RenderPanel. */
virtual void handleChar( QKeyEvent* event, RenderPanel* panel ) = 0;
/** @brief Handle a mouse event. */
virtual void handleMouseEvent( const ViewportMouseEvent& event ) = 0;
/** @brief Return the ToolManager. */
virtual ToolManager* getToolManager() const = 0;
/** @brief Return the ViewManager. */
virtual ViewManager* getViewManager() const = 0;
virtual DisplayGroup* getRootDisplayGroup() const = 0;
virtual uint32_t getDefaultVisibilityBit() const = 0;
virtual BitAllocator* visibilityBits() = 0;
/** Set the message displayed in the status bar */
virtual void setStatus( const QString & message ) = 0;
public Q_SLOTS:
/** @brief Queues a render. Multiple calls before a render happens will only cause a single render.
* @note This function can be called from any thread. */
virtual void queueRender() = 0;
};
} // end namespace rviz
#endif // DISPLAY_CONTEXT_H
|