]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appcmn.cpp
rebaked after addition of XRC handler for richtext control
[wxWidgets.git] / src / common / appcmn.cpp
index fb02e6b93dd076cc69d0597fb572fbfd02b1c7f0..44c63efd1a0f9d4cda31b99ac7da23ff6a343592 100644 (file)
@@ -157,6 +157,8 @@ void wxAppBase::CleanUp()
 #endif // wxUSE_THREADS
 }
 
+// ----------------------------------------------------------------------------
+// various accessors
 // ----------------------------------------------------------------------------
 
 wxWindow* wxAppBase::GetTopWindow() const
@@ -172,6 +174,24 @@ 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
 
 // ----------------------------------------------------------------------------