do platform-specific checks after ensuring that the symbols we use are defined; extract wxGTK-specific checks to wx/gtk/chkconf.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2304,6 +2304,7 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_GUI_HDR = \
|
|||||||
wx/gtk/button.h \
|
wx/gtk/button.h \
|
||||||
wx/gtk/checkbox.h \
|
wx/gtk/checkbox.h \
|
||||||
wx/gtk/checklst.h \
|
wx/gtk/checklst.h \
|
||||||
|
wx/gtk/chkconf.h \
|
||||||
wx/gtk/collpane.h \
|
wx/gtk/collpane.h \
|
||||||
wx/gtk/colordlg.h \
|
wx/gtk/colordlg.h \
|
||||||
wx/gtk/choice.h \
|
wx/gtk/choice.h \
|
||||||
|
@@ -1084,6 +1084,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||||||
wx/gtk/button.h
|
wx/gtk/button.h
|
||||||
wx/gtk/checkbox.h
|
wx/gtk/checkbox.h
|
||||||
wx/gtk/checklst.h
|
wx/gtk/checklst.h
|
||||||
|
wx/gtk/chkconf.h
|
||||||
wx/gtk/collpane.h
|
wx/gtk/collpane.h
|
||||||
wx/gtk/colordlg.h
|
wx/gtk/colordlg.h
|
||||||
wx/gtk/choice.h
|
wx/gtk/choice.h
|
||||||
|
@@ -14,37 +14,16 @@
|
|||||||
#define _WX_CHKCONF_H_
|
#define _WX_CHKCONF_H_
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Platform-specific checking.
|
This file has the following sections:
|
||||||
|
1. checks that all wxUSE_XXX symbols we use are defined
|
||||||
|
a) first the non-GUI ones
|
||||||
|
b) then the GUI-only ones
|
||||||
|
2. platform-specific checks done in the platform headers
|
||||||
|
3. generic consistency checks
|
||||||
|
a) first the non-GUI ones
|
||||||
|
b) then the GUI-only ones
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__WXPALMOS__)
|
|
||||||
# include "wx/palmos/chkconf.h"
|
|
||||||
#elif defined(__WXWINCE__)
|
|
||||||
# include "wx/msw/wince/chkconf.h"
|
|
||||||
#elif defined(__WXMSW__)
|
|
||||||
# include "wx/msw/chkconf.h"
|
|
||||||
#elif defined(__WXMAC__)
|
|
||||||
# include "wx/mac/chkconf.h"
|
|
||||||
#elif defined(__OS2__)
|
|
||||||
# include "wx/os2/chkconf.h"
|
|
||||||
#elif defined(__WXMGL__)
|
|
||||||
# include "wx/mgl/chkconf.h"
|
|
||||||
#elif defined(__WXDFB__)
|
|
||||||
# include "wx/dfb/chkconf.h"
|
|
||||||
#elif defined(__WXMOTIF__)
|
|
||||||
# include "wx/motif/chkconf.h"
|
|
||||||
#elif defined(__WXX11__)
|
|
||||||
# include "wx/x11/chkconf.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __UNIX__
|
|
||||||
# include "wx/unix/chkconf.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __WXUNIVERSAL__
|
|
||||||
# include "wx/univ/chkconf.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
this global setting determines what should we do if the setting FOO
|
this global setting determines what should we do if the setting FOO
|
||||||
requires BAR and BAR is not set: we can either silently unset FOO as well
|
requires BAR and BAR is not set: we can either silently unset FOO as well
|
||||||
@@ -84,7 +63,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
tests for non GUI features
|
Section 1a: tests for non GUI features.
|
||||||
|
|
||||||
please keep the options in alphabetical order!
|
please keep the options in alphabetical order!
|
||||||
*/
|
*/
|
||||||
@@ -323,7 +302,7 @@
|
|||||||
#endif /* wxUSE_VARIANT */
|
#endif /* wxUSE_VARIANT */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
all these tests are for GUI only
|
Section 1b: all these tests are for GUI only.
|
||||||
|
|
||||||
please keep the options in alphabetical order!
|
please keep the options in alphabetical order!
|
||||||
*/
|
*/
|
||||||
@@ -991,7 +970,44 @@
|
|||||||
#endif /* wxUSE_GUI */
|
#endif /* wxUSE_GUI */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
check consistency of the settings
|
Section 2: platform-specific checks.
|
||||||
|
|
||||||
|
This must be done after checking that everything is defined as the platform
|
||||||
|
checks use wxUSE_XXX symbols in #if tests.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(__WXPALMOS__)
|
||||||
|
# include "wx/palmos/chkconf.h"
|
||||||
|
#elif defined(__WXWINCE__)
|
||||||
|
# include "wx/msw/wince/chkconf.h"
|
||||||
|
#elif defined(__WXMSW__)
|
||||||
|
# include "wx/msw/chkconf.h"
|
||||||
|
#elif defined(__WXGTK__)
|
||||||
|
# include "wx/gtk/chkconf.h"
|
||||||
|
#elif defined(__WXMAC__)
|
||||||
|
# include "wx/mac/chkconf.h"
|
||||||
|
#elif defined(__OS2__)
|
||||||
|
# include "wx/os2/chkconf.h"
|
||||||
|
#elif defined(__WXMGL__)
|
||||||
|
# include "wx/mgl/chkconf.h"
|
||||||
|
#elif defined(__WXDFB__)
|
||||||
|
# include "wx/dfb/chkconf.h"
|
||||||
|
#elif defined(__WXMOTIF__)
|
||||||
|
# include "wx/motif/chkconf.h"
|
||||||
|
#elif defined(__WXX11__)
|
||||||
|
# include "wx/x11/chkconf.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __UNIX__
|
||||||
|
# include "wx/unix/chkconf.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __WXUNIVERSAL__
|
||||||
|
# include "wx/univ/chkconf.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
Section 3a: check consistency of the non-GUI settings.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2_6
|
#if WXWIN_COMPATIBILITY_2_6
|
||||||
@@ -1230,7 +1246,9 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif /* wxUSE_TARSTREAM */
|
#endif /* wxUSE_TARSTREAM */
|
||||||
|
|
||||||
/* the rest of the tests is for the GUI settings only */
|
/*
|
||||||
|
Section 3b: the tests for the GUI settings only.
|
||||||
|
*/
|
||||||
#if wxUSE_GUI
|
#if wxUSE_GUI
|
||||||
|
|
||||||
#if wxUSE_BUTTON || \
|
#if wxUSE_BUTTON || \
|
||||||
@@ -1374,40 +1392,6 @@
|
|||||||
#endif /* wxUSE_GRAPHICS_CONTEXT */
|
#endif /* wxUSE_GRAPHICS_CONTEXT */
|
||||||
|
|
||||||
|
|
||||||
/* wxGTK-specific dependencies */
|
|
||||||
#ifdef __WXGTK__
|
|
||||||
# ifndef __WXUNIVERSAL__
|
|
||||||
# if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
|
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
|
||||||
# error "MDI requires wxUSE_MENUS in wxGTK"
|
|
||||||
# else
|
|
||||||
# undef wxUSE_MENUS
|
|
||||||
# define wxUSE_MENUS 1
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# endif /* !__WXUNIVERSAL__ */
|
|
||||||
|
|
||||||
# if wxUSE_JOYSTICK
|
|
||||||
# if !wxUSE_THREADS
|
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
|
||||||
# error "wxJoystick requires threads in wxGTK"
|
|
||||||
# else
|
|
||||||
# undef wxUSE_JOYSTICK
|
|
||||||
# define wxUSE_JOYSTICK 0
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif /* wxGTK && !wxUniv */
|
|
||||||
|
|
||||||
/* Hopefully we can emulate these dialogs in due course */
|
|
||||||
#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
|
|
||||||
# ifdef wxUSE_COLOURDLG
|
|
||||||
# undef wxUSE_COLOURDLG
|
|
||||||
# define wxUSE_COLOURDLG 0
|
|
||||||
# endif
|
|
||||||
#endif /* __SMARTPHONE__ && __WXWINCE__ */
|
|
||||||
|
|
||||||
|
|
||||||
/* generic controls dependencies */
|
/* generic controls dependencies */
|
||||||
#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
|
#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
|
||||||
# if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
|
# if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
|
||||||
|
31
include/wx/gtk/chkconf.h
Normal file
31
include/wx/gtk/chkconf.h
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* Name: wx/gtk/chkconf.h
|
||||||
|
* Purpose: wxGTK-specific settings consistency checks
|
||||||
|
* Author: Vadim Zeitlin
|
||||||
|
* Created: 2007-07-19 (extracted from wx/chkconf.h)
|
||||||
|
* RCS-ID: $Id$
|
||||||
|
* Copyright: (c) 2000-2007 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||||
|
* Licence: wxWindows licence
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __WXUNIVERSAL__
|
||||||
|
# if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
|
||||||
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
|
# error "MDI requires wxUSE_MENUS in wxGTK"
|
||||||
|
# else
|
||||||
|
# undef wxUSE_MENUS
|
||||||
|
# define wxUSE_MENUS 1
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif /* !__WXUNIVERSAL__ */
|
||||||
|
|
||||||
|
#if wxUSE_JOYSTICK
|
||||||
|
# if !wxUSE_THREADS
|
||||||
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
|
# error "wxJoystick requires threads in wxGTK"
|
||||||
|
# else
|
||||||
|
# undef wxUSE_JOYSTICK
|
||||||
|
# define wxUSE_JOYSTICK 0
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif /* wxUSE_JOYSTICK */
|
@@ -69,7 +69,6 @@
|
|||||||
#undef wxUSE_UNICODE_MSLU
|
#undef wxUSE_UNICODE_MSLU
|
||||||
#define wxUSE_UNICODE_MSLU 0
|
#define wxUSE_UNICODE_MSLU 0
|
||||||
|
|
||||||
|
|
||||||
// Disable features which don't make sense for MS Smartphones
|
// Disable features which don't make sense for MS Smartphones
|
||||||
// (due to pointer device usage, limited controls or dialogs, file system)
|
// (due to pointer device usage, limited controls or dialogs, file system)
|
||||||
#if defined(__SMARTPHONE__)
|
#if defined(__SMARTPHONE__)
|
||||||
@@ -84,6 +83,9 @@
|
|||||||
|
|
||||||
#undef wxUSE_COLOURPICKERCTRL
|
#undef wxUSE_COLOURPICKERCTRL
|
||||||
#define wxUSE_COLOURPICKERCTRL 0
|
#define wxUSE_COLOURPICKERCTRL 0
|
||||||
|
|
||||||
|
#undef wxUSE_COLOURDLG
|
||||||
|
#define wxUSE_COLOURDLG 0
|
||||||
#endif // __SMARTPHONE__
|
#endif // __SMARTPHONE__
|
||||||
|
|
||||||
#endif // _WX_MSW_WINCE_CHKCONF_H_
|
#endif // _WX_MSW_WINCE_CHKCONF_H_
|
||||||
|
Reference in New Issue
Block a user