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


C++ wxDELETE函数代码示例

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


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

示例1: wxDELETE

void wxArchiveFSCacheDataImpl::CloseStreams()
{
    wxDELETE(m_archive);
    wxDELETE(m_stream);
}
开发者ID:CyberIntelMafia,项目名称:clamav-devel,代码行数:5,代码来源:fs_arc.cpp

示例2: wxDELETE

FbImportBook::~FbImportBook()
{
	wxDELETE(m_parser);
}
开发者ID:EvgeniiFrolov,项目名称:myrulib,代码行数:4,代码来源:FbImportReader.cpp

示例3: wxDynamicCast

bool wxStandardDialogLayoutAdapter::DoLayoutAdaptation(wxDialog* dialog)
{
    if (dialog->GetSizer())
    {
#if wxUSE_BOOKCTRL
        wxBookCtrlBase* bookContentWindow = wxDynamicCast(dialog->GetContentWindow(), wxBookCtrlBase);

        if (bookContentWindow)
        {
            // If we have a book control, make all the pages (that use sizers) scrollable
            wxWindowList windows;
            for (size_t i = 0; i < bookContentWindow->GetPageCount(); i++)
            {
                wxWindow* page = bookContentWindow->GetPage(i);

                wxScrolledWindow* scrolledWindow = wxDynamicCast(page, wxScrolledWindow);
                if (scrolledWindow)
                    windows.Append(scrolledWindow);
                else if (!scrolledWindow && page->GetSizer())
                {
                    // Create a scrolled window and reparent
                    scrolledWindow = CreateScrolledWindow(page);
                    wxSizer* oldSizer = page->GetSizer();

                    wxSizer* newSizer = new wxBoxSizer(wxVERTICAL);
                    newSizer->Add(scrolledWindow,1, wxEXPAND, 0);

                    page->SetSizer(newSizer, false /* don't delete the old sizer */);

                    scrolledWindow->SetSizer(oldSizer);

                    ReparentControls(page, scrolledWindow);

                    windows.Append(scrolledWindow);
                }
            }

            FitWithScrolling(dialog, windows);
        }
        else
#endif // wxUSE_BOOKCTRL
        {
#if wxUSE_BUTTON
            // If we have an arbitrary dialog, create a scrolling area for the main content, and a button sizer
            // for the main buttons.
            wxScrolledWindow* scrolledWindow = CreateScrolledWindow(dialog);

            int buttonSizerBorder = 0;

            // First try to find a wxStdDialogButtonSizer
            wxSizer* buttonSizer = FindButtonSizer(true /* find std button sizer */, dialog, dialog->GetSizer(), buttonSizerBorder);

            // Next try to find a wxBoxSizer containing the controls
            if (!buttonSizer && dialog->GetLayoutAdaptationLevel() > wxDIALOG_ADAPTATION_STANDARD_SIZER)
                buttonSizer = FindButtonSizer(false /* find ordinary sizer */, dialog, dialog->GetSizer(), buttonSizerBorder);

            // If we still don't have a button sizer, collect any 'loose' buttons in the layout
            if (!buttonSizer && dialog->GetLayoutAdaptationLevel() > wxDIALOG_ADAPTATION_ANY_SIZER)
            {
                int count = 0;
                wxStdDialogButtonSizer* stdButtonSizer = new wxStdDialogButtonSizer;
                buttonSizer = stdButtonSizer;

                FindLooseButtons(dialog, stdButtonSizer, dialog->GetSizer(), count);
                if (count > 0)
                    stdButtonSizer->Realize();
                else
                {
                    wxDELETE(buttonSizer);
                }
            }

            if (buttonSizerBorder == 0)
                buttonSizerBorder = 5;

            ReparentControls(dialog, scrolledWindow, buttonSizer);

            wxBoxSizer* newTopSizer = new wxBoxSizer(wxVERTICAL);
            wxSizer* oldSizer = dialog->GetSizer();

            dialog->SetSizer(newTopSizer, false /* don't delete old sizer */);

            newTopSizer->Add(scrolledWindow, 1, wxEXPAND|wxALL, 0);
            if (buttonSizer)
                newTopSizer->Add(buttonSizer, 0, wxEXPAND|wxALL, buttonSizerBorder);

            scrolledWindow->SetSizer(oldSizer);

            FitWithScrolling(dialog, scrolledWindow);
#endif // wxUSE_BUTTON
        }
    }

    dialog->SetLayoutAdaptationDone(true);
    return true;
}
开发者ID:beanhome,项目名称:dev,代码行数:96,代码来源:dlgcmn.cpp

示例4: wxDELETE

void wxPlatform::ClearPlatforms()
{
    wxDELETE(sm_customPlatforms);
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:4,代码来源:utilscmn.cpp

示例5: wxDELETE

AdvancedDlg::~AdvancedDlg()
{
    wxDELETE(m_rightclickMenu);
    
}
开发者ID:GaganJotSingh,项目名称:codelite,代码行数:5,代码来源:advanced_settings.cpp

示例6: wxDynamicCast

void FbAuthListModel::Append(FbModelData * data)
{
	FbAuthListData * item = wxDynamicCast(data, FbAuthListData);
	if (item && m_position > 0) m_items.Insert(item->GetCode(), m_position - 1);
	wxDELETE(data);
}
开发者ID:EvgeniiFrolov,项目名称:myrulib,代码行数:6,代码来源:FbAuthList.cpp

示例7: wxDELETE

wxTopLevelWindowMSW::ButtonMenu::~ButtonMenu()
{
    wxDELETE(m_menu);
}
开发者ID:Jasonudoo,项目名称:wxWidgets,代码行数:4,代码来源:menuce.cpp

示例8: wxDELETE

void SpinCtrlTestCase::tearDown()
{
    wxDELETE(m_spin);
}
开发者ID:mael15,项目名称:wxWidgets,代码行数:4,代码来源:spinctrltest.cpp

示例9: wxDELETE

CompDateAxis::~CompDateAxis()
{
    wxDELETE(m_spanDraw);
}
开发者ID:lukecian,项目名称:wxfreechart,代码行数:4,代码来源:compdateaxis.cpp

示例10: wxDELETE

void wxSound::Free()
{
    wxDELETE(m_data);
}
开发者ID:madnessw,项目名称:thesnow,代码行数:4,代码来源:sound.cpp

示例11: wxDELETE

void wxAppConsoleBase::CleanUp()
{
    wxDELETE(m_mainLoop);
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:4,代码来源:appbase.cpp

示例12: wxDELETE

void ListBoxTestCase::tearDown()
{
    wxDELETE(m_list);
}
开发者ID:enachb,项目名称:freetel-code,代码行数:4,代码来源:listboxtest.cpp

示例13: wxDELETE

void RearrangeListTestCase::tearDown()
{
    wxDELETE(m_rearrange);
}
开发者ID:beanhome,项目名称:dev,代码行数:4,代码来源:rearrangelisttest.cpp

示例14: wxCreateSoundBackendSDL

/*static*/ void wxSound::EnsureBackend()
{
    if (!ms_backend)
    {
        // FIXME -- make this fully dynamic when plugins architecture is in
        // place
#if wxUSE_LIBSDL
        //if (!ms_backend)
        {
#if !wxUSE_PLUGINS
            ms_backend = wxCreateSoundBackendSDL();
#else
            wxString dllname;
            dllname.Printf(wxT("%s/%s"),
                wxDynamicLibrary::GetPluginsDirectory().c_str(),
                wxDynamicLibrary::CanonicalizePluginName(
                    wxT("sound_sdl"), wxDL_PLUGIN_BASE).c_str());
            wxLogTrace(wxT("sound"),
                       wxT("trying to load SDL plugin from '%s'..."),
                       dllname.c_str());
            wxLogNull null;
            ms_backendSDL = new wxDynamicLibrary(dllname, wxDL_NOW);
            if (!ms_backendSDL->IsLoaded())
            {
                wxDELETE(ms_backendSDL);
            }
            else
            {
                typedef wxSoundBackend *(*wxCreateSoundBackend_t)();
                wxDYNLIB_FUNCTION(wxCreateSoundBackend_t,
                                  wxCreateSoundBackendSDL, *ms_backendSDL);
                if (pfnwxCreateSoundBackendSDL)
                {
                    ms_backend = (*pfnwxCreateSoundBackendSDL)();
                }
            }
#endif
            if (ms_backend && !ms_backend->IsAvailable())
            {
                wxDELETE(ms_backend);
            }
        }
#endif

#ifdef HAVE_SYS_SOUNDCARD_H
        if (!ms_backend)
        {
            ms_backend = new wxSoundBackendOSS();
            if (!ms_backend->IsAvailable())
            {
                wxDELETE(ms_backend);
            }
        }
#endif

        if (!ms_backend)
            ms_backend = new wxSoundBackendNull();

        if (!ms_backend->HasNativeAsyncPlayback())
            ms_backend = new wxSoundSyncOnlyAdaptor(ms_backend);

        wxLogTrace(wxT("sound"),
                   wxT("using backend '%s'"), ms_backend->GetName().c_str());
    }
}
开发者ID:CyberIntelMafia,项目名称:clamav-devel,代码行数:65,代码来源:sound.cpp

示例15: OnExit

 virtual void OnExit() { wxDELETE(ms_buffer); }
开发者ID:chromylei,项目名称:third_party,代码行数:1,代码来源:dcbufcmn.cpp


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