osgEarth 2.1.1
Public Member Functions | Public Attributes

EditModeHandler Struct Reference

Inheritance diagram for EditModeHandler:
Collaboration diagram for EditModeHandler:

List of all members.

Public Member Functions

 EditModeHandler (FeatureModelGraph *featureGraph)
void onClick (Control *control, int mouseButtonMask)

Public Attributes

osg::ref_ptr< FeatureModelGraph_featureGraph

Detailed Description

Definition at line 121 of file osgearth_featureeditor.cpp.


Constructor & Destructor Documentation

EditModeHandler::EditModeHandler ( FeatureModelGraph featureGraph) [inline]

Definition at line 123 of file osgearth_featureeditor.cpp.

        : _featureGraph( featureGraph )
    { 
    }

Member Function Documentation

void EditModeHandler::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 128 of file osgearth_featureeditor.cpp.

                                                          {
        
        //Remove the add point handler if it's valid
        if (s_addPointHandler.valid())
        {            
            osgEarth::removeEventHandler( s_viewer, s_addPointHandler.get() );
            s_addPointHandler = NULL;
        }        

        if (!s_editor.valid() && s_activeFeature.valid())
        {
            Style* style = _featureGraph->getStyles()->getDefaultStyle();
            if ( style )
            {
                style->get<LineSymbol>()->stroke()->stipple() = 0x00FF;
                _featureGraph->dirty();
            }
            s_editor = new FeatureEditor(s_activeFeature.get(), s_source.get(), s_mapNode.get());
            s_root->addChild( s_editor.get() );
        }
    }

Here is the call graph for this function:


Member Data Documentation

Definition at line 150 of file osgearth_featureeditor.cpp.


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