本文整理汇总了C++中LayerSurface::GetActiveAnnotationIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ LayerSurface::GetActiveAnnotationIndex方法的具体用法?C++ LayerSurface::GetActiveAnnotationIndex怎么用?C++ LayerSurface::GetActiveAnnotationIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayerSurface
的用法示例。
在下文中一共展示了LayerSurface::GetActiveAnnotationIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoUpdateUI
//.........这里部分代码省略.........
m_choiceVector->Append( _("Off") );
if ( surf )
{
for ( int i = 0; i < surf->GetNumberOfVectorSets(); i++ )
{
m_choiceVector->Append( wxString::FromAscii( surf->GetVectorSetName( i ) ) );
}
}
m_choiceVector->Append( _("Load vector data...") );
m_choiceVector->SetSelection( surf ? 1 + surf->GetActiveVector() : 0 );
// update overlay controls
m_choiceOverlay->Clear();
m_choiceOverlay->Append( _("Off") );
if ( layer )
{
for ( int i = 0; i < layer->GetNumberOfOverlays(); i++ )
{
m_choiceOverlay->Append( wxString::FromAscii( layer->GetOverlay( i )->GetName() ) );
}
}
m_choiceOverlay->Append( _("Load from file...") );
m_choiceOverlay->SetSelection( layer ? 1 + layer->GetActiveOverlayIndex() : 0 );
m_btnOverlayConfiguration->Show( layer && layer->GetActiveOverlayIndex() >= 0 );
// update annotation controls
m_choiceAnnotation->Clear();
m_choiceAnnotation->Append( _("Off") );
if ( layer )
{
for ( int i = 0; i < layer->GetNumberOfAnnotations(); i++ )
{
m_choiceAnnotation->Append( wxString::FromAscii( layer->GetAnnotation( i )->GetName() ) );
}
}
m_choiceAnnotation->Append( _("Load from file...") );
m_choiceAnnotation->SetSelection( layer ? 1 + layer->GetActiveAnnotationIndex() : 0 );
// update label controls
m_choiceLabel->Clear();
if ( layer )
{
if ( layer->GetNumberOfLabels() > 0 )
{
for ( int i = 0; i < layer->GetNumberOfLabels(); i++ )
{
m_choiceLabel->Append( wxString::FromAscii( layer->GetLabel( i )->GetName() ) );
}
}
else
m_choiceLabel->Append( _("None") );
}
m_choiceLabel->Append( _("Load from file...") );
if ( layer && layer->GetActiveLabelIndex() >= 0 )
m_choiceLabel->SetSelection( layer->GetActiveLabelIndex() );
else
m_choiceLabel->SetSelection( 0 );
if ( layer && layer->GetActiveLabel() )
{
double* rgb = layer->GetActiveLabel()->GetColor();
m_colorPickerLabel->SetColour( wxColour( (int)(rgb[0]*255), (int)(rgb[1]*255), (int)(rgb[2]*255) ) );
}
int nCurvatureMap = layer ? layer->GetProperties()->GetCurvatureMap() : 0;
for ( size_t i = 0; i < m_widgetsMidPoint.size(); i++ )
{
m_widgetsMidPoint[i]->Show( nCurvatureMap != LayerPropertiesSurface::CM_Off );
}
for ( size_t i = 0; i < m_widgetsSlope.size(); i++ )
{
m_widgetsSlope[i]->Show( nCurvatureMap == LayerPropertiesSurface::CM_Threshold );
}
for ( size_t i = 0; i < m_widgetsVector.size(); i++ )
{
m_widgetsVector[i]->Show( m_choiceVector->GetSelection() > 0 );
}
for ( size_t i = 0; i < m_widgetsVertex.size(); i++ )
{
m_widgetsVertex[i]->Show( m_checkShowVertices->GetValue() );
}
for ( size_t i = 0; i < m_widgetsMesh.size(); i++ )
{
m_widgetsMesh[i]->Show( layer && layer->GetProperties()->GetSurfaceRenderMode() != LayerPropertiesSurface::SM_Surface );
}
for ( size_t i = 0; i < m_widgetsLabel.size(); i++ )
{
m_widgetsLabel[i]->Show( layer && layer->GetActiveLabelIndex() >= 0 );
}
m_colorPicker->Enable( layer ); // && nCurvatureMap != LayerPropertiesSurface::CM_Threshold );
// hack to force resize of these controls in scrolled window
for ( size_t i = 0; i < m_widgetsResize.size(); i++ )
{
wxSize sz = m_widgetsResize[i]->GetMinSize();
m_widgetsResize[i]->SetMinSize( wxSize( 100, sz.GetHeight() ) );
}
Layout();
}