X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/73865dad6e17b7e0a969ae9f0b1e5f0ca9e146f9..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/common/appcmn.cpp diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index 4cc829b673..44c63efd1a 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -25,10 +25,9 @@ #endif #ifndef WX_PRECOMP - #include "wx/list.h" #include "wx/app.h" + #include "wx/window.h" #include "wx/bitmap.h" - #include "wx/intl.h" #include "wx/log.h" #include "wx/msgdlg.h" #include "wx/confbase.h" @@ -40,6 +39,7 @@ #include "wx/evtloop.h" #include "wx/msgout.h" #include "wx/thread.h" +#include "wx/vidmode.h" #include "wx/ptr_scpd.h" #if defined(__WXMSW__) @@ -157,6 +157,41 @@ void wxAppBase::CleanUp() #endif // wxUSE_THREADS } +// ---------------------------------------------------------------------------- +// various accessors +// ---------------------------------------------------------------------------- + +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(); +} + +wxLayoutDirection wxAppBase::GetLayoutDirection() const +{ +#if wxUSE_INTL + const wxLocale *const locale = wxGetLocale(); + if ( locale ) + { + const wxLanguageInfo *const + info = wxLocale::GetLanguageInfo(locale->GetLanguage()); + + if ( info ) + return info->LayoutDirection; + } +#endif // wxUSE_INTL + + // we don't know + return wxLayout_Default; +} + #if wxUSE_CMDLINE_PARSER // ----------------------------------------------------------------------------