本文整理汇总了C++中wxUpdateUIEvent::Check方法的典型用法代码示例。如果您正苦于以下问题:C++ wxUpdateUIEvent::Check方法的具体用法?C++ wxUpdateUIEvent::Check怎么用?C++ wxUpdateUIEvent::Check使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxUpdateUIEvent
的用法示例。
在下文中一共展示了wxUpdateUIEvent::Check方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessUpdateUIEvent
void WordWrapHandler::ProcessUpdateUIEvent(wxWindow* owner, wxUpdateUIEvent& event)
{
clEditor* editor = dynamic_cast<clEditor*>(owner);
if(!editor) {
event.Enable(false);
return;
}
event.Enable(true);
event.Check(editor->GetWrapMode() != wxSTC_WRAP_NONE);
}
示例2: OnCommandUI
void wxGxObjectDialog::OnCommandUI(wxUpdateUIEvent& event)
{
wxGISCommand* pCmd = GetCommand(event.GetId());
if(pCmd)
{
if(pCmd->GetKind() == enumGISCommandCheck)
event.Check(pCmd->GetChecked());
event.Enable(pCmd->GetEnabled());
m_toolBar->SetToolShortHelp(event.GetId(), pCmd->GetTooltip());
}
}
示例3: OnUpdateCheckBoxLoop
void ActorAnimationSettingDialog::OnUpdateCheckBoxLoop(wxUpdateUIEvent& e)
{
bool check = true;
if ( mDObject && ( false == mDObject->getAnimationLoop()) )
{
check = false;
}
e.Check(check);
}
示例4: OnUpdateLineDrawMode
void DISPLAY_FOOTPRINTS_FRAME::OnUpdateLineDrawMode( wxUpdateUIEvent& aEvent )
{
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
wxString msgEdgesFill[2] = { _( "Show outlines in filled mode" ),
_( "Show outlines in sketch mode" ) };
int i = displ_opts->m_DisplayModEdgeFill == SKETCH ? 0 : 1;
aEvent.Check( displ_opts->m_DisplayModEdgeFill == SKETCH );
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH, msgEdgesFill[i] );
}
示例5: On_Execute_UI
//---------------------------------------------------------
void CWKSP_Module_Manager::On_Execute_UI(wxUpdateUIEvent &event)
{
if( g_pModule )
{
if( g_pModule->Get_Menu_ID() == m_pMenu->Get_ID_Translated(event.GetId()) )
{
event.Enable(true);
event.Check(true);
}
else
{
event.Enable(false);
event.Check(false);
}
}
else
{
event.Enable(true);
event.Check(false);
}
}
示例6:
//---------------------------------------------------------
void CVIEW_Map_3D::On_Command_UI(wxUpdateUIEvent &event)
{
switch( event.GetId() )
{
case ID_CMD_MAP3D_INTERPOLATED:
event.Check(m_pImage->m_bInterpol);
break;
case ID_CMD_MAP3D_CENTRAL:
event.Check(m_pImage->m_bCentral);
break;
case ID_CMD_MAP3D_STEREO:
event.Check(m_pImage->m_bStereo);
break;
case ID_CMD_MAP3D_SEQ_PLAY:
event.Check(m_Play_Mode == PLAY_MODE_RUN_ONCE);
break;
case ID_CMD_MAP3D_SEQ_PLAY_LOOP:
event.Check(m_Play_Mode == PLAY_MODE_RUN_LOOP);
break;
case ID_CMD_MAP3D_SEQ_SAVE:
event.Check(m_Play_Mode == PLAY_MODE_RUN_SAVE);
break;
}
}
示例7: switch
//---------------------------------------------------------
void CVIEW_Map_3D::On_Command_UI(wxUpdateUIEvent &event)
{
switch( event.GetId() )
{
case ID_CMD_MAP3D_CENTRAL:
event.Check(m_pPanel->Get_Projector().is_Central());
break;
case ID_CMD_MAP3D_CENTRAL_LESS:
case ID_CMD_MAP3D_CENTRAL_MORE:
event.Enable(m_pPanel->Get_Projector().is_Central());
break;
case ID_CMD_MAP3D_INTERPOLATED:
event.Check(m_pPanel->m_Parameters("DRAPE_MODE")->asInt() != 0);
break;
case ID_CMD_MAP3D_STEREO:
event.Check(m_pPanel->m_Parameters("STEREO")->asBool());
break;
case ID_CMD_MAP3D_SEQ_PLAY:
event.Check(m_pPanel->Play_Get_State() == SG_3DVIEW_PLAY_RUN_ONCE);
break;
case ID_CMD_MAP3D_SEQ_PLAY_LOOP:
event.Check(m_pPanel->Play_Get_State() == SG_3DVIEW_PLAY_RUN_LOOP);
break;
case ID_CMD_MAP3D_SEQ_SAVE:
event.Check(m_pPanel->Play_Get_State() == SG_3DVIEW_PLAY_RUN_SAVE);
break;
}
}
示例8: OnUpdateUIRateSel
void MusikTaskBarIcon::OnUpdateUIRateSel ( wxUpdateUIEvent &event)
{
int songid = wxGetApp().Player.GetCurrentSongid();
CMusikSong song;
if(wxGetApp().Library.GetSongFromSongid(songid,&song ))
{
int nRating = song.Rating;
wxASSERT(nRating >= MUSIK_MIN_RATING && nRating <= MUSIK_MAX_RATING);
event.Check( event.GetId() == (MUSIK_PLAYLIST_CONTEXT_RATING + (nRating - MUSIK_MIN_RATING)));
}
else
event.Enable(false);
}
示例9: OnUpdateTextDrawMode
void DISPLAY_FOOTPRINTS_FRAME::OnUpdateTextDrawMode( wxUpdateUIEvent& aEvent )
{
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
wxString msgTextsFill[2] = { _( "Show texts in filled mode" ),
_( "Show texts in sketch mode" ) };
unsigned i = displ_opts->m_DisplayModTextFill == SKETCH ? 0 : 1;
aEvent.Check( displ_opts->m_DisplayModTextFill == SKETCH );
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, msgTextsFill[i] );
}
示例10: OnUpdateLineDrawMode
void DISPLAY_FOOTPRINTS_FRAME::OnUpdateLineDrawMode( wxUpdateUIEvent& aEvent )
{
wxString msgEdgesFill[3] = { _( "Show outlines in line mode" ),
_( "Show outlines in filled mode" ),
_( "Show outlines in sketch mode" ) };
int i = m_DisplayModEdge + 1;
if ( i > 2 )
i = 0;
aEvent.Check( m_DisplayModEdge == 0 );
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH, msgEdgesFill[i] );
}
示例11: OnUpdateShadow
void LayerDlg::OnUpdateShadow(wxUpdateUIEvent& event)
{
LayerItemData *data = GetLayerDataFromItem(m_item);
if (!data)
{
event.Enable(false);
return;
}
vtStructureLayer *slay = data->m_slay;
if (!slay)
{
// only structures cast shadows
event.Enable(false);
return;
}
if (data->m_item != -1)
{
// individual item is selected
vtStructure3d *str3d = slay->GetStructure3d(data->m_item);
event.Enable(true);
event.Check(str3d->GetCastShadow());
}
else
{
// whole layer is selected
int count = slay->size();
if (count)
{
// just use first item
vtStructure3d *str3d = slay->GetStructure3d(0);
event.Enable(true);
event.Check(str3d->GetCastShadow());
}
else
event.Enable(false);
}
}
示例12: OnUpdateTextDrawMode
void DISPLAY_FOOTPRINTS_FRAME::OnUpdateTextDrawMode( wxUpdateUIEvent& aEvent )
{
wxString msgTextsFill[3] = { _( "Show texts in line mode" ),
_( "Show texts in filled mode" ),
_( "Show texts in sketch mode" ) };
unsigned i = m_DisplayModText + 1;
if ( i > 2 )
i = 0;
aEvent.Check( m_DisplayModText == 0 );
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, msgTextsFill[i] );
}
示例13: On_Command_UI
//---------------------------------------------------------
void CVIEW_Map::On_Command_UI(wxUpdateUIEvent &event)
{
switch( event.GetId() )
{
case ID_CMD_MAP_3D_SHOW:
event.Check(m_pMap->View_3D_Get() != NULL);
break;
case ID_CMD_MAP_LAYOUT_SHOW:
event.Check(m_pMap->View_Layout_Get() != NULL);
break;
case ID_CMD_MAP_SYNCHRONIZE:
event.Enable(m_pMap->Get_Manager()->Get_Count() > 1);
event.Check(m_pMap->is_Synchronising());
break;
case ID_CMD_MAP_SAVE_IMAGE_ON_CHANGE:
event.Check(m_pMap->is_Image_Save_Mode());
break;
case ID_CMD_MAP_MODE_ZOOM:
event.Check(m_pControl->Get_Mode() == MAP_MODE_ZOOM);
break;
case ID_CMD_MAP_MODE_PAN:
event.Check(m_pControl->Get_Mode() == MAP_MODE_PAN || m_pControl->Get_Mode() == MAP_MODE_PAN_DOWN);
break;
case ID_CMD_MAP_MODE_SELECT:
event.Check(m_pControl->Get_Mode() == MAP_MODE_SELECT);
break;
case ID_CMD_MAP_MODE_DISTANCE:
event.Check(m_pControl->Get_Mode() == MAP_MODE_DISTANCE);
break;
case ID_CMD_MAP_ZOOM_BACK:
event.Enable(m_pMap->Set_Extent_Back(true));
break;
case ID_CMD_MAP_ZOOM_FORWARD:
event.Enable(m_pMap->Set_Extent_Forward(true));
break;
}
}
示例14: ProcessUpdateUIEvent
void ViewAsHandler::ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event)
{
LEditor *editor = dynamic_cast<LEditor*>(owner);
if ( !editor ) {
return;
}
event.Enable(true);
wxString lexName = clMainFrame::Get()->GetViewAsLanguageById(event.GetInt());
wxString contextName = editor->GetContext()->GetName();
contextName.MakeLower();
event.Check(contextName == lexName);
}
示例15: OnUpdateSelectTrackWidth
void PCB_EDIT_FRAME::OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent )
{
if( aEvent.GetId() == ID_AUX_TOOLBAR_PCB_TRACK_WIDTH )
{
if( m_SelTrackWidthBox->GetSelection() != (int) GetBoard()->GetTrackWidthIndex() )
m_SelTrackWidthBox->SetSelection( GetBoard()->GetTrackWidthIndex() );
}
else
{
bool check = ( ( ( ID_POPUP_PCB_SELECT_WIDTH1 +
(int) GetBoard()->GetTrackWidthIndex() ) == aEvent.GetId() ) &&
!GetDesignSettings().m_UseConnectedTrackWidth );
aEvent.Check( check );
}
}