Upgrade WX to r74856, mainly to support @2x.

This commit is contained in:
comex
2013-09-22 18:44:55 -04:00
parent 0bdef3932f
commit 66ed9a1804
1935 changed files with 45373 additions and 22739 deletions

View File

@ -5,7 +5,6 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: app.h 70353 2012-01-15 14:46:41Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -103,6 +102,9 @@ public:
// be done here. When OnRun() returns, the programs starts shutting down.
virtual int OnRun();
// Called before the first events are handled, called from within MainLoop()
virtual void OnLaunched();
// This is called by wxEventLoopBase::SetActive(): you should put the code
// which needs an active event loop here.
// Note that this function is called whenever an event loop is activated;
@ -228,6 +230,14 @@ public:
// for it
static wxAppTraits *GetTraitsIfExists();
// Return some valid traits object.
//
// This method checks if we have wxTheApp and returns its traits if it does
// exist and the traits are non-NULL, similarly to GetTraitsIfExists(), but
// falls back to wxConsoleAppTraits to ensure that it always returns
// something valid.
static wxAppTraits& GetValidTraits();
// returns the main event loop instance, i.e. the event loop which is started
// by OnRun() and which dispatches all events sent from the native toolkit
// to the application (except when new event loops are temporarily set-up).
@ -236,6 +246,18 @@ public:
wxEventLoopBase* GetMainLoop() const
{ return m_mainLoop; }
// This function sets the C locale to the default locale for the current
// environment. It is advised to call this to ensure that the underlying
// toolkit uses the locale in which the numbers and monetary amounts are
// shown in the format expected by user and so on.
//
// Notice that this does _not_ change the global C++ locale, you need to do
// it explicitly if you want.
//
// Finally, notice that while this function is virtual, it is not supposed
// to be overridden outside of the library itself.
virtual void SetCLocale();
// event processing functions
// --------------------------
@ -494,7 +516,7 @@ protected:
wxDECLARE_NO_COPY_CLASS(wxAppConsoleBase);
};
#if defined(__UNIX__) && !defined(__CYGWIN__)
#if defined(__UNIX__) && !defined(__WXMSW__)
#include "wx/unix/app.h"
#else
// this has to be a class and not a typedef as we forward declare it
@ -636,10 +658,9 @@ public:
virtual void SetActive(bool isActive, wxWindow *lastFocus);
#if WXWIN_COMPATIBILITY_2_6
// OBSOLETE: don't use, always returns true
//
// returns true if the program is successfully initialized
wxDEPRECATED( bool Initialized() );
wxDEPRECATED_MSG("always returns true now, don't call")
bool Initialized();
#endif // WXWIN_COMPATIBILITY_2_6
protected:
@ -766,13 +787,26 @@ public:
// your compiler really, really wants main() to be in your main program (e.g.
// hello.cpp). Now wxIMPLEMENT_APP should add this code if required.
#define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \
int main(int argc, char **argv) \
{ \
wxDISABLE_DEBUG_SUPPORT(); \
// For compilers that support it, prefer to use wmain() as this ensures any
// Unicode strings can be passed as command line parameters and not just those
// representable in the current locale.
#if wxUSE_UNICODE && defined(__VISUALC__)
#define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \
int wmain(int argc, wchar_t **argv) \
{ \
wxDISABLE_DEBUG_SUPPORT(); \
\
return wxEntry(argc, argv); \
}
return wxEntry(argc, argv); \
}
#else // Use standard main()
#define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \
int main(int argc, char **argv) \
{ \
wxDISABLE_DEBUG_SUPPORT(); \
\
return wxEntry(argc, argv); \
}
#endif
// port-specific header could have defined it already in some special way
#ifndef wxIMPLEMENT_WXWIN_MAIN
@ -795,6 +829,7 @@ public:
// Use this macro if you want to define your own main() or WinMain() function
// and call wxEntry() from there.
#define wxIMPLEMENT_APP_NO_MAIN(appname) \
appname& wxGetApp() { return *static_cast<appname*>(wxApp::GetInstance()); } \
wxAppConsole *wxCreateApp() \
{ \
wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \
@ -802,9 +837,7 @@ public:
return new appname; \
} \
wxAppInitializer \
wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
appname& wxGetApp() { return *static_cast<appname*>(wxApp::GetInstance()); } \
wxDECLARE_APP(appname)
wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp)
// Same as wxIMPLEMENT_APP() normally but doesn't include themes support in
// wxUniversal builds