All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
gazebo::rendering::GUIOverlay Class Reference

A class that creates a CEGUI overlay on a render window. More...

#include <rendering/rendering.hh>

Public Member Functions

 GUIOverlay ()
 Constructor.
virtual ~GUIOverlay ()
 Destructor.
bool AttachCameraToImage (CameraPtr &_camera, const std::string &_windowName)
 Use this function to draw the output from a rendering::Camera to and overlay window.
bool AttachCameraToImage (DepthCameraPtr &_camera, const std::string &_windowName)
 Use this function to draw the output from a rendering::DepthCamera to and overlay window.
template<typename T >
void ButtonCallback (const std::string &_buttonName, void(T::*_fp)(), T *_obj)
 Register a CEGUI button callback.
void CreateWindow (const std::string &_type, const std::string &_name, const std::string &_parent, const math::Vector2d &_position, const math::Vector2d &_size, const std::string &_text)
 Create a new window on the overlay.
bool HandleKeyPressEvent (const std::string &_key)
 Handle a key press event.
bool HandleKeyReleaseEvent (const std::string &_key)
 Handle a key release event.
bool HandleMouseEvent (const common::MouseEvent &_evt)
 Handle a mouse event.
void Hide ()
 Make the overlay invisible.
void Init (Ogre::RenderTarget *_renderTarget)
 Initialize the overlay.
bool IsInitialized ()
 Return true if the overlay has been initialized.
void LoadLayout (const std::string &_filename)
 Load a CEGUI layout file.
void Resize (unsigned int _width, unsigned int _height)
 Resize the window.
void Show ()
 Make the overlay visible.
void Update ()
 Update the overlay's objects.

Detailed Description

A class that creates a CEGUI overlay on a render window.

Constructor & Destructor Documentation

gazebo::rendering::GUIOverlay::GUIOverlay ( )

Constructor.

virtual gazebo::rendering::GUIOverlay::~GUIOverlay ( )
virtual

Destructor.

Member Function Documentation

bool gazebo::rendering::GUIOverlay::AttachCameraToImage ( CameraPtr _camera,
const std::string &  _windowName 
)

Use this function to draw the output from a rendering::Camera to and overlay window.

Parameters
[in]_cameraPointer to the camera.
[in]_windowNameName of the window to receive the camera image
Returns
True if successful
bool gazebo::rendering::GUIOverlay::AttachCameraToImage ( DepthCameraPtr _camera,
const std::string &  _windowName 
)

Use this function to draw the output from a rendering::DepthCamera to and overlay window.

Parameters
[in]_cameraPointer to the camera.
[in]_windowNameName of the window to receive the camera image
Returns
True if successful
template<typename T >
void gazebo::rendering::GUIOverlay::ButtonCallback ( const std::string &  _buttonName,
void(T::*)()  _fp,
T *  _obj 
)
inline

Register a CEGUI button callback.

Assign a callback to a name button.

Parameters
[in]_buttonNameName of the button.
[in]_fpFunction pointer to the callback.
[in]_objClass pointer that contains _fp.
void gazebo::rendering::GUIOverlay::CreateWindow ( const std::string &  _type,
const std::string &  _name,
const std::string &  _parent,
const math::Vector2d _position,
const math::Vector2d _size,
const std::string &  _text 
)

Create a new window on the overlay.

Parameters
[in]_typeThe window type. This should match a CEGUI window type. See CEGUI::WindowManager::getSingleton().createWindow().
[in]_nameUnique name for the window.
[in]_parentName of the parent window.
[in]_positionPosition of the window within the parent.
[in]_sizeSize of the window.
[in]_textDisplay title of the window.
bool gazebo::rendering::GUIOverlay::HandleKeyPressEvent ( const std::string &  _key)

Handle a key press event.

Parameters
[in]_keyThe key pressed.
Returns
True if the key press event was handled.
bool gazebo::rendering::GUIOverlay::HandleKeyReleaseEvent ( const std::string &  _key)

Handle a key release event.

Parameters
[in]_keyThe key released.
Returns
True if the key release event was handled.
bool gazebo::rendering::GUIOverlay::HandleMouseEvent ( const common::MouseEvent _evt)

Handle a mouse event.

Parameters
[in]_evtThe mouse event.
Returns
True if the mouse event was handled.
void gazebo::rendering::GUIOverlay::Hide ( )

Make the overlay invisible.

void gazebo::rendering::GUIOverlay::Init ( Ogre::RenderTarget *  _renderTarget)

Initialize the overlay.

Parameters
[in]_renderTargetThe render target which will have the overlay.
bool gazebo::rendering::GUIOverlay::IsInitialized ( )

Return true if the overlay has been initialized.

Returns
True if initialized
void gazebo::rendering::GUIOverlay::LoadLayout ( const std::string &  _filename)

Load a CEGUI layout file.

Parameters
[in]_filenameName of the layout file.
void gazebo::rendering::GUIOverlay::Resize ( unsigned int  _width,
unsigned int  _height 
)

Resize the window.

void gazebo::rendering::GUIOverlay::Show ( )

Make the overlay visible.

void gazebo::rendering::GUIOverlay::Update ( )

Update the overlay's objects.


The documentation for this class was generated from the following file: