git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41099
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// ----------------------------------------------------------------------------
#include "wx/event.h" // for the base class
// ----------------------------------------------------------------------------
#include "wx/event.h" // for the base class
-
-#if wxUSE_GUI
- #include "wx/window.h" // for wxTopLevelWindows
-
- #include "wx/vidmode.h"
-#endif // wxUSE_GUI
-
#include "wx/build.h"
#include "wx/init.h" // we must declare wxEntry()
#include "wx/build.h"
#include "wx/init.h" // we must declare wxEntry()
+#include "wx/intl.h" // for wxLayoutDirection
class WXDLLIMPEXP_BASE wxAppConsole;
class WXDLLIMPEXP_BASE wxAppTraits;
class WXDLLIMPEXP_BASE wxAppConsole;
class WXDLLIMPEXP_BASE wxAppTraits;
#if wxUSE_GUI
class WXDLLEXPORT wxEventLoop;
#if wxUSE_GUI
class WXDLLEXPORT wxEventLoop;
+ struct WXDLLIMPEXP_CORE wxVideoMode;
#endif
// ----------------------------------------------------------------------------
#endif
// ----------------------------------------------------------------------------
// return the "main" top level window (if it hadn't been set previously
// with SetTopWindow(), will return just some top level window and, if
// there are none, will return NULL)
// return the "main" top level window (if it hadn't been set previously
// with SetTopWindow(), will return just some top level window and, if
// there are none, will return NULL)
- virtual wxWindow *GetTopWindow() const
- {
- if (m_topWindow)
- return m_topWindow;
- else if (wxTopLevelWindows.GetCount() > 0)
- return wxTopLevelWindows.GetFirst()->GetData();
- else
- return (wxWindow *)NULL;
- }
+ virtual wxWindow *GetTopWindow() const;
// control the exit behaviour: by default, the program will exit the
// main loop (and so, usually, terminate) when the last top-level
// control the exit behaviour: by default, the program will exit the
// main loop (and so, usually, terminate) when the last top-level
// Get display mode that is used use. This is only used in framebuffer
// wxWin ports (such as wxMGL or wxDFB).
// Get display mode that is used use. This is only used in framebuffer
// wxWin ports (such as wxMGL or wxDFB).
- virtual wxVideoMode GetDisplayMode() const { return wxVideoMode(); }
+ virtual wxVideoMode GetDisplayMode() const;
// Set display mode to use. This is only used in framebuffer wxWin
// ports (such as wxMGL or wxDFB). This method should be called from
// wxApp::OnInitGui
// Set display mode to use. This is only used in framebuffer wxWin
// ports (such as wxMGL or wxDFB). This method should be called from
// wxApp::OnInitGui
//
// the cast is safe as in GUI build we only use wxApp, not wxAppConsole, and in
// console mode it does nothing at all
//
// the cast is safe as in GUI build we only use wxApp, not wxAppConsole, and in
// console mode it does nothing at all
-#define wxTheApp ((wxApp *)wxApp::GetInstance())
+#define wxTheApp wx_static_cast(wxApp*, wxApp::GetInstance())
// ----------------------------------------------------------------------------
// global functions
// ----------------------------------------------------------------------------
// global functions
wxAppInitializer \
wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
DECLARE_APP(appname) \
wxAppInitializer \
wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
DECLARE_APP(appname) \
- appname& wxGetApp() { return *(appname *)wxTheApp; }
+ appname& wxGetApp() { return *wx_static_cast(appname*, wxApp::GetInstance()); }
// Same as IMPLEMENT_APP() normally but doesn't include themes support in
// wxUniversal builds
// Same as IMPLEMENT_APP() normally but doesn't include themes support in
// wxUniversal builds
#ifndef _WX_MSW_STACKWALK_H_
#define _WX_MSW_STACKWALK_H_
#ifndef _WX_MSW_STACKWALK_H_
#define _WX_MSW_STACKWALK_H_
+#include "wx/arrstr.h"
+
// these structs are declared in windows headers
struct _CONTEXT;
struct _EXCEPTION_POINTERS;
// these structs are declared in windows headers
struct _CONTEXT;
struct _EXCEPTION_POINTERS;
#include "wx/aui/floatpane.h"
#ifndef WX_PRECOMP
#include "wx/aui/floatpane.h"
#ifndef WX_PRECOMP
#include "wx/settings.h"
#include "wx/app.h"
#include "wx/dcclient.h"
#include "wx/settings.h"
#include "wx/app.h"
#include "wx/dcclient.h"
#endif
#ifndef WX_PRECOMP
#endif
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/msgdlg.h"
#include "wx/confbase.h"
#include "wx/log.h"
#include "wx/msgdlg.h"
#include "wx/confbase.h"
#include "wx/evtloop.h"
#include "wx/msgout.h"
#include "wx/thread.h"
#include "wx/evtloop.h"
#include "wx/msgout.h"
#include "wx/thread.h"
#include "wx/ptr_scpd.h"
#if defined(__WXMSW__)
#include "wx/ptr_scpd.h"
#if defined(__WXMSW__)
#endif // wxUSE_THREADS
}
#endif // wxUSE_THREADS
}
+// ----------------------------------------------------------------------------
+
+wxWindow* wxAppBase::GetTopWindow() const
+{
+ wxWindow* window = m_topWindow;
+ if (window == NULL && wxTopLevelWindows.GetCount() > 0)
+ window = wxTopLevelWindows.GetFirst()->GetData();
+ return window;
+}
+
+wxVideoMode wxAppBase::GetDisplayMode() const
+{
+ return wxVideoMode();
+}
+
#if wxUSE_CMDLINE_PARSER
// ----------------------------------------------------------------------------
#if wxUSE_CMDLINE_PARSER
// ----------------------------------------------------------------------------
+#include "wx/imagbmp.h"
+
#ifndef WX_PRECOMP
#ifdef __WXMSW__
#include "wx/msw/wrapwin.h"
#ifndef WX_PRECOMP
#ifdef __WXMSW__
#include "wx/msw/wrapwin.h"
#include "wx/log.h"
#include "wx/app.h"
#include "wx/bitmap.h"
#include "wx/log.h"
#include "wx/app.h"
#include "wx/bitmap.h"
+ #include "wx/palette.h"
+ #include "wx/intl.h"
#include "wx/filefn.h"
#include "wx/wfstream.h"
#include "wx/filefn.h"
#include "wx/wfstream.h"
#include "wx/quantize.h"
// For memcpy
#include "wx/quantize.h"
// For memcpy
#ifndef WX_PRECOMP
#include "wx/log.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/hash.h"
#include "wx/utils.h"
#include "wx/hash.h"
#include "wx/utils.h"
#include "wx/math.h"
#include "wx/module.h"
#include "wx/math.h"
#include "wx/module.h"
+ #include "wx/palette.h"
+ #include "wx/intl.h"
#endif
#include "wx/filefn.h"
#include "wx/wfstream.h"
#endif
#include "wx/filefn.h"
#include "wx/wfstream.h"
#if wxUSE_XPM
#include "wx/xpmdecod.h"
#if wxUSE_XPM
#include "wx/xpmdecod.h"
+#include "wx/wxchar.h"
+
#define _ISOC9X_SOURCE 1 // to get vsscanf()
#define _BSD_SOURCE 1 // to still get strdup()
#define _ISOC9X_SOURCE 1 // to get vsscanf()
#define _BSD_SOURCE 1 // to still get strdup()
#endif
#ifndef WX_PRECOMP
#endif
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/hash.h"
#include "wx/string.h"
#include "wx/hash.h"
+ #include "wx/utils.h" // for wxMin and wxMax
+ #include "wx/log.h"
- #include "wx/utils.h" // for wxMin and wxMax
#if defined(__WIN32__) && defined(wxNEED_WX_CTYPE_H)
#include <windef.h>
#if defined(__WIN32__) && defined(wxNEED_WX_CTYPE_H)
#include <windef.h>
#include "wx/icon.h"
#include "wx/math.h"
#include "wx/image.h"
#include "wx/icon.h"
#include "wx/math.h"
#include "wx/image.h"
#endif
#include "wx/rawbmp.h"
#endif
#include "wx/rawbmp.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/image.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/image.h"
#endif // WX_PRECOMP
#include "wx/gtk/private.h" //for idle stuff
#endif // WX_PRECOMP
#include "wx/gtk/private.h" //for idle stuff