]> git.saurik.com Git - wxWidgets.git/commitdiff
moved GetLayoutDirection() to GUI wxApp, it has nothing to do in wxAppConsole
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 11 Oct 2006 22:34:53 +0000 (22:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 11 Oct 2006 22:34:53 +0000 (22:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/app.h
src/common/appbase.cpp
src/common/appcmn.cpp

index 39e3f93c743186bdd4860dbf03bcd262516b17b0..2f1ffac900dc0ed5193b14e0310f7019e15e32f5 100644 (file)
@@ -108,9 +108,6 @@ public:
     // Called from wxExit() function, should terminate the application a.s.a.p.
     virtual void Exit();
 
-    // Return the layout direction for the current locale
-    virtual wxLayoutDirection GetLayoutDirection() const;
-
 
     // application info: name, description, vendor
     // -------------------------------------------
@@ -476,6 +473,10 @@ public:
     virtual void SetPrintMode(int WXUNUSED(mode)) { }
     int GetPrintMode() const { return wxPRINT_POSTSCRIPT; }
 
+    // Return the layout direction for the current locale or wxLayout_Default
+    // if it's unknown
+    virtual wxLayoutDirection GetLayoutDirection() const;
+
 
     // command line parsing (GUI-specific)
     // ------------------------------------------------------------------------
index d727ffeafd9ae47d05640d0585143bd0ab87a15b..697aa2dd87964aa0ba8ab533bce10eae39d1727d 100644 (file)
@@ -215,24 +215,6 @@ void wxAppConsole::Exit()
     exit(-1);
 }
 
-wxLayoutDirection wxAppConsole::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;
-}
-
 // ----------------------------------------------------------------------------
 // traits stuff
 // ----------------------------------------------------------------------------
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
 
 // ----------------------------------------------------------------------------