moved GetLayoutDirection() to GUI wxApp, it has nothing to do in wxAppConsole
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -108,9 +108,6 @@ public:
|
|||||||
// Called from wxExit() function, should terminate the application a.s.a.p.
|
// Called from wxExit() function, should terminate the application a.s.a.p.
|
||||||
virtual void Exit();
|
virtual void Exit();
|
||||||
|
|
||||||
// Return the layout direction for the current locale
|
|
||||||
virtual wxLayoutDirection GetLayoutDirection() const;
|
|
||||||
|
|
||||||
|
|
||||||
// application info: name, description, vendor
|
// application info: name, description, vendor
|
||||||
// -------------------------------------------
|
// -------------------------------------------
|
||||||
@@ -476,6 +473,10 @@ public:
|
|||||||
virtual void SetPrintMode(int WXUNUSED(mode)) { }
|
virtual void SetPrintMode(int WXUNUSED(mode)) { }
|
||||||
int GetPrintMode() const { return wxPRINT_POSTSCRIPT; }
|
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)
|
// command line parsing (GUI-specific)
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
@@ -215,24 +215,6 @@ void wxAppConsole::Exit()
|
|||||||
exit(-1);
|
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
|
// traits stuff
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -157,6 +157,8 @@ void wxAppBase::CleanUp()
|
|||||||
#endif // wxUSE_THREADS
|
#endif // wxUSE_THREADS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// various accessors
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxWindow* wxAppBase::GetTopWindow() const
|
wxWindow* wxAppBase::GetTopWindow() const
|
||||||
@@ -172,6 +174,24 @@ wxVideoMode wxAppBase::GetDisplayMode() const
|
|||||||
return wxVideoMode();
|
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
|
#if wxUSE_CMDLINE_PARSER
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user