Add forceTrueColour option to SetBestVisual().
Currently API only, implement later. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
5600fb6e6f
commit
515a31bf65
@ -675,13 +675,16 @@ wxWidgets.
|
||||
|
||||
\membersection{wxApp::SetUseBestVisual}\label{wxappsetusebestvisual}
|
||||
|
||||
\func{void}{SetUseBestVisual}{\param{bool}{ flag}}
|
||||
\func{void}{SetUseBestVisual}{\param{bool}{ flag}, \param{bool}{ forceTrueColour = false}}
|
||||
|
||||
Allows the programmer to specify whether the application will use the best visual
|
||||
on systems that support several visual on the same display. This is typically the
|
||||
case under Solaris and IRIX, where the default visual is only 8-bit whereas certain
|
||||
applications are supposed to run in TrueColour mode.
|
||||
|
||||
If \arg{forceTrueColour} is true then the application will try to force
|
||||
using a TrueColour visual and abort the app if none is found.
|
||||
|
||||
Note that this function has to be called in the constructor of the {\tt wxApp}
|
||||
instance and won't have any effect when called later on.
|
||||
|
||||
|
@ -463,7 +463,8 @@ public:
|
||||
virtual bool SetDisplayMode(const wxVideoMode& WXUNUSED(info)) { return true; }
|
||||
|
||||
// set use of best visual flag (see below)
|
||||
void SetUseBestVisual( bool flag ) { m_useBestVisual = flag; }
|
||||
void SetUseBestVisual( bool flag, bool forceTrueColour = false )
|
||||
{ m_useBestVisual = flag; m_forceTrueColour = forceTrueColour; }
|
||||
bool GetUseBestVisual() const { return m_useBestVisual; }
|
||||
|
||||
// set/get printing mode: see wxPRINT_XXX constants.
|
||||
@ -534,6 +535,8 @@ protected:
|
||||
// true if the app wants to use the best visual on systems where
|
||||
// more than one are available (Sun, SGI, XFree86 4.0 ?)
|
||||
bool m_useBestVisual;
|
||||
// force TrueColour just in case "best" isn't TrueColour
|
||||
bool m_forceTrueColour;
|
||||
|
||||
// does any of our windows have focus?
|
||||
bool m_isActive;
|
||||
|
@ -74,7 +74,10 @@ wxDEFINE_TIED_SCOPED_PTR_TYPE(wxEventLoop)
|
||||
wxAppBase::wxAppBase()
|
||||
{
|
||||
m_topWindow = (wxWindow *)NULL;
|
||||
|
||||
m_useBestVisual = false;
|
||||
m_forceTrueColour = false;
|
||||
|
||||
m_isActive = true;
|
||||
|
||||
m_mainLoop = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user