osgEarth 2.1.1
Public Member Functions | Public Attributes

EditHandler Struct Reference

Inheritance diagram for EditHandler:
Collaboration diagram for EditHandler:

List of all members.

Public Member Functions

 EditHandler (ImageOverlay *overlay, osgViewer::Viewer *viewer, osg::Node *editor)
void onClick (Control *control, int mouseButtonMask)

Public Attributes

ImageOverlay_overlay
osgViewer::Viewer * _viewer
osg::Node * _editor

Detailed Description

Definition at line 100 of file osgearth_imageoverlay.cpp.


Constructor & Destructor Documentation

EditHandler::EditHandler ( ImageOverlay overlay,
osgViewer::Viewer *  viewer,
osg::Node *  editor 
) [inline]

Definition at line 102 of file osgearth_imageoverlay.cpp.

                                                                                  :
      _overlay(overlay),
      _viewer(viewer),
      _editor(editor){ }

Member Function Documentation

void EditHandler::onClick ( Control control,
int  mouseButtonMask 
) [inline, virtual]

Click event with mouse button mask (see osgGA::GUIEventAdapter::MouseButtonMask)

Reimplemented from osgEarth::Util::Controls::ControlEventHandler.

Definition at line 107 of file osgearth_imageoverlay.cpp.

                                                          {        
#if OSG_MIN_VERSION_REQUIRED(2,9,6)
        if (_editor->getNodeMask() != ~0)
        {
            static_cast<LabelControl*>(control)->setText( "Finish" );
            _editor->setNodeMask(~0);
        }
        else
        {
            static_cast<LabelControl*>(control)->setText( "Edit" );
            _editor->setNodeMask(0);
        }

#else
        OE_NOTICE << "Use OSG 2.9.6 or greater to use editing" << std::endl;
#endif
    }

Member Data Documentation

Definition at line 126 of file osgearth_imageoverlay.cpp.

Definition at line 124 of file osgearth_imageoverlay.cpp.

osgViewer::Viewer* EditHandler::_viewer

Definition at line 125 of file osgearth_imageoverlay.cpp.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines