本文整理汇总了C++中wxDELETE函数的典型用法代码示例。如果您正苦于以下问题:C++ wxDELETE函数的具体用法?C++ wxDELETE怎么用?C++ wxDELETE使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wxDELETE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wxDELETE
void wxArchiveFSCacheDataImpl::CloseStreams()
{
wxDELETE(m_archive);
wxDELETE(m_stream);
}
示例2: wxDELETE
FbImportBook::~FbImportBook()
{
wxDELETE(m_parser);
}
示例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;
}
示例4: wxDELETE
void wxPlatform::ClearPlatforms()
{
wxDELETE(sm_customPlatforms);
}
示例5: wxDELETE
AdvancedDlg::~AdvancedDlg()
{
wxDELETE(m_rightclickMenu);
}
示例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);
}
示例7: wxDELETE
wxTopLevelWindowMSW::ButtonMenu::~ButtonMenu()
{
wxDELETE(m_menu);
}
示例8: wxDELETE
void SpinCtrlTestCase::tearDown()
{
wxDELETE(m_spin);
}
示例9: wxDELETE
CompDateAxis::~CompDateAxis()
{
wxDELETE(m_spanDraw);
}
示例10: wxDELETE
void wxSound::Free()
{
wxDELETE(m_data);
}
示例11: wxDELETE
void wxAppConsoleBase::CleanUp()
{
wxDELETE(m_mainLoop);
}
示例12: wxDELETE
void ListBoxTestCase::tearDown()
{
wxDELETE(m_list);
}
示例13: wxDELETE
void RearrangeListTestCase::tearDown()
{
wxDELETE(m_rearrange);
}
示例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());
}
}
示例15: OnExit
virtual void OnExit() { wxDELETE(ms_buffer); }