当前位置: 首页>>代码示例>>C++>>正文


C++ SetReturnCode函数代码示例

本文整理汇总了C++中SetReturnCode函数的典型用法代码示例。如果您正苦于以下问题:C++ SetReturnCode函数的具体用法?C++ SetReturnCode怎么用?C++ SetReturnCode使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SetReturnCode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetReturnCode

void DIALOG_DRC_CONTROL::OnOkClick( wxCommandEvent& event )
{
    SetReturnCode( wxID_OK );
    SetDrcParmeters();

    m_tester->DestroyDialog( wxID_OK );
}
开发者ID:chgans,项目名称:kicad,代码行数:7,代码来源:dialog_drc.cpp

示例2: DIALOG_COPPER_ZONE_BASE

DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_BASE_FRAME* aParent, ZONE_SETTINGS* aSettings ) :
    DIALOG_COPPER_ZONE_BASE( aParent )
{
    m_Parent = aParent;
    m_Config = Kiface().KifaceSettings();

    m_ptr = aSettings;
    m_settings = *aSettings;

    m_NetSortingByPadCount = true;      // false = alphabetic sort, true = pad count sort
    m_OnExitCode = ZONE_ABORT;

    SetReturnCode( ZONE_ABORT );        // Will be changed on buttons click

    // Fix static text widget minimum width to a suitable value so that
    // resizing the dialog is not necessary when changing the corner smoothing type.
    // Depends on the default text in the widget.
    m_cornerSmoothingTitle->SetMinSize( m_cornerSmoothingTitle->GetSize() );

    initDialog();

    m_sdbSizerOK->SetDefault();
    GetSizer()->SetSizeHints( this );
    Center();
}
开发者ID:grtwall,项目名称:kicad-source-mirror,代码行数:25,代码来源:dialog_copper_zones.cpp

示例3: EndModal

void DlgSaveLayout::OnOkClick( wxCommandEvent& event )
{
	if(!m_ComboLayout->GetValue().IsEmpty())
    {
		if(bSave)
		{
			wxMainFrame::Get()->AddLayout(m_ComboLayout->GetValue());
		}
		else
		{
			wxMainFrame::Get()->RemoveLayout(m_ComboLayout->GetValue());
		}

        if ( IsModal() )
            EndModal(wxID_OK); // If modal
        else
        {
            SetReturnCode(wxID_OK);
            this->Show(false); // If modeless
        }
    }	
	else
	{
		wxMessageBox(wxT("You must enter a layout name"), wxT("Error"));
	}
}
开发者ID:cubemoon,项目名称:game-editor,代码行数:26,代码来源:DlgSaveLayout.cpp

示例4: SetReturnCode

void DIALOG_NON_COPPER_ZONES_EDITOR::Init()
{
    BOARD* board = m_parent->GetBoard();

    SetReturnCode( ZONE_ABORT );  // Will be changed on button click

    AddUnitSymbol( *m_MinThicknessValueTitle, g_UserUnit );
    wxString msg = StringFromValue( g_UserUnit, m_settings.m_ZoneMinThickness );
    m_ZoneMinThicknessCtrl->SetValue( msg );

    if( m_settings.m_Zone_45_Only )
        m_OrientEdgesOpt->SetSelection( 1 );

    switch( m_settings.m_Zone_HatchingStyle )
    {
    case CPolyLine::NO_HATCH:
        m_OutlineAppearanceCtrl->SetSelection( 0 );
        break;

    case CPolyLine::DIAGONAL_EDGE:
        m_OutlineAppearanceCtrl->SetSelection( 1 );
        break;

    case CPolyLine::DIAGONAL_FULL:
        m_OutlineAppearanceCtrl->SetSelection( 2 );
        break;
    }

    // Create one column in m_LayerSelectionCtrl
    wxListItem column0;
    column0.SetId( 0 );
    m_LayerSelectionCtrl->InsertColumn( 0, column0 );

    // Create an icon list:
    wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );
    m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL );

    int ii = 0;
    int lyrSelect = ( (PCB_SCREEN*) m_parent->GetScreen() )->m_Active_Layer;

    if( m_zone )
        lyrSelect = m_zone->GetLayer();

    for( LSEQ seq = LSET::AllNonCuMask().Seq(); seq; ++seq, ++ii )
    {
        LAYER_ID layer = *seq;

        EDA_COLOR_T layerColor = board->GetLayerColor( layer );
        imageList->Add( makeLayerBitmap( layerColor ) );

        wxString msg = board->GetLayerName( layer );
        msg.Trim();

        int itemIndex = m_LayerSelectionCtrl->InsertItem(
                m_LayerSelectionCtrl->GetItemCount(), msg, ii );

        if(lyrSelect == layer )
            m_LayerSelectionCtrl->Select( itemIndex );
    }
}
开发者ID:antogg,项目名称:kicad-source-mirror,代码行数:60,代码来源:dialog_non_copper_zones_properties.cpp

示例5: EndModal

void ParamEdit::Close() {
	if (IsModal()) 
		EndModal(wxID_OK);
	else {
		SetReturnCode(wxID_OK);
		Show(false);
	}
}
开发者ID:cyclefusion,项目名称:szarp,代码行数:8,代码来源:paredit.cpp

示例6: wxASSERT_MSG

void wxDialog::EndModal(int retCode)
{
    wxASSERT_MSG( IsModal(), wxT("EndModal() called for non modal dialog") );

    SetReturnCode(retCode);

    Hide();
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:8,代码来源:dialog.cpp

示例7: SetReturnCode

void DIALOG_DRC_CONTROL::OnCancelClick( wxCommandEvent& event )
{
    SetReturnCode( wxID_CANCEL );

    // The dialog can be modal or not modal.
    // Leave the DRC caller destroy (or not) the dialog
    m_tester->DestroyDRCDialog( wxID_CANCEL );
}
开发者ID:AlexanderBrevig,项目名称:kicad-source-mirror,代码行数:8,代码来源:dialog_drc.cpp

示例8: SetReturnCode

// NB: this function (surprisingly) may be called for both modal and modeless
//     dialogs and should work for both of them
void wxDialog::EndModal(int retCode)
{
    if ( m_eventLoop )
        m_eventLoop->Exit(retCode);

    SetReturnCode(retCode);
    Show(false);
}
开发者ID:beanhome,项目名称:dev,代码行数:10,代码来源:dialog_osx.cpp

示例9: WXUNUSED

void CConfigChooser::onCancel(wxCommandEvent& WXUNUSED(event))
{
	if (IsModal()) {
		EndModal(wxID_CANCEL);
	} else {
		SetReturnCode(wxID_CANCEL);
		Show(false);
	}
}
开发者ID:g4klx,项目名称:uWSDR,代码行数:9,代码来源:ConfigChooser.cpp

示例10: wxASSERT_MSG

void wxDialog::EndModal(int retCode)
{
    wxASSERT_MSG( IsModal(), _T("EndModal() called for non modal dialog") );

//    m_endModalCalled = true;
    SetReturnCode(retCode);

    Hide();
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:9,代码来源:dialog.cpp

示例11: SetReturnCode

//----------------------------------------------------------------
void CommandDialog::OnButtonCancelClick(wxCommandEvent& event)
/**
 * \brief Occurs when the Cancel Button is clicked. Closes the Dialog.
 * \param event CommandEvent.
 **/
{
    SetReturnCode(wxID_CANCEL);
    Destroy();
}
开发者ID:Sneedd,项目名称:penv,代码行数:10,代码来源:commanddialog.cpp

示例12: EndModal

void DIALOG_ANNOTATE::OnCancelClick( wxCommandEvent& event )
{
    if( IsModal() )
        EndModal( wxID_CANCEL );
    else
    {
        SetReturnCode( wxID_CANCEL );
        this->Show( false );
    }
}
开发者ID:PatMart,项目名称:kicad-source-mirror,代码行数:10,代码来源:dialog_annotate.cpp

示例13: ShowModal

void wxDialogBase::ShowWindowModal ()
{
    int retval = ShowModal();
    // wxWindowModalDialogEvent relies on GetReturnCode() returning correct
    // code. Rather than doing it manually in all ShowModal() overrides for
    // native dialogs (and getting accidentally broken again), set it here.
    // The worst that can happen is that it will be set twice to the same
    // value.
    SetReturnCode(retval);
    SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED  );
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:11,代码来源:dlgcmn.cpp

示例14: ApplyLimit

void filter_dlg::OnOK(wxCommandEvent &event) {
	if (Validate() && TransferDataFromWindow()) {
		ApplyLimit();
		ExecFilter();
		if (IsModal()) {
			EndModal(wxID_OK);
		} else {
			SetReturnCode(wxID_OK);
			Show(false);
		}
	}
}
开发者ID:JGRennison,项目名称:retcon,代码行数:12,代码来源:filter-dlg.cpp

示例15: DIALOG_GENDRILL_BASE

DIALOG_GENDRILL::DIALOG_GENDRILL( PCB_EDIT_FRAME* parent ) :
    DIALOG_GENDRILL_BASE( parent )
{
    m_parent = parent;
    m_board  = parent->GetBoard();
    m_config = Kiface().KifaceSettings();
    m_plotOpts = m_parent->GetPlotSettings();

    SetReturnCode( 1 );
    initDialog();
    GetSizer()->SetSizeHints( this );
}
开发者ID:AlexanderBrevig,项目名称:kicad-source-mirror,代码行数:12,代码来源:dialog_gendrill.cpp


注:本文中的SetReturnCode函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。