/*****************************************************************************
 * $LastChangedDate: 2009-11-07 22:56:33 -0500 (Sat, 07 Nov 2009) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Mouse device class (OSG).
 *//*
 * LEGAL:   COPYRIGHT (C) 2009 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#if COMPILE_OSG
#ifndef INPUT_DEVICE_MOUSE_OSG_HH
#define INPUT_DEVICE_MOUSE_OSG_HH 1

#include "input/device_mouse.hh"

#include <osgGA/GUIEventHandler>

namespace input {

////////////////////////////////////////////////////////////////////////////////
/// @brief Mouse device class (OSG).
///
/// This is a private implementation of KeyboardDevice.
/// KeyboardDeviceOSG and MouseDeviceOG are similar.
///
class MouseDeviceOSG : public MouseDevice
{
PREVENT_COPYING(MouseDeviceOSG)
friend class MouseDevice;
private:
                    MouseDeviceOSG( void );
    virtual         ~MouseDeviceOSG();
    virtual bool    EnableDevice( void );  // implement Device abstract method

    /// @brief Handles mouse events (OSG).
    class HandlerOSG : public osgGA::GUIEventHandler
    {
    public:
                        HandlerOSG( void ) { }
        virtual         ~HandlerOSG() { }
        virtual bool    handle( const osgGA::GUIEventAdapter& event, osgGA::GUIActionAdapter& action );
        virtual void    accept( osgGA::GUIEventHandlerVisitor& visitor );
    };
};

} // namespace input

#endif // INPUT_DEVICE_MOUSE_OSG_HH
#endif // COMPILE_OSG
