Files
wxWidgets/src/common/appcmn.cpp
Vadim Zeitlin 7beba2fc73 1. wxFontMapper almost finished
2. font helper functions are now in separate files, not utilsunx.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-05 19:03:19 +00:00

78 lines
2.2 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: common/appcmn.cpp
// Purpose: wxAppBase methods common to all platforms
// Author: Vadim Zeitlin
// Modified by:
// Created: 18.10.99
// RCS-ID: $Id$
// Copyright: (c) Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ---------------------------------------------------------------------------
// headers
// ---------------------------------------------------------------------------
#ifdef __GNUG__
#pragma implementation "appbase.h"
#endif
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/list.h"
#endif
#include "wx/thread.h"
#include "wx/confbase.h"
// ===========================================================================
// implementation
// ===========================================================================
// ---------------------------------------------------------------------------
// wxAppBase
// ----------------------------------------------------------------------------
void wxAppBase::ProcessPendingEvents()
{
// ensure that we're the only thread to modify the pending events list
wxCRIT_SECT_LOCKER(locker, wxPendingEventsLocker);
if ( !wxPendingEvents )
return;
// iterate until the list becomes empty
wxNode *node = wxPendingEvents->First();
while (node)
{
wxEvtHandler *handler = (wxEvtHandler *)node->Data();
handler->ProcessPendingEvents();
delete node;
node = wxPendingEvents->First();
}
}
int wxAppBase::OnExit()
{
#if wxUSE_CONFIG
// delete the config object if any (don't use Get() here, but Set()
// because Get() could create a new config object)
delete wxConfigBase::Set((wxConfigBase *) NULL);
#endif // wxUSE_CONFIG
return 0;
}