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


C++ wxCHECK_RET函数代码示例

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


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

示例1: wxCHECK_RET

void wxPlotCurve::SetClientData( void *data )
{
    wxCHECK_RET(M_PLOTCURVEDATA, wxT("invalid plotcurve"));
    M_PLOTCURVEDATA->SetClientData(data);
}
开发者ID:stahta01,项目名称:wxCode_components,代码行数:5,代码来源:plotcurv.cpp

示例2: wxCHECK_RET

void wxRadioBox::SetLabel( const wxString& label )
{
    wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );

    GTKSetLabelForFrame(GTK_FRAME(m_widget), label);
}
开发者ID:EdgarTx,项目名称:wx,代码行数:6,代码来源:radiobox.cpp

示例3: wxCHECK_RET

void wxTextCtrl::Paste()
{
    wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
    gtk_editable_paste_clipboard(GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG);
}
开发者ID:CyberIntelMafia,项目名称:clamav-devel,代码行数:5,代码来源:textctrl.cpp

示例4: ExportSingleDatasetSelect

void ExportSingleDatasetSelect(wxWindow* pWnd, IGxDataset* const pGxDataset)
{
    wxCHECK_RET(pGxDataset, wxT("The input pointer (IGxDataset*) is NULL"));


    wxGxObject* pGxSrcObj = dynamic_cast<wxGxObject*>(pGxDataset);
    wxString sName = pGxSrcObj->GetName();
    sName = ClearExt(sName);

    wxGxObjectDialog dlg(pWnd, wxID_ANY, _("Select output"));
    dlg.SetName(sName);
    dlg.SetAllowMultiSelect(false);
    dlg.SetAllFilters(false);


    wxGISEnumDatasetType eType = pGxDataset->GetType();
    int eSubType = pGxDataset->GetSubType();
    bool bDefaultSet = false;
    int eDefaulSubType = 0;

    if (eType == enumGISFeatureDataset)
    {
        for (size_t i = enumVecUnknown + 1; i < enumVecMAX; ++i)
        {
            wxGISEnumVectorDatasetType eCurrentSubType = (wxGISEnumVectorDatasetType)i;
            if (eCurrentSubType != eSubType && IsFileDataset(enumGISFeatureDataset, eCurrentSubType))
            {
                if (bDefaultSet)
                {
                    dlg.AddFilter(new wxGxFeatureDatasetFilter(eCurrentSubType), false);
                }
                else
                {
                    dlg.AddFilter(new wxGxFeatureDatasetFilter(eCurrentSubType), true);
                    bDefaultSet = true;
                    eDefaulSubType = eCurrentSubType;
                }
            }
        }

        if (eSubType != enumVecPostGIS)
        {
            dlg.AddFilter(new wxGxFeatureDatasetFilter(enumVecPostGIS), false);
        }
    }
    else if (eType == enumGISRasterDataset)
    {
        //for (size_t i = enumRasterUnknown + 1; i < enumRasterMAX; ++i)
        //{
        //    wxGISEnumRasterDatasetType eCurrentSubType = (wxGISEnumRasterDatasetType)i;
        //    if (eCurrentSubType != eSubType && IsFileDataset(enumGISRasterDataset, eCurrentSubType))
        //    {
        //        if (bDefaultSet)
        //        {
        //            dlg.AddFilter(new wxGxRasterDatasetFilter(eCurrentSubType), false);
        //        }
        //        else
        //        {
        //            dlg.AddFilter(new wxGxRasterDatasetFilter(eCurrentSubType), true);
        //            bDefaultSet = true;
        //            eDefaulSubType = eCurrentSubType;
        //        }
        //    }
        //}

        //if (eSubType != enumRasterPostGIS)
        //{
        //    dlg.AddFilter(new wxGxRasterDatasetFilter(enumRasterPostGIS), false);
        //}
    }
    else if (eType == enumGISTableDataset)
    {
        for (size_t i = enumTableUnknown + 1; i < enumTableMAX; ++i)
        {
            wxGISEnumTableDatasetType eCurrentSubType = (wxGISEnumTableDatasetType)i;
            if (eCurrentSubType != eSubType && IsFileDataset(enumGISTableDataset, eCurrentSubType))
            {
                if (bDefaultSet)
                {
                    dlg.AddFilter(new wxGxTableDatasetFilter(eCurrentSubType), false);
                }
                else
                {
                    dlg.AddFilter(new wxGxTableDatasetFilter(eCurrentSubType), true);
                    bDefaultSet = true;
                    eDefaulSubType = eCurrentSubType;
                }
            }
        }

        if (eSubType != enumTablePostgres)
        {
            dlg.AddFilter(new wxGxTableDatasetFilter(enumTablePostgres), false);
        }
    }

    dlg.SetButtonCaption(_("Export"));
    dlg.SetOverwritePrompt(true);

    wxGxObject* pGxParentObj = pGxSrcObj->GetParent();
//.........这里部分代码省略.........
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:101,代码来源:processing.cpp

示例5: wxCHECK_RET

void wxClientDCImpl::DoGetSize(int *width, int *height) const
{
    wxCHECK_RET( m_window, wxT("wxClientDCImpl without a window?") );

    m_window->GetClientSize(width, height);
}
开发者ID:chromylei,项目名称:third_party,代码行数:6,代码来源:dcclient.cpp

示例6: GetScreen

void SCH_EDIT_FRAME::EndSegment( wxDC* DC )
{
    SCH_SCREEN* screen = GetScreen();
    SCH_LINE* segment = (SCH_LINE*) screen->GetCurItem();

    if( segment == NULL || segment->Type() != SCH_LINE_T || !segment->IsNew() )
        return;

    // Delete zero length segments and clear item flags.
    SCH_ITEM* item = s_wires.begin();

    while( item )
    {
        item->ClearFlags();

        wxCHECK_RET( item->Type() == SCH_LINE_T, wxT( "Unexpected object type in wire list." ) );

        segment = (SCH_LINE*) item;
        item = item->Next();

        if( segment->IsNull() )
            delete s_wires.Remove( segment );
    }

    if( s_wires.GetCount() == 0 )
        return;

    // Get the last non-null wire (this is the last created segment).
    SetRepeatItem( segment = (SCH_LINE*) s_wires.GetLast() );

    screen->SetCurItem( NULL );
    m_canvas->EndMouseCapture( -1, -1, wxEmptyString, false );

    // store the terminal point of this last segment: a junction could be needed
    // (the last wire could be merged/deleted/modified, and lost)
    wxPoint endpoint = segment->GetEndPoint();

    // store the starting point of this first segment: a junction could be needed
    SCH_LINE* firstsegment = (SCH_LINE*) s_wires.GetFirst();
    wxPoint startPoint = firstsegment->GetStartPoint();

    screen->Append( s_wires );

    // Correct and remove segments that need to be merged.
    screen->SchematicCleanUp( NULL, DC );

    // A junction could be needed to connect the end point of the last created segment.
    if( screen->IsJunctionNeeded( endpoint ) )
        screen->Append( AddJunction( DC, endpoint ) );

    // A junction could be needed to connect the start point of the set of new created wires
    if( screen->IsJunctionNeeded( startPoint ) )
        screen->Append( AddJunction( DC, startPoint ) );

    m_canvas->Refresh();

    // Put the snap shot of the previous wire, buses, and junctions in the undo/redo list.
    PICKED_ITEMS_LIST oldItems;

    oldItems.m_Status = UR_WIRE_IMAGE;

    while( s_oldWires.GetCount() != 0 )
    {
        ITEM_PICKER picker = ITEM_PICKER( s_oldWires.PopFront(), UR_WIRE_IMAGE );
        oldItems.PushItem( picker );
    }

    SaveCopyInUndoList( oldItems, UR_WIRE_IMAGE );

    OnModify();
}
开发者ID:LDavis4559,项目名称:kicad-source-mirror,代码行数:71,代码来源:bus-wire-junction.cpp

示例7: wxCHECK_RET

void wxMenuBase::AddSubMenu(wxMenu *submenu)
{
    wxCHECK_RET( submenu, wxT("can't add a NULL submenu") );

    submenu->SetParent((wxMenu *)this);
}
开发者ID:beanhome,项目名称:dev,代码行数:6,代码来源:menucmn.cpp

示例8: wxCHECK_RET

// ----------------------------------------------------------------------------
// client data
// ----------------------------------------------------------------------------
void wxChoice::DoSetItemClientData(unsigned int n, void* clientData)
{
    wxCHECK_RET( IsValid(n), wxT("wxChoice::DoSetItemClientData: invalid index") );

    m_datas[n] = (char*)clientData ;
}
开发者ID:SCP-682,项目名称:Cities3D,代码行数:9,代码来源:choice.cpp

示例9: if

wxGLContext::wxGLContext(wxGLCanvas *win,
                         const wxGLContext *other,
                         const wxGLContextAttrs *ctxAttrs)
{
    const int* contextAttribs = NULL;
    bool needsARB = false;

    if ( ctxAttrs )
    {
        contextAttribs = ctxAttrs->GetGLAttrs();
        needsARB = ctxAttrs->NeedsARB();
    }
    else if ( win->GetGLCTXAttrs().GetGLAttrs() )
    {
        // If OpenGL context parameters were set at wxGLCanvas ctor, get them now
        contextAttribs = win->GetGLCTXAttrs().GetGLAttrs();
        needsARB = win->GetGLCTXAttrs().NeedsARB();
    }
    // else use GPU driver defaults

    m_isOk = false;

    // We need to create a temporary context to get the pointer to
    // wglCreateContextAttribsARB function
    HGLRC tempContext = wglCreateContext(win->GetHDC());
    wxCHECK_RET( tempContext, "wglCreateContext failed!" );

    wglMakeCurrent(win->GetHDC(), tempContext);
    PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB
            = (PFNWGLCREATECONTEXTATTRIBSARBPROC)
            wglGetProcAddress("wglCreateContextAttribsARB");
    wglMakeCurrent(win->GetHDC(), NULL);
    wglDeleteContext(tempContext);

    // The preferred way is using wglCreateContextAttribsARB, even for old context
    if ( !wglCreateContextAttribsARB && needsARB ) // OpenGL 3 context creation
    {
        wxLogMessage(_("OpenGL 3.0 or later is not supported by the OpenGL driver."));
        return;
    }

    if ( wglCreateContextAttribsARB )
    {
        m_glContext = wglCreateContextAttribsARB(win->GetHDC(),
                                                other ? other->m_glContext : 0,
                                                contextAttribs);
    }
    else
    {
        // Create legacy context
        m_glContext = wglCreateContext(win->GetHDC());
        // Set shared context
        if ( other && !wglShareLists(other->m_glContext, m_glContext) )
            wxLogLastError("wglShareLists");
     }

    if ( !m_glContext )
        wxLogMessage(_("Couldn't create OpenGL context"));
    else
        m_isOk = true;
}
开发者ID:gdos,项目名称:wxWidgets,代码行数:61,代码来源:glcanvas.cpp

示例10: wxCHECK_RET

void wxWizard::SetPageSize(const wxSize& size)
{
    wxCHECK_RET(!m_started, wxT("wxWizard::SetPageSize after RunWizard"));
    m_sizePage = size;
}
开发者ID:ACanadianKernel,项目名称:pcsx2,代码行数:5,代码来源:wizard.cpp

示例11: wxCHECK_RET

void 
hoxTable::SetBoard( hoxBoard* pBoard )
{
	wxCHECK_RET(m_board == NULL, "The Board has already been set.");
    m_board = pBoard;
}
开发者ID:DoBuiThao,项目名称:hoxchess,代码行数:6,代码来源:hoxTable.cpp

示例12: WXUNUSED

void wxMenuBar::Refresh(bool WXUNUSED(eraseBackground), const wxRect *WXUNUSED(rect))
{
    wxCHECK_RET( IsAttached(), wxT("can't refresh unatteched menubar") );

    DrawMenuBar();
}
开发者ID:Bluehorn,项目名称:wxPython,代码行数:6,代码来源:menu.cpp

示例13: wxCHECK_RET

void wxColourData::SetCustomColour(int i, const wxColour& colour)
{
    wxCHECK_RET( i >= 0 && i < NUM_CUSTOM, wxT("custom colour index out of range") );

    m_custColours[i] = colour;
}
开发者ID:Zombiebest,项目名称:Dolphin,代码行数:6,代码来源:colourdata.cpp

示例14: GetCrossHairPosition

void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type )
{
    SCH_LINE* segment;
    SCH_LINE* nextSegment;
    wxPoint   cursorpos = GetCrossHairPosition();

    // We should know if a segment is currently in progress
    segment = (SCH_LINE*) GetScreen()->GetCurItem();
    if( segment )   // a current item exists, but not necessary a currently edited item
    {
        if( !segment->GetFlags() || ( segment->Type() != SCH_LINE_T ) )
        {
            if( segment->GetFlags() )
            {
                wxLogDebug( wxT( "BeginSegment: item->GetFlags()== %X" ),
                    segment->GetFlags() );
            }
            // no wire, bus or graphic line in progress
            segment = NULL;
        }
    }

    if( !segment )  /* first point : Create first wire or bus */
    {
        GetScreen()->ExtractWires( s_oldWires, true );
        GetScreen()->SchematicCleanUp( m_canvas );

        switch( type )
        {
        default:
            segment = new SCH_LINE( cursorpos, LAYER_NOTES );
            break;

        case LAYER_WIRE:
            segment = new SCH_LINE( cursorpos, LAYER_WIRE );

            /* A junction will be created later, when we'll know the
             * segment end position, and if the junction is really needed */
            break;

        case LAYER_BUS:
            segment = new SCH_LINE( cursorpos, LAYER_BUS );
            break;
        }

        segment->SetFlags( IS_NEW );
        s_wires.PushBack( segment );
        GetScreen()->SetCurItem( segment );

        // We need 2 segments to go from a given start pin to an end point when the horizontal
        // and vertical lines only switch is on.
        if( GetForceHVLines() )
        {
            nextSegment = new SCH_LINE( *segment );
            nextSegment->SetFlags( IS_NEW );
            s_wires.PushBack( nextSegment );
            GetScreen()->SetCurItem( nextSegment );
        }

        m_canvas->SetMouseCapture( DrawSegment, AbortCreateNewLine );
        SetRepeatItem( NULL );
    }
    else    // A segment is in progress: terminates the current segment and add a new segment.
    {
        SCH_LINE* prevSegment = (SCH_LINE*) segment->Back();

        // Be aware prevSegment can be null when the horizontal and vertical lines only switch is off
        // when we create the first segment.

        if( !GetForceHVLines() )
        {
            // If only one segment is needed and it has a zero length, do not create a new one.
            if( segment->IsNull() )
                return;
        }
        else
        {
            wxCHECK_RET( prevSegment != NULL, wxT( "Failed to create second line segment." ) );

            // If two segments are required and they both have zero length, do not
            // create a new one.
            if( prevSegment && prevSegment->IsNull() && segment->IsNull() )
                return;
        }

        m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );

        // Terminate the command if the end point is on a pin, junction, or another wire or bus.
        if( GetScreen()->IsTerminalPoint( cursorpos, segment->GetLayer() ) )
        {
            EndSegment( DC );
            return;
        }

        // Create a new segment, and chain it after the current new segment.
        nextSegment = new SCH_LINE( *segment );
        nextSegment->SetStartPoint( cursorpos );
        s_wires.PushBack( nextSegment );

        segment->SetEndPoint( cursorpos );
//.........这里部分代码省略.........
开发者ID:LDavis4559,项目名称:kicad-source-mirror,代码行数:101,代码来源:bus-wire-junction.cpp

示例15: wxCHECK_RET

void wxBitmapComboBoxBase::DoSetItemBitmap(unsigned int n, const wxBitmap& bitmap)
{
    wxCHECK_RET( n < m_bitmaps.size(), "invalid item index" );
    *GetBitmapPtr(n) = bitmap;
}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:5,代码来源:bmpcboxcmn.cpp


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