OSGUIsh  0.3.1
MouseDownFocusPolicy.hpp
Go to the documentation of this file.
00001 /******************************************************************************\
00002 * MouseDownFocusPolicy.hpp                                                     *
00003 * A focus policy that sets the focus on a node that gets "MouseDown" event.    *
00004 *                                                                              *
00005 * Copyright (C) 2006-2010 by Leandro Motta Barros.                             *
00006 *                                                                              *
00007 * This program is distributed under the OpenSceneGraph Public License. You     *
00008 * should have received a copy of it with the source distribution, in a file    *
00009 * named 'COPYING.txt'.                                                         *
00010 \******************************************************************************/
00011 
00012 #ifndef _OSGUISH_MOUSE_DOWN_FOCUS_POLICY_HPP_
00013 #define _OSGUISH_MOUSE_DOWN_FOCUS_POLICY_HPP_
00014 
00015 #include <OSGUIsh/FocusPolicy.hpp>
00016 
00017 
00018 namespace OSGUIsh
00019 {
00024    class MouseDownFocusPolicy: public FocusPolicy
00025    {
00026       public:
00028          MouseDownFocusPolicy(NodePtr& focusedNode);
00029 
00030          // (inherits documentation)
00031          virtual void updateFocus(const osgGA::GUIEventAdapter& ea,
00032                                   const NodePtr nodeUnderMouse);
00033    };
00034 
00035 } // namespace OSGUIsh
00036 
00037 #endif // _OSGUISH_MOUSE_DOWN_FOCUS_POLICY_HPP_