From efd17a1d4fa08bf549023a1cc74ce98f9db91be3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 7 May 2004 22:17:29 +0000 Subject: [PATCH] split wxUSE_MDI from wxUSE_MDI_ARCHITECTURE (which is wxUSE_MDI + wxUSE_DOCVIEW) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure.in | 15 +++++++++++---- include/wx/chkconf.h | 17 +++++++++++++++++ include/wx/mac/setup0.h | 11 +++++++++++ include/wx/mdi.h | 4 ++-- include/wx/msw/setup0.h | 11 +++++++++++ include/wx/os2/setup0.h | 2 ++ src/gtk/mdi.cpp | 2 +- src/gtk1/mdi.cpp | 2 +- src/msw/mdi.cpp | 5 ++--- 9 files changed, 58 insertions(+), 11 deletions(-) diff --git a/configure.in b/configure.in index 4466b4f899..c5fecb2d18 100644 --- a/configure.in +++ b/configure.in @@ -437,6 +437,7 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_DRAGIMAGE=no DEFAULT_wxUSE_SPLINES=no + DEFAULT_wxUSE_MDI=no DEFAULT_wxUSE_MDI_ARCHITECTURE=no DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE=no DEFAULT_wxUSE_PRINTING_ARCHITECTURE=no @@ -619,6 +620,7 @@ else DEFAULT_wxUSE_DRAGIMAGE=yes DEFAULT_wxUSE_SPLINES=yes + DEFAULT_wxUSE_MDI=yes DEFAULT_wxUSE_MDI_ARCHITECTURE=yes DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE=yes DEFAULT_wxUSE_PRINTING_ARCHITECTURE=yes @@ -908,7 +910,8 @@ WX_ARG_ENABLE(html, [ --enable-html use wxHTML sub-library], w WX_ARG_ENABLE(htmlhelp, [ --enable-htmlhelp use wxHTML-based help], wxUSE_WXHTML_HELP) WX_ARG_ENABLE(constraints, [ --enable-constraints use layout-constraints system], wxUSE_CONSTRAINTS) WX_ARG_ENABLE(printarch, [ --enable-printarch use printing architecture], wxUSE_PRINTING_ARCHITECTURE) -WX_ARG_ENABLE(mdi, [ --enable-mdi use multiple document interface architecture], wxUSE_MDI_ARCHITECTURE) +WX_ARG_ENABLE(mdi, [ --enable-mdi use multiple document interface architecture], wxUSE_MDI) +WX_ARG_ENABLE(mdidoc, [ --enable-mdidoc use docview architecture with MDI], wxUSE_MDI_ARCHITECTURE) WX_ARG_ENABLE(loggui, [ --enable-loggui use standard GUI logger], wxUSE_LOGGUI) WX_ARG_ENABLE(logwin, [ --enable-logwin use wxLogWindow], wxUSE_LOGWINDOW) WX_ARG_ENABLE(logdialog, [ --enable-logdialog use wxLogDialog], wxUSE_LOGDIALOG) @@ -5096,9 +5099,13 @@ if test "$wxUSE_CONSTRAINTS" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS layout" fi -if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then - AC_DEFINE(wxUSE_MDI_ARCHITECTURE) - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mdi" +if test "$wxUSE_MDI" = "yes"; then + AC_DEFINE(wxUSE_MDI) + + if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then + AC_DEFINE(wxUSE_MDI_ARCHITECTURE) + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mdi" + fi fi if test "$wxUSE_DOC_VIEW_ARCHITECTURE" = "yes" ; then diff --git a/include/wx/chkconf.h b/include/wx/chkconf.h index 5cfbacacd7..6673f2906f 100644 --- a/include/wx/chkconf.h +++ b/include/wx/chkconf.h @@ -496,6 +496,14 @@ # endif #endif /* !defined(wxUSE_LOG_DIALOG) */ +#ifndef wxUSE_MDI +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_MDI must be defined." +# else +# define wxUSE_MDI 0 +# endif +#endif /* !defined(wxUSE_MDI) */ + #ifndef wxUSE_MDI_ARCHITECTURE # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_MDI_ARCHITECTURE must be defined." @@ -1340,6 +1348,15 @@ #endif /* wxUSE_PRINTING_ARCHITECTURE */ #if wxUSE_MDI_ARCHITECTURE +# if !wxUSE_MDI +# ifdef wxABORT_ON_CONFIG_ERROR +# error "MDI requires wxUSE_MDI" +# else +# undef wxUSE_MDI +# define wxUSE_MDI 1 +# endif +# endif + # if !wxUSE_DOC_VIEW_ARCHITECTURE # ifdef wxABORT_ON_CONFIG_ERROR # error "MDI requires wxUSE_DOC_VIEW_ARCHITECTURE" diff --git a/include/wx/mac/setup0.h b/include/wx/mac/setup0.h index 99436eedc7..04a97dd14f 100644 --- a/include/wx/mac/setup0.h +++ b/include/wx/mac/setup0.h @@ -739,10 +739,21 @@ // Big GUI components // ---------------------------------------------------------------------------- +// Set to 0 to disable MDI support. +// +// Requires wxUSE_NOTEBOOK under platforms other than MSW. +// +// Default is 1. +// +// Recommended setting: 1, can be safely set to 0. +#define wxUSE_MDI 1 + // Set to 0 to disable document/view architecture #define wxUSE_DOC_VIEW_ARCHITECTURE 1 // Set to 0 to disable MDI document/view architecture +// +// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE #define wxUSE_MDI_ARCHITECTURE 1 // Set to 0 to disable print/preview architecture code diff --git a/include/wx/mdi.h b/include/wx/mdi.h index 9f17e533d6..02f079f87b 100644 --- a/include/wx/mdi.h +++ b/include/wx/mdi.h @@ -3,7 +3,7 @@ #include "wx/setup.h" -#if wxUSE_MDI_ARCHITECTURE +#if wxUSE_MDI #if defined(__WXUNIVERSAL__) #include "wx/generic/mdig.h" @@ -21,7 +21,7 @@ #include "wx/generic/mdig.h" #endif -#endif // wxUSE_MDI_ARCHITECTURE +#endif // wxUSE_MDI #endif // _WX_MDI_H_BASE_ diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index eb4094aaac..8e63f7dc56 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -786,10 +786,21 @@ // Big GUI components // ---------------------------------------------------------------------------- +// Set to 0 to disable MDI support. +// +// Requires wxUSE_NOTEBOOK under platforms other than MSW. +// +// Default is 1. +// +// Recommended setting: 1, can be safely set to 0. +#define wxUSE_MDI 1 + // Set to 0 to disable document/view architecture #define wxUSE_DOC_VIEW_ARCHITECTURE 1 // Set to 0 to disable MDI document/view architecture +// +// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE #define wxUSE_MDI_ARCHITECTURE 1 // Set to 0 to disable print/preview architecture code diff --git a/include/wx/os2/setup0.h b/include/wx/os2/setup0.h index 261e5087fb..b505e4ce7b 100644 --- a/include/wx/os2/setup0.h +++ b/include/wx/os2/setup0.h @@ -156,6 +156,8 @@ #define wxUSE_DOC_VIEW_ARCHITECTURE 1 // Set to 0 to disable document/view architecture +#define wxUSE_MDI 1 + #define wxUSE_MDI_ARCHITECTURE 1 // Set to 0 to disable MDI document/view architecture #define wxUSE_PRINTING_ARCHITECTURE 1 diff --git a/src/gtk/mdi.cpp b/src/gtk/mdi.cpp index 6f88db3f39..d2de112f36 100644 --- a/src/gtk/mdi.cpp +++ b/src/gtk/mdi.cpp @@ -16,7 +16,7 @@ #include "wx/mdi.h" -#if wxUSE_MDI_ARCHITECTURE +#if wxUSE_MDI #include "wx/dialog.h" #include "wx/menu.h" diff --git a/src/gtk1/mdi.cpp b/src/gtk1/mdi.cpp index 6f88db3f39..d2de112f36 100644 --- a/src/gtk1/mdi.cpp +++ b/src/gtk1/mdi.cpp @@ -16,7 +16,7 @@ #include "wx/mdi.h" -#if wxUSE_MDI_ARCHITECTURE +#if wxUSE_MDI #include "wx/dialog.h" #include "wx/menu.h" diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 8a6d2eb788..e8c4b63a79 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -28,7 +28,7 @@ #pragma hdrstop #endif -#if wxUSE_MDI_ARCHITECTURE && !defined(__WXUNIVERSAL__) +#if wxUSE_MDI && !defined(__WXUNIVERSAL__) #ifndef WX_PRECOMP #include "wx/setup.h" @@ -1394,6 +1394,5 @@ static void UnpackMDIActivate(WXWPARAM wParam, WXLPARAM lParam, *hwndDeact = (WXHWND)wParam; } -#endif -// wxUSE_MDI_ARCHITECTURE && !defined(__WXUNIVERSAL__) +#endif // wxUSE_MDI && !defined(__WXUNIVERSAL__) -- 2.45.2