From 1bc4900ed6fd2de9263d85ec55479a668f6ec5ab Mon Sep 17 00:00:00 2001 From: stevecor <21205494+stevecor@users.noreply.github.com> Date: Wed, 22 Apr 2026 08:54:45 -0700 Subject: [PATCH] Remove wxUSE_GEOMETRY Disabling it doesn't save much on code size and the build without it is currently broken anyhow, so just remove the possibility to turn it off. Closes #26388. Closes #26402. --- build/cmake/options.cmake | 1 - build/cmake/setup.h.in | 2 -- build/tools/build-wxwidgets.py | 1 - configure | 36 ------------------------- configure.ac | 5 ---- docs/doxygen/mainpages/const_wxusedef.h | 1 - include/wx/affinematrix2d.h | 4 --- include/wx/affinematrix2dbase.h | 4 --- include/wx/android/setup.h | 3 --- include/wx/chkconf.h | 18 ------------- include/wx/geometry.h | 5 ---- include/wx/gtk/setup.h | 3 --- include/wx/msw/setup.h | 3 --- include/wx/osx/setup.h | 3 --- include/wx/setup_inc.h | 3 --- include/wx/univ/setup.h | 3 --- setup.h.in | 2 -- setup.h_vms | 2 -- src/common/affinematrix2d.cpp | 5 ---- src/common/geometry.cpp | 5 ---- 20 files changed, 109 deletions(-) diff --git a/build/cmake/options.cmake b/build/cmake/options.cmake index 50e9e30a77..87b310732f 100644 --- a/build/cmake/options.cmake +++ b/build/cmake/options.cmake @@ -221,7 +221,6 @@ if(WIN32 OR APPLE) wx_option(wxUSE_FSVOLUME "use wxFSVolume class") endif() wx_option(wxUSE_FSWATCHER "use wxFileSystemWatcher class") -wx_option(wxUSE_GEOMETRY "use geometry class") wx_option(wxUSE_LOG "use logging system") wx_option(wxUSE_MIMETYPE "use wxMimeTypesManager") wx_option(wxUSE_PRINTF_POS_PARAMS "use wxVsnprintf() which supports positional parameters") diff --git a/build/cmake/setup.h.in b/build/cmake/setup.h.in index 7906f72c8c..1be1d228e4 100644 --- a/build/cmake/setup.h.in +++ b/build/cmake/setup.h.in @@ -420,8 +420,6 @@ #cmakedefine01 wxUSE_DISPLAY -#cmakedefine01 wxUSE_GEOMETRY - #cmakedefine01 wxUSE_IMAGLIST #cmakedefine01 wxUSE_INFOBAR diff --git a/build/tools/build-wxwidgets.py b/build/tools/build-wxwidgets.py index 1bd6b47958..4b72157a7e 100755 --- a/build/tools/build-wxwidgets.py +++ b/build/tools/build-wxwidgets.py @@ -270,7 +270,6 @@ def main(scriptName, args): "--enable-graphics_ctx", "--enable-mediactrl", "--enable-display", - "--enable-geometry", "--enable-debug_flag", "--enable-optimise", "--disable-debugreport", diff --git a/configure b/configure index f70d3301b4..2d80a9bfd7 100755 --- a/configure +++ b/configure @@ -1205,7 +1205,6 @@ enable_fs_inet enable_fs_zip enable_fsvolume enable_fswatcher -enable_geometry enable_log enable_mimetype enable_printfposparam @@ -2184,7 +2183,6 @@ Optional Features: --enable-fs_zip now replaced by fs_archive --enable-fsvolume use wxFSVolume class --enable-fswatcher use wxFileSystemWatcher class - --enable-geometry use geometry class --enable-log use logging system --enable-mimetype use wxMimeTypesManager --enable-printfposparam use wxVsnprintf() which supports positional parameters @@ -7591,35 +7589,6 @@ fi eval "$wx_cv_use_fswatcher" - enablestring= - defaultval=$wxUSE_ALL_FEATURES - if test -z "$defaultval"; then - if test x"$enablestring" = xdisable; then - defaultval=yes - else - defaultval=no - fi - fi - - # Check whether --enable-geometry was given. -if test "${enable_geometry+set}" = set; then : - enableval=$enable_geometry; - if test "$enableval" = yes; then - wx_cv_use_geometry='wxUSE_GEOMETRY=yes' - else - wx_cv_use_geometry='wxUSE_GEOMETRY=no' - fi - -else - - wx_cv_use_geometry='wxUSE_GEOMETRY=${'DEFAULT_wxUSE_GEOMETRY":-$defaultval}" - -fi - - - eval "$wx_cv_use_geometry" - - enablestring= defaultval=$wxUSE_ALL_FEATURES if test -z "$defaultval"; then @@ -38053,11 +38022,6 @@ if test "$wxUSE_LOG" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS keyboard" fi -if test "$wxUSE_GEOMETRY" = "yes"; then - $as_echo "#define wxUSE_GEOMETRY 1" >>confdefs.h - -fi - if test "$wxUSE_BASE64" = "yes"; then $as_echo "#define wxUSE_BASE64 1" >>confdefs.h diff --git a/configure.ac b/configure.ac index 3426f9844c..53fff11070 100644 --- a/configure.ac +++ b/configure.ac @@ -736,7 +736,6 @@ if test "$USE_WIN32" = 1 -o "$USE_DARWIN"; then WX_ARG_FEATURE(fsvolume, [ --enable-fsvolume use wxFSVolume class], wxUSE_FSVOLUME) fi WX_ARG_FEATURE(fswatcher, [ --enable-fswatcher use wxFileSystemWatcher class], wxUSE_FSWATCHER) -WX_ARG_FEATURE(geometry, [ --enable-geometry use geometry class], wxUSE_GEOMETRY) WX_ARG_FEATURE(log, [ --enable-log use logging system], wxUSE_LOG) WX_ARG_FEATURE(mimetype, [ --enable-mimetype use wxMimeTypesManager], wxUSE_MIMETYPE) WX_ARG_FEATURE(printfposparam,[ --enable-printfposparam use wxVsnprintf() which supports positional parameters], wxUSE_PRINTF_POS_PARAMS) @@ -5663,10 +5662,6 @@ if test "$wxUSE_LOG" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS keyboard" fi -if test "$wxUSE_GEOMETRY" = "yes"; then - AC_DEFINE(wxUSE_GEOMETRY) -fi - if test "$wxUSE_BASE64" = "yes"; then AC_DEFINE(wxUSE_BASE64) fi diff --git a/docs/doxygen/mainpages/const_wxusedef.h b/docs/doxygen/mainpages/const_wxusedef.h index f16d0fc18a..2362c9ebe7 100644 --- a/docs/doxygen/mainpages/const_wxusedef.h +++ b/docs/doxygen/mainpages/const_wxusedef.h @@ -126,7 +126,6 @@ library: @itemdef{wxUSE_GENERIC_DRAGIMAGE, Used in wxDragImage sample.} @itemdef{wxUSE_GENERIC_DRAWELLIPSE, See comment in wx/dc.h file.} @itemdef{wxUSE_GENERIC_MDI_AS_NATIVE, This is not a user-settable symbol, it is only used internally in wx/generic/mdig.h.} -@itemdef{wxUSE_GEOMETRY, Use common geometry classes} @itemdef{wxUSE_GIF, Use GIF wxImageHandler} @itemdef{wxUSE_GLCANVAS, Enables OpenGL support.} @itemdef{wxUSE_GRAPHICS_CONTEXT, Use wxGraphicsContext and related classes.} diff --git a/include/wx/affinematrix2d.h b/include/wx/affinematrix2d.h index b1c6b94c2a..dd6b52194a 100644 --- a/include/wx/affinematrix2d.h +++ b/include/wx/affinematrix2d.h @@ -12,8 +12,6 @@ #include "wx/defs.h" -#if wxUSE_GEOMETRY - #include "wx/affinematrix2dbase.h" // A simple implementation of wxAffineMatrix2DBase interface done entirely in @@ -46,6 +44,4 @@ private: wxDouble m_11, m_12, m_21, m_22, m_tx, m_ty; }; -#endif // wxUSE_GEOMETRY - #endif // _WX_AFFINEMATRIX2D_H_ diff --git a/include/wx/affinematrix2dbase.h b/include/wx/affinematrix2dbase.h index a1c8b42014..c06397880f 100644 --- a/include/wx/affinematrix2dbase.h +++ b/include/wx/affinematrix2dbase.h @@ -12,8 +12,6 @@ #include "wx/defs.h" -#if wxUSE_GEOMETRY - #include "wx/geometry.h" struct wxMatrix2D @@ -122,6 +120,4 @@ protected: wxPoint2DDouble DoTransformDistance(const wxPoint2DDouble& p) const = 0; }; -#endif // wxUSE_GEOMETRY - #endif // _WX_AFFINEMATRIX2DBASE_H_ diff --git a/include/wx/android/setup.h b/include/wx/android/setup.h index dc635a27ed..5fcaf05e38 100644 --- a/include/wx/android/setup.h +++ b/include/wx/android/setup.h @@ -1054,9 +1054,6 @@ // Recommended setting: 1 if you need it, can be safely set to 0 otherwise #define wxUSE_DISPLAY 1 -// Miscellaneous geometry code: needed for Canvas library -#define wxUSE_GEOMETRY 1 - // Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and // wxListCtrl. // diff --git a/include/wx/chkconf.h b/include/wx/chkconf.h index 55d7045df8..50890aa85f 100644 --- a/include/wx/chkconf.h +++ b/include/wx/chkconf.h @@ -1711,24 +1711,6 @@ # define wxUSE_ACTIVITYINDICATOR 0 #endif /* wxUSE_ACTIVITYINDICATOR */ -#if wxUSE_GRAPHICS_CONTEXT && !wxUSE_GEOMETRY -# ifdef wxABORT_ON_CONFIG_ERROR -# error "wxUSE_GRAPHICS_CONTEXT requires wxUSE_GEOMETRY" -# else -# undef wxUSE_GRAPHICS_CONTEXT -# define wxUSE_GRAPHICS_CONTEXT 0 -# endif -#endif /* wxUSE_GRAPHICS_CONTEXT */ - -#if wxUSE_DC_TRANSFORM_MATRIX && !wxUSE_GEOMETRY -# ifdef wxABORT_ON_CONFIG_ERROR -# error "wxUSE_DC_TRANSFORM_MATRIX requires wxUSE_GEOMETRY" -# else -# undef wxUSE_DC_TRANSFORM_MATRIX -# define wxUSE_DC_TRANSFORM_MATRIX 0 -# endif -#endif /* wxUSE_DC_TRANSFORM_MATRIX */ - /* generic controls dependencies */ #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__) # if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG diff --git a/include/wx/geometry.h b/include/wx/geometry.h index 658ebcdd6a..6bb801d381 100644 --- a/include/wx/geometry.h +++ b/include/wx/geometry.h @@ -12,8 +12,6 @@ #include "wx/defs.h" -#if wxUSE_GEOMETRY - #include "wx/utils.h" #include "wx/gdicmn.h" #include "wx/math.h" @@ -848,7 +846,4 @@ public : virtual wxRect2DInt InverseTransform( const wxRect2DInt &r ) const ; }; - -#endif // wxUSE_GEOMETRY - #endif // _WX_GEOMETRY_H_ diff --git a/include/wx/gtk/setup.h b/include/wx/gtk/setup.h index 0b84bdf438..b8681c7e4e 100644 --- a/include/wx/gtk/setup.h +++ b/include/wx/gtk/setup.h @@ -1054,9 +1054,6 @@ // Recommended setting: 1 if you need it, can be safely set to 0 otherwise #define wxUSE_DISPLAY 1 -// Miscellaneous geometry code: needed for Canvas library -#define wxUSE_GEOMETRY 1 - // Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and // wxListCtrl. // diff --git a/include/wx/msw/setup.h b/include/wx/msw/setup.h index e3086e2c44..6272cbdc55 100644 --- a/include/wx/msw/setup.h +++ b/include/wx/msw/setup.h @@ -1054,9 +1054,6 @@ // Recommended setting: 1 if you need it, can be safely set to 0 otherwise #define wxUSE_DISPLAY 1 -// Miscellaneous geometry code: needed for Canvas library -#define wxUSE_GEOMETRY 1 - // Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and // wxListCtrl. // diff --git a/include/wx/osx/setup.h b/include/wx/osx/setup.h index ee4e3eb4f9..a03a80dc85 100644 --- a/include/wx/osx/setup.h +++ b/include/wx/osx/setup.h @@ -1061,9 +1061,6 @@ // Recommended setting: 1 if you need it, can be safely set to 0 otherwise #define wxUSE_DISPLAY 1 -// Miscellaneous geometry code: needed for Canvas library -#define wxUSE_GEOMETRY 1 - // Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and // wxListCtrl. // diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index 9f914bef0a..7f6ff70881 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -1050,9 +1050,6 @@ // Recommended setting: 1 if you need it, can be safely set to 0 otherwise #define wxUSE_DISPLAY 1 -// Miscellaneous geometry code: needed for Canvas library -#define wxUSE_GEOMETRY 1 - // Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and // wxListCtrl. // diff --git a/include/wx/univ/setup.h b/include/wx/univ/setup.h index d969506540..7059ca0218 100644 --- a/include/wx/univ/setup.h +++ b/include/wx/univ/setup.h @@ -1054,9 +1054,6 @@ // Recommended setting: 1 if you need it, can be safely set to 0 otherwise #define wxUSE_DISPLAY 1 -// Miscellaneous geometry code: needed for Canvas library -#define wxUSE_GEOMETRY 1 - // Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and // wxListCtrl. // diff --git a/setup.h.in b/setup.h.in index 27a6ff7531..e7a2a91e7e 100644 --- a/setup.h.in +++ b/setup.h.in @@ -419,8 +419,6 @@ #define wxUSE_DISPLAY 0 -#define wxUSE_GEOMETRY 0 - #define wxUSE_IMAGLIST 0 #define wxUSE_INFOBAR 0 diff --git a/setup.h_vms b/setup.h_vms index 06aab1c544..7fd8ce3579 100644 --- a/setup.h_vms +++ b/setup.h_vms @@ -455,8 +455,6 @@ typedef pid_t GPid; #define wxUSE_DISPLAY 0 -#define wxUSE_GEOMETRY 1 - #define wxUSE_IMAGLIST 1 #define wxUSE_INFOBAR 1 diff --git a/src/common/affinematrix2d.cpp b/src/common/affinematrix2d.cpp index cb29f8293d..e3c1466c5a 100644 --- a/src/common/affinematrix2d.cpp +++ b/src/common/affinematrix2d.cpp @@ -9,9 +9,6 @@ #include "wx/wxprec.h" - -#if wxUSE_GEOMETRY - #include "wx/affinematrix2d.h" #include "wx/math.h" @@ -185,5 +182,3 @@ bool wxAffineMatrix2D::IsIdentity() const m_21 == 0 && m_22 == 1 && m_tx == 0 && m_ty == 0; } - -#endif // wxUSE_GEOMETRY diff --git a/src/common/geometry.cpp b/src/common/geometry.cpp index 34f7169a42..1497e7bf20 100644 --- a/src/common/geometry.cpp +++ b/src/common/geometry.cpp @@ -10,9 +10,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" - -#if wxUSE_GEOMETRY - #include "wx/geometry.h" #ifndef WX_PRECOMP @@ -418,5 +415,3 @@ wxRect2DInt wxTransform2D::InverseTransform( const wxRect2DInt &r ) const InverseTransform( &res ); return res; } - -#endif // wxUSE_GEOMETRY