OSGUIsh  0.3.1
Public Member Functions | Protected Member Functions | Private Attributes
OSGUIsh::FocusPolicy Class Reference

#include <FocusPolicy.hpp>

Inheritance diagram for OSGUIsh::FocusPolicy:
OSGUIsh::ManualFocusPolicy OSGUIsh::MouseDownFocusPolicy OSGUIsh::MouseOverFocusPolicy

List of all members.

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

NodePtrfocusedNode_

Detailed Description

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.


Constructor & Destructor Documentation

OSGUIsh::FocusPolicy::FocusPolicy ( NodePtr focusedNode)

Constructs a FocusPolicy.

Parameters:
focusedNodeThe node with focus. A FocusPolicy will keep this pointing to the node that has the focus.

Member Function Documentation

void OSGUIsh::FocusPolicy::setFocusedNode ( NodePtr  focusedNode) [inline, protected]

Updates the focused node.

Definition at line 50 of file FocusPolicy.hpp.

References focusedNode_.

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.

Parameters:
eaThe event generated by OSG.
nodeUnderMouseThe node under the mouse pointer.

Implemented in OSGUIsh::ManualFocusPolicy, OSGUIsh::MouseDownFocusPolicy, and OSGUIsh::MouseOverFocusPolicy.


Member Data Documentation

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().


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