added wxSystemSettings::HasFrameDecorations (anybody knows a better name?)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11773 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -35,6 +35,9 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // Get a system metric, e.g. scrollbar size
 | 
					    // Get a system metric, e.g. scrollbar size
 | 
				
			||||||
    static int         GetSystemMetric(int index);
 | 
					    static int         GetSystemMetric(int index);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Return true if the port can draw frame titlebar (i.e. doesn't need wxUniv for it)
 | 
				
			||||||
 | 
					    static bool        HasFrameDecorations() { return TRUE; }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,6 +35,9 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // Get a system metric, e.g. scrollbar size
 | 
					    // Get a system metric, e.g. scrollbar size
 | 
				
			||||||
    static int         GetSystemMetric(int index);
 | 
					    static int         GetSystemMetric(int index);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Return true if the port can draw frame titlebar (i.e. doesn't need wxUniv for it)
 | 
				
			||||||
 | 
					    static bool        HasFrameDecorations() { return TRUE; }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -127,6 +127,9 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // Get a system metric, e.g. scrollbar size
 | 
					    // Get a system metric, e.g. scrollbar size
 | 
				
			||||||
    static int         GetSystemMetric(int index);
 | 
					    static int         GetSystemMetric(int index);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Return true if the port can draw frame titlebar (i.e. doesn't need wxUniv for it)
 | 
				
			||||||
 | 
					    static bool        HasFrameDecorations() { return TRUE; }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -36,6 +36,9 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // Get a system metric, e.g. scrollbar size
 | 
					    // Get a system metric, e.g. scrollbar size
 | 
				
			||||||
    static int         GetSystemMetric(int index);
 | 
					    static int         GetSystemMetric(int index);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Return true if the port can draw frame titlebar (i.e. doesn't need wxUniv for it)
 | 
				
			||||||
 | 
					    static bool        HasFrameDecorations() { return TRUE; }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -33,6 +33,9 @@ public:
 | 
				
			|||||||
    // Get a system metric, e.g. scrollbar size
 | 
					    // Get a system metric, e.g. scrollbar size
 | 
				
			||||||
    static int GetSystemMetric(int index);
 | 
					    static int GetSystemMetric(int index);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Return true if the port can draw frame titlebar (i.e. doesn't need wxUniv for it)
 | 
				
			||||||
 | 
					    static bool HasFrameDecorations() { return TRUE; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,6 +24,7 @@ public:
 | 
				
			|||||||
    static wxColour    GetSystemColour(int index);
 | 
					    static wxColour    GetSystemColour(int index);
 | 
				
			||||||
    static wxFont      GetSystemFont(int index);
 | 
					    static wxFont      GetSystemFont(int index);
 | 
				
			||||||
    static int         GetSystemMetric(int index);
 | 
					    static int         GetSystemMetric(int index);
 | 
				
			||||||
 | 
					    static bool        HasFrameDecorations() { return TRUE; }
 | 
				
			||||||
}; // end of CLASS wxSystemSettings
 | 
					}; // end of CLASS wxSystemSettings
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,9 +26,14 @@
 | 
				
			|||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "wx/defs.h"
 | 
					#include "wx/defs.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef WX_PRECOMP
 | 
				
			||||||
 | 
					    #include "wx/dcclient.h"
 | 
				
			||||||
 | 
					    #include "wx/settings.h"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "wx/toplevel.h"
 | 
					#include "wx/toplevel.h"
 | 
				
			||||||
#include "wx/univ/renderer.h"
 | 
					#include "wx/univ/renderer.h"
 | 
				
			||||||
#include "wx/dcclient.h"
 | 
					 | 
				
			||||||
#include "wx/bitmap.h"
 | 
					#include "wx/bitmap.h"
 | 
				
			||||||
#include "wx/image.h"
 | 
					#include "wx/image.h"
 | 
				
			||||||
#include "wx/cshelp.h"
 | 
					#include "wx/cshelp.h"
 | 
				
			||||||
@@ -71,9 +76,8 @@ bool wxTopLevelWindow::Create(wxWindow *parent,
 | 
				
			|||||||
         exstyleOrig = 0;
 | 
					         exstyleOrig = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ( ms_drawDecorations == -1 )
 | 
					    if ( ms_drawDecorations == -1 )
 | 
				
			||||||
        ms_drawDecorations = TRUE;
 | 
					        ms_drawDecorations = !wxSystemSettings::HasFrameDecorations();
 | 
				
			||||||
        // FIXME_MGL -- this is temporary; we assume for now that native TLW
 | 
					        // FIXME -- wxUniv should provide a way to force non-native decorations!
 | 
				
			||||||
        //              can't do decorations, which is not true
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ( ms_drawDecorations )
 | 
					    if ( ms_drawDecorations )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user