From 29825f5fc4639b5aa86902cb4b1cd4fa07fb3593 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Tue, 17 Apr 2007 05:48:09 +0000 Subject: [PATCH] add wxUSE_STC wrappers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/setup0.h | 9 +++++++-- include/wx/motif/setup0.h | 9 +++++++-- include/wx/msw/setup0.h | 9 +++++++-- include/wx/msw/wince/setup.h | 9 +++++++-- include/wx/os2/setup0.h | 9 +++++++-- include/wx/palmos/setup0.h | 9 +++++++-- include/wx/setup_inc.h | 7 +++++++ include/wx/stc/stc.h | 9 +++++++-- include/wx/univ/setup0.h | 10 +++++++--- setup.h.in | 5 ++--- src/stc/PlatWX.cpp | 6 ++++++ src/stc/ScintillaWX.cpp | 5 +++++ src/stc/stc.cpp | 15 +++++---------- src/stc/stc.cpp.in | 15 +++++---------- src/stc/stc.h.in | 9 +++++++-- 15 files changed, 93 insertions(+), 42 deletions(-) diff --git a/include/wx/mac/setup0.h b/include/wx/mac/setup0.h index d4b8896cdc..dbf2ba1d59 100644 --- a/include/wx/mac/setup0.h +++ b/include/wx/mac/setup0.h @@ -567,6 +567,13 @@ // Recommended setting: 1 #define wxUSE_AUI 1 +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + // Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced // 2D drawing API. (Still somewhat experimental) @@ -1073,8 +1080,6 @@ // Use wxHTML-based help controller? #define wxUSE_WXHTML_HELP 1 -#define wxUSE_RESOURCES 0 - // 0 for no wxGetResource/wxWriteResource #define wxUSE_CONSTRAINTS 1 // 0 for no window layout constraint system diff --git a/include/wx/motif/setup0.h b/include/wx/motif/setup0.h index 25ef8c3cb8..cf89a3b213 100644 --- a/include/wx/motif/setup0.h +++ b/include/wx/motif/setup0.h @@ -566,6 +566,13 @@ // Recommended setting: 1 #define wxUSE_AUI 1 +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + // Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced // 2D drawing API. (Still somewhat experimental) @@ -1072,8 +1079,6 @@ // Use wxHTML-based help controller? #define wxUSE_WXHTML_HELP 1 -#define wxUSE_RESOURCES 0 - // 0 for no wxGetResource/wxWriteResource #define wxUSE_CONSTRAINTS 1 // 0 for no window layout constraint system diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index a88f1b49b6..cdfae50267 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -566,6 +566,13 @@ // Recommended setting: 1 #define wxUSE_AUI 1 +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + // Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced // 2D drawing API. (Still somewhat experimental) @@ -1072,8 +1079,6 @@ // Use wxHTML-based help controller? #define wxUSE_WXHTML_HELP 1 -#define wxUSE_RESOURCES 0 - // 0 for no wxGetResource/wxWriteResource #define wxUSE_CONSTRAINTS 1 // 0 for no window layout constraint system diff --git a/include/wx/msw/wince/setup.h b/include/wx/msw/wince/setup.h index 645c6a0f68..0e24d68dcd 100644 --- a/include/wx/msw/wince/setup.h +++ b/include/wx/msw/wince/setup.h @@ -566,6 +566,13 @@ // Recommended setting: 1 #define wxUSE_AUI 1 +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + // Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced // 2D drawing API. (Still somewhat experimental) @@ -1072,8 +1079,6 @@ // Use wxHTML-based help controller? #define wxUSE_WXHTML_HELP 1 -#define wxUSE_RESOURCES 0 - // 0 for no wxGetResource/wxWriteResource #define wxUSE_CONSTRAINTS 1 // 0 for no window layout constraint system diff --git a/include/wx/os2/setup0.h b/include/wx/os2/setup0.h index 8d0e95131a..a0fca2ada9 100644 --- a/include/wx/os2/setup0.h +++ b/include/wx/os2/setup0.h @@ -566,6 +566,13 @@ // Recommended setting: 1 #define wxUSE_AUI 1 +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + // Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced // 2D drawing API. (Still somewhat experimental) @@ -1072,8 +1079,6 @@ // Use wxHTML-based help controller? #define wxUSE_WXHTML_HELP 1 -#define wxUSE_RESOURCES 0 - // 0 for no wxGetResource/wxWriteResource #define wxUSE_CONSTRAINTS 1 // 0 for no window layout constraint system diff --git a/include/wx/palmos/setup0.h b/include/wx/palmos/setup0.h index 5ac424e7fb..563f0e4bf9 100644 --- a/include/wx/palmos/setup0.h +++ b/include/wx/palmos/setup0.h @@ -566,6 +566,13 @@ // Recommended setting: 1 #define wxUSE_AUI 1 +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + // Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced // 2D drawing API. (Still somewhat experimental) @@ -1072,8 +1079,6 @@ // Use wxHTML-based help controller? #define wxUSE_WXHTML_HELP 1 -#define wxUSE_RESOURCES 0 - // 0 for no wxGetResource/wxWriteResource #define wxUSE_CONSTRAINTS 1 // 0 for no window layout constraint system diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index 827dbf7422..282c403282 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -562,6 +562,13 @@ // Recommended setting: 1 #define wxUSE_AUI 1 +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + // Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced // 2D drawing API. (Still somewhat experimental) diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index a48accc7f4..10a2e656ab 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -20,10 +20,15 @@ #ifndef __stc_h__ #define __stc_h__ +#include "wx/defs.h" -#include "wx/wx.h" +#if wxUSE_STC + +#include "wx/control.h" #include "wx/dnd.h" +#include "wx/stopwatch.h" +class WXDLLIMPEXP_CORE wxScrollBar; #ifdef WXMAKINGDLL_STC #define WXDLLIMPEXP_STC WXEXPORT @@ -3618,4 +3623,4 @@ inline const wxWX2MBbuf wx2stc(const wxString& str) { //---------------------------------------------------------------------- #endif - +#endif // wxUSE_STC diff --git a/include/wx/univ/setup0.h b/include/wx/univ/setup0.h index 83843b71e3..dbc1332c13 100644 --- a/include/wx/univ/setup0.h +++ b/include/wx/univ/setup0.h @@ -583,6 +583,13 @@ // Recommended setting: 1 #define wxUSE_AUI 1 +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + // Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced // 2D drawing API. (Still somewhat experimental) @@ -1119,9 +1126,6 @@ // Use wxHTML-based help controller #define wxUSE_WXHTML_HELP 1 -// Use resources -#define wxUSE_RESOURCES 0 - // Window layout constraint system #define wxUSE_CONSTRAINTS 1 diff --git a/setup.h.in b/setup.h.in index d4e09cd1e8..1e990974c1 100644 --- a/setup.h.in +++ b/setup.h.in @@ -298,6 +298,8 @@ #define wxUSE_AUI 0 +#define wxUSE_STC 0 + #ifndef wxUSE_GRAPHICS_CONTEXT #define wxUSE_GRAPHICS_CONTEXT 0 @@ -909,9 +911,6 @@ /* define if you have vsscanf function */ #undef HAVE_VSSCANF -/* The number of bytes in a char. */ -#undef SIZEOF_CHAR - /* The number of bytes in a wchar_t. */ #undef SIZEOF_WCHAR_T diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 111230d8de..095d031fb3 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -11,8 +11,12 @@ #pragma hdrstop #endif +#if wxUSE_STC #ifndef WX_PRECOMP + #include "wx/menu.h" + #include "wx/dcmemory.h" + #include "wx/settings.h" #endif // WX_PRECOMP #include @@ -1568,3 +1572,5 @@ const wxWX2MBbuf wx2stc(const wxString& str) } #endif + +#endif // wxUSE_STC diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 1fdd2515c5..dfd62a5da8 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -21,8 +21,11 @@ #pragma hdrstop #endif +#if wxUSE_STC #ifndef WX_PRECOMP + #include "wx/scrolbar.h" + #include "wx/menu.h" #endif // WX_PRECOMP #include "wx/textbuf.h" @@ -1143,3 +1146,5 @@ bool ScintillaWX::GetUseAntiAliasing() { //---------------------------------------------------------------------- //---------------------------------------------------------------------- + +#endif // wxUSE_STC diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index c7a5b60f89..5f72b1de71 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -22,19 +22,21 @@ #pragma hdrstop #endif +#if wxUSE_STC + +#include "wx/stc/stc.h" #ifndef WX_PRECOMP + #include "wx/wx.h" #endif // WX_PRECOMP #include -#include "wx/wx.h" #include "wx/tokenzr.h" #include "wx/mstream.h" #include "wx/image.h" #include "wx/file.h" -#include "wx/stc/stc.h" #include "ScintillaWX.h" //---------------------------------------------------------------------- @@ -3433,11 +3435,4 @@ wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent& event): //---------------------------------------------------------------------- //---------------------------------------------------------------------- - - - - - - - - +#endif // wxUSE_STC diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index e9f068b8e0..592e6da131 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -22,19 +22,21 @@ #pragma hdrstop #endif +#if wxUSE_STC + +#include "wx/stc/stc.h" #ifndef WX_PRECOMP + #include "wx/wx.h" #endif // WX_PRECOMP #include -#include "wx/wx.h" #include "wx/tokenzr.h" #include "wx/mstream.h" #include "wx/image.h" #include "wx/file.h" -#include "wx/stc/stc.h" #include "ScintillaWX.h" //---------------------------------------------------------------------- @@ -1071,11 +1073,4 @@ wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent& event): //---------------------------------------------------------------------- //---------------------------------------------------------------------- - - - - - - - - +#endif // wxUSE_STC diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index 9dd1d5dfbd..66686107c9 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -20,10 +20,15 @@ #ifndef __stc_h__ #define __stc_h__ +#include "wx/defs.h" -#include "wx/wx.h" +#if wxUSE_STC + +#include "wx/control.h" #include "wx/dnd.h" +#include "wx/stopwatch.h" +class WXDLLIMPEXP_CORE wxScrollBar; #ifdef WXMAKINGDLL_STC #define WXDLLIMPEXP_STC WXEXPORT @@ -539,4 +544,4 @@ inline const wxWX2MBbuf wx2stc(const wxString& str) { //---------------------------------------------------------------------- #endif - +#endif // wxUSE_STC -- 2.47.2