|
OSGUIsh
0.3.1
|
#include <FocusPolicy.hpp>
Public Member Functions | |
| FocusPolicy (NodePtr &focusedNode) | |
| virtual void | updateFocus (const osgGA::GUIEventAdapter &ea, const NodePtr nodeUnderMouse)=0 |
Protected Member Functions | |
| void | setFocusedNode (NodePtr focusedNode) |
| Updates the focused node. | |
Private Attributes | |
| NodePtr & | focusedNode_ |
An abstract class defining an interface used to implement different policies for changing focus from one node to another.
Definition at line 26 of file FocusPolicy.hpp.
| OSGUIsh::FocusPolicy::FocusPolicy | ( | NodePtr & | focusedNode | ) |
Constructs a FocusPolicy.
| focusedNode | The node with focus. A FocusPolicy will keep this pointing to the node that has the focus. |
| void OSGUIsh::FocusPolicy::setFocusedNode | ( | NodePtr | focusedNode | ) | [inline, protected] |
| virtual void OSGUIsh::FocusPolicy::updateFocus | ( | const osgGA::GUIEventAdapter & | ea, |
| const NodePtr | nodeUnderMouse | ||
| ) | [pure virtual] |
Concrete subclasses of FocusPolicy will implement this so that setFocusedNode() is called whenever it is necessary to change the focus according to the policy.
This is called for every event arriving via OSG, after the signals are called.
| ea | The event generated by OSG. |
| nodeUnderMouse | The node under the mouse pointer. |
Implemented in OSGUIsh::ManualFocusPolicy, OSGUIsh::MouseDownFocusPolicy, and OSGUIsh::MouseOverFocusPolicy.
NodePtr& OSGUIsh::FocusPolicy::focusedNode_ [private] |
A reference to the focused node. The policy will make this point to the proper node, the one that has the focus according to the policy.
Definition at line 58 of file FocusPolicy.hpp.
Referenced by setFocusedNode().
1.7.5.1