initial commit

Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
2025-10-31 23:37:30 +01:00
commit bf6b52fd94
9654 changed files with 4035664 additions and 0 deletions

View File

@@ -0,0 +1,99 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
@MAKE_SET@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
INSTALL = @INSTALL@
### Variables: ###
DESTDIR =
### Conditionally set variables: ###
### Targets: ###
all: helpview hhp2cached ifacecheck screenshotgen wxrc
install: install_ifacecheck install_screenshotgen install_wxrc
uninstall: uninstall_ifacecheck uninstall_screenshotgen uninstall_wxrc
install-strip: install install-strip_ifacecheck install-strip_screenshotgen install-strip_wxrc
clean:
rm -rf ./.deps ./.pch
rm -f ./*.o
-(cd helpview/src && $(MAKE) clean)
-(cd hhp2cached && $(MAKE) clean)
-(cd ifacecheck/src && $(MAKE) clean)
-(cd screenshotgen/src && $(MAKE) clean)
-(cd wxrc && $(MAKE) clean)
distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch Makefile
-(cd helpview/src && $(MAKE) distclean)
-(cd hhp2cached && $(MAKE) distclean)
-(cd ifacecheck/src && $(MAKE) distclean)
-(cd screenshotgen/src && $(MAKE) distclean)
-(cd wxrc && $(MAKE) distclean)
helpview:
(cd helpview/src && $(MAKE) all)
hhp2cached:
(cd hhp2cached && $(MAKE) all)
ifacecheck:
(cd ifacecheck/src && $(MAKE) all)
install_ifacecheck:
(cd ifacecheck/src && $(MAKE) install)
uninstall_ifacecheck:
(cd ifacecheck/src && $(MAKE) uninstall)
install-strip_ifacecheck:
(cd ifacecheck/src && $(MAKE) install-strip)
screenshotgen:
(cd screenshotgen/src && $(MAKE) all)
install_screenshotgen:
(cd screenshotgen/src && $(MAKE) install)
uninstall_screenshotgen:
(cd screenshotgen/src && $(MAKE) uninstall)
install-strip_screenshotgen:
(cd screenshotgen/src && $(MAKE) install-strip)
wxrc:
(cd wxrc && $(MAKE) all)
install_wxrc:
(cd wxrc && $(MAKE) install)
uninstall_wxrc:
(cd wxrc && $(MAKE) uninstall)
install-strip_wxrc:
(cd wxrc && $(MAKE) install-strip)
# Include dependency info, if present:
@IF_GNU_MAKE@-include ./.deps/*.d
.PHONY: all install uninstall clean distclean helpview hhp2cached ifacecheck \
install_ifacecheck uninstall_ifacecheck install-strip_ifacecheck \
screenshotgen install_screenshotgen uninstall_screenshotgen \
install-strip_screenshotgen wxrc install_wxrc uninstall_wxrc \
install-strip_wxrc

View File

@@ -0,0 +1,7 @@
all:
cd src; $(MAKE)
clean:
cd src; $(MAKE) clean

View File

@@ -0,0 +1,231 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
@MAKE_SET@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
INSTALL = @INSTALL@
EXEEXT = @EXEEXT@
WINDRES = @WINDRES@
STRIP = @STRIP@
NM = @NM@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DIR = @INSTALL_DIR@
BK_DEPS = @BK_DEPS@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
bindir = @bindir@
LIBS = @LIBS@
LDFLAGS_GUI = @LDFLAGS_GUI@
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
USE_DPI_AWARE_MANIFEST = @USE_DPI_AWARE_MANIFEST@
WX_LIB_FLAVOUR = @WX_LIB_FLAVOUR@
TOOLKIT = @TOOLKIT@
TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@
TOOLKIT_VERSION = @TOOLKIT_VERSION@
TOOLCHAIN_FULLNAME = @TOOLCHAIN_FULLNAME@
EXTRALIBS = @EXTRALIBS@
EXTRALIBS_XML = @EXTRALIBS_XML@
EXTRALIBS_HTML = @EXTRALIBS_HTML@
EXTRALIBS_GUI = @EXTRALIBS_GUI@
WX_CPPFLAGS = @WX_CPPFLAGS@
WX_CXXFLAGS = @WX_CXXFLAGS@
WX_LDFLAGS = @WX_LDFLAGS@
HOST_SUFFIX = @HOST_SUFFIX@
DYLIB_RPATH_FLAG = @DYLIB_RPATH_FLAG@
wx_top_builddir = @wx_top_builddir@
### Variables: ###
DESTDIR =
WX_RELEASE = 3.3
WX_VERSION = $(WX_RELEASE).1
LIBDIRNAME = $(wx_top_builddir)/lib
HELPVIEW_CXXFLAGS = $(WX_CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
$(__THREAD_DEFINE_p) -I$(srcdir) $(__DLLFLAG_p) \
-I$(srcdir)/../../../samples $(WX_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS)
HELPVIEW_OBJECTS = \
helpview_helpview.o \
$(__helpview___win32rc)
### Conditionally set variables: ###
@COND_DEPS_TRACKING_0@CXXC = $(CXX)
@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX)
@COND_USE_GUI_0@PORTNAME = base
@COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
@COND_TOOLKIT_MAC@WXBASEPORT = _carbon
@COND_BUILD_debug@WXDEBUGFLAG = d
@COND_WXUNIV_1@WXUNIVNAME = univ
@COND_MONOLITHIC_0@EXTRALIBS_FOR_BASE = $(EXTRALIBS)
@COND_MONOLITHIC_1@EXTRALIBS_FOR_BASE = $(EXTRALIBS) \
@COND_MONOLITHIC_1@ $(EXTRALIBS_XML) $(EXTRALIBS_GUI)
@COND_MONOLITHIC_0@EXTRALIBS_FOR_GUI = $(EXTRALIBS_GUI)
@COND_MONOLITHIC_1@EXTRALIBS_FOR_GUI =
@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
@COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = --define __WXUNIVERSAL__
@COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
@COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p_1 = --define wxDEBUG_LEVEL=0
@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_1 = --define wxNO_EXCEPTIONS
@COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI
@COND_USE_RTTI_0@__RTTI_DEFINE_p_1 = --define wxNO_RTTI
@COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS
@COND_USE_THREADS_0@__THREAD_DEFINE_p_1 = --define wxNO_THREADS
@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL
@COND_SHARED_1@__DLLFLAG_p_1 = --define WXUSINGDLL
@COND_PLATFORM_WIN32_1@__WIN32_DPI_MANIFEST_p = \
@COND_PLATFORM_WIN32_1@ --define \
@COND_PLATFORM_WIN32_1@ wxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST)
COND_PLATFORM_OS2_1___helpview___os2_emxbindcmd = $(NM) helpview$(EXEEXT) | if \
grep -q pmwin.763 ; then emxbind -ep helpview$(EXEEXT) ; fi
@COND_PLATFORM_OS2_1@__helpview___os2_emxbindcmd = $(COND_PLATFORM_OS2_1___helpview___os2_emxbindcmd)
@COND_TOOLKIT_MSW@__RCDEFDIR_p = --include-dir \
@COND_TOOLKIT_MSW@ $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME)
@COND_PLATFORM_MACOSX_1@__helpview_app_Contents_PkgInfo___depname \
@COND_PLATFORM_MACOSX_1@ = helpview.app/Contents/PkgInfo
@COND_PLATFORM_MACOSX_1@__helpview_bundle___depname = helpview_bundle
@COND_TOOLKIT_MAC@____helpview_BUNDLE_TGT_REF_DEP = \
@COND_TOOLKIT_MAC@ $(__helpview_app_Contents_PkgInfo___depname)
@COND_TOOLKIT_OSX_CARBON@____helpview_BUNDLE_TGT_REF_DEP \
@COND_TOOLKIT_OSX_CARBON@ = $(__helpview_app_Contents_PkgInfo___depname)
@COND_TOOLKIT_OSX_COCOA@____helpview_BUNDLE_TGT_REF_DEP \
@COND_TOOLKIT_OSX_COCOA@ = $(__helpview_app_Contents_PkgInfo___depname)
@COND_TOOLKIT_OSX_IPHONE@____helpview_BUNDLE_TGT_REF_DEP \
@COND_TOOLKIT_OSX_IPHONE@ = $(__helpview_app_Contents_PkgInfo___depname)
@COND_TOOLKIT_COCOA@____helpview_BUNDLE_TGT_REF_DEP = \
@COND_TOOLKIT_COCOA@ $(__helpview_app_Contents_PkgInfo___depname)
@COND_PLATFORM_WIN32_1@__helpview___win32rc = helpview_helpview_rc.o
COND_MONOLITHIC_0___WXLIB_HTML_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_HTML_p = $(COND_MONOLITHIC_0___WXLIB_HTML_p)
COND_MONOLITHIC_0___WXLIB_CORE_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p)
COND_MONOLITHIC_0___WXLIB_NET_p = \
-lwx_base$(WXBASEPORT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_NET_p = $(COND_MONOLITHIC_0___WXLIB_NET_p)
COND_MONOLITHIC_0___WXLIB_BASE_p = \
-lwx_base$(WXBASEPORT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
COND_MONOLITHIC_1___WXLIB_MONO_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
@COND_MONOLITHIC_1_USE_STC_1@__LIB_SCINTILLA_IF_MONO_p \
@COND_MONOLITHIC_1_USE_STC_1@ = $(__LIB_SCINTILLA_p)
@COND_USE_STC_1@__LIB_SCINTILLA_p = \
@COND_USE_STC_1@ -lwxscintilla$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_1_USE_STC_1@__LIB_LEXILLA_IF_MONO_p = $(__LIB_LEXILLA_p)
@COND_USE_STC_1@__LIB_LEXILLA_p = \
@COND_USE_STC_1@ -lwxlexilla$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_USE_GUI_1_wxUSE_LIBTIFF_builtin@__LIB_TIFF_p \
@COND_USE_GUI_1_wxUSE_LIBTIFF_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBTIFF_builtin@ -lwxtiff$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_USE_GUI_1_wxUSE_LIBJPEG_builtin@__LIB_JPEG_p \
@COND_USE_GUI_1_wxUSE_LIBJPEG_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBJPEG_builtin@ -lwxjpeg$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@__LIB_PNG_p \
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@ -lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_USE_GUI_1_wxUSE_LIBWEBP_builtin@__LIB_WEBP_p \
@COND_USE_GUI_1_wxUSE_LIBWEBP_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBWEBP_builtin@ -lwxwebp$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_ZLIB_builtin@__LIB_ZLIB_p = \
@COND_wxUSE_ZLIB_builtin@ -lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_REGEX_builtin@__LIB_REGEX_p = \
@COND_wxUSE_REGEX_builtin@ -lwxregexu$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_EXPAT_builtin@__LIB_EXPAT_p = \
@COND_wxUSE_EXPAT_builtin@ -lwxexpat$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
### Targets: ###
all: helpview$(EXEEXT) $(__helpview_bundle___depname) data
install: install_helpview
uninstall: uninstall_helpview
install-strip: install
$(STRIP) $(DESTDIR)$(bindir)/helpview$(EXEEXT)
clean:
rm -rf ./.deps ./.pch
rm -f ./*.o
rm -f helpview$(EXEEXT)
rm -rf helpview.app
distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch Makefile
helpview$(EXEEXT): $(HELPVIEW_OBJECTS) $(__helpview___win32rc)
$(CXX) -o $@ $(HELPVIEW_OBJECTS) -L$(LIBDIRNAME) $(DYLIB_RPATH_FLAG) $(LDFLAGS_GUI) $(LDFLAGS) $(WX_LDFLAGS) $(__WXLIB_HTML_p) $(EXTRALIBS_HTML) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_WEBP_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
$(__helpview___os2_emxbindcmd)
@COND_PLATFORM_MACOSX_1@helpview.app/Contents/PkgInfo: helpview$(EXEEXT) $(top_srcdir)/src/osx/carbon/Info.plist.in $(top_srcdir)/src/osx/carbon/wxmac.icns
@COND_PLATFORM_MACOSX_1@ mkdir -p helpview.app/Contents
@COND_PLATFORM_MACOSX_1@ mkdir -p helpview.app/Contents/MacOS
@COND_PLATFORM_MACOSX_1@ mkdir -p helpview.app/Contents/Resources
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@ sed -e "s/\$${MACOSX_BUNDLE_GUI_IDENTIFIER}/org.wxwidgets.helpview/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_EXECUTABLE_NAME}/helpview/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_BUNDLE_NAME}/helpview/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_COPYRIGHT}/Copyright 2002-2025 wxWidgets/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_BUNDLE_VERSION}/$(WX_VERSION)/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_INFO_STRING}/helpview version $(WX_VERSION), (c) 2002-2025 wxWidgets/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_LONG_VERSION_STRING}/$(WX_VERSION), (c) 2002-2025 wxWidgets/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_SHORT_VERSION_STRING}/$(WX_RELEASE)/" \
@COND_PLATFORM_MACOSX_1@ $(top_srcdir)/src/osx/carbon/Info.plist.in >helpview.app/Contents/Info.plist
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@ /bin/echo "APPL????" >helpview.app/Contents/PkgInfo
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@ ln -f helpview$(EXEEXT) helpview.app/Contents/MacOS/helpview
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@ cp -f $(top_srcdir)/src/osx/carbon/wxmac.icns helpview.app/Contents/Resources/wxmac.icns
@COND_PLATFORM_MACOSX_1@helpview_bundle: $(____helpview_BUNDLE_TGT_REF_DEP)
install_helpview: helpview$(EXEEXT)
$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) helpview$(EXEEXT) $(DESTDIR)$(bindir)
uninstall_helpview:
rm -f $(DESTDIR)$(bindir)/helpview$(EXEEXT)
data:
@mkdir -p .
@for f in test.zip; do \
if test ! -f ./$$f -a ! -d ./$$f ; \
then x=yep ; \
else x=`find $(srcdir)/$$f -newer ./$$f -print` ; \
fi; \
case "$$x" in ?*) \
cp -pRf $(srcdir)/$$f . ;; \
esac; \
done
helpview_helpview.o: $(srcdir)/helpview.cpp
$(CXXC) -c -o $@ $(HELPVIEW_CXXFLAGS) $(srcdir)/helpview.cpp
helpview_helpview_rc.o: $(srcdir)/helpview.rc
$(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) --include-dir $(srcdir) $(__DLLFLAG_p_1) $(__WIN32_DPI_MANIFEST_p) --include-dir $(srcdir)/../../../samples $(__RCDEFDIR_p) --include-dir $(top_srcdir)/include
# Include dependency info, if present:
@IF_GNU_MAKE@-include ./.deps/*.d
.PHONY: all install uninstall clean distclean helpview_bundle install_helpview \
uninstall_helpview data

View File

@@ -0,0 +1,21 @@
/* XPM */
static const char *const helpback_xpm[] = {
"16 15 3 1",
" c None",
". c Black",
"X c Gray100",
" ",
" ",
" . ",
" .. ",
" .X. ",
" .XX........ ",
" .XXXXXXXXXX. ",
" .XXXXXXXXXXX. ",
" .XXXXXXXXXXX. ",
" .XXXXXXXXXX. ",
" .XX........ ",
" .X. ",
" .. ",
" . ",
" "};

View File

@@ -0,0 +1,25 @@
/* XPM */
static const char *const helpbook_xpm[] = {
"16 16 6 1",
" c None",
". c Black",
"X c #000080",
"o c #c0c0c0",
"O c #808080",
"+ c Gray100",
" ",
" .. ",
" ..XX. ",
" ..XXXXX. ",
" ..XXXXXXXX. ",
".oXXXXXXXXXX. ",
".XoXXXXXXXXXX. ",
".XXoXXXXXXXXXX. ",
".XXXoXXXXXXXXX..",
".XXXXoXXXXXX..O ",
" .XXXXoXXX..O+O ",
" .XXXXo..O++o..",
" .XXX.O+++o.. ",
" .XX.o+o.. ",
" .X.o.. ",
" ... "};

View File

@@ -0,0 +1,21 @@
/* XPM */
static const char *const helpdown_xpm[] = {
"16 15 3 1",
" c None",
". c Black",
"X c Gray100",
" ",
" ...... ",
" .XXXX. ",
" .XXXX. ",
" .XXXX. ",
" .XXXX. ",
" .XXXX. ",
" .XXXX. ",
" ....XXXX.... ",
" .XXXXXXXX. ",
" .XXXXXX. ",
" .XXXX. ",
" .XX. ",
" .. ",
" "};

View File

@@ -0,0 +1,21 @@
/* XPM */
static const char *const helpforward_xpm[] = {
"16 15 3 1",
" c None",
". c Black",
"X c Gray100",
" ",
" ",
" . ",
" .. ",
" .X. ",
" ........XX. ",
" .XXXXXXXXXX. ",
" .XXXXXXXXXXX. ",
" .XXXXXXXXXXX. ",
" .XXXXXXXXXX. ",
" ........XX. ",
" .X. ",
" .. ",
" . ",
" "};

View File

@@ -0,0 +1,41 @@
/* XPM */
static const char *const helpicon_xpm[] = {
"32 32 6 1",
" c None",
". c #808080",
"X c Black",
"o c #c0c0c0",
"O c Gray100",
"+ c #000080",
" ",
" ",
" ",
" ",
" ",
" ",
" .......X ",
" ...ooooooo.X ",
" o.....XoooOoOOOOoX ",
" .oOoOoO.ooOoOoOOOO.X ",
" o.o.oOoOoOoO.ooOoOoOOOOX ",
" +oOoOoOoOOOOXoooOoOOOOOoX ",
" +oOoOoOoOOOO.oooOoOOOOOX ",
" +OoOoOoOOOOOXooOoOoOOOOoX ",
" o+OoOoOoOOOOO.ooOoOoOOOO.X ",
" o+oOoOoOoOOOOXoooOoOOOOOOX ",
" o+oOoOoOoOOOO.oooOooOOOooX ",
" o+OoOoOoOOOOOXooOo...oooX+ ",
" o+OoOoOoOOoooXooXXXXXXX++ ",
" o+OoOoOo.o.oXXX++++++++. ",
" o+oOoOo.oXXX+++...... ",
" o+oOoXXX+++.+ ",
" o+OXX+++... ",
" o+++... ",
" o+.. ",
" o. ",
" ",
" ",
" ",
" ",
" ",
" "};

View File

@@ -0,0 +1,57 @@
/* XPM */
static const char *const helpopen_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 36 1",
", c #AAC1E8",
"1 c #9AEA53",
"q c #DCE6F6",
". c #295193",
"; c #A9D066",
"r c #C6D6F0",
"$ c #4A7CCE",
"9 c #779DDB",
"8 c #EAF0FA",
"O c #6E96D8",
"X c #214279",
"e c #BED0EE",
"6 c #85A7DF",
"5 c #F0F5FC",
"t c #ADC4E9",
": c #3161B1",
" c None",
"u c #274D8B",
"& c #BFDC9B",
"> c #9FB9E5",
"y c #5584D1",
"w c #3569BF",
"% c #3A70CA",
"+ c #305FAC",
"3 c #5D89D3",
"0 c #D2DFF4",
"@ c #CAE2AA",
"= c #B2D58C",
"2 c #FAFCFE",
"# c #638ED5",
"* c #CEDCF2",
"4 c #90AFE2",
"< c #B3C8EB",
"7 c #E5EDF9",
"- c #A2BCE6",
"o c #DFF0D0",
/* pixels */
" ",
" .... ",
"XXXXX .oo. ",
"XOOOO+ .@o. ",
"XOOOO#$%.&*XXX ",
"XOOOOOOO.=*X-X ",
"XOXXXX...;*XXXX:",
"XOX>,<.11111*X2:",
"X3X4>,<.111*X5-:",
"XX#64>,,.1*X78: ",
"XXO964>,,.X0q7: ",
"Xw3O964>,,er0t: ",
"X%y3O964>,<er: ",
"uXXXXXXXXXXXX: ",
" "
};

View File

@@ -0,0 +1,21 @@
/* XPM */
static const char *const helpoptions_xpm[] = {
"16 16 2 1",
" c None",
". c #000000",
" ",
" .. ",
" ... ",
" .... ",
" . ... ",
" .. ... ",
" . .. ",
" .. ... ",
" . .. ",
" ......... ",
" .. ... ",
" . ... ",
" .. ... ",
" .... ....... ",
" ",
" "};

View File

@@ -0,0 +1,23 @@
/* XPM */
static const char *const helppage_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c Gray100",
"o c Black",
" ",
" .......... ",
" .XXXXXXXX.. ",
" .XXXXXXXXooo ",
" .X......XXXo ",
" .XXXXXXXXXXo ",
" .X........Xo ",
" .XXXXXXXXXXo ",
" .X........Xo ",
" .XXXXXXXXXXo ",
" .X........Xo ",
" .XXXXXXXXXXo ",
" .X........Xo ",
" .XXXXXXXXXXo ",
" .XXXXXXXXXXo ",
" oooooooooooo "};

View File

@@ -0,0 +1,35 @@
/* XPM */
static const char *const helpsidepanel_xpm[] = {
"16 15 17 1",
" c None",
". c #000000",
"+ c #800000",
"@ c #008000",
"# c #808000",
"$ c #000080",
"% c #800080",
"& c #008080",
"* c #C0C0C0",
"= c #808080",
"- c #FF0000",
"; c #00FF00",
"> c #FFFF00",
", c #0000FF",
"' c #FF00FF",
") c #00FFFF",
"! c #FFFFFF",
"****************",
"*..............*",
"*.************.*",
"*..............*",
"*.****.!!!!!!!.*",
"*.****.!====*!.*",
"*.****.!!!!!!!.*",
"*.****.!===*!!.*",
"*.****.!!!!!!!.*",
"*.****.!====*!.*",
"*.****.!!!!!!!.*",
"*.****.!===*!!.*",
"*.****.!!!!!!!.*",
"*..............*",
"****************"};

View File

@@ -0,0 +1,21 @@
/* XPM */
static const char *const helpup_xpm[] = {
"16 15 3 1",
" c None",
". c Black",
"X c Gray100",
" ",
" .. ",
" .XX. ",
" .XXXX. ",
" .XXXXXX. ",
" .XXXXXXXX. ",
" ....XXXX.... ",
" .XXXX. ",
" .XXXX. ",
" .XXXX. ",
" .XXXX. ",
" .XXXX. ",
" .XXXX. ",
" ...... ",
" "};

View File

@@ -0,0 +1,21 @@
/* XPM */
static const char *const helpuplevel_xpm[] = {
"16 15 3 1",
" c None",
". c Black",
"X c Gray100",
" ",
" .. ",
" .XX. ",
" .XXXX. ",
" .XXXXXX. ",
" .XXXXXXXX. ",
" ....XXXX.... ",
" .XXXX. ",
" .XXXX..... ",
" .XXXXXXXX. ",
" .XXXXXXXX. ",
" .XXXXXXXX. ",
" .XXXXXXXX. ",
" .......... ",
" "};

View File

@@ -0,0 +1,293 @@
/////////////////////////////////////////////////////////////////////////////
// Name: client.cpp
// Purpose: Remote help sample client
// Author: Julian Smart
// Modified by: Eric Dowty
// Created: 25/01/99
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#define USE_REMOTE 1
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include <math.h>
#include "wx/process.h"
#include "wx/helpbase.h"
#include "wx/html/helpfrm.h"
#include "wx/html/helpctrl.h"
#include "wx/config.h"
// Settings common to both executables: determines whether
// we're using TCP/IP or real DDE.
//#include "ddesetup.h"
//#define wxUSE_DDE_FOR_IPC 0
#include <wx/ipc.h>
#ifndef wxHAS_IMAGES_IN_RESOURCES
#include "mondrian.xpm"
#endif
#include "remhelp.h"
#include "client.h"
// ----------------------------------------------------------------------------
// wxWin macros
// ----------------------------------------------------------------------------
wxIMPLEMENT_APP(MyApp);
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(CLIENT_QUIT, MyFrame::OnExit)
EVT_MENU(CLIENT_HELPMAIN, MyFrame::OnHelp_Main)
EVT_MENU(CLIENT_HELPBOOK1, MyFrame::OnHelp_Book1)
EVT_MENU(CLIENT_HELPBOOK2, MyFrame::OnHelp_Book2)
EVT_MENU(CLIENT_HELPINDEX, MyFrame::OnHelp_Index)
EVT_MENU(CLIENT_HELPCONTENTS, MyFrame::OnHelp_Contents)
EVT_MENU(CLIENT_HELPSEARCH, MyFrame::OnHelp_Search)
EVT_MENU(CLIENT_HELPTITLE, MyFrame::OnHelp_Title)
EVT_MENU(CLIENT_HELPADDBOOK, MyFrame::OnHelp_Addbook)
EVT_MENU(CLIENT_HELPTEMPDIR, MyFrame::OnHelp_Tempdir)
EVT_MENU(CLIENT_HELPQUIT, MyFrame::OnHelp_Quitserver)
EVT_MENU(DIALOG_MODAL, MyFrame::ModalDlg)
EVT_BUTTON(BUTTON_MODAL, MyFrame::ModalDlg)
wxEND_EVENT_TABLE()
// ----------------------------------------------------------------------------
// globals
// ----------------------------------------------------------------------------
wxListBox *the_list = nullptr;
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// MyApp
// ----------------------------------------------------------------------------
// The `main program' equivalent, creating the windows and returning the
// main frame
bool MyApp::OnInit()
{
wxString a_appname, a_service, a_windowname, a_book;
m_help = nullptr;
// for MSW (DDE classes), a_service is 'service name', apparently an arbitrary string
// for Unix, should be a valid file name (for a nonexistent file)
// for nonMSW, nonUnix, must be port number, for example "4242" (TCP/IP based classes)
// should be unique to the client app
a_service = "/tmp/wxWidgets-helpconnection";
//a_service = "4242";
a_windowname = "HTML Help Test: %s";
#if defined(__WXMSW__)
a_appname = "helpview.exe";
#else
a_appname = "./helpview";
#endif
//a_book = "helpfiles/testing.hhp";
a_book = "test.zip";
wxConfig *conf = (wxConfig*) wxConfig::Get();
#if defined(USE_REMOTE)
m_help = new wxRemoteHtmlHelpController();
m_help->SetServer( a_appname );
m_help->SetService( a_service );
#else
m_help = new wxHtmlHelpController();
#endif
//this is a dummy for wxRemoteHtmlHelpController
m_help->UseConfig(conf);
m_help->AddBook( a_book );
m_help->SetTitleFormat( a_windowname );
// Create the main frame window
MyFrame* frame = new MyFrame(nullptr, "Help Client");
frame->Show(true);
return true;
}
int MyApp::OnExit()
{
delete m_help;
delete wxConfig::Set(nullptr);
return 0;
}
// Define my frame constructor
MyFrame::MyFrame(wxFrame *frame, const wxString& title)
: wxFrame(frame, wxID_ANY, title, wxDefaultPosition, wxSize( 200, 100 ) )
{
m_panel = nullptr;
// Give it an icon
SetIcon(wxICON(mondrian));
// Make a menubar
wxMenu *file_menu = new wxMenu;
file_menu->Append(CLIENT_HELPMAIN, "Help - Main");
file_menu->Append(CLIENT_HELPBOOK1, "Help - Book1");
file_menu->Append(CLIENT_HELPBOOK2, "Help - Book2");
file_menu->Append(CLIENT_HELPINDEX, "Help - DisplayIndex");
file_menu->Append(CLIENT_HELPCONTENTS, "Help - DisplayContents");
file_menu->Append(CLIENT_HELPSEARCH, "Help - KeywordSearch");
file_menu->Append(CLIENT_HELPTITLE, "Help - SetTitleFormat");
file_menu->Append(CLIENT_HELPADDBOOK, "Help - AddBook");
file_menu->Append(CLIENT_HELPTEMPDIR, "Help - SetTempDir");
file_menu->Append(CLIENT_HELPQUIT, "Help - Kill Server");
file_menu->Append(DIALOG_MODAL, "Modal dialog");
file_menu->Append(CLIENT_QUIT, "Quit");
wxMenuBar *menu_bar = new wxMenuBar;
menu_bar->Append(file_menu, "File");
// Associate the menu bar with the frame
SetMenuBar(menu_bar);
// Make a panel
m_panel = new wxPanel(this );
m_modalbutton = new wxButton( this, BUTTON_MODAL, "Modal Dialog",
wxPoint(10,10), wxDefaultSize );
}
void MyFrame::OnHelp_Book1(wxCommandEvent& event)
{
wxGetApp().m_help->Display( "book1.htm" );
}
void MyFrame::OnHelp_Book2(wxCommandEvent& event)
{
wxGetApp().m_help->Display( "book2.htm" );
}
void MyFrame::OnHelp_Main(wxCommandEvent& event)
{
wxGetApp().m_help->Display( "main.htm" );
}
void MyFrame::OnHelp_Index(wxCommandEvent& event)
{
wxGetApp().m_help->DisplayIndex( );
}
void MyFrame::OnHelp_Contents(wxCommandEvent& event)
{
wxGetApp().m_help->DisplayContents( );
}
void MyFrame::OnHelp_Search(wxCommandEvent& event)
{
wxGetApp().m_help->KeywordSearch( "enjoy" );
}
void MyFrame::OnHelp_Title(wxCommandEvent& event)
{
wxGetApp().m_help->SetTitleFormat( "Another_Title: %s" );
}
void MyFrame::OnHelp_Addbook(wxCommandEvent& event)
{
wxGetApp().m_help->AddBook("helpfiles/another.hhp" );
}
void MyFrame::OnHelp_Tempdir(wxCommandEvent& event)
{
wxGetApp().m_help->SetTempDir( "tempdir" );
}
void MyFrame::OnHelp_Quitserver(wxCommandEvent& event)
{
// if (!wxGetApp().m_help->m_connection->Poke( wxT("--YouAreDead"), wxT("") ) )
// wxLogError(wxT("wxRemoteHtmlHelpController - YouAreDead Failed"));
wxGetApp().m_help->Quit();
}
void MyFrame::OnExit(wxCommandEvent& event)
{
Close();
}
void MyFrame::ModalDlg(wxCommandEvent& WXUNUSED(event))
{
MyModalDialog dlg(this);
dlg.ShowModal();
}
wxBEGIN_EVENT_TABLE(MyModalDialog, wxDialog)
EVT_BUTTON(wxID_ANY, MyModalDialog::OnButton)
wxEND_EVENT_TABLE()
// ----------------------------------------------------------------------------
// MyModalDialog
// ----------------------------------------------------------------------------
MyModalDialog::MyModalDialog(wxWindow *parent)
: wxDialog(parent, wxID_ANY, wxString("Modal dialog"))
{
wxBoxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
m_main = new wxButton(this, wxID_ANY, "Main");
m_book1 = new wxButton(this, wxID_ANY, "Book1");
m_book2 = new wxButton(this, wxID_ANY, "Book2");
sizerTop->Add(m_main, 0, wxALIGN_CENTER | wxALL, 5);
sizerTop->Add(m_book1, 0, wxALIGN_CENTER | wxALL, 5);
sizerTop->Add(m_book2, 0, wxALIGN_CENTER | wxALL, 5);
SetSizer(sizerTop);
sizerTop->SetSizeHints(this);
sizerTop->Fit(this);
m_main->SetFocus();
m_main->SetDefault();
}
void MyModalDialog::OnButton(wxCommandEvent& event)
{
if ( event.GetEventObject() == m_main )
{
wxGetApp().m_help->Display( "main.htm" );
}
else if ( event.GetEventObject() == m_book1 )
{
wxGetApp().m_help->Display( "book1.htm" );
}
else if ( event.GetEventObject() == m_book2 )
{
wxGetApp().m_help->Display( "book2.htm" );
}
else
{
event.Skip();
}
}

View File

@@ -0,0 +1,85 @@
/////////////////////////////////////////////////////////////////////////////
// Name: client.h
// Purpose: Remote help sample client
// Author: Julian Smart
// Modified by: Eric Dowty
// Created: 2002-11-18
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Define a new application
class MyApp: public wxApp
{
public:
virtual bool OnInit();
virtual int OnExit();
#if defined(USE_REMOTE)
wxRemoteHtmlHelpController *m_help;
#else
wxHtmlHelpController *m_help;
#endif
};
wxDECLARE_APP(MyApp);
// Define a new frame
class MyFrame: public wxFrame
{
public:
MyFrame(wxFrame *frame, const wxString& title);
private:
void OnExit(wxCommandEvent& event);
void OnHelp_Main(wxCommandEvent& event);
void OnHelp_Book1(wxCommandEvent& event);
void OnHelp_Book2(wxCommandEvent& event);
void OnHelp_Index(wxCommandEvent& event);
void OnHelp_Contents(wxCommandEvent& event);
void OnHelp_Search(wxCommandEvent& event);
void OnHelp_Title(wxCommandEvent& event);
void OnHelp_Addbook(wxCommandEvent& event);
void OnHelp_Tempdir(wxCommandEvent& event);
void OnHelp_Quitserver(wxCommandEvent& event);
void ModalDlg(wxCommandEvent& event);
wxPanel *m_panel;
wxButton *m_modalbutton;
wxDECLARE_EVENT_TABLE();
};
class MyModalDialog : public wxDialog
{
public:
MyModalDialog(wxWindow *parent);
private:
void OnButton(wxCommandEvent& event);
wxButton *m_main;
wxButton *m_book1;
wxButton *m_book2;
wxDECLARE_EVENT_TABLE();
};
#define CLIENT_QUIT wxID_EXIT
#define CLIENT_EXECUTE 2
#define CLIENT_REQUEST 3
#define CLIENT_POKE 4
#define CLIENT_HELPMAIN 5
#define CLIENT_HELPBOOK1 6
#define CLIENT_HELPBOOK2 7
#define DIALOG_MODAL 8
#define BUTTON_MODAL 9
#define CLIENT_HELPINDEX 10
#define CLIENT_HELPCONTENTS 11
#define CLIENT_HELPSEARCH 12
#define CLIENT_HELPTITLE 13
#define CLIENT_HELPADDBOOK 14
#define CLIENT_HELPTEMPDIR 15
#define CLIENT_HELPQUIT 16

View File

@@ -0,0 +1 @@
#include "wx/msw/wx.rc"

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" ?>
<makefile>
<include file="../../../build/bakefiles/common_samples.bkl"/>
<exe id="helpview" template="wx_util" template_append="wx_append">
<if cond="FORMAT=='autoconf'">
<wx-mac-app-bundle/>
</if>
<sources>
helpview.cpp
</sources>
<win32-res>helpview.rc</win32-res>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<install-to>$(BINDIR)</install-to>
</exe>
<wx-data id="data">
<files>
test.zip
</files>
</wx-data>
</makefile>

View File

@@ -0,0 +1,478 @@
/////////////////////////////////////////////////////////////////////////////
// Name: helpview.h
// Purpose: HelpView application
// A standalone viewer for wxHTML Help (.htb) files
// Author: Vaclav Slavik, Julian Smart
// Created: 2002-07-09
// Copyright: (c) 2002 Vaclav Slavik, Julian Smart and others
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWidgets headers
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/filename.h"
#include "wx/image.h"
#include "wx/wxhtml.h"
#include "wx/fs_zip.h"
#include "wx/log.h"
#include "wx/artprov.h"
#include "wx/filedlg.h"
#include "helpview.h"
class AlternateArtProvider : public wxArtProvider
{
protected:
virtual wxBitmap CreateBitmap(const wxArtID& id, const wxArtClient& client,
const wxSize& size);
};
wxIMPLEMENT_APP(hvApp);
hvApp::hvApp()
{
#if wxUSE_IPC
m_server = nullptr;
#endif
}
bool hvApp::OnInit()
{
wxArtProvider::Push(new AlternateArtProvider);
int istyle = wxHF_DEFAULT_STYLE;
wxString service, windowName, titleFormat, argStr;
wxString book[10];
int bookCount = 0;
int i;
bool hasService = false;
bool hasWindowName = false;
bool createServer = false;
#if wxUSE_IPC
m_server = nullptr;
#endif
// Help books are recognized by extension ".hhp" ".htb" or ".zip".
// Service and window_name can occur anywhere in arguments,
// but service must be first
// Other arguments (topic?) could be added
// modes of operation:
// 1) no arguments - stand alone, prompt user for book
// 2) books only - stand alone, open books
// 3) "--server" as (any) arg - start connection with default service;
// also open any books passed as other arguments
// 4) at least one argument which is not book, and not "--server" - take first
// such argument as service, second (if present) as window name,
// start service, open any books
for( i=1; i<argc; i++ )
{
argStr = argv[i];
if ( argStr.Find( wxT(".hhp") ) >= 0
|| argStr.Find( wxT(".htb") ) >= 0
|| argStr.Find( wxT(".zip") ) >= 0 )
{
book[bookCount] = argStr;
bookCount++;
}
else if ( argStr == wxT("--server") )
{
createServer = true;
#if defined(__WXMSW__)
service = wxT("generic_helpservice");
#elif defined(__UNIX__)
service = wxT("/tmp/") + wxString(wxT("generic_helpservice"));
#else
service = wxT("4242");
#endif
}
else if ( !hasService )
{
service = argStr;
hasService = true;
createServer = true;
}
else if ( !hasWindowName )
{
windowName = argStr;
hasWindowName = true;
}
else if ( argStr.Find( wxT("--Style") ) >= 0 )
{
long style;
wxString numb = argStr.AfterLast(wxT('e'));
if ( !(numb.ToLong(&style) ) )
{
wxLogError( wxT("Integer conversion failed for --Style") );
}
else
{
istyle = style;
}
}
else
{
//unknown - could be topic?
}
}
// No book - query user; but not on Mac, since there
// may be an AppleEvent to open a document on the way
#ifndef __WXMAC__
if ( bookCount < 1 )
{
wxString s = wxFileSelector( wxT("Open help file"),
wxGetCwd(),
wxEmptyString,
wxEmptyString,
wxT("Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp"),
wxFD_OPEN | wxFD_FILE_MUST_EXIST,
nullptr);
if (!s.empty())
{
book[0] = s;
bookCount = 1;
}
}
#endif
#if wxUSE_IPC
if ( createServer )
{
// Create a new server
m_server = new hvServer;
if ( !m_server->Create(service) )
{
wxString wxm = wxT("Server Create failed - service: ");
wxString xxm = wxm << service;
wxLogError( xxm );
//if MSW quits here, probably another copy already exists
return false;
}
createServer = false;
wxUnusedVar(createServer);
}
#endif // wxUSE_IPC
//now add help
wxInitAllImageHandlers();
wxFileSystem::AddHandler(new wxZipFSHandler);
SetVendorName(wxT("wxWidgets") );
SetAppName(wxT("wxHTMLHelpServer") );
wxConfig::Get(); // create an instance
m_helpController = new wxHtmlHelpController( istyle );
// By default, the application doesn't continue running if only the help
// frame remains. This makes sense for the programs doing something else
// and also showing help, but as this one only shows help, we should keep
// it running as long as this frame is opened.
m_helpController->SetShouldPreventAppExit(true);
if ( !hasWindowName )
{
titleFormat = wxT("Help: %s") ;
}
else
{
//remove underscores
windowName.Replace( wxT("_"), wxT(" ") );
titleFormat = windowName;
}
m_helpController->SetTitleFormat( titleFormat );
for( i=0; i<bookCount; i++ )
{
wxFileName fileName(book[i]);
m_helpController->AddBook(fileName);
}
m_helpController->DisplayContents();
return true;
}
int hvApp::OnExit()
{
#if wxUSE_IPC
wxObjectList::compatibility_iterator node = m_connections.GetFirst();
while (node)
{
wxObjectList::compatibility_iterator next = node->GetNext();
hvConnection* connection = (hvConnection*) node->GetData();
connection->Disconnect();
delete connection;
node = next;
}
m_connections.Clear();
if (m_server)
{
delete m_server;
m_server = nullptr;
}
#endif
delete m_helpController;
delete wxConfig::Set(nullptr);
return 0;
}
bool hvApp::OpenBook(wxHtmlHelpController* controller)
{
wxString s = wxFileSelector(_("Open help file"),
wxGetCwd(),
wxEmptyString,
wxEmptyString,
_(
"Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|\
HTML Help Project (*.hhp)|*.hhp"),
wxFD_OPEN | wxFD_FILE_MUST_EXIST,
nullptr);
if ( !s.empty() )
{
wxString ext = s.Right(4).Lower();
if (ext == wxT(".zip") || ext == wxT(".htb") || ext == wxT(".hhp"))
{
wxBusyCursor bcur;
wxFileName fileName(s);
controller->AddBook(fileName);
return true;
}
}
return false;
}
#ifdef __WXMAC__
/// Respond to Apple Event for opening a document
void hvApp::MacOpenFiles(const wxArrayString& fileNames)
{
wxBusyCursor bcur;
wxFileName fileName(fileNames[0]);
m_helpController->AddBook(fileName);
m_helpController->DisplayContents();
}
#endif
/*
* Art provider class
*/
// ---------------------------------------------------------------------
// helper macros
// ---------------------------------------------------------------------
// Standard macro for getting a resource from XPM file:
#define ART(artId, xpmRc) \
if ( id == artId ) return wxBitmap(xpmRc##_xpm);
#define GET_STD_ICON_FROM_APP(iconId)
// There are two ways of getting the standard icon: either via XPMs or via
// wxIcon ctor. This depends on the platform:
#if defined(__WXUNIVERSAL__)
#define CREATE_STD_ICON(iconId, xpmRc) return wxNullBitmap;
#elif defined(__WXGTK__)
#define CREATE_STD_ICON(iconId, xpmRc) return wxBitmap(xpmRc##_xpm);
#else
#define CREATE_STD_ICON(iconId, xpmRc) \
{ \
wxIcon icon(wxT(iconId)); \
wxBitmap bmp; \
bmp.CopyFromIcon(icon); \
return bmp; \
}
#endif
// Macro used in CreateBitmap to get wxICON_FOO icons:
#define ART_MSGBOX(artId, iconId, xpmRc) \
if ( id == artId ) \
{ \
GET_STD_ICON_FROM_APP(iconId) \
CREATE_STD_ICON(#iconId, xpmRc) \
}
// ---------------------------------------------------------------------
// XPMs with the art
// ---------------------------------------------------------------------
// XPM hack: make the arrays const
//#define static static const
#include "bitmaps/helpback.xpm"
#include "bitmaps/helpbook.xpm"
#include "bitmaps/helpdown.xpm"
#include "bitmaps/helpforward.xpm"
#include "bitmaps/helpoptions.xpm"
#include "bitmaps/helppage.xpm"
#include "bitmaps/helpsidepanel.xpm"
#include "bitmaps/helpup.xpm"
#include "bitmaps/helpuplevel.xpm"
#include "bitmaps/helpicon.xpm"
#include "bitmaps/helpopen.xpm"
//#undef static
// ---------------------------------------------------------------------
// CreateBitmap routine
// ---------------------------------------------------------------------
wxBitmap AlternateArtProvider::CreateBitmap(const wxArtID& id,
const wxArtClient& client,
const wxSize& WXUNUSED(size))
{
ART(wxART_HELP_SIDE_PANEL, helpsidepanel)
ART(wxART_HELP_SETTINGS, helpoptions)
ART(wxART_HELP_BOOK, helpbook)
ART(wxART_HELP_FOLDER, helpbook)
ART(wxART_HELP_PAGE, helppage)
//ART(wxART_ADD_BOOKMARK, addbookm)
//ART(wxART_DEL_BOOKMARK, delbookm)
ART(wxART_GO_BACK, helpback)
ART(wxART_GO_FORWARD, helpforward)
ART(wxART_GO_UP, helpup)
ART(wxART_GO_DOWN, helpdown)
ART(wxART_GO_TO_PARENT, helpuplevel)
ART(wxART_FILE_OPEN, helpopen)
if (client == wxART_HELP_BROWSER)
{
//ART(wxART_FRAME_ICON, helpicon)
ART(wxART_HELP, helpicon)
}
//ART(wxART_GO_HOME, home)
// Any wxWidgets icons not implemented here
// will be provided by the default art provider.
return wxNullBitmap;
}
#if wxUSE_IPC
wxConnectionBase *hvServer::OnAcceptConnection(const wxString& topic)
{
if (topic == wxT("HELP"))
return new hvConnection();
else
return nullptr;
}
// ----------------------------------------------------------------------------
// hvConnection
// ----------------------------------------------------------------------------
hvConnection::hvConnection()
: wxConnection()
{
wxGetApp().GetConnections().Append(this);
}
hvConnection::~hvConnection()
{
wxGetApp().GetConnections().DeleteObject(this);
}
bool hvConnection::OnExec(const wxString& WXUNUSED(topic),
const wxString& data)
{
// wxLogStatus("Execute command: %s", data);
if ( data == "--intstring" )
{
long i;
wxString argStr = data;
wxString numb = argStr.AfterLast(wxT('g'));
if ( !(numb.ToLong(&i) ) )
{
wxLogError( wxT("Integer conversion failed for --intstring") );
}
else
{
wxGetApp().GetHelpController()->Display(int(i));
}
}
else
{
wxGetApp().GetHelpController()->Display(data);
}
return true;
}
bool hvConnection::OnPoke(const wxString& WXUNUSED(topic),
const wxString& item,
const void *buf,
size_t size,
wxIPCFormat format)
{
const wxString data = GetTextFromData(buf, size, format);
// wxLogStatus("Poke command: %s = %s", item, data);
//topic is not tested
if ( wxGetApp().GetHelpController() )
{
if ( item == wxT("--AddBook") )
{
wxGetApp().GetHelpController()->AddBook(data);
}
else if ( item == wxT("--DisplayContents") )
{
wxGetApp().GetHelpController()->DisplayContents();
}
else if ( item == wxT("--DisplayIndex") )
{
wxGetApp().GetHelpController()->DisplayIndex();
}
else if ( item == wxT("--KeywordSearch") )
{
wxGetApp().GetHelpController()->KeywordSearch(data);
}
else if ( item == wxT("--SetTitleFormat") )
{
wxString newname = data;
newname.Replace( wxT("_"), wxT(" ") );
wxGetApp().GetHelpController()->SetTitleFormat(newname);
//does not redraw title bar?
//wxGetApp().GetHelpController()->ReFresh(); - or something
}
else if ( item == wxT("--SetTempDir") )
{
wxGetApp().GetHelpController()->SetTempDir(data);
}
else if ( item == wxT("--YouAreDead") )
{
// don't really know how to kill app from down here...
// use wxKill from client instead
//wxWindow *win = wxTheApp->GetTopWindow();
//if ( win )
// win->Destroy();
}
}
return true;
}
#endif // #if wxUSE_IPC

View File

@@ -0,0 +1,86 @@
/////////////////////////////////////////////////////////////////////////////
// Name: helpview.h
// Purpose: HelpView application class
// Author: Vaclav Slavik, Julian Smart
// Created: 2002-07-09
// Copyright: (c) 2002 Vaclav Slavik, Julian Smart and others
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_HELPVIEW_H_
#define _WX_HELPVIEW_H_
#define hvVERSION 1.04
#if wxUSE_IPC
#include <wx/ipc.h>
class hvServer;
#endif
/*!
* The helpview application class.
*/
class hvApp : public wxApp
{
public:
hvApp();
/// Initialise the application.
virtual bool OnInit();
/// Clean up the application's data.
virtual int OnExit();
#ifdef __WXMAC__
/// Respond to Apple Event for opening a document
virtual void MacOpenFiles(const wxArrayString& fileNames);
#endif
/// Prompt the user for a book to open
bool OpenBook(wxHtmlHelpController* controller);
/// Returns the help controller.
wxHtmlHelpController* GetHelpController() { return m_helpController; }
#if wxUSE_IPC
/// Returns the list of connections.
wxList& GetConnections() { return m_connections; }
#endif
private:
wxHtmlHelpController* m_helpController;
#if wxUSE_IPC
wxList m_connections;
hvServer* m_server;
#endif
};
#if wxUSE_IPC
class hvConnection : public wxConnection
{
public:
hvConnection();
virtual ~hvConnection();
bool OnExec(const wxString& topic, const wxString& data);
bool OnPoke(const wxString& topic, const wxString& item,
const void *data, size_t size, wxIPCFormat format);
private:
};
class hvServer: public wxServer
{
public:
wxConnectionBase *OnAcceptConnection(const wxString& topic);
};
#endif
#endif
// _WX_HELPVIEW_H_

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,5 @@
/* We need this to get the right default icon. */
aaaaaa ICON "helpview.ico"
helpview ICON "helpview.ico"
#include "wx/msw/wx.rc"

View File

@@ -0,0 +1,240 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
include ../../../build/msw/config.gcc
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
CPPDEPS = -MT$@ -MF$@.d -MD -MP
WX_RELEASE_NODOT = 33
COMPILER_PREFIX = gcc
OBJS = \
$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
LIBDIRNAME = \
.\..\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
SETUPHDIR = $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)
HELPVIEW_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG) \
-D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
-I$(SETUPHDIR) -I.\..\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_p) -W \
-Wall -I. $(__DLLFLAG_p) -I.\..\..\..\samples -DNOPCH $(__RTTIFLAG_5) \
$(__EXCEPTIONSFLAG_6) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
HELPVIEW_OBJECTS = \
$(OBJS)\helpview_helpview.o \
$(OBJS)\helpview_helpview_rc.o
### Conditionally set variables: ###
ifeq ($(USE_GUI),0)
PORTNAME = base
endif
ifeq ($(USE_GUI),1)
PORTNAME = msw$(TOOLKIT_VERSION)
endif
ifeq ($(OFFICIAL_BUILD),1)
COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
endif
ifeq ($(BUILD),debug)
WXDEBUGFLAG = d
endif
ifeq ($(WXUNIV),1)
WXUNIVNAME = univ
endif
ifeq ($(SHARED),1)
WXDLLFLAG = dll
endif
ifeq ($(SHARED),0)
LIBTYPE_SUFFIX = lib
endif
ifeq ($(SHARED),1)
LIBTYPE_SUFFIX = dll
endif
ifeq ($(MONOLITHIC),0)
EXTRALIBS_FOR_BASE =
endif
ifeq ($(MONOLITHIC),1)
EXTRALIBS_FOR_BASE =
endif
ifeq ($(BUILD),debug)
__OPTIMIZEFLAG_2 = -O0
endif
ifeq ($(BUILD),release)
__OPTIMIZEFLAG_2 = -O2
endif
ifeq ($(USE_RTTI),0)
__RTTIFLAG_5 = -fno-rtti
endif
ifeq ($(USE_RTTI),1)
__RTTIFLAG_5 =
endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONSFLAG_6 = -fno-exceptions
endif
ifeq ($(USE_EXCEPTIONS),1)
__EXCEPTIONSFLAG_6 =
endif
ifeq ($(WXUNIV),1)
__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
endif
ifeq ($(WXUNIV),1)
__WXUNIV_DEFINE_p_1 = --define __WXUNIVERSAL__
endif
ifeq ($(DEBUG_FLAG),0)
__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
endif
ifeq ($(DEBUG_FLAG),0)
__DEBUG_DEFINE_p_1 = --define wxDEBUG_LEVEL=0
endif
ifeq ($(BUILD),release)
__NDEBUG_DEFINE_p = -DNDEBUG
endif
ifeq ($(BUILD),release)
__NDEBUG_DEFINE_p_1 = --define NDEBUG
endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONS_DEFINE_p_1 = --define wxNO_EXCEPTIONS
endif
ifeq ($(USE_RTTI),0)
__RTTI_DEFINE_p = -DwxNO_RTTI
endif
ifeq ($(USE_RTTI),0)
__RTTI_DEFINE_p_1 = --define wxNO_RTTI
endif
ifeq ($(USE_THREADS),0)
__THREAD_DEFINE_p = -DwxNO_THREADS
endif
ifeq ($(USE_THREADS),0)
__THREAD_DEFINE_p_1 = --define wxNO_THREADS
endif
ifeq ($(USE_CAIRO),1)
____CAIRO_INCLUDEDIR_FILENAMES_p = -I$(CAIRO_ROOT)\include\cairo
endif
ifeq ($(USE_CAIRO),1)
__CAIRO_INCLUDEDIR_p = --include-dir $(CAIRO_ROOT)/include/cairo
endif
ifeq ($(SHARED),1)
__DLLFLAG_p = -DWXUSINGDLL
endif
ifeq ($(SHARED),1)
__DLLFLAG_p_1 = --define WXUSINGDLL
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_HTML_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_CORE_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_NET_p = \
-lwxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_BASE_p = -lwxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
endif
ifeq ($(MONOLITHIC),1)
__WXLIB_MONO_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
endif
ifeq ($(MONOLITHIC),1)
ifeq ($(USE_STC),1)
__LIB_SCINTILLA_IF_MONO_p = -lwxscintilla$(WXDEBUGFLAG)
endif
endif
ifeq ($(MONOLITHIC),1)
ifeq ($(USE_STC),1)
__LIB_LEXILLA_IF_MONO_p = $(__LIB_LEXILLA_p)
endif
endif
ifeq ($(USE_STC),1)
__LIB_LEXILLA_p = -lwxlexilla$(WXDEBUGFLAG)
endif
ifeq ($(USE_GUI),1)
__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
endif
ifeq ($(USE_GUI),1)
__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
endif
ifeq ($(USE_GUI),1)
__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
endif
ifeq ($(USE_GUI),1)
__LIB_WEBP_p = -lwxwebp$(WXDEBUGFLAG)
endif
ifeq ($(USE_CAIRO),1)
__CAIRO_LIB_p = -lcairo
endif
ifeq ($(USE_CAIRO),1)
____CAIRO_LIBDIR_FILENAMES_p = -L$(CAIRO_ROOT)\lib
endif
ifeq ($(BUILD),debug)
ifeq ($(DEBUG_INFO),default)
__DEBUGINFO = -g
endif
endif
ifeq ($(BUILD),release)
ifeq ($(DEBUG_INFO),default)
__DEBUGINFO =
endif
endif
ifeq ($(DEBUG_INFO),0)
__DEBUGINFO =
endif
ifeq ($(DEBUG_INFO),1)
__DEBUGINFO = -g
endif
ifeq ($(USE_THREADS),0)
__THREADSFLAG =
endif
ifeq ($(USE_THREADS),1)
__THREADSFLAG = -mthreads
endif
all: $(OBJS)
$(OBJS):
-if not exist $(OBJS) mkdir $(OBJS)
### Targets: ###
all: $(OBJS)\helpview.exe data
clean:
-if exist $(OBJS)\*.o del $(OBJS)\*.o
-if exist $(OBJS)\*.d del $(OBJS)\*.d
-if exist $(OBJS)\helpview.exe del $(OBJS)\helpview.exe
$(OBJS)\helpview.exe: $(HELPVIEW_OBJECTS) $(OBJS)\helpview_helpview_rc.o
$(foreach f,$(subst \,/,$(HELPVIEW_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp))
@move /y $@.rsp.tmp $@.rsp >nul
$(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_WEBP_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lgdiplus -lmsimg32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme
@-del $@.rsp
data:
if not exist $(OBJS) mkdir $(OBJS)
for %%f in (test.zip) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS)
$(OBJS)\helpview_helpview.o: ./helpview.cpp
$(CXX) -c -o $@ $(HELPVIEW_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\helpview_helpview_rc.o: ./helpview.rc
$(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) --include-dir $(SETUPHDIR) --include-dir ./../../../include $(__CAIRO_INCLUDEDIR_p) --include-dir . $(__DLLFLAG_p_1) --define wxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST) --include-dir ./../../../samples --define NOPCH
.PHONY: all clean data
SHELL := $(COMSPEC)
# Dependencies tracking:
-include $(OBJS)/*.d

View File

@@ -0,0 +1,453 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
!include <../../../build/msw/config.vc>
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
WX_RELEASE_NODOT = 33
COMPILER_PREFIX = vc
OBJS = \
$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
LIBDIRNAME = \
.\..\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(LIBTYPE_SUFFIX)$(CFG)
SETUPHDIR = $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)
HELPVIEW_CXXFLAGS = /M$(__RUNTIME_LIBS_10)$(__DEBUGRUNTIME_4) /DWIN32 \
$(__DEBUGINFO_0) /Fd$(OBJS)\helpview.pdb $(____DEBUGRUNTIME_3_p) \
$(__OPTIMIZEFLAG_6) /D_CRT_SECURE_NO_DEPRECATE=1 \
/D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \
$(__NO_VC_CRTDBG_p) $(__TARGET_CPU_COMPFLAG_p) /D__WXMSW__ \
$(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
/I$(SETUPHDIR) /I.\..\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_p) /W4 \
/I. $(__DLLFLAG_p) /D_WINDOWS /I.\..\..\..\samples /DNOPCH $(__RTTIFLAG_11) \
$(__EXCEPTIONSFLAG_12) $(CPPFLAGS) $(CXXFLAGS)
HELPVIEW_OBJECTS = \
$(OBJS)\helpview_helpview.obj
HELPVIEW_RESOURCES = \
$(OBJS)\helpview_helpview.res
### Conditionally set variables: ###
!if "$(TARGET_CPU)" == "AMD64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "ARM"
ARCH_SUFFIX = _arm
!endif
!if "$(TARGET_CPU)" == "ARM64"
ARCH_SUFFIX = _arm64
!endif
!if "$(TARGET_CPU)" == "IA64"
ARCH_SUFFIX = _ia64
!endif
!if "$(TARGET_CPU)" == "X64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "amd64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "arm"
ARCH_SUFFIX = _arm
!endif
!if "$(TARGET_CPU)" == "arm64"
ARCH_SUFFIX = _arm64
!endif
!if "$(TARGET_CPU)" == "ia64"
ARCH_SUFFIX = _ia64
!endif
!if "$(TARGET_CPU)" == "x64"
ARCH_SUFFIX = _x64
!endif
!if "$(USE_GUI)" == "0"
PORTNAME = base
!endif
!if "$(USE_GUI)" == "1"
PORTNAME = msw$(TOOLKIT_VERSION)
!endif
!if "$(OFFICIAL_BUILD)" == "1"
COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
WXDEBUGFLAG = d
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
WXDEBUGFLAG = d
!endif
!if "$(WXUNIV)" == "1"
WXUNIVNAME = univ
!endif
!if "$(SHARED)" == "1"
WXDLLFLAG = dll
!endif
!if "$(SHARED)" == "0"
LIBTYPE_SUFFIX = lib
!endif
!if "$(SHARED)" == "1"
LIBTYPE_SUFFIX = dll
!endif
!if "$(TARGET_CPU)" == "AMD64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "ARM"
LINK_TARGET_CPU = /MACHINE:ARM
!endif
!if "$(TARGET_CPU)" == "ARM64"
LINK_TARGET_CPU = /MACHINE:ARM64
!endif
!if "$(TARGET_CPU)" == "IA64"
LINK_TARGET_CPU = /MACHINE:IA64
!endif
!if "$(TARGET_CPU)" == "X64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "amd64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "arm"
LINK_TARGET_CPU = /MACHINE:ARM
!endif
!if "$(TARGET_CPU)" == "arm64"
LINK_TARGET_CPU = /MACHINE:ARM64
!endif
!if "$(TARGET_CPU)" == "ia64"
LINK_TARGET_CPU = /MACHINE:IA64
!endif
!if "$(TARGET_CPU)" == "x64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "1" && "$(VISUALSTUDIOVERSION)" == "14.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "1" && "$(VISUALSTUDIOVERSION)" == "15.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "1" && "$(VISUALSTUDIOVERSION)" == "16.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "1" && "$(VISUALSTUDIOVERSION)" == "17.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "2" && "$(VISUALSTUDIOVERSION)" == "14.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware_pmv2.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "2" && "$(VISUALSTUDIOVERSION)" == "15.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware_pmv2.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "2" && "$(VISUALSTUDIOVERSION)" == "16.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware_pmv2.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "2" && "$(VISUALSTUDIOVERSION)" == "17.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware_pmv2.manifest
!endif
!if "$(MONOLITHIC)" == "0"
EXTRALIBS_FOR_BASE =
!endif
!if "$(MONOLITHIC)" == "1"
EXTRALIBS_FOR_BASE =
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_0 = /Zi
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_0 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_0 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_0 = /Zi
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_1 = /DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_1 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_1 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_1 = /DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_2 = $(__DEBUGRUNTIME_5)
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_2 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_2 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_2 = $(__DEBUGRUNTIME_5)
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p = /D_DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
____DEBUGRUNTIME_3_p =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
____DEBUGRUNTIME_3_p = /D_DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p_1 = /d _DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p_1 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
____DEBUGRUNTIME_3_p_1 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
____DEBUGRUNTIME_3_p_1 = /d _DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_4 = d
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_4 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__DEBUGRUNTIME_4 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
__DEBUGRUNTIME_4 = d
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_5 =
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_5 = /opt:ref /opt:icf
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__DEBUGRUNTIME_5 = /opt:ref /opt:icf
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
__DEBUGRUNTIME_5 =
!endif
!if "$(BUILD)" == "debug"
__OPTIMIZEFLAG_6 = /Od
!endif
!if "$(BUILD)" == "release"
__OPTIMIZEFLAG_6 = /O2
!endif
!if "$(USE_THREADS)" == "0"
__THREADSFLAG_9 = L
!endif
!if "$(USE_THREADS)" == "1"
__THREADSFLAG_9 = T
!endif
!if "$(RUNTIME_LIBS)" == "dynamic"
__RUNTIME_LIBS_10 = D
!endif
!if "$(RUNTIME_LIBS)" == "static"
__RUNTIME_LIBS_10 = $(__THREADSFLAG_9)
!endif
!if "$(USE_RTTI)" == "0"
__RTTIFLAG_11 = /GR-
!endif
!if "$(USE_RTTI)" == "1"
__RTTIFLAG_11 = /GR
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONSFLAG_12 =
!endif
!if "$(USE_EXCEPTIONS)" == "1"
__EXCEPTIONSFLAG_12 = /EHsc
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__
!endif
!if "$(TARGET_CPU)" == ""
__TARGET_CPU_COMPFLAG_p = /DTARGET_CPU_COMPFLAG=0
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
__TARGET_CPU_COMPFLAG_p =
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
__TARGET_CPU_COMPFLAG_p =
!endif
!if "$(TARGET_CPU)" == ""
__TARGET_CPU_COMPFLAG_p_1 = /d TARGET_CPU_COMPFLAG=0
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
__TARGET_CPU_COMPFLAG_p_1 =
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
__TARGET_CPU_COMPFLAG_p_1 =
!endif
!if "$(WXUNIV)" == "1"
__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
!endif
!if "$(WXUNIV)" == "1"
__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__
!endif
!if "$(DEBUG_FLAG)" == "0"
__DEBUG_DEFINE_p = /DwxDEBUG_LEVEL=0
!endif
!if "$(DEBUG_FLAG)" == "0"
__DEBUG_DEFINE_p_1 = /d wxDEBUG_LEVEL=0
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__NDEBUG_DEFINE_p = /DNDEBUG
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__NDEBUG_DEFINE_p = /DNDEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__NDEBUG_DEFINE_p_1 = /d NDEBUG
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__NDEBUG_DEFINE_p_1 = /d NDEBUG
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONS_DEFINE_p_1 = /d wxNO_EXCEPTIONS
!endif
!if "$(USE_RTTI)" == "0"
__RTTI_DEFINE_p = /DwxNO_RTTI
!endif
!if "$(USE_RTTI)" == "0"
__RTTI_DEFINE_p_1 = /d wxNO_RTTI
!endif
!if "$(USE_THREADS)" == "0"
__THREAD_DEFINE_p = /DwxNO_THREADS
!endif
!if "$(USE_THREADS)" == "0"
__THREAD_DEFINE_p_1 = /d wxNO_THREADS
!endif
!if "$(USE_CAIRO)" == "1"
____CAIRO_INCLUDEDIR_FILENAMES_p = /I$(CAIRO_ROOT)\include\cairo
!endif
!if "$(USE_CAIRO)" == "1"
____CAIRO_INCLUDEDIR_FILENAMES_1_p = /i $(CAIRO_ROOT)\include\cairo
!endif
!if "$(SHARED)" == "1"
__DLLFLAG_p = /DWXUSINGDLL
!endif
!if "$(SHARED)" == "1"
__DLLFLAG_p_1 = /d WXUSINGDLL
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_HTML_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_CORE_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_NET_p = \
wxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_BASE_p = \
wxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
!if "$(MONOLITHIC)" == "1"
__WXLIB_MONO_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
!if "$(MONOLITHIC)" == "1" && "$(USE_STC)" == "1"
__LIB_SCINTILLA_IF_MONO_p = wxscintilla$(WXDEBUGFLAG).lib
!endif
!if "$(MONOLITHIC)" == "1" && "$(USE_STC)" == "1"
__LIB_LEXILLA_IF_MONO_p = $(__LIB_LEXILLA_p)
!endif
!if "$(USE_STC)" == "1"
__LIB_LEXILLA_p = wxlexilla$(WXDEBUGFLAG).lib
!endif
!if "$(USE_GUI)" == "1"
__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
!endif
!if "$(USE_GUI)" == "1"
__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
!endif
!if "$(USE_GUI)" == "1"
__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
!endif
!if "$(USE_GUI)" == "1"
__LIB_WEBP_p = wxwebp$(WXDEBUGFLAG).lib
!endif
!if "$(USE_CAIRO)" == "1"
__CAIRO_LIB_p = cairo.lib
!endif
!if "$(USE_CAIRO)" == "1"
____CAIRO_LIBDIR_FILENAMES_p = /LIBPATH:$(CAIRO_ROOT)\lib
!endif
all: $(OBJS)
$(OBJS):
-if not exist $(OBJS) mkdir $(OBJS)
### Targets: ###
all: $(OBJS)\helpview.exe data
clean:
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
-if exist $(OBJS)\*.res del $(OBJS)\*.res
-if exist $(OBJS)\*.pch del $(OBJS)\*.pch
-if exist $(OBJS)\helpview.exe del $(OBJS)\helpview.exe
-if exist $(OBJS)\helpview.ilk del $(OBJS)\helpview.ilk
-if exist $(OBJS)\helpview.pdb del $(OBJS)\helpview.pdb
$(OBJS)\helpview.exe: $(HELPVIEW_OBJECTS) $(OBJS)\helpview_helpview.res
link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\helpview.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(WIN32_DPI_LINKFLAG) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<<
$(HELPVIEW_OBJECTS) $(HELPVIEW_RESOURCES) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_WEBP_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib gdiplus.lib msimg32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib
<<
data:
if not exist $(OBJS) mkdir $(OBJS)
for %f in (test.zip) do if not exist $(OBJS)\%f copy .\%f $(OBJS)
$(OBJS)\helpview_helpview.obj: .\helpview.cpp
$(CXX) /c /nologo /TP /Fo$@ $(HELPVIEW_CXXFLAGS) .\helpview.cpp
$(OBJS)\helpview_helpview.res: .\helpview.rc
rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_3_p_1) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_1) $(__TARGET_CPU_COMPFLAG_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) /i $(SETUPHDIR) /i .\..\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_1_p) /i . $(__DLLFLAG_p_1) /d _WINDOWS /i .\..\..\..\samples /d NOPCH .\helpview.rc

View File

@@ -0,0 +1,35 @@
The HTML help client-server pair sample consists of three parts:
1) The Client, derived from Client from the IPC samples and now containing wxRemoteHtmlHelpController
2) The Server, derived from helpview - the app is called helpview
3) The sample help files, specifically called by the Client, which are from the HTML/Help sample
Normally, the Client is started first, and it will in turn start up the Server (helpview) the first time help is requested with Display. If the Server is to be started first, the default service name ("generic_helpservice" for MSW, "/tmp/generic_helpservice" for Unix or "4242" otherwise) should be used for the connection in the client.
It is assumed that there will be one copy of the server for each app which uses help. Depending on the OS, it may be possible to use different instances of the same server, or even to use one instance of the server (probably not a good idea) to service more than one app requesting help.
At the moment, if a connection has been established and if the client is killed, the server is also killed. If the client is started up again, it will use the same connection.
If USE_REMOTE in client.cpp is undefined, the "client" app will use wxHtmlHelpController instead of wxRemoteHtmlHelpController, that is the remote server will not be used. In MSW, this results in freezing of the help window when called from a modal dialog. In GTK, the window is not frozen, but it must be closed before you can return to the app itself.
------------------------------------------------
wxRemoteHtmlHelpController Class
This class can be added to an application (the client) to provide wxWidgets HTML help. It will start up the remote help controller (helpview) the first time the Display member function is called, passing the server the connection name or port number, the name of the help window and the help book (.hhp, .htb, .zip). This class will only work with a particular server app, helpview.
Most of the functions of wxHtmlHelpController are available - the relevant arguments are just passed to wxHtmlHelpController in the server. The functions involving wxConfig are not implemented - the config parameters (font, windows size and position) are kept in the server.
Use the members SetServer and SetService to pass the name of the server app and service name or port. This must be done before the first call to the Display member function, or defaults will be used. The default server app is "helpview" and default service depends on the platform: for MSW it is "appname_helpservice" (a service name string); for UNIX platforms it is "/tmp/appname_helpservice" (a file name) and otherwise it is "4242" (a TCP/IP port number), where "appname" is the name of the application without extension.
A wxRemoteHtmlHelpController can be created in wxApp::OnInit, or some high level window like a mainframe. It should be deleted explicitly, for example in wxApp::OnExit, or else the various connection objects are deleted in the wrong order. Using a wxRemoteHtmlHelpController member of wxApp does not work because of problems on exit.
This has been tested on wxMSW and wxGTK. It does not work on wxMac because the connection classes, as well as wxExecute, are not fully supported.
----------------------------------------------
Changes to helpview sample
The constructor now tests the command-line arguments, looking first for help books (containing .hhp, .htb, .zip). Then it looks for "--server". If arguments not falling in these categories are present, they are taken to be 1) the service name or 2) the window name (see wxRemoteHtmlHelpController for the meaning of service name).
The client passes most functions of wxHtmlHelpController, with argument, to helpview using wxConnection::Poke. The string for the Display function is passed with wxConnection::Execute.

View File

@@ -0,0 +1,412 @@
/////////////////////////////////////////////////////////////////////////////
// Name: remhelp.cpp
// Purpose: Remote help controller class
// Author: Eric Dowty
// Created: 2002-11-18
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include <math.h>
#include "wx/process.h"
#include "wx/confbase.h"
// Settings common to both executables: determines whether
// we're using TCP/IP or real DDE.
//#include "ddesetup.h"
//#define wxUSE_DDE_FOR_IPC 0
#ifndef wxHAS_IMAGES_IN_RESOURCES
#include "mondrian.xpm"
#endif
#include "remhelp.h"
#include "client.h"
#if !defined(USE_REMOTE)
#include <wx/html/helpctrl.h>
#endif
//////////////////
//////////////////
// helper classes
rhhcClient::rhhcClient( bool *isconn_a )
{
isconn_2 = isconn_a;
}
wxConnectionBase *rhhcClient::OnMakeConnection()
{
return new rhhcConnection( isconn_2 );
}
rhhcConnection::rhhcConnection( bool *isconn_a )
: wxConnection()
{
isconn_3 = isconn_a;
*isconn_3 = true;
}
rhhcConnection::~rhhcConnection()
{
*isconn_3 = false;
}
bool rhhcConnection::OnAdvise(const wxString& topic, const wxString& item, char *data, int size, wxIPCFormat format)
{
return true;
}
bool rhhcConnection::OnDisconnect()
{
*isconn_3 = false;
return wxConnection::OnDisconnect();
}
//////////////////////////////////////////
/////////////////////////////////////////
// wxRemoteHtmlHelpController class
wxIMPLEMENT_CLASS(wxRemoteHtmlHelpController, wxHelpControllerBase);
wxRemoteHtmlHelpController::wxRemoteHtmlHelpController(int style )
{
m_style = style;
m_connection = nullptr;
m_client = nullptr;
m_pid = 0;
isconn_1 = false;
m_process = nullptr;
// defaults
//
// server app is assumed to be local
//
// for MSW (DDE classes), a_service is 'service name', apparently an arbitrary string
// for Unix, should be a valid file name (for a nonexistent file)
// for nonMSW, nonUnix, must be port number, for example "4242" (TCP/IP based classes)
// should be unique to the client app
wxString thename = wxGetApp().GetAppName();
#if defined(__WXMSW__)
m_appname = wxT("helpview.exe");
m_service = thename + wxString(wxT("_helpservice"));
#elif defined(__UNIX__)
m_appname = wxT("./helpview");
m_service = wxT("/tmp/") + thename + wxString(wxT("_helpservice"));
#else
m_appname = wxT("./helpview");
m_service = wxT("4242");
#endif
m_book = thename + wxT(".hhp"); // or .htb or .zip
m_windowname = thename + wxT(" Help: %s");
//underscores for spaces
m_windowname.Replace( wxT(" "), wxT("_") );
}
void wxRemoteHtmlHelpController::SetService(wxString& a_service)
{
m_service = a_service;
}
void wxRemoteHtmlHelpController::SetServer(wxString& a_appname)
{
m_appname = a_appname;
}
void wxRemoteHtmlHelpController::OnQuit()
{
//kill the Server here?
//this function is not called ?
}
wxRemoteHtmlHelpController::~wxRemoteHtmlHelpController()
{
if ( isconn_1 )
{
// if (!m_connection->Poke( wxT("--YouAreDead"), wxT("") ) )
// wxLogError(wxT("wxRemoteHtmlHelpController - YouAreDead Failed"));
// Kill the server. This could be an option.
Quit();
m_connection->Disconnect();
delete m_connection;
delete m_process;
m_process = nullptr;
}
if( m_client )
delete m_client; //should be automatic?
}
bool wxRemoteHtmlHelpController::DoConnection()
{
wxString cmd, blank;
int nsleep;
blank = wxT(" ");
// ignored under DDE, host name in TCP/IP based classes
wxString hostName = wxT("localhost");
// Create a new client
if( !m_client ) m_client = new rhhcClient(&isconn_1);
nsleep = 0;
// suppress the log messages from MakeConnection()
{
wxLogNull nolog;
//first try to connect assuming server is running
if( !isconn_1 )
m_connection = (rhhcConnection *)m_client->MakeConnection(hostName, m_service, wxT("HELP") );
//if not, start server
if( !isconn_1 ) {
wxString stylestr;
stylestr.Printf( wxT("--Style%d"), m_style );
cmd = m_appname + blank + m_service + blank + m_windowname + blank + m_book + blank + stylestr;
m_process = new wxProcess(nullptr);
m_pid = wxExecute( cmd, false, m_process );
// leaks - wxExecute itself (if not deleted) and in wxExecute at
// wxExecuteData *data = new wxExecuteData;
if( m_pid <= 0 ) {
wxLogError( wxT("wxRemoteHtmlHelpController - Failed to start Help server") );
return false;
}
}
while ( !isconn_1 )
{
//try every second for a while, then leave it to user
wxSleep(1);
if( nsleep > 4 ) {
if ( wxMessageBox( wxT("Failed to make connection to Help server.\nRetry?") ,
wxT("wxRemoteHtmlHelpController Error"),
wxICON_ERROR | wxYES_NO | wxCANCEL ) != wxYES )
{
// no server
return false;
}
}
nsleep++;
m_connection = (rhhcConnection *)m_client->MakeConnection(hostName, m_service, wxT("HELP") );
}
}
if (!m_connection->StartAdvise(wxT("Item"))) {
wxLogError(wxT("wxRemoteHtmlHelpController - StartAdvise failed") );
return false;
}
return true;
}
bool wxRemoteHtmlHelpController::LoadFile(const wxString& WXUNUSED(file))
{
return true;
}
bool wxRemoteHtmlHelpController::DisplaySection(int sectionNo)
{
Display(sectionNo);
return true;
}
bool wxRemoteHtmlHelpController::DisplayBlock(long blockNo)
{
return DisplaySection((int)blockNo);
}
bool wxRemoteHtmlHelpController::Quit()
{
//this code from exec sample - branches left in for testing
// sig = 3, 6, 9 or 12 all kill server with no apparent problem
// but give error message on MSW - timout?
int sig = 15; //3 = quit; 6 = abort; 9 = kill; 15 = terminate
/*
switch ( sig )
{
default:
wxFAIL_MSG( wxT("unexpected return value") );
// fall through
case -1:
// cancelled
return false;
case wxSIGNONE:
case wxSIGHUP:
case wxSIGINT:
case wxSIGQUIT:
case wxSIGILL:
case wxSIGTRAP:
case wxSIGABRT:
case wxSIGEMT:
case wxSIGFPE:
case wxSIGKILL:
case wxSIGBUS:
case wxSIGSEGV:
case wxSIGSYS:
case wxSIGPIPE:
case wxSIGALRM:
case wxSIGTERM:
break;
}
*/
if ( sig == 0 )
{
if ( wxProcess::Exists(m_pid) )
{
wxLogStatus(wxT("Process %ld is running."), m_pid);
}
else
{
wxLogStatus(wxT("No process with pid = %ld."), m_pid);
}
}
else // not SIGNONE
{
wxKillError rc = wxProcess::Kill(m_pid, (wxSignal)sig);
if ( rc == wxKILL_OK )
{
wxLogStatus(wxT("Process %ld killed with signal %d."), m_pid, sig);
}
else
{
static const wxChar *errorText[] =
{
wxT(""), // no error
wxT("signal not supported"),
wxT("permission denied"),
wxT("no such process"),
wxT("unspecified error"),
};
// sig = 3, 6, 9 or 12 all kill server with no apparent problem
// but give error message on MSW - timout?
//
//wxLogError(wxT("Failed to kill process %ld with signal %d: %s"),
// m_pid, sig, errorText[rc]);
}
}
return true;
}
void wxRemoteHtmlHelpController::Display(const wxString& helpfile)
{
if( !isconn_1 ) {
if( !DoConnection() ) return;
}
if (!m_connection->Execute( helpfile, -1 ) )
wxLogError(wxT("wxRemoteHtmlHelpController - Display Failed"));
}
void wxRemoteHtmlHelpController::Display(const int id)
{
if( !isconn_1 ) {
if( !DoConnection() ) return;
}
wxString intstring;
intstring.Printf( "--intstring%d", id );
if (!m_connection->Execute( intstring, -1 ) )
wxLogError(wxT("wxRemoteHtmlHelpController - Display Failed"));
}
bool wxRemoteHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg)
{
//ignore show_wait_msg - there shouldn't be a delay in this step
//show_wait_msg = true could be transmitted with ++AddBook
m_book = book;
if( isconn_1 ) {
if (!m_connection->Poke( wxT("--AddBook"), (char*)book.c_str() ) )
{
wxLogError(wxT("wxRemoteHtmlHelpController - AddBook Failed"));
}
return false;
}
return true;
}
bool wxRemoteHtmlHelpController::DisplayContents()
{
if( isconn_1 ) {
if (!m_connection->Poke( wxT("--DisplayContents"), wxT("") ) ) {
wxLogError(wxT("wxRemoteHtmlHelpController - DisplayContents Failed"));
return false;
}
}
return true;
}
void wxRemoteHtmlHelpController::DisplayIndex()
{
if( isconn_1 ) {
if (!m_connection->Poke( wxT("--DisplayIndex"), wxT("") ) )
{
wxLogError(wxT("wxRemoteHtmlHelpController - DisplayIndex Failed"));
}
}
}
bool wxRemoteHtmlHelpController::KeywordSearch(const wxString& keyword)
{
if( isconn_1 ) {
if (!m_connection->Poke( wxT("--KeywordSearch"), (char*)keyword.c_str() ) ) {
wxLogError(wxT("wxRemoteHtmlHelpController - KeywordSearch Failed"));
return false;
}
}
return true;
}
void wxRemoteHtmlHelpController::SetTitleFormat(const wxString& format)
{
m_windowname = format;
m_windowname.Replace( wxT(" "), wxT("_") );
if( isconn_1 ) {
if (!m_connection->Poke( wxT("--SetTitleFormat"), (char*)format.c_str() ) )
{
wxLogError(wxT("wxRemoteHtmlHelpController - SetTitleFormat Failed"));
}
}
}
void wxRemoteHtmlHelpController::SetTempDir(const wxString& path)
{
if( isconn_1 ) {
if (!m_connection->Poke( wxT("--SetTempDir"), (char*)path.c_str() ) )
{
wxLogError(wxT("wxRemoteHtmlHelpController - SetTempDir Failed"));
}
}
}

View File

@@ -0,0 +1,91 @@
/////////////////////////////////////////////////////////////////////////////
// Name: remhelp.h
// Purpose: Remote help controller class
// Author: Eric Dowty
// Created: 2002-11-18
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_REMHELP_H_
#define _WX_REMHELP_H_
#include <wx/helpbase.h>
#include <wx/ipc.h>
#include <wx/html/helpctrl.h>
class WXDLLIMPEXP_FWD_BASE wxConfigBase;
class rhhcConnection : public wxConnection
{
public:
rhhcConnection(bool *isconn_a);
virtual ~rhhcConnection();
bool OnAdvise(const wxString& topic, const wxString& item, char *data, int size, wxIPCFormat format);
bool OnDisconnect();
bool *isconn_3;
};
class rhhcClient: public wxClient
{
public:
rhhcClient(bool *isconn_a);
//~rhhcClient( );
wxConnectionBase *OnMakeConnection();
bool *isconn_2;
};
class wxRemoteHtmlHelpController : public wxHelpControllerBase
{
wxDECLARE_CLASS(wxRemoteHtmlHelpController);
public:
wxRemoteHtmlHelpController(int style = wxHF_DEFAULT_STYLE);
virtual ~wxRemoteHtmlHelpController();
void OnQuit(void);
void SetService(wxString& a_service);
void SetServer(wxString& a_appname); //could be wxHelpController::SetViewer
//standard wxHtmlHelpController functions
bool AddBook(const wxString& book, bool show_wait_msg = false);
void Display(const wxString& x);
void Display(const int id);
bool DisplayContents();
void DisplayIndex();
bool KeywordSearch(const wxString& keyword);
void SetTempDir(const wxString& path);
void SetTitleFormat(const wxString& format);
//dummies - config is in server
void UseConfig(wxConfigBase* config, const wxString& rootpath = wxEmptyString) {};
void ReadCustomization(wxConfigBase* cfg, wxString path = wxEmptyString) {};
void WriteCustomization(wxConfigBase* cfg, wxString path = wxEmptyString) {};
//virtuals from wxHelpControllerBase - not in wxHtmlHelpController
//won't compile without these
bool LoadFile(const class wxString &); //dummy
bool DisplaySection(int);
bool DisplayBlock(long);
bool Quit(void);
private:
void OnExit(wxCommandEvent& event);
bool DoConnection();
rhhcConnection *m_connection;
rhhcClient *m_client;
wxProcess *m_process;
int m_pid;
int m_style;
wxString m_appname;
wxString m_service;
wxString m_windowname;
wxString m_book;
bool isconn_1;
};
#endif
// _WX_REMHELP_H_

Binary file not shown.

View File

@@ -0,0 +1,174 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
@MAKE_SET@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
INSTALL = @INSTALL@
EXEEXT = @EXEEXT@
WINDRES = @WINDRES@
STRIP = @STRIP@
NM = @NM@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DIR = @INSTALL_DIR@
BK_DEPS = @BK_DEPS@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
bindir = @bindir@
LIBS = @LIBS@
LDFLAGS_GUI = @LDFLAGS_GUI@
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
USE_DPI_AWARE_MANIFEST = @USE_DPI_AWARE_MANIFEST@
WX_LIB_FLAVOUR = @WX_LIB_FLAVOUR@
TOOLKIT = @TOOLKIT@
TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@
TOOLKIT_VERSION = @TOOLKIT_VERSION@
TOOLCHAIN_FULLNAME = @TOOLCHAIN_FULLNAME@
EXTRALIBS = @EXTRALIBS@
EXTRALIBS_XML = @EXTRALIBS_XML@
EXTRALIBS_HTML = @EXTRALIBS_HTML@
EXTRALIBS_GUI = @EXTRALIBS_GUI@
WX_CPPFLAGS = @WX_CPPFLAGS@
WX_CXXFLAGS = @WX_CXXFLAGS@
WX_LDFLAGS = @WX_LDFLAGS@
HOST_SUFFIX = @HOST_SUFFIX@
DYLIB_RPATH_FLAG = @DYLIB_RPATH_FLAG@
wx_top_builddir = @wx_top_builddir@
### Variables: ###
DESTDIR =
WX_RELEASE = 3.3
LIBDIRNAME = $(wx_top_builddir)/lib
HHP2CACHED_CXXFLAGS = $(WX_CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
$(__THREAD_DEFINE_p) -I$(srcdir) $(__DLLFLAG_p) -I$(srcdir)/../../samples \
$(WX_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS)
HHP2CACHED_OBJECTS = \
hhp2cached_hhp2cached.o \
$(__hhp2cached___win32rc)
### Conditionally set variables: ###
@COND_DEPS_TRACKING_0@CXXC = $(CXX)
@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX)
@COND_USE_GUI_0@PORTNAME = base
@COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
@COND_TOOLKIT_MAC@WXBASEPORT = _carbon
@COND_BUILD_debug@WXDEBUGFLAG = d
@COND_WXUNIV_1@WXUNIVNAME = univ
@COND_MONOLITHIC_0@EXTRALIBS_FOR_BASE = $(EXTRALIBS)
@COND_MONOLITHIC_1@EXTRALIBS_FOR_BASE = $(EXTRALIBS) \
@COND_MONOLITHIC_1@ $(EXTRALIBS_XML) $(EXTRALIBS_GUI)
@COND_MONOLITHIC_0@EXTRALIBS_FOR_GUI = $(EXTRALIBS_GUI)
@COND_MONOLITHIC_1@EXTRALIBS_FOR_GUI =
@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
@COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = --define __WXUNIVERSAL__
@COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
@COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p_1 = --define wxDEBUG_LEVEL=0
@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_1 = --define wxNO_EXCEPTIONS
@COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI
@COND_USE_RTTI_0@__RTTI_DEFINE_p_1 = --define wxNO_RTTI
@COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS
@COND_USE_THREADS_0@__THREAD_DEFINE_p_1 = --define wxNO_THREADS
@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL
@COND_SHARED_1@__DLLFLAG_p_1 = --define WXUSINGDLL
@COND_PLATFORM_WIN32_1@__WIN32_DPI_MANIFEST_p = \
@COND_PLATFORM_WIN32_1@ --define \
@COND_PLATFORM_WIN32_1@ wxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST)
COND_PLATFORM_OS2_1___hhp2cached___os2_emxbindcmd = $(NM) hhp2cached$(EXEEXT) \
| if grep -q pmwin.763 ; then emxbind -ep hhp2cached$(EXEEXT) ; fi
@COND_PLATFORM_OS2_1@__hhp2cached___os2_emxbindcmd = $(COND_PLATFORM_OS2_1___hhp2cached___os2_emxbindcmd)
@COND_TOOLKIT_MSW@__RCDEFDIR_p = --include-dir \
@COND_TOOLKIT_MSW@ $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME)
@COND_PLATFORM_WIN32_1@__hhp2cached___win32rc = hhp2cached_hhp2cached_rc.o
COND_MONOLITHIC_0___WXLIB_HTML_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_HTML_p = $(COND_MONOLITHIC_0___WXLIB_HTML_p)
COND_MONOLITHIC_0___WXLIB_CORE_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p)
COND_MONOLITHIC_0___WXLIB_BASE_p = \
-lwx_base$(WXBASEPORT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
COND_MONOLITHIC_1___WXLIB_MONO_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
@COND_MONOLITHIC_1_USE_STC_1@__LIB_SCINTILLA_IF_MONO_p \
@COND_MONOLITHIC_1_USE_STC_1@ = $(__LIB_SCINTILLA_p)
@COND_USE_STC_1@__LIB_SCINTILLA_p = \
@COND_USE_STC_1@ -lwxscintilla$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_1_USE_STC_1@__LIB_LEXILLA_IF_MONO_p = $(__LIB_LEXILLA_p)
@COND_USE_STC_1@__LIB_LEXILLA_p = \
@COND_USE_STC_1@ -lwxlexilla$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_USE_GUI_1_wxUSE_LIBTIFF_builtin@__LIB_TIFF_p \
@COND_USE_GUI_1_wxUSE_LIBTIFF_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBTIFF_builtin@ -lwxtiff$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_USE_GUI_1_wxUSE_LIBJPEG_builtin@__LIB_JPEG_p \
@COND_USE_GUI_1_wxUSE_LIBJPEG_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBJPEG_builtin@ -lwxjpeg$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@__LIB_PNG_p \
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@ -lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_USE_GUI_1_wxUSE_LIBWEBP_builtin@__LIB_WEBP_p \
@COND_USE_GUI_1_wxUSE_LIBWEBP_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBWEBP_builtin@ -lwxwebp$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_ZLIB_builtin@__LIB_ZLIB_p = \
@COND_wxUSE_ZLIB_builtin@ -lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_REGEX_builtin@__LIB_REGEX_p = \
@COND_wxUSE_REGEX_builtin@ -lwxregexu$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_EXPAT_builtin@__LIB_EXPAT_p = \
@COND_wxUSE_EXPAT_builtin@ -lwxexpat$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
### Targets: ###
all: hhp2cached$(EXEEXT)
install: install_hhp2cached
uninstall: uninstall_hhp2cached
install-strip: install
$(STRIP) $(DESTDIR)$(bindir)/hhp2cached$(EXEEXT)
clean:
rm -rf ./.deps ./.pch
rm -f ./*.o
rm -f hhp2cached$(EXEEXT)
distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch Makefile
hhp2cached$(EXEEXT): $(HHP2CACHED_OBJECTS) $(__hhp2cached___win32rc)
$(CXX) -o $@ $(HHP2CACHED_OBJECTS) -L$(LIBDIRNAME) $(DYLIB_RPATH_FLAG) $(LDFLAGS_GUI) $(LDFLAGS) $(WX_LDFLAGS) $(__WXLIB_HTML_p) $(EXTRALIBS_HTML) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_WEBP_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
$(__hhp2cached___os2_emxbindcmd)
install_hhp2cached: hhp2cached$(EXEEXT)
$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) hhp2cached$(EXEEXT) $(DESTDIR)$(bindir)
uninstall_hhp2cached:
rm -f $(DESTDIR)$(bindir)/hhp2cached$(EXEEXT)
hhp2cached_hhp2cached.o: $(srcdir)/hhp2cached.cpp
$(CXXC) -c -o $@ $(HHP2CACHED_CXXFLAGS) $(srcdir)/hhp2cached.cpp
hhp2cached_hhp2cached_rc.o: $(srcdir)/hhp2cached.rc
$(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) --include-dir $(srcdir) $(__DLLFLAG_p_1) $(__WIN32_DPI_MANIFEST_p) --include-dir $(srcdir)/../../samples $(__RCDEFDIR_p) --include-dir $(top_srcdir)/include
# Include dependency info, if present:
@IF_GNU_MAKE@-include ./.deps/*.d
.PHONY: all install uninstall clean distclean install_hhp2cached \
uninstall_hhp2cached

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" ?>
<makefile>
<include file="../../build/bakefiles/common_samples.bkl"/>
<exe id="hhp2cached" template="wx_util" template_append="wx_append">
<sources>
hhp2cached.cpp
</sources>
<win32-res>hhp2cached.rc</win32-res>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib>
<install-to>$(BINDIR)</install-to>
</exe>
<!-- <wx-data id="data">
<files>
test.zip
</files>
</wx-data> -->
</makefile>

View File

@@ -0,0 +1,38 @@
/*
Converts hhp (HTML Help Workshop) files into cached
version for faster reading
Usage: hhp2cached file.hhp [file2.hhp ...]
*/
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/html/helpdata.h"
class MyApp : public wxApp
{
public:
virtual bool OnInit();
};
wxIMPLEMENT_APP(MyApp);
bool MyApp::OnInit()
{
for (int i = 1; i < argc; i++)
{
wxHtmlHelpData data;
wxPrintf(wxT("Processing %s...\n"), argv[i]);
data.SetTempDir(wxPathOnly(argv[i]));
data.AddBook(argv[i]);
}
return false;
}

View File

@@ -0,0 +1 @@
#include "wx/msw/wx.rc"

View File

@@ -0,0 +1,232 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
include ../../build/msw/config.gcc
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
CPPDEPS = -MT$@ -MF$@.d -MD -MP
WX_RELEASE_NODOT = 33
COMPILER_PREFIX = gcc
OBJS = \
$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
LIBDIRNAME = \
.\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
SETUPHDIR = $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)
HHP2CACHED_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG) \
-D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
-I$(SETUPHDIR) -I.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_p) -W \
-Wall -I. $(__DLLFLAG_p) -I.\..\..\samples -DNOPCH $(__RTTIFLAG_5) \
$(__EXCEPTIONSFLAG_6) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
HHP2CACHED_OBJECTS = \
$(OBJS)\hhp2cached_hhp2cached.o \
$(OBJS)\hhp2cached_hhp2cached_rc.o
### Conditionally set variables: ###
ifeq ($(USE_GUI),0)
PORTNAME = base
endif
ifeq ($(USE_GUI),1)
PORTNAME = msw$(TOOLKIT_VERSION)
endif
ifeq ($(OFFICIAL_BUILD),1)
COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
endif
ifeq ($(BUILD),debug)
WXDEBUGFLAG = d
endif
ifeq ($(WXUNIV),1)
WXUNIVNAME = univ
endif
ifeq ($(SHARED),1)
WXDLLFLAG = dll
endif
ifeq ($(SHARED),0)
LIBTYPE_SUFFIX = lib
endif
ifeq ($(SHARED),1)
LIBTYPE_SUFFIX = dll
endif
ifeq ($(MONOLITHIC),0)
EXTRALIBS_FOR_BASE =
endif
ifeq ($(MONOLITHIC),1)
EXTRALIBS_FOR_BASE =
endif
ifeq ($(BUILD),debug)
__OPTIMIZEFLAG_2 = -O0
endif
ifeq ($(BUILD),release)
__OPTIMIZEFLAG_2 = -O2
endif
ifeq ($(USE_RTTI),0)
__RTTIFLAG_5 = -fno-rtti
endif
ifeq ($(USE_RTTI),1)
__RTTIFLAG_5 =
endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONSFLAG_6 = -fno-exceptions
endif
ifeq ($(USE_EXCEPTIONS),1)
__EXCEPTIONSFLAG_6 =
endif
ifeq ($(WXUNIV),1)
__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
endif
ifeq ($(WXUNIV),1)
__WXUNIV_DEFINE_p_1 = --define __WXUNIVERSAL__
endif
ifeq ($(DEBUG_FLAG),0)
__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
endif
ifeq ($(DEBUG_FLAG),0)
__DEBUG_DEFINE_p_1 = --define wxDEBUG_LEVEL=0
endif
ifeq ($(BUILD),release)
__NDEBUG_DEFINE_p = -DNDEBUG
endif
ifeq ($(BUILD),release)
__NDEBUG_DEFINE_p_1 = --define NDEBUG
endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONS_DEFINE_p_1 = --define wxNO_EXCEPTIONS
endif
ifeq ($(USE_RTTI),0)
__RTTI_DEFINE_p = -DwxNO_RTTI
endif
ifeq ($(USE_RTTI),0)
__RTTI_DEFINE_p_1 = --define wxNO_RTTI
endif
ifeq ($(USE_THREADS),0)
__THREAD_DEFINE_p = -DwxNO_THREADS
endif
ifeq ($(USE_THREADS),0)
__THREAD_DEFINE_p_1 = --define wxNO_THREADS
endif
ifeq ($(USE_CAIRO),1)
____CAIRO_INCLUDEDIR_FILENAMES_p = -I$(CAIRO_ROOT)\include\cairo
endif
ifeq ($(USE_CAIRO),1)
__CAIRO_INCLUDEDIR_p = --include-dir $(CAIRO_ROOT)/include/cairo
endif
ifeq ($(SHARED),1)
__DLLFLAG_p = -DWXUSINGDLL
endif
ifeq ($(SHARED),1)
__DLLFLAG_p_1 = --define WXUSINGDLL
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_HTML_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_CORE_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_BASE_p = -lwxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
endif
ifeq ($(MONOLITHIC),1)
__WXLIB_MONO_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
endif
ifeq ($(MONOLITHIC),1)
ifeq ($(USE_STC),1)
__LIB_SCINTILLA_IF_MONO_p = -lwxscintilla$(WXDEBUGFLAG)
endif
endif
ifeq ($(MONOLITHIC),1)
ifeq ($(USE_STC),1)
__LIB_LEXILLA_IF_MONO_p = $(__LIB_LEXILLA_p)
endif
endif
ifeq ($(USE_STC),1)
__LIB_LEXILLA_p = -lwxlexilla$(WXDEBUGFLAG)
endif
ifeq ($(USE_GUI),1)
__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
endif
ifeq ($(USE_GUI),1)
__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
endif
ifeq ($(USE_GUI),1)
__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
endif
ifeq ($(USE_GUI),1)
__LIB_WEBP_p = -lwxwebp$(WXDEBUGFLAG)
endif
ifeq ($(USE_CAIRO),1)
__CAIRO_LIB_p = -lcairo
endif
ifeq ($(USE_CAIRO),1)
____CAIRO_LIBDIR_FILENAMES_p = -L$(CAIRO_ROOT)\lib
endif
ifeq ($(BUILD),debug)
ifeq ($(DEBUG_INFO),default)
__DEBUGINFO = -g
endif
endif
ifeq ($(BUILD),release)
ifeq ($(DEBUG_INFO),default)
__DEBUGINFO =
endif
endif
ifeq ($(DEBUG_INFO),0)
__DEBUGINFO =
endif
ifeq ($(DEBUG_INFO),1)
__DEBUGINFO = -g
endif
ifeq ($(USE_THREADS),0)
__THREADSFLAG =
endif
ifeq ($(USE_THREADS),1)
__THREADSFLAG = -mthreads
endif
all: $(OBJS)
$(OBJS):
-if not exist $(OBJS) mkdir $(OBJS)
### Targets: ###
all: $(OBJS)\hhp2cached.exe
clean:
-if exist $(OBJS)\*.o del $(OBJS)\*.o
-if exist $(OBJS)\*.d del $(OBJS)\*.d
-if exist $(OBJS)\hhp2cached.exe del $(OBJS)\hhp2cached.exe
$(OBJS)\hhp2cached.exe: $(HHP2CACHED_OBJECTS) $(OBJS)\hhp2cached_hhp2cached_rc.o
$(foreach f,$(subst \,/,$(HHP2CACHED_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp))
@move /y $@.rsp.tmp $@.rsp >nul
$(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_WEBP_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lgdiplus -lmsimg32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme
@-del $@.rsp
$(OBJS)\hhp2cached_hhp2cached.o: ./hhp2cached.cpp
$(CXX) -c -o $@ $(HHP2CACHED_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\hhp2cached_hhp2cached_rc.o: ./hhp2cached.rc
$(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) --include-dir $(SETUPHDIR) --include-dir ./../../include $(__CAIRO_INCLUDEDIR_p) --include-dir . $(__DLLFLAG_p_1) --define wxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST) --include-dir ./../../samples --define NOPCH
.PHONY: all clean
SHELL := $(COMSPEC)
# Dependencies tracking:
-include $(OBJS)/*.d

View File

@@ -0,0 +1,445 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
!include <../../build/msw/config.vc>
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
WX_RELEASE_NODOT = 33
COMPILER_PREFIX = vc
OBJS = \
$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
LIBDIRNAME = \
.\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(LIBTYPE_SUFFIX)$(CFG)
SETUPHDIR = $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)
HHP2CACHED_CXXFLAGS = /M$(__RUNTIME_LIBS_10)$(__DEBUGRUNTIME_4) /DWIN32 \
$(__DEBUGINFO_0) /Fd$(OBJS)\hhp2cached.pdb $(____DEBUGRUNTIME_3_p) \
$(__OPTIMIZEFLAG_6) /D_CRT_SECURE_NO_DEPRECATE=1 \
/D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \
$(__NO_VC_CRTDBG_p) $(__TARGET_CPU_COMPFLAG_p) /D__WXMSW__ \
$(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
/I$(SETUPHDIR) /I.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_p) /W4 /I. \
$(__DLLFLAG_p) /D_WINDOWS /I.\..\..\samples /DNOPCH $(__RTTIFLAG_11) \
$(__EXCEPTIONSFLAG_12) $(CPPFLAGS) $(CXXFLAGS)
HHP2CACHED_OBJECTS = \
$(OBJS)\hhp2cached_hhp2cached.obj
HHP2CACHED_RESOURCES = \
$(OBJS)\hhp2cached_hhp2cached.res
### Conditionally set variables: ###
!if "$(TARGET_CPU)" == "AMD64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "ARM"
ARCH_SUFFIX = _arm
!endif
!if "$(TARGET_CPU)" == "ARM64"
ARCH_SUFFIX = _arm64
!endif
!if "$(TARGET_CPU)" == "IA64"
ARCH_SUFFIX = _ia64
!endif
!if "$(TARGET_CPU)" == "X64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "amd64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "arm"
ARCH_SUFFIX = _arm
!endif
!if "$(TARGET_CPU)" == "arm64"
ARCH_SUFFIX = _arm64
!endif
!if "$(TARGET_CPU)" == "ia64"
ARCH_SUFFIX = _ia64
!endif
!if "$(TARGET_CPU)" == "x64"
ARCH_SUFFIX = _x64
!endif
!if "$(USE_GUI)" == "0"
PORTNAME = base
!endif
!if "$(USE_GUI)" == "1"
PORTNAME = msw$(TOOLKIT_VERSION)
!endif
!if "$(OFFICIAL_BUILD)" == "1"
COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
WXDEBUGFLAG = d
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
WXDEBUGFLAG = d
!endif
!if "$(WXUNIV)" == "1"
WXUNIVNAME = univ
!endif
!if "$(SHARED)" == "1"
WXDLLFLAG = dll
!endif
!if "$(SHARED)" == "0"
LIBTYPE_SUFFIX = lib
!endif
!if "$(SHARED)" == "1"
LIBTYPE_SUFFIX = dll
!endif
!if "$(TARGET_CPU)" == "AMD64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "ARM"
LINK_TARGET_CPU = /MACHINE:ARM
!endif
!if "$(TARGET_CPU)" == "ARM64"
LINK_TARGET_CPU = /MACHINE:ARM64
!endif
!if "$(TARGET_CPU)" == "IA64"
LINK_TARGET_CPU = /MACHINE:IA64
!endif
!if "$(TARGET_CPU)" == "X64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "amd64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "arm"
LINK_TARGET_CPU = /MACHINE:ARM
!endif
!if "$(TARGET_CPU)" == "arm64"
LINK_TARGET_CPU = /MACHINE:ARM64
!endif
!if "$(TARGET_CPU)" == "ia64"
LINK_TARGET_CPU = /MACHINE:IA64
!endif
!if "$(TARGET_CPU)" == "x64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "1" && "$(VISUALSTUDIOVERSION)" == "14.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../include/wx/msw/wx_dpi_aware.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "1" && "$(VISUALSTUDIOVERSION)" == "15.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../include/wx/msw/wx_dpi_aware.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "1" && "$(VISUALSTUDIOVERSION)" == "16.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../include/wx/msw/wx_dpi_aware.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "1" && "$(VISUALSTUDIOVERSION)" == "17.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../include/wx/msw/wx_dpi_aware.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "2" && "$(VISUALSTUDIOVERSION)" == "14.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../include/wx/msw/wx_dpi_aware_pmv2.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "2" && "$(VISUALSTUDIOVERSION)" == "15.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../include/wx/msw/wx_dpi_aware_pmv2.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "2" && "$(VISUALSTUDIOVERSION)" == "16.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../include/wx/msw/wx_dpi_aware_pmv2.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "2" && "$(VISUALSTUDIOVERSION)" == "17.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../include/wx/msw/wx_dpi_aware_pmv2.manifest
!endif
!if "$(MONOLITHIC)" == "0"
EXTRALIBS_FOR_BASE =
!endif
!if "$(MONOLITHIC)" == "1"
EXTRALIBS_FOR_BASE =
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_0 = /Zi
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_0 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_0 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_0 = /Zi
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_1 = /DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_1 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_1 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_1 = /DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_2 = $(__DEBUGRUNTIME_5)
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_2 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_2 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_2 = $(__DEBUGRUNTIME_5)
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p = /D_DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
____DEBUGRUNTIME_3_p =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
____DEBUGRUNTIME_3_p = /D_DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p_1 = /d _DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p_1 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
____DEBUGRUNTIME_3_p_1 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
____DEBUGRUNTIME_3_p_1 = /d _DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_4 = d
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_4 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__DEBUGRUNTIME_4 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
__DEBUGRUNTIME_4 = d
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_5 =
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_5 = /opt:ref /opt:icf
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__DEBUGRUNTIME_5 = /opt:ref /opt:icf
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
__DEBUGRUNTIME_5 =
!endif
!if "$(BUILD)" == "debug"
__OPTIMIZEFLAG_6 = /Od
!endif
!if "$(BUILD)" == "release"
__OPTIMIZEFLAG_6 = /O2
!endif
!if "$(USE_THREADS)" == "0"
__THREADSFLAG_9 = L
!endif
!if "$(USE_THREADS)" == "1"
__THREADSFLAG_9 = T
!endif
!if "$(RUNTIME_LIBS)" == "dynamic"
__RUNTIME_LIBS_10 = D
!endif
!if "$(RUNTIME_LIBS)" == "static"
__RUNTIME_LIBS_10 = $(__THREADSFLAG_9)
!endif
!if "$(USE_RTTI)" == "0"
__RTTIFLAG_11 = /GR-
!endif
!if "$(USE_RTTI)" == "1"
__RTTIFLAG_11 = /GR
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONSFLAG_12 =
!endif
!if "$(USE_EXCEPTIONS)" == "1"
__EXCEPTIONSFLAG_12 = /EHsc
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__
!endif
!if "$(TARGET_CPU)" == ""
__TARGET_CPU_COMPFLAG_p = /DTARGET_CPU_COMPFLAG=0
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
__TARGET_CPU_COMPFLAG_p =
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
__TARGET_CPU_COMPFLAG_p =
!endif
!if "$(TARGET_CPU)" == ""
__TARGET_CPU_COMPFLAG_p_1 = /d TARGET_CPU_COMPFLAG=0
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
__TARGET_CPU_COMPFLAG_p_1 =
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
__TARGET_CPU_COMPFLAG_p_1 =
!endif
!if "$(WXUNIV)" == "1"
__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
!endif
!if "$(WXUNIV)" == "1"
__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__
!endif
!if "$(DEBUG_FLAG)" == "0"
__DEBUG_DEFINE_p = /DwxDEBUG_LEVEL=0
!endif
!if "$(DEBUG_FLAG)" == "0"
__DEBUG_DEFINE_p_1 = /d wxDEBUG_LEVEL=0
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__NDEBUG_DEFINE_p = /DNDEBUG
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__NDEBUG_DEFINE_p = /DNDEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__NDEBUG_DEFINE_p_1 = /d NDEBUG
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__NDEBUG_DEFINE_p_1 = /d NDEBUG
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONS_DEFINE_p_1 = /d wxNO_EXCEPTIONS
!endif
!if "$(USE_RTTI)" == "0"
__RTTI_DEFINE_p = /DwxNO_RTTI
!endif
!if "$(USE_RTTI)" == "0"
__RTTI_DEFINE_p_1 = /d wxNO_RTTI
!endif
!if "$(USE_THREADS)" == "0"
__THREAD_DEFINE_p = /DwxNO_THREADS
!endif
!if "$(USE_THREADS)" == "0"
__THREAD_DEFINE_p_1 = /d wxNO_THREADS
!endif
!if "$(USE_CAIRO)" == "1"
____CAIRO_INCLUDEDIR_FILENAMES_p = /I$(CAIRO_ROOT)\include\cairo
!endif
!if "$(USE_CAIRO)" == "1"
____CAIRO_INCLUDEDIR_FILENAMES_1_p = /i $(CAIRO_ROOT)\include\cairo
!endif
!if "$(SHARED)" == "1"
__DLLFLAG_p = /DWXUSINGDLL
!endif
!if "$(SHARED)" == "1"
__DLLFLAG_p_1 = /d WXUSINGDLL
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_HTML_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_CORE_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_BASE_p = \
wxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
!if "$(MONOLITHIC)" == "1"
__WXLIB_MONO_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
!if "$(MONOLITHIC)" == "1" && "$(USE_STC)" == "1"
__LIB_SCINTILLA_IF_MONO_p = wxscintilla$(WXDEBUGFLAG).lib
!endif
!if "$(MONOLITHIC)" == "1" && "$(USE_STC)" == "1"
__LIB_LEXILLA_IF_MONO_p = $(__LIB_LEXILLA_p)
!endif
!if "$(USE_STC)" == "1"
__LIB_LEXILLA_p = wxlexilla$(WXDEBUGFLAG).lib
!endif
!if "$(USE_GUI)" == "1"
__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
!endif
!if "$(USE_GUI)" == "1"
__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
!endif
!if "$(USE_GUI)" == "1"
__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
!endif
!if "$(USE_GUI)" == "1"
__LIB_WEBP_p = wxwebp$(WXDEBUGFLAG).lib
!endif
!if "$(USE_CAIRO)" == "1"
__CAIRO_LIB_p = cairo.lib
!endif
!if "$(USE_CAIRO)" == "1"
____CAIRO_LIBDIR_FILENAMES_p = /LIBPATH:$(CAIRO_ROOT)\lib
!endif
all: $(OBJS)
$(OBJS):
-if not exist $(OBJS) mkdir $(OBJS)
### Targets: ###
all: $(OBJS)\hhp2cached.exe
clean:
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
-if exist $(OBJS)\*.res del $(OBJS)\*.res
-if exist $(OBJS)\*.pch del $(OBJS)\*.pch
-if exist $(OBJS)\hhp2cached.exe del $(OBJS)\hhp2cached.exe
-if exist $(OBJS)\hhp2cached.ilk del $(OBJS)\hhp2cached.ilk
-if exist $(OBJS)\hhp2cached.pdb del $(OBJS)\hhp2cached.pdb
$(OBJS)\hhp2cached.exe: $(HHP2CACHED_OBJECTS) $(OBJS)\hhp2cached_hhp2cached.res
link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\hhp2cached.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(WIN32_DPI_LINKFLAG) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<<
$(HHP2CACHED_OBJECTS) $(HHP2CACHED_RESOURCES) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_WEBP_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib gdiplus.lib msimg32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib
<<
$(OBJS)\hhp2cached_hhp2cached.obj: .\hhp2cached.cpp
$(CXX) /c /nologo /TP /Fo$@ $(HHP2CACHED_CXXFLAGS) .\hhp2cached.cpp
$(OBJS)\hhp2cached_hhp2cached.res: .\hhp2cached.rc
rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_3_p_1) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_1) $(__TARGET_CPU_COMPFLAG_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) /i $(SETUPHDIR) /i .\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_1_p) /i . $(__DLLFLAG_p_1) /d _WINDOWS /i .\..\..\samples /d NOPCH .\hhp2cached.rc

View File

@@ -0,0 +1,55 @@
Ifacecheck utility
==================
1) INTRODUCTION
This utility compares the wxWidgets real interface contained in the "include"
hierarchy with the wxWidgets interface used for documentation purposes and
kept in the "interface" hierarchy.
Ifacecheck warns about incoherences (mainly wrong prototype signatures) and
can even correct them automatically. It uses the XML outputs of the gccxml utility
(see http://www.gccxml.org) and of the Doxygen utility (see http://www.doxygen.org)
to do the comparison.
It's explicitly designed for wxWidgets documentation needs and is probably of little
use for anything else than wxWidgets docs reviewing.
2) PREREQUISITES FOR USING IT
To use this utility you'll need at least:
- wxWidgets "include" and "interface" headers tree
- Doxygen installed
- Gccxml installed
3) HOW TO USE IT (on Linux)
First, create the doxygen XML:
> cd docs/doxygen
> ./regen.sh xml
> cd ../..
Next, create the gcc XML:
> ./configure # configure wxWidgets as you would do when building it
> cd utils/ifacecheck
> ./rungccxml.sh
> cd ../..
Last, build and run ifacecheck:
> cd utils/ifacecheck/src
> make
> make install
> cd ..
> ifacecheck -u wxapi-preproc.txt wxapi.xml ../../docs/doxygen/out/xml/index.xml >ifacecheck.log
Now you should have the log of the utility saved in 'ifacecheck.log'.
Its contents should be easy to interpret.
For more info about ifacecheck options just type:
> ifacecheck --help

View File

@@ -0,0 +1,343 @@
<!-- GCC_XML 0.7-cvs DTD Version 0.3 -->
<!-- Written by Paul Ross 2003-07-13 -->
<!-- Updated by Martin Piskernig 2004-11-14
* Some bugfixes (MP; 2004-11-18):
- added OffsetType attribute list
- Base cannot be child element of GCC_XML
- fixed Field::mutable to be of boolean type
- added "attributes" to destructor attlist
-->
<!ATTLIST Argument attributes CDATA #IMPLIED>
<!ATTLIST Argument default CDATA #IMPLIED>
<!ATTLIST Argument name CDATA #IMPLIED>
<!-- type can not be an IDREF as it might be "_4c" etc. which will be
an invalid id -->
<!ATTLIST Argument type CDATA #REQUIRED>
<!ATTLIST ArrayType align CDATA #IMPLIED>
<!ATTLIST ArrayType attributes CDATA #IMPLIED>
<!ATTLIST ArrayType id ID #REQUIRED>
<!ATTLIST ArrayType max CDATA #REQUIRED>
<!ATTLIST ArrayType min CDATA #FIXED "0">
<!ATTLIST ArrayType size CDATA #IMPLIED>
<!ATTLIST ArrayType type IDREF #REQUIRED>
<!ATTLIST Base access (public | private | protected) "public">
<!ATTLIST Base type IDREF #REQUIRED>
<!ATTLIST Base virtual (0 | 1) "0">
<!ATTLIST Class abstract (0 | 1) "0">
<!ATTLIST Class access (public | private | protected) "public">
<!ATTLIST Class align CDATA #IMPLIED>
<!ATTLIST Class artificial CDATA #IMPLIED>
<!ATTLIST Class attributes CDATA #IMPLIED>
<!ATTLIST Class bases CDATA #IMPLIED>
<!ATTLIST Class context IDREF #REQUIRED>
<!ATTLIST Class file CDATA #REQUIRED>
<!ATTLIST Class id ID #REQUIRED>
<!ATTLIST Class incomplete (0 | 1) "0">
<!ATTLIST Class line CDATA #REQUIRED>
<!ATTLIST Class location CDATA #REQUIRED>
<!ATTLIST Class mangled CDATA #REQUIRED>
<!ATTLIST Class members CDATA #IMPLIED>
<!ATTLIST Class name CDATA #REQUIRED>
<!ATTLIST Class size CDATA #IMPLIED>
<!ATTLIST Constructor access (public | private | protected) "public">
<!ATTLIST Constructor artificial CDATA #IMPLIED>
<!ATTLIST Constructor attributes CDATA #IMPLIED>
<!ATTLIST Constructor context CDATA #REQUIRED>
<!ATTLIST Constructor endline CDATA #IMPLIED>
<!ATTLIST Constructor extern (0 | 1) "0">
<!ATTLIST Constructor file CDATA #REQUIRED>
<!ATTLIST Constructor id ID #REQUIRED>
<!ATTLIST Constructor line CDATA #REQUIRED>
<!ATTLIST Constructor location CDATA #REQUIRED>
<!ATTLIST Constructor mangled CDATA #REQUIRED>
<!ATTLIST Constructor name CDATA #REQUIRED>
<!ATTLIST Constructor throw CDATA #IMPLIED>
<!ATTLIST Converter access (public | private | protected) "public">
<!ATTLIST Converter attributes CDATA #IMPLIED>
<!ATTLIST Converter const (0 | 1) "0">
<!ATTLIST Converter context IDREF #REQUIRED>
<!ATTLIST Converter endline CDATA #IMPLIED>
<!ATTLIST Converter extern (0 | 1) "0">
<!ATTLIST Converter file CDATA #REQUIRED>
<!ATTLIST Converter id ID #REQUIRED>
<!ATTLIST Converter line CDATA #REQUIRED>
<!ATTLIST Converter location CDATA #REQUIRED>
<!ATTLIST Converter mangled CDATA #REQUIRED>
<!ATTLIST Converter name CDATA #REQUIRED>
<!ATTLIST Converter returns IDREF #REQUIRED>
<!ATTLIST Converter throw CDATA #IMPLIED>
<!ATTLIST Converter virtual (0 | 1) "0">
<!ATTLIST CvQualifiedType align CDATA #IMPLIED>
<!ATTLIST CvQualifiedType attributes CDATA #IMPLIED>
<!ATTLIST CvQualifiedType const CDATA #IMPLIED>
<!ATTLIST CvQualifiedType id ID #REQUIRED>
<!ATTLIST CvQualifiedType restrict CDATA #IMPLIED>
<!ATTLIST CvQualifiedType size CDATA #IMPLIED>
<!ATTLIST CvQualifiedType type IDREF #REQUIRED>
<!ATTLIST CvQualifiedType volatile CDATA #IMPLIED>
<!ATTLIST Destructor access (public | private | protected) "public">
<!ATTLIST Destructor artificial CDATA #IMPLIED>
<!ATTLIST Destructor attributes CDATA #IMPLIED>
<!ATTLIST Destructor context IDREF #REQUIRED>
<!ATTLIST Destructor endline CDATA #IMPLIED>
<!ATTLIST Destructor extern (0 | 1) "0">
<!ATTLIST Destructor file CDATA #REQUIRED>
<!ATTLIST Destructor id ID #REQUIRED>
<!ATTLIST Destructor line CDATA #REQUIRED>
<!ATTLIST Destructor location CDATA #REQUIRED>
<!ATTLIST Destructor mangled CDATA #REQUIRED>
<!ATTLIST Destructor name CDATA #REQUIRED>
<!ATTLIST Destructor throw CDATA #IMPLIED>
<!ATTLIST Destructor virtual (0 | 1) "0">
<!ATTLIST EnumValue init CDATA #REQUIRED>
<!ATTLIST EnumValue name CDATA #REQUIRED>
<!ATTLIST Enumeration access (public | private | protected) "public">
<!ATTLIST Enumeration align CDATA #IMPLIED>
<!ATTLIST Enumeration artificial CDATA #IMPLIED>
<!ATTLIST Enumeration attributes CDATA #IMPLIED>
<!ATTLIST Enumeration context CDATA #REQUIRED>
<!ATTLIST Enumeration file CDATA #REQUIRED>
<!ATTLIST Enumeration id ID #REQUIRED>
<!ATTLIST Enumeration line CDATA #REQUIRED>
<!ATTLIST Enumeration location CDATA #REQUIRED>
<!ATTLIST Enumeration name CDATA #REQUIRED>
<!ATTLIST Enumeration size CDATA #IMPLIED>
<!ATTLIST Field access (public | private | protected) "public">
<!ATTLIST Field attributes CDATA #IMPLIED>
<!ATTLIST Field bits CDATA #IMPLIED>
<!ATTLIST Field context IDREF #REQUIRED>
<!ATTLIST Field file CDATA #REQUIRED>
<!ATTLIST Field id ID #REQUIRED>
<!ATTLIST Field line CDATA #REQUIRED>
<!ATTLIST Field location CDATA #REQUIRED>
<!ATTLIST Field mangled CDATA #IMPLIED>
<!ATTLIST Field mutable (0 | 1) "0">
<!ATTLIST Field name CDATA #REQUIRED>
<!ATTLIST Field offset CDATA #IMPLIED>
<!ATTLIST Field type CDATA #REQUIRED>
<!ATTLIST File id ID #REQUIRED>
<!ATTLIST File name CDATA #REQUIRED>
<!ATTLIST Function attributes CDATA #IMPLIED>
<!ATTLIST Function context IDREF #REQUIRED>
<!ATTLIST Function endline CDATA #IMPLIED>
<!ATTLIST Function extern (0 | 1) "0">
<!ATTLIST Function file CDATA #REQUIRED>
<!ATTLIST Function id ID #REQUIRED>
<!ATTLIST Function line CDATA #REQUIRED>
<!ATTLIST Function location CDATA #REQUIRED>
<!ATTLIST Function mangled CDATA #IMPLIED>
<!ATTLIST Function name CDATA #REQUIRED>
<!ATTLIST Function returns CDATA #REQUIRED>
<!ATTLIST Function throw CDATA #IMPLIED>
<!ATTLIST FunctionType attributes CDATA #IMPLIED>
<!ATTLIST FunctionType id ID #REQUIRED>
<!ATTLIST FunctionType returns IDREF #REQUIRED>
<!ATTLIST FundamentalType align CDATA #IMPLIED>
<!ATTLIST FundamentalType attributes CDATA #IMPLIED>
<!ATTLIST FundamentalType id ID #REQUIRED>
<!ATTLIST FundamentalType name CDATA #REQUIRED>
<!ATTLIST FundamentalType size CDATA #IMPLIED>
<!ATTLIST Method access (public | private | protected) "public">
<!ATTLIST Method attributes CDATA #IMPLIED>
<!ATTLIST Method const (0 | 1) "0">
<!ATTLIST Method context IDREF #REQUIRED>
<!ATTLIST Method endline CDATA #IMPLIED>
<!ATTLIST Method extern (0 | 1) "0">
<!ATTLIST Method file CDATA #REQUIRED>
<!ATTLIST Method id ID #REQUIRED>
<!ATTLIST Method line CDATA #REQUIRED>
<!ATTLIST Method location CDATA #REQUIRED>
<!ATTLIST Method mangled CDATA #REQUIRED>
<!ATTLIST Method name CDATA #REQUIRED>
<!ATTLIST Method pure_virtual (0 | 1) "0">
<!ATTLIST Method returns CDATA #REQUIRED>
<!ATTLIST Method static (0 | 1) "0">
<!ATTLIST Method throw CDATA #IMPLIED>
<!ATTLIST Method virtual (0 | 1) "0">
<!ATTLIST MethodType attributes CDATA #IMPLIED>
<!ATTLIST MethodType basetype IDREF #REQUIRED>
<!ATTLIST MethodType id ID #REQUIRED>
<!ATTLIST MethodType returns CDATA #REQUIRED>
<!ATTLIST Namespace attributes CDATA #IMPLIED>
<!ATTLIST Namespace context IDREF #IMPLIED>
<!ATTLIST Namespace id ID #REQUIRED>
<!ATTLIST Namespace mangled CDATA #IMPLIED>
<!ATTLIST Namespace members CDATA #IMPLIED>
<!ATTLIST Namespace name CDATA #REQUIRED>
<!ATTLIST NamespaceAlias context IDREF #IMPLIED>
<!ATTLIST NamespaceAlias id ID #REQUIRED>
<!ATTLIST NamespaceAlias mangled CDATA #IMPLIED>
<!ATTLIST NamespaceAlias name CDATA #REQUIRED>
<!ATTLIST NamespaceAlias namespace CDATA #REQUIRED>
<!ATTLIST OffsetType align CDATA #IMPLIED>
<!ATTLIST OffsetType attributes CDATA #IMPLIED>
<!ATTLIST OffsetType id ID #REQUIRED>
<!ATTLIST OffsetType basetype IDREF #REQUIRED>
<!ATTLIST OffsetType size CDATA #IMPLIED>
<!ATTLIST OffsetType type CDATA #REQUIRED>
<!ATTLIST OperatorFunction attributes CDATA #IMPLIED>
<!ATTLIST OperatorFunction context IDREF #REQUIRED>
<!ATTLIST OperatorFunction endline CDATA #IMPLIED>
<!ATTLIST OperatorFunction extern (0 | 1) "0">
<!ATTLIST OperatorFunction file CDATA #REQUIRED>
<!ATTLIST OperatorFunction id ID #REQUIRED>
<!ATTLIST OperatorFunction line CDATA #REQUIRED>
<!ATTLIST OperatorFunction location CDATA #REQUIRED>
<!ATTLIST OperatorFunction mangled CDATA #REQUIRED>
<!ATTLIST OperatorFunction name CDATA #REQUIRED>
<!ATTLIST OperatorFunction returns IDREF #REQUIRED>
<!ATTLIST OperatorFunction throw CDATA #IMPLIED>
<!ATTLIST OperatorMethod access (public | private | protected) "public">
<!ATTLIST OperatorMethod attributes CDATA #IMPLIED>
<!ATTLIST OperatorMethod const (0 | 1) "0">
<!ATTLIST OperatorMethod context IDREF #REQUIRED>
<!ATTLIST OperatorMethod endline CDATA #IMPLIED>
<!ATTLIST OperatorMethod extern (0 | 1) "0">
<!ATTLIST OperatorMethod file CDATA #REQUIRED>
<!ATTLIST OperatorMethod id ID #REQUIRED>
<!ATTLIST OperatorMethod line CDATA #REQUIRED>
<!ATTLIST OperatorMethod location CDATA #REQUIRED>
<!ATTLIST OperatorMethod mangled CDATA #REQUIRED>
<!ATTLIST OperatorMethod name CDATA #REQUIRED>
<!ATTLIST OperatorMethod pure_virtual (0 | 1) "0">
<!ATTLIST OperatorMethod returns IDREF #REQUIRED>
<!ATTLIST OperatorMethod static (0 | 1) "0">
<!ATTLIST OperatorMethod throw CDATA #IMPLIED>
<!ATTLIST OperatorMethod virtual (0 | 1) "0">
<!ATTLIST PointerType align CDATA #IMPLIED>
<!ATTLIST PointerType attributes CDATA #IMPLIED>
<!ATTLIST PointerType id ID #REQUIRED>
<!ATTLIST PointerType size CDATA #IMPLIED>
<!ATTLIST PointerType type CDATA #REQUIRED>
<!ATTLIST ReferenceType align CDATA #IMPLIED>
<!ATTLIST ReferenceType attributes CDATA #IMPLIED>
<!ATTLIST ReferenceType id ID #REQUIRED>
<!ATTLIST ReferenceType size CDATA #IMPLIED>
<!ATTLIST ReferenceType type CDATA #REQUIRED>
<!ATTLIST Struct abstract (0 | 1) "0">
<!ATTLIST Struct access (public | private | protected) "public">
<!ATTLIST Struct align CDATA #IMPLIED>
<!ATTLIST Struct artificial (0 | 1) "0">
<!ATTLIST Struct attributes CDATA #IMPLIED>
<!ATTLIST Struct bases CDATA #IMPLIED>
<!ATTLIST Struct context IDREF #REQUIRED>
<!ATTLIST Struct file CDATA #REQUIRED>
<!ATTLIST Struct id ID #REQUIRED>
<!ATTLIST Struct incomplete (0 | 1) "0">
<!ATTLIST Struct line CDATA #REQUIRED>
<!ATTLIST Struct location CDATA #REQUIRED>
<!ATTLIST Struct mangled CDATA #REQUIRED>
<!ATTLIST Struct members CDATA #IMPLIED>
<!ATTLIST Struct name CDATA #IMPLIED>
<!ATTLIST Struct size CDATA #IMPLIED>
<!ATTLIST Typedef attributes CDATA #IMPLIED>
<!ATTLIST Typedef context IDREF #REQUIRED>
<!ATTLIST Typedef file CDATA #REQUIRED>
<!ATTLIST Typedef id ID #REQUIRED>
<!ATTLIST Typedef line CDATA #REQUIRED>
<!ATTLIST Typedef location CDATA #REQUIRED>
<!ATTLIST Typedef name CDATA #REQUIRED>
<!ATTLIST Typedef type CDATA #REQUIRED>
<!ATTLIST Unimplemented function CDATA #IMPLIED>
<!ATTLIST Unimplemented id ID #REQUIRED>
<!ATTLIST Unimplemented node CDATA #REQUIRED>
<!ATTLIST Unimplemented tree_code (187 | 190 | 193) #REQUIRED>
<!ATTLIST Unimplemented tree_code_name (template_type_parm |
typename_type | using_decl) #REQUIRED>
<!ATTLIST Union abstract (0 | 1) "0">
<!ATTLIST Union access (public | private | protected) "public">
<!ATTLIST Union align CDATA #IMPLIED>
<!ATTLIST Union artificial (0 | 1) "0">
<!ATTLIST Union attributes CDATA #IMPLIED>
<!ATTLIST Union bases CDATA #IMPLIED>
<!ATTLIST Union context IDREF #REQUIRED>
<!ATTLIST Union file CDATA #REQUIRED>
<!ATTLIST Union id ID #REQUIRED>
<!ATTLIST Union incomplete (0 | 1) "0">
<!ATTLIST Union line CDATA #REQUIRED>
<!ATTLIST Union location CDATA #REQUIRED>
<!ATTLIST Union mangled CDATA #REQUIRED>
<!ATTLIST Union members CDATA #IMPLIED>
<!ATTLIST Union name CDATA #IMPLIED>
<!ATTLIST Union size CDATA #IMPLIED>
<!ATTLIST Variable access (public | private | protected) "public">
<!ATTLIST Variable artificial CDATA #IMPLIED>
<!ATTLIST Variable attributes CDATA #IMPLIED>
<!ATTLIST Variable context IDREF #REQUIRED>
<!ATTLIST Variable extern (0 | 1) "0">
<!ATTLIST Variable file CDATA #REQUIRED>
<!ATTLIST Variable id ID #REQUIRED>
<!ATTLIST Variable init CDATA #IMPLIED>
<!ATTLIST Variable line CDATA #REQUIRED>
<!ATTLIST Variable location CDATA #REQUIRED>
<!ATTLIST Variable mangled CDATA #IMPLIED>
<!ATTLIST Variable name CDATA #REQUIRED>
<!ATTLIST Variable type CDATA #REQUIRED>
<!ATTLIST GCC_XML cvs_revision CDATA #IMPLIED>
<!ELEMENT Argument EMPTY>
<!ELEMENT Ellipsis EMPTY>
<!ELEMENT ArrayType EMPTY>
<!ELEMENT Base EMPTY>
<!ELEMENT Class (Base)*>
<!ELEMENT Constructor (Argument | Ellipsis)*>
<!ELEMENT Converter EMPTY>
<!ELEMENT CvQualifiedType EMPTY>
<!ELEMENT Destructor (Argument)*> <!-- FIXME -->
<!ELEMENT EnumValue EMPTY>
<!ELEMENT Enumeration (EnumValue)+>
<!ELEMENT Field EMPTY>
<!ELEMENT File EMPTY>
<!ELEMENT Function (Argument | Ellipsis)*>
<!ELEMENT FunctionType (Argument | Ellipsis)*>
<!ELEMENT FundamentalType EMPTY>
<!ELEMENT Method (Argument | Ellipsis)*>
<!ELEMENT MethodType (Argument | Ellipsis)*>
<!ELEMENT Namespace EMPTY>
<!ELEMENT NamespaceAlias EMPTY>
<!ELEMENT OffsetType EMPTY>
<!ELEMENT OperatorFunction (Argument | Ellipsis)*>
<!ELEMENT OperatorMethod (Argument | Ellipsis)*>
<!ELEMENT PointerType EMPTY>
<!ELEMENT ReferenceType EMPTY>
<!ELEMENT Struct (Base)*>
<!ELEMENT Typedef EMPTY>
<!ELEMENT Unimplemented EMPTY>
<!ELEMENT Union (Base)*>
<!ELEMENT Variable EMPTY>
<!ELEMENT GCC_XML (ArrayType | Class | Constructor | Converter | CvQualifiedType |
Destructor | Enumeration | Field | File | Function | FunctionType |
FundamentalType | Method | MethodType | Namespace | NamespaceAlias | OperatorFunction
| OperatorMethod | OffsetType | PointerType | ReferenceType | Struct | Typedef |
Unimplemented | Union | Variable)+>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,83 @@
#!/bin/bash
#
# Runs gccxml on the wxWidgets include folder, in order to build the XML
# file to fetch to ifacecheck to check the coherency of the wxWidgets
# interface headers with the "real" ones.
## CONSTANTS
############
gccxmloutput="wxapi.xml" # the file where we store the gccXML output
preprocoutput="wxapi-preproc.txt" # the file where we store the preprocessor's #define values
allheaders="/tmp/wx-all.h" # the header which includes all wx public headers (autogenerated)
# the list of all wxWidgets public headers
listcmd="ls wx/*.h wx/aui/*.h wx/html/*.h wx/protocol/*.h wx/richtext/*.h wx/stc/*.h wx/xml/*.h wx/xrc/*.h"
## MAIN
#######
if [[ ! -z "$1" ]]; then
echo "This script does not accept arguments."
echo "Usage: $0"
echo "Creates a '$gccxmloutput' file which you can pass to ifacecheck."
exit 1
fi
me=$(basename $0)
current=$(pwd)/${0%%/$me} # current path
gccxmloutput="$current/$gccxmloutput"
cd @top_srcdir@/include # go to wx include folder
# now filter it
headerlist=`$listcmd | grep -v wxshl | grep -v wx_cw | grep -v setup | grep -v xti | grep -v dde.h | grep -v fmappriv`
cd $current # return to the original path
# create the header file to pass to gccxml
echo "Creating the $allheaders dummy file which #includes all wxWidgets interface header files..."
if [[ -f $allheaders ]]; then rm $allheaders; fi
for f in $headerlist; do
echo "#include <$f>" >> $allheaders
done
# filter the configure flags to pass to gccxml
wx_top_builddir="@wx_top_builddir@"
top_srcdir="@top_srcdir@"
flags="@CPPFLAGS@ @CXXFLAGS@"
# NOTE: it's important to define __WXDEBUG__ because some functions of wx
# are declared (and thus parsed by gcc) only if that symbol is defined.
# So we remove it from $flags (in case it's defined) and then readd it.
flags=`echo "$flags" | sed -e 's/-pthread//g' | sed -e 's/__WXDEBUG__//g'`
# append some other flags:
flags="-I . -I @top_srcdir@/include $flags -D__WXDEBUG__ -D__WX@TOOLKIT@__ -DWXBUILDING $allheaders"
# run gccxml with the same flag used for the real compilation of wx sources:
echo "Running gccxml on the $allheaders file... results in $gccxmloutput"
if [[ -f "$gccxmloutput" ]]; then rm $gccxmloutput; fi
gccxml $flags -fxml=$gccxmloutput
if [[ $? != 0 ]]; then
echo "Errors running gccxml... aborting."
exit
fi
# now get the list of the #defined values for wx headers, so that the result
# can be passed to ifacecheck to aid the comparison
echo "Running gccxml's preprocessor on the $allheaders file... results in $preprocoutput"
gccxml -E -dM $flags >$preprocoutput
if [[ $? != 0 ]]; then
echo "Errors running gccxml preprocessor... aborting."
exit
fi
# cleanup
rm $allheaders

View File

@@ -0,0 +1,132 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
@MAKE_SET@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
INSTALL = @INSTALL@
EXEEXT = @EXEEXT@
STRIP = @STRIP@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DIR = @INSTALL_DIR@
BK_DEPS = @BK_DEPS@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
bindir = @bindir@
LIBS = @LIBS@
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
WX_LIB_FLAVOUR = @WX_LIB_FLAVOUR@
TOOLKIT = @TOOLKIT@
TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@
TOOLKIT_VERSION = @TOOLKIT_VERSION@
EXTRALIBS = @EXTRALIBS@
EXTRALIBS_XML = @EXTRALIBS_XML@
EXTRALIBS_GUI = @EXTRALIBS_GUI@
WX_CPPFLAGS = @WX_CPPFLAGS@
WX_CXXFLAGS = @WX_CXXFLAGS@
WX_LDFLAGS = @WX_LDFLAGS@
HOST_SUFFIX = @HOST_SUFFIX@
DYLIB_RPATH_FLAG = @DYLIB_RPATH_FLAG@
wx_top_builddir = @wx_top_builddir@
### Variables: ###
DESTDIR =
WX_RELEASE = 3.3
LIBDIRNAME = $(wx_top_builddir)/lib
IFACECHECK_CXXFLAGS = $(WX_CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
$(__THREAD_DEFINE_p) -I$(srcdir) $(__DLLFLAG_p) -DwxUSE_GUI=0 $(WX_CXXFLAGS) \
$(CPPFLAGS) $(CXXFLAGS)
IFACECHECK_OBJECTS = \
ifacecheck_ifacecheck.o \
ifacecheck_xmlparser.o
### Conditionally set variables: ###
@COND_DEPS_TRACKING_0@CXXC = $(CXX)
@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX)
@COND_USE_GUI_0@PORTNAME = base
@COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
@COND_TOOLKIT_MAC@WXBASEPORT = _carbon
@COND_BUILD_debug@WXDEBUGFLAG = d
@COND_WXUNIV_1@WXUNIVNAME = univ
@COND_MONOLITHIC_0@EXTRALIBS_FOR_BASE = $(EXTRALIBS)
@COND_MONOLITHIC_1@EXTRALIBS_FOR_BASE = $(EXTRALIBS) \
@COND_MONOLITHIC_1@ $(EXTRALIBS_XML) $(EXTRALIBS_GUI)
@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
@COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
@COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI
@COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS
@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL
COND_MONOLITHIC_0___WXLIB_XML_p = \
-lwx_base$(WXBASEPORT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_XML_p = $(COND_MONOLITHIC_0___WXLIB_XML_p)
COND_MONOLITHIC_0___WXLIB_BASE_p = \
-lwx_base$(WXBASEPORT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
COND_MONOLITHIC_1___WXLIB_MONO_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
@COND_MONOLITHIC_1@__LIB_PNG_IF_MONO_p = $(__LIB_PNG_p)
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@__LIB_PNG_p \
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@ -lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_ZLIB_builtin@__LIB_ZLIB_p = \
@COND_wxUSE_ZLIB_builtin@ -lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_REGEX_builtin@__LIB_REGEX_p = \
@COND_wxUSE_REGEX_builtin@ -lwxregexu$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_EXPAT_builtin@__LIB_EXPAT_p = \
@COND_wxUSE_EXPAT_builtin@ -lwxexpat$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
### Targets: ###
all: ifacecheck$(EXEEXT)
install: install_ifacecheck
uninstall: uninstall_ifacecheck
install-strip: install
$(STRIP) $(DESTDIR)$(bindir)/ifacecheck$(EXEEXT)
clean:
rm -rf ./.deps ./.pch
rm -f ./*.o
rm -f ifacecheck$(EXEEXT)
distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch Makefile
ifacecheck$(EXEEXT): $(IFACECHECK_OBJECTS)
$(CXX) -o $@ $(IFACECHECK_OBJECTS) -L$(LIBDIRNAME) $(DYLIB_RPATH_FLAG) $(LDFLAGS) $(WX_LDFLAGS) $(__WXLIB_XML_p) $(EXTRALIBS_XML) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
install_ifacecheck: ifacecheck$(EXEEXT)
$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) ifacecheck$(EXEEXT) $(DESTDIR)$(bindir)
uninstall_ifacecheck:
rm -f $(DESTDIR)$(bindir)/ifacecheck$(EXEEXT)
ifacecheck_ifacecheck.o: $(srcdir)/ifacecheck.cpp
$(CXXC) -c -o $@ $(IFACECHECK_CXXFLAGS) $(srcdir)/ifacecheck.cpp
ifacecheck_xmlparser.o: $(srcdir)/xmlparser.cpp
$(CXXC) -c -o $@ $(IFACECHECK_CXXFLAGS) $(srcdir)/xmlparser.cpp
# Include dependency info, if present:
@IF_GNU_MAKE@-include ./.deps/*.d
.PHONY: all install uninstall clean distclean install_ifacecheck \
uninstall_ifacecheck

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" ?>
<makefile>
<include file="../../../build/bakefiles/common_samples.bkl"/>
<exe id="ifacecheck" template="wx_util_console" template_append="wx_append_base">
<sources>
ifacecheck.cpp
xmlparser.cpp
</sources>
<headers>xmlparser.h</headers>
<wx-lib>xml</wx-lib>
<wx-lib>base</wx-lib>
<install-to>$(BINDIR)</install-to>
</exe>
</makefile>

View File

@@ -0,0 +1,685 @@
/////////////////////////////////////////////////////////////////////////////
// Name: ifacecheck.cpp
// Purpose: Interface headers <=> real headers coherence checker
// Author: Francesco Montorsi
// Created: 2008/03/17
// Copyright: (c) 2008 Francesco Montorsi
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// for all others, include the necessary headers
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/crt.h"
#endif
#include "wx/cmdline.h"
#include "wx/textfile.h"
#include "wx/filename.h"
#include "wx/stopwatch.h" // for wxGetLocalTime
#include "xmlparser.h"
// global verbosity flag
bool g_verbose = false;
// ----------------------------------------------------------------------------
// IfaceCheckApp
// ----------------------------------------------------------------------------
#define API_DUMP_FILE "dump.api.txt"
#define INTERFACE_DUMP_FILE "dump.interface.txt"
#define PROCESS_ONLY_OPTION "p"
#define USE_PREPROCESSOR_OPTION "u"
#define MODIFY_SWITCH "m"
#define DUMP_SWITCH "d"
#define HELP_SWITCH "h"
#define VERBOSE_SWITCH "v"
static const wxCmdLineEntryDesc g_cmdLineDesc[] =
{
{ wxCMD_LINE_OPTION, USE_PREPROCESSOR_OPTION, "use-preproc",
"uses the preprocessor output to increase the checker accuracy",
wxCMD_LINE_VAL_STRING, wxCMD_LINE_NEEDS_SEPARATOR },
{ wxCMD_LINE_OPTION, PROCESS_ONLY_OPTION, "process-only",
"processes only header files matching the given wildcard",
wxCMD_LINE_VAL_STRING, wxCMD_LINE_NEEDS_SEPARATOR },
{ wxCMD_LINE_SWITCH, MODIFY_SWITCH, "modify",
"modify the interface headers to match the real ones" },
{ wxCMD_LINE_SWITCH, DUMP_SWITCH, "dump",
"dump both interface and API to plain text dump.*.txt files" },
{ wxCMD_LINE_SWITCH, HELP_SWITCH, "help",
"show help message", wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
{ wxCMD_LINE_SWITCH, VERBOSE_SWITCH, "verbose",
"be verbose" },
{ wxCMD_LINE_PARAM, nullptr, nullptr,
"gccXML", wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY },
{ wxCMD_LINE_PARAM, nullptr, nullptr,
"doxygenXML", wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY },
wxCMD_LINE_DESC_END
};
class IfaceCheckLog : public wxLog
{
public:
IfaceCheckLog() {}
virtual void DoLogText(const wxString& msg)
{
// send all messages to stdout (normal behaviour is to sent them to stderr)
wxPuts(msg);
fflush(stdout);
}
};
class IfaceCheckApp : public wxAppConsole
{
public:
// don't use builtin cmd line parsing:
virtual bool OnInit() { m_modify=false; return true; }
virtual int OnRun();
bool ParsePreprocessorOutput(const wxString& filename);
bool Compare();
int CompareClasses(const wxClass* iface, const wxClass* api);
bool FixMethod(const wxString& header, const wxMethod* iface, const wxMethod* api);
bool StringContainsMethodName(const wxString& str, const wxMethod* m);
void PrintStatistics(long secs);
bool IsToProcess(const wxString& headername) const
{
if (m_strToMatch.IsEmpty())
return true;
return wxMatchWild(m_strToMatch, headername, false);
}
protected:
wxXmlGccInterface m_gccInterface; // "real" headers API
wxXmlDoxygenInterface m_doxyInterface; // doxygen-commented headers API
// was the MODIFY_SWITCH passed?
bool m_modify;
// if non-empty, then PROCESS_ONLY_OPTION was passed and this is the
// wildcard expression to match
wxString m_strToMatch;
};
wxIMPLEMENT_APP_CONSOLE(IfaceCheckApp);
int IfaceCheckApp::OnRun()
{
long startTime = wxGetLocalTime(); // for timing purpose
wxCmdLineParser parser(g_cmdLineDesc, argc, argv);
parser.SetLogo(
wxString::Format("wxWidgets Interface checker utility (built %s against %s)",
__DATE__, wxVERSION_STRING));
// make the output more readable:
wxLog::SetActiveTarget(new IfaceCheckLog);
wxLog::DisableTimestamp();
// parse the command line...
bool ok = true;
wxString preprocFile;
switch (parser.Parse())
{
case 0:
if (parser.Found(VERBOSE_SWITCH))
g_verbose = true;
// IMPORTANT: parsing #define values must be done _before_ actually
// parsing the GCC/doxygen XML files
if (parser.Found(USE_PREPROCESSOR_OPTION, &preprocFile))
{
if (!ParsePreprocessorOutput(preprocFile))
return 1;
}
// in any case set basic std preprocessor #defines:
m_doxyInterface.AddPreprocessorValue("NULL", "0");
// parse the two XML files which contain the real and the doxygen interfaces
// for wxWidgets API:
if (!m_gccInterface.Parse(parser.GetParam(0)) ||
!m_doxyInterface.Parse(parser.GetParam(1)))
return 1;
if (parser.Found(DUMP_SWITCH))
{
wxLogMessage("Dumping real API to '%s'...", API_DUMP_FILE);
m_gccInterface.Dump(API_DUMP_FILE);
wxLogMessage("Dumping interface API to '%s'...", INTERFACE_DUMP_FILE);
m_doxyInterface.Dump(INTERFACE_DUMP_FILE);
}
else
{
if (parser.Found(MODIFY_SWITCH))
m_modify = true;
if (parser.Found(PROCESS_ONLY_OPTION, &m_strToMatch))
{
size_t len = m_strToMatch.Len();
if (m_strToMatch.StartsWith("\"") &&
m_strToMatch.EndsWith("\"") &&
len > 2)
m_strToMatch = m_strToMatch.Mid(1, len-2);
}
ok = Compare();
}
PrintStatistics(wxGetLocalTime() - startTime);
return ok ? 0 : 1;
default:
wxPrintf("\nThis utility checks that the interface XML files created by Doxygen are in\n");
wxPrintf("synch with the real headers (whose contents are extracted by the gcc XML file).\n\n");
wxPrintf("The 'gccXML' parameter should be the wxapi.xml file created by the 'rungccxml.sh'\n");
wxPrintf("script which resides in 'utils/ifacecheck'.\n");
wxPrintf("The 'doxygenXML' parameter should be the index.xml file created by Doxygen\n");
wxPrintf("for the wxWidgets 'interface' folder.\n\n");
wxPrintf("Since the gcc XML file does not contain info about #defines, if you use\n");
wxPrintf("the -%s option, you'll get a smaller number of false warnings.\n",
USE_PREPROCESSOR_OPTION);
// HELP_SWITCH was passed or a syntax error occurred
return 0;
}
}
bool IfaceCheckApp::Compare()
{
const wxClassArray& interfaces = m_doxyInterface.GetClasses();
const wxClass* c;
int mcount = 0, ccount = 0;
wxLogMessage("Comparing the interface API to the real API (%d classes to compare)...",
interfaces.GetCount());
if (!m_strToMatch.IsEmpty())
{
wxLogMessage("Processing only header files matching '%s' expression.", m_strToMatch);
}
for (unsigned int i=0; i<interfaces.GetCount(); i++)
{
// only compare the methods which are available for the port
// for which the gcc XML was produced
if (interfaces[i].GetAvailability() != wxPORT_UNKNOWN &&
(interfaces[i].GetAvailability() & m_gccInterface.GetInterfacePort()) == 0) {
if (g_verbose)
{
wxLogMessage("skipping class '%s' since it's not available for the %s port.",
interfaces[i].GetName(), m_gccInterface.GetInterfacePortName());
}
continue; // skip this method
}
// shorten the name of the header so the log file is more readable
// and also for calling IsToProcess() against it
wxString header = wxFileName(interfaces[i].GetHeader()).GetFullName();
if (!IsToProcess(header))
continue; // skip this one
wxString cname = interfaces[i].GetName();
// search in the real headers for i-th interface class; we search for
// both class cname and cnameBase since in wxWidgets world tipically
// class cname is platform-specific while the real public interface of
// that class is part of the cnameBase class.
/*c = m_gccInterface.FindClass(cname + "Base");
if (c) api.Add(c);*/
c = m_gccInterface.FindClass(cname);
if (!c)
{
// sometimes the platform-specific class is named "wxGeneric" + cname
// or similar:
c = m_gccInterface.FindClass("wxGeneric" + cname.Mid(2));
if (!c)
{
c = m_gccInterface.FindClass("wxGtk" + cname.Mid(2));
}
}
if (c) {
// there is a class with the same (logic) name!
mcount += CompareClasses(&interfaces[i], c);
} else {
wxLogMessage("%s: couldn't find the real interface for the '%s' class",
header, cname);
ccount++;
}
}
wxLogMessage("%d on a total of %d methods (%.1f%%) of the interface headers do not exist in the real headers",
mcount, m_doxyInterface.GetMethodCount(), (float)(100.0 * mcount/m_doxyInterface.GetMethodCount()));
wxLogMessage("%d on a total of %d classes (%.1f%%) of the interface headers do not exist in the real headers",
ccount, m_doxyInterface.GetClassesCount(), (float)(100.0 * ccount/m_doxyInterface.GetClassesCount()));
return true;
}
int IfaceCheckApp::CompareClasses(const wxClass* iface, const wxClass* api)
{
const wxMethod *real;
int count = 0;
wxASSERT(iface && api);
// shorten the name of the header so the log file is more readable
wxString header = wxFileName(iface->GetHeader()).GetFullName();
for (unsigned int i=0; i<iface->GetMethodCount(); i++)
{
const wxMethod& m = iface->GetMethod(i);
// only compare the methods which are available for the port
// for which the gcc XML was produced
if (m.GetAvailability() != wxPORT_UNKNOWN &&
(m.GetAvailability() & m_gccInterface.GetInterfacePort()) == 0) {
if (g_verbose)
{
wxLogMessage("skipping method '%s' since it's not available for the %s port.",
m.GetAsString(), m_gccInterface.GetInterfacePortName());
}
continue; // skip this method
}
// search in the methods of the api classes provided
real = api->RecursiveUpwardFindMethod(m, &m_gccInterface);
// avoid some false positives:
if (!real && m.ActsAsDefaultCtor())
{
// build an artificial default ctor for this class:
wxMethod temp(m);
temp.GetArgumentTypes().Clear();
// repeat search:
real = api->RecursiveUpwardFindMethod(temp, &m_gccInterface);
}
// no matches?
if (!real)
{
bool proceed = true;
wxMethodPtrArray overloads =
api->RecursiveUpwardFindMethodsNamed(m.GetName(), &m_gccInterface);
// avoid false positives:
for (unsigned int k=0; k<overloads.GetCount(); k++)
if (overloads[k]->MatchesExceptForAttributes(m) &&
m.IsDeprecated() && !overloads[k]->IsDeprecated())
{
// maybe the iface method is marked as deprecated but the
// real method is not?
wxMethod tmp(*overloads[k]);
tmp.SetDeprecated(true);
if (tmp == m)
{
// in this case, we can disregard this warning... the real
// method probably is included in WXWIN_COMPAT sections!
proceed = false; // skip this method
}
}
#define HACK_TO_AUTO_CORRECT_ONLY_METHOD_ATTRIBUTES 0
#if HACK_TO_AUTO_CORRECT_ONLY_METHOD_ATTRIBUTES
for (unsigned int k=0; k<overloads.GetCount(); k++)
if (overloads[k]->MatchesExceptForAttributes(m))
{
// fix default values of results[k]:
wxMethod tmp(*overloads[k]);
tmp.SetArgumentTypes(m.GetArgumentTypes());
// modify interface header
if (FixMethod(iface->GetHeader(), &m, &tmp))
{
wxLogMessage("Adjusted attributes of '%s' method", m.GetAsString());
}
proceed = false;
break;
}
#endif // HACK_TO_AUTO_CORRECT_ONLY_METHOD_ATTRIBUTES
if (proceed)
{
if (overloads.GetCount()==0)
{
wxLogMessage("%s: real '%s' class and their parents have no method '%s'",
header, api->GetName(), m.GetAsString());
// we've found no overloads
}
else
{
// first, output a warning
wxString warning = header;
if (overloads.GetCount()>1)
warning += wxString::Format(": in the real headers there are %d overloads of '%s' for "
"'%s' all with different signatures:\n",
overloads.GetCount(), m.GetName(), api->GetName());
else {
warning += wxString::Format(": in the real headers there is a method '%s' for '%s'"
" but has different signature:\n",
m.GetName(), api->GetName());
}
// get a list of the prototypes with _all_ possible attributes:
warning += "\tdoxy header: " + m.GetAsString(true, true, true, true);
for (unsigned int j=0; j<overloads.GetCount(); j++)
warning += "\n\treal header: " + overloads[j]->GetAsString(true, true, true, true);
wxLogWarning(warning);
count++;
if (overloads.GetCount()>1)
{
// TODO: decide which of these overloads is the most "similar" to m
// and eventually modify it
if (m_modify)
{
wxLogWarning("\tmanual fix is required");
}
}
else
{
wxASSERT(overloads.GetCount() == 1);
if (m_modify || m.IsCtor())
{
wxLogWarning("\tfixing it...");
// try to modify it!
FixMethod(iface->GetHeader(), &m, overloads[0]);
}
}
}
count++;
} // if (proceed)
}
}
return count;
}
bool IfaceCheckApp::StringContainsMethodName(const wxString& str, const wxMethod* m)
{
return str.Contains(m->GetName()) ||
(m->IsOperator() && str.Contains("operator"));
}
bool IfaceCheckApp::FixMethod(const wxString& header, const wxMethod* iface, const wxMethod* api)
{
unsigned int i,j;
wxASSERT(iface && api);
wxTextFile file;
if (!file.Open(header)) {
wxLogError("\tcan't open the '%s' header file.", header);
return false;
}
// GetLocation() returns the line where the last part of the prototype is placed;
// i.e. the line containing the semicolon at the end of the declaration.
int end = iface->GetLocation()-1;
if (end <= 0 || end >= (int)file.GetLineCount()) {
wxLogWarning("\tinvalid location info for method '%s': %d.",
iface->GetAsString(), iface->GetLocation());
return false;
}
if (!file.GetLine(end).Contains(";")) {
wxLogWarning("\tinvalid location info for method '%s': %d.",
iface->GetAsString(), iface->GetLocation());
return false;
}
// is this a one-line prototype declaration?
bool founddecl = false;
int start;
if (StringContainsMethodName(file.GetLine(end), iface))
{
// yes, this prototype is all on this line:
start = end;
founddecl = true;
}
else
{
start = end; // will be decremented inside the while{} loop below
// find the start point of this prototype declaration; i.e. the line
// containing the function name, which is also the line following
// the marker '*/' for the closure of the doxygen comment
do
{
start--; // go up one line
if (StringContainsMethodName(file.GetLine(start), iface))
founddecl = true;
}
while (start > 0 && !founddecl &&
!file.GetLine(start).Contains(";") &&
!file.GetLine(start).Contains("*/"));
}
if (start <= 0 || !founddecl)
{
wxLogError("\tcan't find the beginning of the declaration of '%s' method in '%s' header looking backwards from line %d; I arrived at %d and gave up",
iface->GetAsString(), header, end+1 /* zero-based => 1-based */, start);
return false;
}
// remove the old prototype
for (int k=start; k<=end; k++)
file.RemoveLine(start); // remove (end-start)-nth times the start-th line
#define INDENTATION_STR wxString(" ")
// if possible, add also the @deprecated tag in the doxygen comment if it's missing
int deprecationOffset = 0;
if (file.GetLine(start-1).Contains("*/") &&
(api->IsDeprecated() && !iface->IsDeprecated()))
{
file.RemoveLine(start-1);
file.InsertLine(INDENTATION_STR + INDENTATION_STR +
"@deprecated @todo provide deprecation description", start-1);
file.InsertLine(INDENTATION_STR + "*/", start++);
// we have added a new line in the final balance
deprecationOffset=1;
}
wxMethod tmp(*api);
// discard gcc XML argument names and replace them with those parsed from doxygen XML;
// in this way we should avoid introducing doxygen warnings about cases where the argument
// 'xx' of the prototype is called 'yy' in the function's docs.
const wxArgumentTypeArray& doxygenargs = iface->GetArgumentTypes();
const wxArgumentTypeArray& realargs = api->GetArgumentTypes();
if (realargs.GetCount() == doxygenargs.GetCount())
{
for (j=0; j<doxygenargs.GetCount(); j++)
if (doxygenargs[j]==realargs[j])
{
realargs[j].SetArgumentName(doxygenargs[j].GetArgumentName());
if (realargs[j].GetDefaultValue().IsNumber() &&
doxygenargs[j].GetDefaultValue().StartsWith("wx"))
realargs[j].SetDefaultValue(doxygenargs[j].GetDefaultValue());
}
tmp.SetArgumentTypes(realargs);
}
#define WRAP_COLUMN 80
wxArrayString toinsert;
toinsert.Add(INDENTATION_STR + tmp.GetAsString() + ";");
int nStartColumn = toinsert[0].Find('(');
wxASSERT(nStartColumn != wxNOT_FOUND);
// wrap lines too long at comma boundaries
for (i=0; i<toinsert.GetCount(); i++)
{
size_t len = toinsert[i].Len();
if (len > WRAP_COLUMN)
{
wxASSERT(i == toinsert.GetCount()-1);
// break this line
wxString tmpleft = toinsert[i].Left(WRAP_COLUMN);
int comma = tmpleft.Find(',', true /* from end */);
if (comma == wxNOT_FOUND)
break; // break out of the for cycle...
toinsert.Add(wxString(' ', nStartColumn+1) +
toinsert[i].Right(len-comma-2)); // exclude the comma and the space after it
toinsert[i] = tmpleft.Left(comma+1); // include the comma
}
}
// insert the new lines
for (i=0; i<toinsert.GetCount(); i++)
file.InsertLine(toinsert[i], start+i);
// now save the modification
if (!file.Write()) {
wxLogError("\tcan't save the '%s' header file.", header);
return false;
}
// how many lines did we add/remove in total?
int nOffset = toinsert.GetCount() + deprecationOffset - (end-start+1);
if (nOffset == 0)
return false;
if (g_verbose)
{
wxLogMessage("\tthe final row offset for following methods is %d lines.", nOffset);
}
// update the other method's locations for those methods which belong to the modified header
// and are placed _below_ the modified method
wxClassPtrArray cToUpdate = m_doxyInterface.FindClassesDefinedIn(header);
for (i=0; i < cToUpdate.GetCount(); i++)
{
for (j=0; j < cToUpdate[i]->GetMethodCount(); j++)
{
wxMethod& m = cToUpdate[i]->GetMethod(j);
if (m.GetLocation() > iface->GetLocation())
{
// update the location of this method
m.SetLocation(m.GetLocation()+nOffset);
}
}
}
return true;
}
bool IfaceCheckApp::ParsePreprocessorOutput(const wxString& filename)
{
wxTextFile tf;
if (!tf.Open(filename)) {
wxLogError("can't open the '%s' preprocessor output file.", filename);
return false;
}
size_t useful = 0;
for (unsigned int i=0; i < tf.GetLineCount(); i++)
{
const wxString& line = tf.GetLine(i);
wxString defnameval = line.Mid(8); // what follows the "#define " string
// the format of this line should be:
// #define DEFNAME DEFVALUE
if (!line.StartsWith("#define ")) {
wxLogError("unexpected content in '%s' at line %d.", filename, i+1);
return false;
}
if (defnameval.Contains(" "))
{
// get DEFNAME
wxString defname = defnameval.BeforeFirst(' ');
if (defname.Contains("("))
continue; // this is a macro, skip it!
// get DEFVAL
wxString defval = defnameval.AfterFirst(' ').Strip(wxString::both);
if (defval.StartsWith("(") && defval.EndsWith(")"))
defval = defval.Mid(1, defval.Len()-2);
// store this pair in the doxygen interface, where it can be useful
m_doxyInterface.AddPreprocessorValue(defname, defval);
useful++;
}
else
{
// it looks like the format of this line is:
// #define DEFNAME
// we are not interested to symbols #defined to nothing,
// so we just ignore this line.
}
}
wxLogMessage("Parsed %d preprocessor #defines from '%s' which will be used later...",
useful, filename);
return true;
}
void IfaceCheckApp::PrintStatistics(long secs)
{
// these stats, for what regards the gcc XML, are all referred to the wxWidgets
// classes only!
wxLogMessage("wx real headers contains declaration of %d classes (%d methods)",
m_gccInterface.GetClassesCount(), m_gccInterface.GetMethodCount());
wxLogMessage("wx interface headers contains declaration of %d classes (%d methods)",
m_doxyInterface.GetClassesCount(), m_doxyInterface.GetMethodCount());
// build a list of the undocumented wx classes
wxString list;
int undoc = 0;
const wxClassArray& arr = m_gccInterface.GetClasses();
for (unsigned int i=0; i<arr.GetCount(); i++) {
if (m_doxyInterface.FindClass(arr[i].GetName()) == nullptr) {
list += arr[i].GetName() + ", ";
undoc++;
}
}
list.RemoveLast();
list.RemoveLast();
wxLogMessage("the list of the %d undocumented wx classes is: %s", undoc, list);
wxLogMessage("total processing took %d seconds.", secs);
}

View File

@@ -0,0 +1,185 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
include ../../../build/msw/config.gcc
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
CPPDEPS = -MT$@ -MF$@.d -MD -MP
WX_RELEASE_NODOT = 33
COMPILER_PREFIX = gcc
OBJS = \
$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
LIBDIRNAME = \
.\..\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
SETUPHDIR = $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)
IFACECHECK_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG) \
-D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
-I$(SETUPHDIR) -I.\..\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_p) -W \
-Wall -I. $(__DLLFLAG_p) -DwxUSE_GUI=0 $(__RTTIFLAG_5) $(__EXCEPTIONSFLAG_6) \
-Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
IFACECHECK_OBJECTS = \
$(OBJS)\ifacecheck_ifacecheck.o \
$(OBJS)\ifacecheck_xmlparser.o
### Conditionally set variables: ###
ifeq ($(USE_GUI),0)
PORTNAME = base
endif
ifeq ($(USE_GUI),1)
PORTNAME = msw$(TOOLKIT_VERSION)
endif
ifeq ($(OFFICIAL_BUILD),1)
COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
endif
ifeq ($(BUILD),debug)
WXDEBUGFLAG = d
endif
ifeq ($(WXUNIV),1)
WXUNIVNAME = univ
endif
ifeq ($(SHARED),1)
WXDLLFLAG = dll
endif
ifeq ($(SHARED),0)
LIBTYPE_SUFFIX = lib
endif
ifeq ($(SHARED),1)
LIBTYPE_SUFFIX = dll
endif
ifeq ($(MONOLITHIC),0)
EXTRALIBS_FOR_BASE =
endif
ifeq ($(MONOLITHIC),1)
EXTRALIBS_FOR_BASE =
endif
ifeq ($(BUILD),debug)
__OPTIMIZEFLAG_2 = -O0
endif
ifeq ($(BUILD),release)
__OPTIMIZEFLAG_2 = -O2
endif
ifeq ($(USE_RTTI),0)
__RTTIFLAG_5 = -fno-rtti
endif
ifeq ($(USE_RTTI),1)
__RTTIFLAG_5 =
endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONSFLAG_6 = -fno-exceptions
endif
ifeq ($(USE_EXCEPTIONS),1)
__EXCEPTIONSFLAG_6 =
endif
ifeq ($(WXUNIV),1)
__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
endif
ifeq ($(DEBUG_FLAG),0)
__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
endif
ifeq ($(BUILD),release)
__NDEBUG_DEFINE_p = -DNDEBUG
endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
endif
ifeq ($(USE_RTTI),0)
__RTTI_DEFINE_p = -DwxNO_RTTI
endif
ifeq ($(USE_THREADS),0)
__THREAD_DEFINE_p = -DwxNO_THREADS
endif
ifeq ($(USE_CAIRO),1)
____CAIRO_INCLUDEDIR_FILENAMES_p = -I$(CAIRO_ROOT)\include\cairo
endif
ifeq ($(SHARED),1)
__DLLFLAG_p = -DWXUSINGDLL
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_XML_p = \
-lwxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_BASE_p = -lwxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
endif
ifeq ($(MONOLITHIC),1)
__WXLIB_MONO_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
endif
ifeq ($(MONOLITHIC),1)
__LIB_PNG_IF_MONO_p = $(__LIB_PNG_p)
endif
ifeq ($(USE_GUI),1)
__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
endif
ifeq ($(USE_CAIRO),1)
__CAIRO_LIB_p = -lcairo
endif
ifeq ($(USE_CAIRO),1)
____CAIRO_LIBDIR_FILENAMES_p = -L$(CAIRO_ROOT)\lib
endif
ifeq ($(BUILD),debug)
ifeq ($(DEBUG_INFO),default)
__DEBUGINFO = -g
endif
endif
ifeq ($(BUILD),release)
ifeq ($(DEBUG_INFO),default)
__DEBUGINFO =
endif
endif
ifeq ($(DEBUG_INFO),0)
__DEBUGINFO =
endif
ifeq ($(DEBUG_INFO),1)
__DEBUGINFO = -g
endif
ifeq ($(USE_THREADS),0)
__THREADSFLAG =
endif
ifeq ($(USE_THREADS),1)
__THREADSFLAG = -mthreads
endif
all: $(OBJS)
$(OBJS):
-if not exist $(OBJS) mkdir $(OBJS)
### Targets: ###
all: $(OBJS)\ifacecheck.exe
clean:
-if exist $(OBJS)\*.o del $(OBJS)\*.o
-if exist $(OBJS)\*.d del $(OBJS)\*.d
-if exist $(OBJS)\ifacecheck.exe del $(OBJS)\ifacecheck.exe
$(OBJS)\ifacecheck.exe: $(IFACECHECK_OBJECTS)
$(foreach f,$(subst \,/,$(IFACECHECK_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp))
@move /y $@.rsp.tmp $@.rsp >nul
$(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) $(__WXLIB_XML_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lgdiplus -lmsimg32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme
@-del $@.rsp
$(OBJS)\ifacecheck_ifacecheck.o: ./ifacecheck.cpp
$(CXX) -c -o $@ $(IFACECHECK_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\ifacecheck_xmlparser.o: ./xmlparser.cpp
$(CXX) -c -o $@ $(IFACECHECK_CXXFLAGS) $(CPPDEPS) $<
.PHONY: all clean
SHELL := $(COMSPEC)
# Dependencies tracking:
-include $(OBJS)/*.d

View File

@@ -0,0 +1,339 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
!include <../../../build/msw/config.vc>
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
WX_RELEASE_NODOT = 33
COMPILER_PREFIX = vc
OBJS = \
$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
LIBDIRNAME = \
.\..\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(LIBTYPE_SUFFIX)$(CFG)
SETUPHDIR = $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)
IFACECHECK_CXXFLAGS = /M$(__RUNTIME_LIBS_10)$(__DEBUGRUNTIME_4) /DWIN32 \
$(__DEBUGINFO_0) /Fd$(OBJS)\ifacecheck.pdb $(____DEBUGRUNTIME_3_p) \
$(__OPTIMIZEFLAG_6) /D_CRT_SECURE_NO_DEPRECATE=1 \
/D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \
$(__NO_VC_CRTDBG_p) $(__TARGET_CPU_COMPFLAG_p) /D__WXMSW__ \
$(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
/I$(SETUPHDIR) /I.\..\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_p) /W4 \
/I. $(__DLLFLAG_p) /D_CONSOLE /DwxUSE_GUI=0 $(__RTTIFLAG_11) \
$(__EXCEPTIONSFLAG_12) $(CPPFLAGS) $(CXXFLAGS)
IFACECHECK_OBJECTS = \
$(OBJS)\ifacecheck_ifacecheck.obj \
$(OBJS)\ifacecheck_xmlparser.obj
### Conditionally set variables: ###
!if "$(TARGET_CPU)" == "AMD64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "ARM"
ARCH_SUFFIX = _arm
!endif
!if "$(TARGET_CPU)" == "ARM64"
ARCH_SUFFIX = _arm64
!endif
!if "$(TARGET_CPU)" == "IA64"
ARCH_SUFFIX = _ia64
!endif
!if "$(TARGET_CPU)" == "X64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "amd64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "arm"
ARCH_SUFFIX = _arm
!endif
!if "$(TARGET_CPU)" == "arm64"
ARCH_SUFFIX = _arm64
!endif
!if "$(TARGET_CPU)" == "ia64"
ARCH_SUFFIX = _ia64
!endif
!if "$(TARGET_CPU)" == "x64"
ARCH_SUFFIX = _x64
!endif
!if "$(USE_GUI)" == "0"
PORTNAME = base
!endif
!if "$(USE_GUI)" == "1"
PORTNAME = msw$(TOOLKIT_VERSION)
!endif
!if "$(OFFICIAL_BUILD)" == "1"
COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
WXDEBUGFLAG = d
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
WXDEBUGFLAG = d
!endif
!if "$(WXUNIV)" == "1"
WXUNIVNAME = univ
!endif
!if "$(SHARED)" == "1"
WXDLLFLAG = dll
!endif
!if "$(SHARED)" == "0"
LIBTYPE_SUFFIX = lib
!endif
!if "$(SHARED)" == "1"
LIBTYPE_SUFFIX = dll
!endif
!if "$(TARGET_CPU)" == "AMD64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "ARM"
LINK_TARGET_CPU = /MACHINE:ARM
!endif
!if "$(TARGET_CPU)" == "ARM64"
LINK_TARGET_CPU = /MACHINE:ARM64
!endif
!if "$(TARGET_CPU)" == "IA64"
LINK_TARGET_CPU = /MACHINE:IA64
!endif
!if "$(TARGET_CPU)" == "X64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "amd64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "arm"
LINK_TARGET_CPU = /MACHINE:ARM
!endif
!if "$(TARGET_CPU)" == "arm64"
LINK_TARGET_CPU = /MACHINE:ARM64
!endif
!if "$(TARGET_CPU)" == "ia64"
LINK_TARGET_CPU = /MACHINE:IA64
!endif
!if "$(TARGET_CPU)" == "x64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(MONOLITHIC)" == "0"
EXTRALIBS_FOR_BASE =
!endif
!if "$(MONOLITHIC)" == "1"
EXTRALIBS_FOR_BASE =
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_0 = /Zi
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_0 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_0 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_0 = /Zi
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_1 = /DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_1 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_1 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_1 = /DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_2 = $(__DEBUGRUNTIME_5)
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_2 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_2 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_2 = $(__DEBUGRUNTIME_5)
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p = /D_DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
____DEBUGRUNTIME_3_p =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
____DEBUGRUNTIME_3_p = /D_DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_4 = d
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_4 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__DEBUGRUNTIME_4 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
__DEBUGRUNTIME_4 = d
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_5 =
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_5 = /opt:ref /opt:icf
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__DEBUGRUNTIME_5 = /opt:ref /opt:icf
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
__DEBUGRUNTIME_5 =
!endif
!if "$(BUILD)" == "debug"
__OPTIMIZEFLAG_6 = /Od
!endif
!if "$(BUILD)" == "release"
__OPTIMIZEFLAG_6 = /O2
!endif
!if "$(USE_THREADS)" == "0"
__THREADSFLAG_9 = L
!endif
!if "$(USE_THREADS)" == "1"
__THREADSFLAG_9 = T
!endif
!if "$(RUNTIME_LIBS)" == "dynamic"
__RUNTIME_LIBS_10 = D
!endif
!if "$(RUNTIME_LIBS)" == "static"
__RUNTIME_LIBS_10 = $(__THREADSFLAG_9)
!endif
!if "$(USE_RTTI)" == "0"
__RTTIFLAG_11 = /GR-
!endif
!if "$(USE_RTTI)" == "1"
__RTTIFLAG_11 = /GR
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONSFLAG_12 =
!endif
!if "$(USE_EXCEPTIONS)" == "1"
__EXCEPTIONSFLAG_12 = /EHsc
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
!if "$(TARGET_CPU)" == ""
__TARGET_CPU_COMPFLAG_p = /DTARGET_CPU_COMPFLAG=0
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
__TARGET_CPU_COMPFLAG_p =
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
__TARGET_CPU_COMPFLAG_p =
!endif
!if "$(WXUNIV)" == "1"
__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
!endif
!if "$(DEBUG_FLAG)" == "0"
__DEBUG_DEFINE_p = /DwxDEBUG_LEVEL=0
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__NDEBUG_DEFINE_p = /DNDEBUG
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__NDEBUG_DEFINE_p = /DNDEBUG
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS
!endif
!if "$(USE_RTTI)" == "0"
__RTTI_DEFINE_p = /DwxNO_RTTI
!endif
!if "$(USE_THREADS)" == "0"
__THREAD_DEFINE_p = /DwxNO_THREADS
!endif
!if "$(USE_CAIRO)" == "1"
____CAIRO_INCLUDEDIR_FILENAMES_p = /I$(CAIRO_ROOT)\include\cairo
!endif
!if "$(SHARED)" == "1"
__DLLFLAG_p = /DWXUSINGDLL
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_XML_p = \
wxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_BASE_p = \
wxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
!if "$(MONOLITHIC)" == "1"
__WXLIB_MONO_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
!if "$(MONOLITHIC)" == "1"
__LIB_PNG_IF_MONO_p = $(__LIB_PNG_p)
!endif
!if "$(USE_GUI)" == "1"
__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
!endif
!if "$(USE_CAIRO)" == "1"
__CAIRO_LIB_p = cairo.lib
!endif
!if "$(USE_CAIRO)" == "1"
____CAIRO_LIBDIR_FILENAMES_p = /LIBPATH:$(CAIRO_ROOT)\lib
!endif
all: $(OBJS)
$(OBJS):
-if not exist $(OBJS) mkdir $(OBJS)
### Targets: ###
all: $(OBJS)\ifacecheck.exe
clean:
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
-if exist $(OBJS)\*.res del $(OBJS)\*.res
-if exist $(OBJS)\*.pch del $(OBJS)\*.pch
-if exist $(OBJS)\ifacecheck.exe del $(OBJS)\ifacecheck.exe
-if exist $(OBJS)\ifacecheck.ilk del $(OBJS)\ifacecheck.ilk
-if exist $(OBJS)\ifacecheck.pdb del $(OBJS)\ifacecheck.pdb
$(OBJS)\ifacecheck.exe: $(IFACECHECK_OBJECTS)
link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\ifacecheck.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<<
$(IFACECHECK_OBJECTS) $(__WXLIB_XML_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib gdiplus.lib msimg32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib
<<
$(OBJS)\ifacecheck_ifacecheck.obj: .\ifacecheck.cpp
$(CXX) /c /nologo /TP /Fo$@ $(IFACECHECK_CXXFLAGS) .\ifacecheck.cpp
$(OBJS)\ifacecheck_xmlparser.obj: .\xmlparser.cpp
$(CXX) /c /nologo /TP /Fo$@ $(IFACECHECK_CXXFLAGS) .\xmlparser.cpp

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,521 @@
/////////////////////////////////////////////////////////////////////////////
// Name: xmlparser.h
// Purpose: Parser of the API/interface XML files
// Author: Francesco Montorsi
// Created: 2008/03/17
// Copyright: (c) 2008 Francesco Montorsi
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _XMLPARSER_H_
#define _XMLPARSER_H_
#include <wx/txtstrm.h>
#include <wx/dynarray.h>
#include <wx/xml/xml.h>
#include <wx/platinfo.h>
#include <wx/log.h>
#include <wx/hashmap.h>
/*
IMPORTANT
=========
Any fix aimed to reduce "false positives" which involves
references to a specific wxWidgets class is marked in
ifacecheck sources with the string:
// ADHOC-FIX:
// ...fix description...
*/
// NOTE: all messages in this way are printed on the stderr
//#define wxLogWarning wxLogMessage
// ----------------------------------------------------------------------------
// Represents a type with or without const/static/ qualifier
// and with or without & and * operators
// ----------------------------------------------------------------------------
class wxType
{
public:
wxType() {}
wxType(const wxString& type)
{ SetTypeFromString(type); }
void SetTypeFromString(const wxString& t);
wxString GetAsString() const
{ return m_strType; }
// returns this type _without_ any decoration,
// including the & (which indicates this is a reference),
// the * (which indicates this is a pointer), etc.
wxString GetAsCleanString() const
{ return m_strTypeClean; }
bool IsConst() const
{ return m_strType.Contains("const"); }
bool IsStatic() const
{ return m_strType.Contains("static"); }
bool IsPointer() const
{ return m_strType.Contains("*"); }
bool IsReference() const
{ return m_strType.Contains("&"); }
bool operator==(const wxType& m) const;
bool operator!=(const wxType& m) const
{ return !(*this == m); }
bool IsOk() const;
protected:
wxString m_strType,
m_strTypeClean; // m_strType "cleaned" of its attributes
// (only for internal use)
};
extern wxType wxEmptyType;
WX_DECLARE_OBJARRAY(wxType, wxTypeArray);
// ----------------------------------------------------------------------------
// Represents a type used as argument for some wxMethod
// ----------------------------------------------------------------------------
class wxArgumentType : public wxType
{
public:
wxArgumentType() {}
wxArgumentType(const wxString& type, const wxString& defVal,
const wxString& argName = wxEmptyString)
{ SetTypeFromString(type); SetDefaultValue(defVal); m_strArgName = argName; }
void SetArgumentName(const wxString& name)
{ m_strArgName=name.Strip(wxString::both); }
wxString GetArgumentName() const
{ return m_strArgName; }
void SetDefaultValue(const wxString& defval,
const wxString& defvalForCmp = wxEmptyString);
wxString GetDefaultValue() const
{ return m_strDefaultValue; }
// returns the default value used for comparisons
wxString GetDefaultCleanValue() const
{ return m_strDefaultValueForCmp; }
bool HasDefaultValue() const
{ return !m_strDefaultValue.IsEmpty(); }
bool operator==(const wxArgumentType& m) const;
bool operator!=(const wxArgumentType& m) const
{ return !(*this == m); }
protected:
wxString m_strDefaultValue;
// this string may differ from m_strDefaultValue if there were
// preprocessor substitutions or other "replacements" done to
// avoid false errors.
wxString m_strDefaultValueForCmp;
// the argument name
wxString m_strArgName;
};
extern wxArgumentType wxEmptyArgumentType;
WX_DECLARE_OBJARRAY(wxArgumentType, wxArgumentTypeArray);
enum wxMethodAccessSpecifier
{
wxMAS_PUBLIC,
wxMAS_PROTECTED,
wxMAS_PRIVATE
};
// ----------------------------------------------------------------------------
// Represents a single prototype of a class' member.
// ----------------------------------------------------------------------------
class wxMethod
{
public:
wxMethod()
{ m_bConst=m_bVirtual=m_bPureVirtual=m_bStatic=m_bDeprecated=false;
m_nLine=-1; m_nAvailability=wxPORT_UNKNOWN; m_access=wxMAS_PUBLIC; }
wxMethod(const wxType& rettype, const wxString& name,
const wxArgumentTypeArray& arguments,
bool isConst, bool isStatic, bool isVirtual)
: m_retType(rettype), m_strName(name.Strip(wxString::both)),
m_bConst(isConst), m_bStatic(isStatic), m_bVirtual(isVirtual)
{ SetArgumentTypes(arguments); m_nLine=-1; }
public: // getters
// bWithArgumentNames = output argument names?
// bCleanDefaultValues = output clean argument default values?
// bDeprecated = output [deprecated] next to deprecated methods?
// bAccessSpec = output [public], [protected] or [private] next to method?
//
// TODO: convert to readable flags this set of bools
wxString GetAsString(bool bWithArgumentNames = true,
bool bCleanDefaultValues = false,
bool bDeprecated = false,
bool bAccessSpec = false) const;
// parser of the prototype:
// all these functions return strings with spaces stripped
wxType GetReturnType() const
{ return m_retType; }
wxString GetName() const
{ return m_strName; }
const wxArgumentTypeArray& GetArgumentTypes() const
{ return m_args; }
wxArgumentTypeArray& GetArgumentTypes()
{ return m_args; }
int GetLocation() const
{ return m_nLine; }
int GetAvailability() const
{ return m_nAvailability; }
wxMethodAccessSpecifier GetAccessSpecifier() const
{ return m_access; }
bool IsConst() const
{ return m_bConst; }
bool IsStatic() const
{ return m_bStatic; }
bool IsVirtual() const
{ return m_bVirtual; }
bool IsPureVirtual() const
{ return m_bPureVirtual; }
bool IsOk() const;
bool IsCtor() const
{ return m_retType==wxEmptyType && !m_strName.StartsWith("~"); }
bool IsDtor() const
{ return m_retType==wxEmptyType && m_strName.StartsWith("~"); }
bool IsOperator() const
{ return m_strName.StartsWith("operator"); }
bool IsDeprecated() const
{ return m_bDeprecated; }
public: // setters
void SetReturnType(const wxType& t)
{ m_retType=t; }
void SetName(const wxString& name)
{ m_strName=name; }
void SetArgumentTypes(const wxArgumentTypeArray& arr)
{ m_args=arr; }
void SetConst(bool c = true)
{ m_bConst=c; }
void SetStatic(bool c = true)
{ m_bStatic=c; }
void SetVirtual(bool c = true)
{ m_bVirtual=c; }
void SetPureVirtual(bool c = true)
{
m_bPureVirtual=c;
if (c) m_bVirtual=c; // pure virtual => virtual
}
void SetDeprecated(bool c = true)
{ m_bDeprecated=c; }
void SetLocation(int lineNumber)
{ m_nLine=lineNumber; }
void SetAvailability(int nAvail)
{ m_nAvailability=nAvail; }
void SetAccessSpecifier(wxMethodAccessSpecifier spec)
{ m_access=spec; }
public: // misc
bool operator==(const wxMethod&) const;
bool operator!=(const wxMethod& m) const
{ return !(*this == m); }
// this function works like operator== but tests everything:
// - method name
// - return type
// - argument types
// except for the method attributes (const,static,virtual,pureVirtual,deprecated)
bool MatchesExceptForAttributes(const wxMethod& m) const;
// returns true if this is a ctor which has default values for all its
// argument, thus is able to act also as default ctor
bool ActsAsDefaultCtor() const;
// dumps the contents of this class in the given stream
void Dump(wxTextOutputStream& stream) const;
protected:
wxType m_retType;
wxString m_strName;
wxArgumentTypeArray m_args;
// misc attributes:
bool m_bConst;
bool m_bStatic;
bool m_bVirtual;
bool m_bPureVirtual;
bool m_bDeprecated;
// m_nLine can be -1 if no location infos are available
int m_nLine;
// this is a combination of wxPORT_* flags (see wxPortId) or wxPORT_UNKNOWN
// if this method should be available for all wxWidgets ports.
// NOTE: this is not used for comparing wxMethod objects
// (gccXML never gives this kind of info).
int m_nAvailability;
// the access specifier for this method
wxMethodAccessSpecifier m_access;
};
WX_DECLARE_OBJARRAY(wxMethod, wxMethodArray);
WX_DEFINE_ARRAY(const wxMethod*, wxMethodPtrArray);
// we need wxClassPtrArray to be defined _before_ wxClass itself,
// since wxClass uses wxClassPtrArray.
class wxClass;
WX_DEFINE_ARRAY(const wxClass*, wxClassPtrArray);
class wxXmlInterface;
// ----------------------------------------------------------------------------
// Represents a class of the wx API/interface.
// ----------------------------------------------------------------------------
class wxClass
{
public:
wxClass() {}
wxClass(const wxString& name, const wxString& headername)
: m_strName(name), m_strHeader(headername) {}
public: // setters
void SetHeader(const wxString& header)
{ m_strHeader=header; }
void SetName(const wxString& name)
{ m_strName=name; }
void SetAvailability(int nAvail)
{ m_nAvailability=nAvail; }
void SetParent(unsigned int k, const wxString& name)
{ m_parents[k]=name; }
public: // getters
bool IsOk() const
{ return !m_strName.IsEmpty() && !m_methods.IsEmpty(); }
bool IsValidCtorForThisClass(const wxMethod& m) const;
bool IsValidDtorForThisClass(const wxMethod& m) const;
wxString GetName() const
{ return m_strName; }
wxString GetHeader() const
{ return m_strHeader; }
wxString GetNameWithoutTemplate() const;
unsigned int GetMethodCount() const
{ return m_methods.GetCount(); }
wxMethod& GetMethod(unsigned int n) const
{ return m_methods[n]; }
wxMethod& GetLastMethod() const
{ return m_methods.Last(); }
int GetAvailability() const
{ return m_nAvailability; }
//const wxClass *GetParent(unsigned int i) const
const wxString& GetParent(unsigned int i) const
{ return m_parents[i]; }
unsigned int GetParentCount() const
{ return m_parents.GetCount(); }
public: // misc
void AddMethod(const wxMethod& func)
{ m_methods.Add(func); }
void AddParent(const wxString& parent)//wxClass* parent)
{ m_parents.Add(parent); }
// returns a single result (the first, which is also the only
// one if CheckConsistency() return true)
const wxMethod* FindMethod(const wxMethod& m) const;
// like FindMethod() but this one searches also recursively in
// the parents of this class.
const wxMethod* RecursiveUpwardFindMethod(const wxMethod& m,
const wxXmlInterface* allclasses) const;
// returns an array of pointers to the overloaded methods with the
// same given name
wxMethodPtrArray FindMethodsNamed(const wxString& name) const;
// like FindMethodsNamed() but this one searches also recursively in
// the parents of this class.
wxMethodPtrArray RecursiveUpwardFindMethodsNamed(const wxString& name,
const wxXmlInterface* allclasses) const;
// dumps all methods to the given output stream
void Dump(wxTextOutputStream& stream) const;
// slow check
bool CheckConsistency() const;
protected:
wxString m_strName;
wxString m_strHeader;
wxMethodArray m_methods;
// name of the base classes: we store the names and not the pointers
// because this makes _much_ easier the parsing process!
// (basically because when parsing class X which derives from Y,
// we may have not parsed yet class Y!)
wxArrayString m_parents;
// see the wxMethod::m_nAvailability field for more info
int m_nAvailability;
};
WX_DECLARE_OBJARRAY(wxClass, wxClassArray);
// ----------------------------------------------------------------------------
// wxXmlInterface
// ----------------------------------------------------------------------------
class wxXmlInterface
{
public:
wxXmlInterface() {}
const wxClass* FindClass(const wxString& classname) const
{
for (unsigned int i=0; i<m_classes.GetCount(); i++)
if (m_classes[i].GetName() == classname)
return &m_classes[i];
return nullptr;
}
void Dump(const wxString& filename);
const wxClassArray& GetClasses() const
{ return m_classes; }
unsigned int GetClassesCount() const
{ return m_classes.GetCount(); }
unsigned int GetMethodCount() const
{
unsigned int methods = 0;
for (unsigned i=0; i < m_classes.GetCount(); i++)
methods += m_classes[i].GetMethodCount();
return methods;
}
// pass a full-path header filename:
wxClassPtrArray FindClassesDefinedIn(const wxString& headerfile) const;
void ShowProgress()
{ /*wxFprintf(stderr, ".");*/ }
// is this interface coherent?
bool CheckConsistency() const;
protected:
wxClassArray m_classes;
};
#if 1
// for wxTypeIdHashMap, keys == gccxml IDs and values == associated type strings
// e.g. key = "0x123f" and value = "const wxAboutDialogInfo&"
WX_DECLARE_HASH_MAP( unsigned long, wxString,
wxIntegerHash, wxIntegerEqual,
wxTypeIdHashMap );
WX_DECLARE_STRING_HASH_MAP( wxString, wxStringHashMap );
#else
#include <map>
typedef std::basic_string<char> stlString;
typedef std::map<unsigned long, stlString> wxTypeIdHashMap;
#endif
// ----------------------------------------------------------------------------
// Represents the real interface of wxWidgets
// Loads it from the XML produced by gccXML: http://www.gccxml.org
// ----------------------------------------------------------------------------
class wxXmlGccInterface : public wxXmlInterface
{
public:
wxXmlGccInterface()
{
// FIXME: we should retrieve this from the XML file!
// here we suppose the XML was created for the currently-running port
m_portId = wxPlatformInfo::Get().GetPortId();
}
bool Parse(const wxString& filename);
bool ParseMethod(const wxXmlNode *p,
const wxTypeIdHashMap& types,
wxMethod& m);
wxPortId GetInterfacePort() const
{ return m_portId; }
wxString GetInterfacePortName() const
{ return wxPlatformInfo::GetPortIdName(m_portId, false); }
protected:
// the port for which the gcc XML was generated
wxPortId m_portId;
};
// ----------------------------------------------------------------------------
// Represents the interface of the doxygen headers of wxWidgets
// Loads it from the XML produced by Doxygen: http://www.doxygen.org
// ----------------------------------------------------------------------------
class wxXmlDoxygenInterface : public wxXmlInterface
{
public:
wxXmlDoxygenInterface() {}
// !!SPEEDUP-TODO!!
// Using wxXmlDocument::Load as is, the entire XML file is parsed
// and an entire tree of wxXmlNodes is built in memory.
// We need however only small portions of the Doxygen-generated XML: to speedup the
// processing we could detach the expat callbacks when we detect the beginning of a
// node we're not interested about, or just don't create a wxXmlNode for it!
// This needs a modification of wxXml API.
bool Parse(const wxString& filename);
bool ParseCompoundDefinition(const wxString& filename);
bool ParseMethod(const wxXmlNode*, wxMethod&, wxString& header);
// this class can take advantage of the preprocessor output to give
// a minor number of false positive warnings in the final comparison
void AddPreprocessorValue(const wxString& name, const wxString& val)
{ m_preproc[name]=val; }
protected:
wxStringHashMap m_preproc;
};
#endif // _XMLPARSER_H_

View File

@@ -0,0 +1,73 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
include ../build/msw/config.gcc
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
MAKEARGS = LINK_DLL_FLAGS="$(LINK_DLL_FLAGS)" \
LINK_MODULE_FLAGS="$(LINK_MODULE_FLAGS)" CC="$(CC)" CXX="$(CXX)" \
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
LDFLAGS="$(LDFLAGS)" CPP="$(CPP)" SHARED="$(SHARED)" \
TOOLKIT_VERSION="$(TOOLKIT_VERSION)" WXUNIV="$(WXUNIV)" BUILD="$(BUILD)" \
DEBUG_INFO="$(DEBUG_INFO)" DEBUG_FLAG="$(DEBUG_FLAG)" \
MONOLITHIC="$(MONOLITHIC)" USE_GUI="$(USE_GUI)" USE_HTML="$(USE_HTML)" \
USE_WEBVIEW="$(USE_WEBVIEW)" \
USE_WEBVIEW_CHROMIUM="$(USE_WEBVIEW_CHROMIUM)" USE_MEDIA="$(USE_MEDIA)" \
USE_XML="$(USE_XML)" USE_XRC="$(USE_XRC)" USE_AUI="$(USE_AUI)" \
USE_RIBBON="$(USE_RIBBON)" USE_PROPGRID="$(USE_PROPGRID)" \
USE_RICHTEXT="$(USE_RICHTEXT)" USE_STC="$(USE_STC)" \
USE_OPENGL="$(USE_OPENGL)" USE_QA="$(USE_QA)" \
USE_EXCEPTIONS="$(USE_EXCEPTIONS)" USE_RTTI="$(USE_RTTI)" \
USE_DPI_AWARE_MANIFEST="$(USE_DPI_AWARE_MANIFEST)" \
USE_THREADS="$(USE_THREADS)" USE_CAIRO="$(USE_CAIRO)" \
OFFICIAL_BUILD="$(OFFICIAL_BUILD)" VENDOR="$(VENDOR)" \
WX_FLAVOUR="$(WX_FLAVOUR)" WX_LIB_FLAVOUR="$(WX_LIB_FLAVOUR)" CFG="$(CFG)" \
RUNTIME_LIBS="$(RUNTIME_LIBS)" WINDRES="$(WINDRES)"
### Conditionally set variables: ###
### Targets: ###
all: helpview hhp2cached ifacecheck screenshotgen wxrc
clean:
-if exist .\*.o del .\*.o
-if exist .\*.d del .\*.d
$(MAKE) -C helpview\src -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C hhp2cached -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C ifacecheck\src -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C screenshotgen\src -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C wxrc -f makefile.gcc $(MAKEARGS) clean
helpview:
$(MAKE) -C helpview\src -f makefile.gcc $(MAKEARGS) all
hhp2cached:
$(MAKE) -C hhp2cached -f makefile.gcc $(MAKEARGS) all
ifacecheck:
$(MAKE) -C ifacecheck\src -f makefile.gcc $(MAKEARGS) all
screenshotgen:
$(MAKE) -C screenshotgen\src -f makefile.gcc $(MAKEARGS) all
wxrc:
$(MAKE) -C wxrc -f makefile.gcc $(MAKEARGS) all
.PHONY: all clean helpview hhp2cached ifacecheck screenshotgen wxrc
SHELL := $(COMSPEC)
# Dependencies tracking:
-include ./*.d

View File

@@ -0,0 +1,87 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
!include <../build/msw/config.vc>
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CPP="$(CPP)" SHARED="$(SHARED)" \
TOOLKIT_VERSION="$(TOOLKIT_VERSION)" WXUNIV="$(WXUNIV)" BUILD="$(BUILD)" \
TARGET_CPU="$(TARGET_CPU)" VISUALSTUDIOVERSION="$(VISUALSTUDIOVERSION)" \
VISUALSTUDIOPLATFORM="$(VISUALSTUDIOPLATFORM)" DEBUG_INFO="$(DEBUG_INFO)" \
DEBUG_FLAG="$(DEBUG_FLAG)" DEBUG_RUNTIME_LIBS="$(DEBUG_RUNTIME_LIBS)" \
MONOLITHIC="$(MONOLITHIC)" USE_GUI="$(USE_GUI)" USE_HTML="$(USE_HTML)" \
USE_WEBVIEW="$(USE_WEBVIEW)" \
USE_WEBVIEW_CHROMIUM="$(USE_WEBVIEW_CHROMIUM)" USE_MEDIA="$(USE_MEDIA)" \
USE_XML="$(USE_XML)" USE_XRC="$(USE_XRC)" USE_AUI="$(USE_AUI)" \
USE_RIBBON="$(USE_RIBBON)" USE_PROPGRID="$(USE_PROPGRID)" \
USE_RICHTEXT="$(USE_RICHTEXT)" USE_STC="$(USE_STC)" \
USE_OPENGL="$(USE_OPENGL)" USE_QA="$(USE_QA)" \
USE_EXCEPTIONS="$(USE_EXCEPTIONS)" USE_RTTI="$(USE_RTTI)" \
USE_DPI_AWARE_MANIFEST="$(USE_DPI_AWARE_MANIFEST)" \
USE_THREADS="$(USE_THREADS)" USE_CAIRO="$(USE_CAIRO)" \
OFFICIAL_BUILD="$(OFFICIAL_BUILD)" VENDOR="$(VENDOR)" \
WX_FLAVOUR="$(WX_FLAVOUR)" WX_LIB_FLAVOUR="$(WX_LIB_FLAVOUR)" CFG="$(CFG)" \
RUNTIME_LIBS="$(RUNTIME_LIBS)"
### Conditionally set variables: ###
### Targets: ###
all: sub_helpview sub_hhp2cached sub_ifacecheck sub_screenshotgen sub_wxrc
clean:
-if exist .\*.obj del .\*.obj
-if exist .\*.res del .\*.res
-if exist .\*.pch del .\*.pch
cd helpview\src
$(MAKE) -f makefile.vc $(MAKEARGS) clean
cd "$(MAKEDIR)"
cd hhp2cached
$(MAKE) -f makefile.vc $(MAKEARGS) clean
cd "$(MAKEDIR)"
cd ifacecheck\src
$(MAKE) -f makefile.vc $(MAKEARGS) clean
cd "$(MAKEDIR)"
cd screenshotgen\src
$(MAKE) -f makefile.vc $(MAKEARGS) clean
cd "$(MAKEDIR)"
cd wxrc
$(MAKE) -f makefile.vc $(MAKEARGS) clean
cd "$(MAKEDIR)"
sub_helpview:
cd helpview\src
$(MAKE) -f makefile.vc $(MAKEARGS) all
cd "$(MAKEDIR)"
sub_hhp2cached:
cd hhp2cached
$(MAKE) -f makefile.vc $(MAKEARGS) all
cd "$(MAKEDIR)"
sub_ifacecheck:
cd ifacecheck\src
$(MAKE) -f makefile.vc $(MAKEARGS) all
cd "$(MAKEDIR)"
sub_screenshotgen:
cd screenshotgen\src
$(MAKE) -f makefile.vc $(MAKEARGS) all
cd "$(MAKEDIR)"
sub_wxrc:
cd wxrc
$(MAKE) -f makefile.vc $(MAKEARGS) all
cd "$(MAKEDIR)"

View File

@@ -0,0 +1,7 @@
all:
cd src; $(MAKE)
clean:
cd src; $(MAKE) clean

View File

@@ -0,0 +1,51 @@
wxWidgets Controls Screenshot Generator
=======================================
Author: Utensil Candel (Email: UtensilCandel at GMail dot com)
Licence: wxWindows licence
Thanks: Francesco Montorsi, Bryan Petty, Auria, Jorg and wxForum
This utility is developed to automatically generate screenshots of the wxWidgets
controls for use in wxWidgets documentation.
The main part of the GUI (guiframe.h/guiframe.cpp) was generated with wxFormBuilder
(http://wxformbuilder.org/), a powerful cross-platform open-source RAD tool. Now its
trace is removed so we can maintain the code without using it.
===User Guide: How To Use==
The screenshots will be generated under sub-directory "screenshots" silently.
Please monitor this folder before taking screenshots using "File->Open screenshots folder".
1) The menu "Capture->Full screen" can take a screeshot for the fullscreen. It's designed
for testing purpose only.
2) The menu "Capture->Regions<Begin>" and "Capture->Regions<End>" was the semi-auto part,
and now it's deprecated and will be removed soon.
3) Finally the full-auto mode: "Capture->Capture All" or Ctrl+Alt+A, follow the instructions
and all the screenshots will be generated correctly under the subdirectory "screenshots".
==Developer Guide: How To Add More Controls==
(Coming soon)
==To-do List==
1) Remove wxAuiNoteBook related lagacy codes, which is no longer useful;
2) Refactor the GUI code, which was generated by wxFormBuilder, but it's messy for human to
maintain;
3) Remove the class CtrlMaskOut since semi-auto part of this utility is no longer needed.
4) Clearify the interface of class AutoCaptureMechanism and document how to add a new control
that needs to take screenshots, and how to adjust it to avoid bugs in wxRTTI system and
wxWindow::GetScreenRect();
5) Make this utility easier to configure;
6) Add test functionality to confirm bugs in wxRTTI system and wxWindow::GetScreenRect().

View File

@@ -0,0 +1,272 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
@MAKE_SET@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
INSTALL = @INSTALL@
EXEEXT = @EXEEXT@
WINDRES = @WINDRES@
STRIP = @STRIP@
NM = @NM@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DIR = @INSTALL_DIR@
BK_DEPS = @BK_DEPS@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
bindir = @bindir@
LIBS = @LIBS@
LDFLAGS_GUI = @LDFLAGS_GUI@
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
USE_DPI_AWARE_MANIFEST = @USE_DPI_AWARE_MANIFEST@
WX_LIB_FLAVOUR = @WX_LIB_FLAVOUR@
TOOLKIT = @TOOLKIT@
TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@
TOOLKIT_VERSION = @TOOLKIT_VERSION@
TOOLCHAIN_FULLNAME = @TOOLCHAIN_FULLNAME@
EXTRALIBS = @EXTRALIBS@
EXTRALIBS_XML = @EXTRALIBS_XML@
EXTRALIBS_HTML = @EXTRALIBS_HTML@
EXTRALIBS_GUI = @EXTRALIBS_GUI@
WX_CPPFLAGS = @WX_CPPFLAGS@
WX_CXXFLAGS = @WX_CXXFLAGS@
WX_LDFLAGS = @WX_LDFLAGS@
HOST_SUFFIX = @HOST_SUFFIX@
DYLIB_RPATH_FLAG = @DYLIB_RPATH_FLAG@
HEADER_PAD_OPTION = @HEADER_PAD_OPTION@
wx_top_builddir = @wx_top_builddir@
### Variables: ###
DESTDIR =
WX_RELEASE = 3.3
WX_VERSION = $(WX_RELEASE).1
LIBDIRNAME = $(wx_top_builddir)/lib
SCREENSHOTGEN_CXXFLAGS = $(WX_CPPFLAGS) -D__WX$(TOOLKIT)__ \
$(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
$(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) -I$(srcdir) $(__DLLFLAG_p) \
-I$(srcdir)/../../../samples $(WX_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS)
SCREENSHOTGEN_OBJECTS = \
screenshotgen_screenshot_app.o \
screenshotgen_screenshot_main.o \
screenshotgen_guiframe.o \
screenshotgen_customcombo.o \
screenshotgen_autocapture.o \
$(__screenshotgen___win32rc)
### Conditionally set variables: ###
@COND_DEPS_TRACKING_0@CXXC = $(CXX)
@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX)
@COND_USE_GUI_0@PORTNAME = base
@COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
@COND_TOOLKIT_MAC@WXBASEPORT = _carbon
@COND_BUILD_debug@WXDEBUGFLAG = d
@COND_WXUNIV_1@WXUNIVNAME = univ
@COND_MONOLITHIC_0@EXTRALIBS_FOR_BASE = $(EXTRALIBS)
@COND_MONOLITHIC_1@EXTRALIBS_FOR_BASE = $(EXTRALIBS) \
@COND_MONOLITHIC_1@ $(EXTRALIBS_XML) $(EXTRALIBS_GUI)
@COND_MONOLITHIC_0@EXTRALIBS_FOR_GUI = $(EXTRALIBS_GUI)
@COND_MONOLITHIC_1@EXTRALIBS_FOR_GUI =
@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
@COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = --define __WXUNIVERSAL__
@COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
@COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p_1 = --define wxDEBUG_LEVEL=0
@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_1 = --define wxNO_EXCEPTIONS
@COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI
@COND_USE_RTTI_0@__RTTI_DEFINE_p_1 = --define wxNO_RTTI
@COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS
@COND_USE_THREADS_0@__THREAD_DEFINE_p_1 = --define wxNO_THREADS
@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL
@COND_SHARED_1@__DLLFLAG_p_1 = --define WXUSINGDLL
@COND_PLATFORM_WIN32_1@__WIN32_DPI_MANIFEST_p = \
@COND_PLATFORM_WIN32_1@ --define \
@COND_PLATFORM_WIN32_1@ wxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST)
COND_PLATFORM_OS2_1___screenshotgen___os2_emxbindcmd = $(NM) \
screenshotgen$(EXEEXT) | if grep -q pmwin.763 ; then emxbind -ep \
screenshotgen$(EXEEXT) ; fi
@COND_PLATFORM_OS2_1@__screenshotgen___os2_emxbindcmd = $(COND_PLATFORM_OS2_1___screenshotgen___os2_emxbindcmd)
@COND_TOOLKIT_MSW@__RCDEFDIR_p = --include-dir \
@COND_TOOLKIT_MSW@ $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME)
@COND_PLATFORM_MACOSX_1@__screenshotgen_app_Contents_PkgInfo___depname \
@COND_PLATFORM_MACOSX_1@ = screenshotgen.app/Contents/PkgInfo
@COND_PLATFORM_MACOSX_1@__screenshotgen_bundle___depname \
@COND_PLATFORM_MACOSX_1@ = screenshotgen_bundle
@COND_TOOLKIT_MAC@____screenshotgen_BUNDLE_TGT_REF_DEP = \
@COND_TOOLKIT_MAC@ $(__screenshotgen_app_Contents_PkgInfo___depname)
@COND_TOOLKIT_OSX_CARBON@____screenshotgen_BUNDLE_TGT_REF_DEP \
@COND_TOOLKIT_OSX_CARBON@ = \
@COND_TOOLKIT_OSX_CARBON@ $(__screenshotgen_app_Contents_PkgInfo___depname)
@COND_TOOLKIT_OSX_COCOA@____screenshotgen_BUNDLE_TGT_REF_DEP \
@COND_TOOLKIT_OSX_COCOA@ = \
@COND_TOOLKIT_OSX_COCOA@ $(__screenshotgen_app_Contents_PkgInfo___depname)
@COND_TOOLKIT_OSX_IPHONE@____screenshotgen_BUNDLE_TGT_REF_DEP \
@COND_TOOLKIT_OSX_IPHONE@ = \
@COND_TOOLKIT_OSX_IPHONE@ $(__screenshotgen_app_Contents_PkgInfo___depname)
@COND_TOOLKIT_COCOA@____screenshotgen_BUNDLE_TGT_REF_DEP \
@COND_TOOLKIT_COCOA@ = $(__screenshotgen_app_Contents_PkgInfo___depname)
COND_MONOLITHIC_0___WXLIB_AUI_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_AUI_p = $(COND_MONOLITHIC_0___WXLIB_AUI_p)
COND_MONOLITHIC_0___WXLIB_RICHTEXT_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_RICHTEXT_p = $(COND_MONOLITHIC_0___WXLIB_RICHTEXT_p)
COND_MONOLITHIC_0___WXLIB_HTML_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_HTML_p = $(COND_MONOLITHIC_0___WXLIB_HTML_p)
COND_MONOLITHIC_0___WXLIB_XML_p = \
-lwx_base$(WXBASEPORT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_XML_p = $(COND_MONOLITHIC_0___WXLIB_XML_p)
COND_MONOLITHIC_0___WXLIB_CORE_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p)
COND_MONOLITHIC_0___WXLIB_BASE_p = \
-lwx_base$(WXBASEPORT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
@COND_PLATFORM_WIN32_1@__screenshotgen___win32rc = \
@COND_PLATFORM_WIN32_1@ screenshotgen_screenshotgen_rc.o
COND_MONOLITHIC_1___WXLIB_MONO_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
@COND_MONOLITHIC_1_USE_STC_1@__LIB_SCINTILLA_IF_MONO_p \
@COND_MONOLITHIC_1_USE_STC_1@ = $(__LIB_SCINTILLA_p)
@COND_USE_STC_1@__LIB_SCINTILLA_p = \
@COND_USE_STC_1@ -lwxscintilla$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_1_USE_STC_1@__LIB_LEXILLA_IF_MONO_p = $(__LIB_LEXILLA_p)
@COND_USE_STC_1@__LIB_LEXILLA_p = \
@COND_USE_STC_1@ -lwxlexilla$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_USE_GUI_1_wxUSE_LIBTIFF_builtin@__LIB_TIFF_p \
@COND_USE_GUI_1_wxUSE_LIBTIFF_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBTIFF_builtin@ -lwxtiff$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_USE_GUI_1_wxUSE_LIBJPEG_builtin@__LIB_JPEG_p \
@COND_USE_GUI_1_wxUSE_LIBJPEG_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBJPEG_builtin@ -lwxjpeg$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@__LIB_PNG_p \
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@ -lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_USE_GUI_1_wxUSE_LIBWEBP_builtin@__LIB_WEBP_p \
@COND_USE_GUI_1_wxUSE_LIBWEBP_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBWEBP_builtin@ -lwxwebp$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_ZLIB_builtin@__LIB_ZLIB_p = \
@COND_wxUSE_ZLIB_builtin@ -lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_REGEX_builtin@__LIB_REGEX_p = \
@COND_wxUSE_REGEX_builtin@ -lwxregexu$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_EXPAT_builtin@__LIB_EXPAT_p = \
@COND_wxUSE_EXPAT_builtin@ -lwxexpat$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
### Targets: ###
all: screenshotgen$(EXEEXT) $(__screenshotgen_bundle___depname) bitmaps xml
install: install_screenshotgen
uninstall: uninstall_screenshotgen
install-strip: install
$(STRIP) $(DESTDIR)$(bindir)/screenshotgen$(EXEEXT)
clean:
rm -rf ./.deps ./.pch
rm -f ./*.o
rm -f screenshotgen$(EXEEXT)
rm -rf screenshotgen.app
distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch Makefile
screenshotgen$(EXEEXT): $(SCREENSHOTGEN_OBJECTS) $(__screenshotgen___win32rc)
$(CXX) -o $@ $(SCREENSHOTGEN_OBJECTS) -L$(LIBDIRNAME) $(DYLIB_RPATH_FLAG) $(LDFLAGS_GUI) $(HEADER_PAD_OPTION) $(LDFLAGS) $(WX_LDFLAGS) $(__WXLIB_AUI_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_HTML_p) $(EXTRALIBS_HTML) $(__WXLIB_XML_p) $(EXTRALIBS_XML) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_WEBP_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
$(__screenshotgen___os2_emxbindcmd)
@COND_PLATFORM_MACOSX_1@screenshotgen.app/Contents/PkgInfo: screenshotgen$(EXEEXT) $(top_srcdir)/src/osx/carbon/Info.plist.in $(top_srcdir)/src/osx/carbon/wxmac.icns
@COND_PLATFORM_MACOSX_1@ mkdir -p screenshotgen.app/Contents
@COND_PLATFORM_MACOSX_1@ mkdir -p screenshotgen.app/Contents/MacOS
@COND_PLATFORM_MACOSX_1@ mkdir -p screenshotgen.app/Contents/Resources
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@ sed -e "s/\$${MACOSX_BUNDLE_GUI_IDENTIFIER}/org.wxwidgets.screenshotgen/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_EXECUTABLE_NAME}/screenshotgen/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_BUNDLE_NAME}/screenshotgen/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_COPYRIGHT}/Copyright 2002-2025 wxWidgets/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_BUNDLE_VERSION}/$(WX_VERSION)/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_INFO_STRING}/screenshotgen version $(WX_VERSION), (c) 2002-2025 wxWidgets/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_LONG_VERSION_STRING}/$(WX_VERSION), (c) 2002-2025 wxWidgets/" \
@COND_PLATFORM_MACOSX_1@ -e "s/\$${MACOSX_BUNDLE_SHORT_VERSION_STRING}/$(WX_RELEASE)/" \
@COND_PLATFORM_MACOSX_1@ $(top_srcdir)/src/osx/carbon/Info.plist.in >screenshotgen.app/Contents/Info.plist
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@ /bin/echo "APPL????" >screenshotgen.app/Contents/PkgInfo
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@ ln -f screenshotgen$(EXEEXT) screenshotgen.app/Contents/MacOS/screenshotgen
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@
@COND_PLATFORM_MACOSX_1@ cp -f $(top_srcdir)/src/osx/carbon/wxmac.icns screenshotgen.app/Contents/Resources/wxmac.icns
@COND_PLATFORM_MACOSX_1@screenshotgen_bundle: $(____screenshotgen_BUNDLE_TGT_REF_DEP)
install_screenshotgen: screenshotgen$(EXEEXT)
$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) screenshotgen$(EXEEXT) $(DESTDIR)$(bindir)
uninstall_screenshotgen:
rm -f $(DESTDIR)$(bindir)/screenshotgen$(EXEEXT)
bitmaps:
@mkdir -p ./bitmaps
@for f in wxwin32x32.png bell.png sound.png dropbuth.png dropbutn.png dropbutp.png throbber.gif; do \
if test ! -f ./bitmaps/$$f -a ! -d ./bitmaps/$$f ; \
then x=yep ; \
else x=`find $(srcdir)/bitmaps/$$f -newer ./bitmaps/$$f -print` ; \
fi; \
case "$$x" in ?*) \
cp -pRf $(srcdir)/bitmaps/$$f ./bitmaps ;; \
esac; \
done
xml:
@mkdir -p .
@for f in richtext.xml; do \
if test ! -f ./$$f -a ! -d ./$$f ; \
then x=yep ; \
else x=`find $(srcdir)/$$f -newer ./$$f -print` ; \
fi; \
case "$$x" in ?*) \
cp -pRf $(srcdir)/$$f . ;; \
esac; \
done
screenshotgen_screenshot_app.o: $(srcdir)/screenshot_app.cpp
$(CXXC) -c -o $@ $(SCREENSHOTGEN_CXXFLAGS) $(srcdir)/screenshot_app.cpp
screenshotgen_screenshot_main.o: $(srcdir)/screenshot_main.cpp
$(CXXC) -c -o $@ $(SCREENSHOTGEN_CXXFLAGS) $(srcdir)/screenshot_main.cpp
screenshotgen_guiframe.o: $(srcdir)/guiframe.cpp
$(CXXC) -c -o $@ $(SCREENSHOTGEN_CXXFLAGS) $(srcdir)/guiframe.cpp
screenshotgen_customcombo.o: $(srcdir)/customcombo.cpp
$(CXXC) -c -o $@ $(SCREENSHOTGEN_CXXFLAGS) $(srcdir)/customcombo.cpp
screenshotgen_autocapture.o: $(srcdir)/autocapture.cpp
$(CXXC) -c -o $@ $(SCREENSHOTGEN_CXXFLAGS) $(srcdir)/autocapture.cpp
screenshotgen_screenshotgen_rc.o: $(srcdir)/screenshotgen.rc
$(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) --include-dir $(srcdir) $(__DLLFLAG_p_1) $(__WIN32_DPI_MANIFEST_p) --include-dir $(srcdir)/../../../samples $(__RCDEFDIR_p) --include-dir $(top_srcdir)/include
# Include dependency info, if present:
@IF_GNU_MAKE@-include ./.deps/*.d
.PHONY: all install uninstall clean distclean screenshotgen_bundle \
install_screenshotgen uninstall_screenshotgen bitmaps xml

View File

@@ -0,0 +1,359 @@
/////////////////////////////////////////////////////////////////////////////
// Name: autocapture.cpp
// Purpose: Implement wxCtrlMaskOut class
// Author: Utensil Candel (UtensilCandel@@gmail.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#include "autocapture.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/bitmap.h"
#include "wx/filename.h"
#include "wx/notebook.h"
#include <ctime>
#ifdef __WXMAC__
#include <cstring>
#endif
// ----------------------------------------------------------------------------
// AutoCaptureMechanism
// ----------------------------------------------------------------------------
AutoCaptureMechanism::AutoCaptureMechanism(wxNotebook *notebook,
int flag, int margin)
: m_notebook(notebook),
m_flag(flag),
m_margin(margin),
m_grid(nullptr)
{
}
/* static */
wxString AutoCaptureMechanism::default_dir = wxT("screenshots");
/* static */
wxString AutoCaptureMechanism::GetDefaultDirectoryAbsPath()
{
return wxFileName::DirName(GetDefaultDirectory()).GetAbsolutePath();
}
/* static */
void AutoCaptureMechanism::Delay(int seconds)
{
// TODO: Switch this to use wxTimer.
// Wait for 3 seconds
clock_t start = clock();
while ( clock() - start < (clock_t)CLOCKS_PER_SEC * seconds)
wxYieldIfNeeded();
}
/* static */
bool AutoCaptureMechanism::Capture(wxBitmap* bitmap, int x, int y,
int width, int height, int delay)
{
// Somehow wxScreenDC.Blit() doesn't work under Mac for now. Here is a trick.
#ifdef __WXMAC__
// wxExecute(wxT("screencapture -x ") + tempfile, wxEXEC_SYNC);
char captureCommand[80] =""; // a reasonable max size is 80
sprintf(captureCommand, "sleep %d;%s", delay, "screencapture -x /tmp/wx_screen_capture.png");
system(captureCommand);
if(delay) Delay(delay);
wxBitmap fullscreen;
do
{
fullscreen = wxBitmap(wxT("/tmp/wx_screen_capture.png"), wxBITMAP_TYPE_PNG);
}
while(!fullscreen.IsOk());
*bitmap = fullscreen.GetSubBitmap(wxRect(x, y, width, height));
// to prevent loading the old screenshot next time
system("rm /tmp/wx_screen_capture.png");
return true;
#else // Under other paltforms, take a real screenshot
if(delay) Delay(delay);
// Create a DC for the whole screen area
wxScreenDC dcScreen;
bitmap->Create(width, height);
// Create a memory DC that will be used for actually taking the screenshot
wxMemoryDC memDC;
memDC.SelectObject((*bitmap));
memDC.Clear();
// Blit (in this case copy) the actual screen on the memory DC
// and thus the Bitmap
memDC.Blit( 0, // Copy to this X coordinate
0, // Copy to this Y coordinate
width, // Copy this width
height, // Copy this height
&dcScreen, // From where do we copy?
x, // What's the X offset in the original DC?
y // What's the Y offset in the original DC?
);
// Select the Bitmap out of the memory DC by selecting a new
// uninitialized Bitmap
memDC.SelectObject(wxNullBitmap);
#endif // #ifdef __WXMAC__
return true;
}
/* static */
bool AutoCaptureMechanism::Capture(wxBitmap* bitmap, wxRect rect, int delay)
{
wxPoint origin = rect.GetPosition();
return Capture(bitmap, origin.x, origin.y, rect.GetWidth(), rect.GetHeight(), delay);
}
/* static */
void AutoCaptureMechanism::Save(wxBitmap* screenshot, const wxString& fileName)
{
// make sure default_dir exists
if (!wxDirExists(default_dir))
wxMkdir(default_dir);
wxFileName fullFileName(default_dir, "appear-" + fileName +
"-" + wxPlatformInfo::Get().GetPortIdShortName() + ".png");
// do not overwrite already existing files with this name
while (fullFileName.FileExists())
fullFileName.SetName(fullFileName.GetName() + "_");
// save the screenshot as a PNG
screenshot->SaveFile(fullFileName.GetFullPath(), wxBITMAP_TYPE_PNG);
}
void AutoCaptureMechanism::CaptureAll()
{
// start from the first page
m_notebook->SetSelection(0);
wxYield();
for (ControlList::iterator it = m_controlList.begin();
it != m_controlList.end();
++it)
{
Control &ctrl = *it;
if (ctrl.flag == AJ_TurnPage) // Turn to next page
{
m_notebook->SetSelection(m_notebook->GetSelection() + 1);
wxYield();
continue;
}
// create the screenshot
wxBitmap screenshot(1, 1);
Capture(&screenshot, ctrl);
if(ctrl.flag & AJ_Union)
{
// union screenshots until AJ_UnionEnd
do
{
++it;
it->name = ctrl.name; //preserving the name
wxBitmap screenshot2(1, 1);
Capture(&screenshot2, *it);
wxBitmap combined(1, 1);
Union(&screenshot, &screenshot2, &combined);
screenshot = combined;
}
while(!(it->flag & AJ_UnionEnd));
}
// and save it
Save(&screenshot, ctrl.name);
}
}
bool AutoCaptureMechanism::Capture(wxBitmap* bitmap, Control& ctrl)
{
// no manual specification for the control name
// or name adjustment is disabled globally
if (ctrl.name == wxT("") || m_flag & AJ_DisableNameAdjust)
{
// Get its name from wxRTTI
ctrl.name = ctrl.ctrl->GetClassInfo()->GetClassName();
}
int choice = wxNO;
wxRect rect = GetRect(ctrl.ctrl, ctrl.flag);
if (ctrl.flag & AJ_Dropdown && !(m_flag & AJ_DisableDropdown))
{
// for drop-down controls we need the help of the user
wxString caption = _("Drop-down screenshot...");
wxString msg =
wxString::Format(_("Do you wish to capture the drop-down list of '%s' ?\n\n If YES, please drop down the list of '%s' in 5 seconds after closing this message box.\n If NO, the screenshot for this control won't contain its drop-down list."),
ctrl.name, ctrl.name);
choice = wxMessageBox(msg, caption, wxYES_NO, m_notebook);
if (choice == wxYES)
{
//A little hint
ctrl.ctrl->SetCursor(wxCursor(wxCURSOR_HAND));
// Do some rect adjust so it can include the dropdown list
// This adjust isn't pretty, but it works fine on all three paltforms.
// Looking forward to a better solution
int h = rect.GetHeight();
rect.SetHeight(h * 4);
}
}
// cut off "wx" and change the name into lowercase.
// e.g. wxButton will have a name of "button" at the end
ctrl.name.StartsWith(wxT("wx"), &(ctrl.name));
ctrl.name.MakeLower();
// take the screenshot
Capture(bitmap, rect, (choice == wxYES)?5:0);
if (choice == wxYES) ctrl.ctrl->SetCursor(wxNullCursor);
if (ctrl.flag & AJ_RegionAdjust)
PutBack(ctrl.ctrl);
return true;
}
/* static */
bool AutoCaptureMechanism::Union(wxBitmap* top, wxBitmap* bottom, wxBitmap* result)
{
int w1, w2, h1, h2, w, h;
w1 = top->GetWidth();
w2 = bottom->GetWidth();
h1 = top->GetHeight();
h2 = bottom->GetHeight();
const int gap_between = 20;
w = (w1 >= w2) ? w1 : w2;
h = h1 + h2 + gap_between;
result->Create(w, h);
wxMemoryDC dstDC;
dstDC.SelectObject((*result));
dstDC.SetBrush(*wxWHITE_BRUSH);
dstDC.Clear();
dstDC.DrawBitmap((*top), 0, 0);
dstDC.DrawBitmap((*bottom), 0, h1 + gap_between);
dstDC.SelectObject(wxNullBitmap);
return true;
}
wxRect AutoCaptureMechanism::GetRect(wxWindow* ctrl, int flag)
{
if( (!(m_flag & AJ_DisableRegionAdjust) && (flag & AJ_RegionAdjust))
|| (m_flag & AJ_AlwaysRegionAdjust) )
{
wxWindow * parent = ctrl->GetParent();
wxSizer * sizer = parent->GetSizer();
//The assertion won't fail if controls are still managed by wxSizer, and it's unlikely to
//change in the future.
wxASSERT_MSG(sizer,
"The GUI that AutoCaptureMechanism working with doesn't manage controls with wxSizer");
sizer->Detach(ctrl);
/*
+---------+-----------+---------+
| 0 | label | 1 |
+---------+-----------+---------+
| label | ctrl | label |
+---------+-----------+---------+
| 2 | label | 3 |
+---------+-----------+---------+
*/
m_grid = new wxFlexGridSizer(3, 3, m_margin, m_margin);
wxStaticText* l[4];
for (int i = 0; i < 4; ++i)
l[i] = new wxStaticText(parent, wxID_ANY, wxT(" "));
m_grid->Add(l[0]);
m_grid->Add(new wxStaticText(parent, wxID_ANY, wxT(" ")));
m_grid->Add(l[1]);
m_grid->Add(new wxStaticText(parent, wxID_ANY, wxT(" ")));
m_grid->Add(ctrl, 1, wxEXPAND);
m_grid->Add(new wxStaticText(parent, wxID_ANY, wxT(" ")));
m_grid->Add(l[2]);
m_grid->Add(new wxStaticText(parent, wxID_ANY, wxT(" ")));
m_grid->Add(l[3]);
sizer->Add(m_grid);
parent->SetSizer(sizer);
parent->Layout();
parent->Refresh();
wxYield();
return wxRect(l[0]->GetScreenRect().GetBottomRight(),
l[3]->GetScreenRect().GetTopLeft());
}
else
{
return ctrl->GetScreenRect().Inflate(m_margin);
}
}
void AutoCaptureMechanism::PutBack(wxWindow * ctrl)
{
if(!m_grid) return;
m_grid->Detach(ctrl);
wxSizerItemList children = m_grid->GetChildren();
for (wxSizerItemList::iterator it = children.begin(); it != children.end(); ++it)
{
wxSizerItem* item = *it;
if (item->IsWindow()) delete (*it)->GetWindow();
}
wxSizer * sizer = ctrl->GetParent()->GetSizer();
//The assertion won't fail if controls are still managed by wxSizer, and it's unlikely to
//change in the future.
wxASSERT_MSG(sizer,
"The GUI that AutoCaptureMechanism working with doesn't manage controls with wxSizer");
sizer->Detach(m_grid);
delete m_grid;
m_grid = nullptr;
sizer->Add(ctrl);
}

View File

@@ -0,0 +1,435 @@
/////////////////////////////////////////////////////////////////////////////
// Name: autocapture.h
// Purpose: Defines the AutoCaptureMechanism class
// Author: Utensil Candel (UtensilCandel@@gmail.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _AUTOCAPTURE_H_
#define _AUTOCAPTURE_H_
#include "wx/beforestd.h"
#include <vector>
#include "wx/afterstd.h"
#include "wx/gdicmn.h"
class wxBitmap;
class wxFlexGridSizer;
class wxWindow;
class wxNotebook;
/**
GlobalAdjustFlags works with AutoCaptureMechanism's constructor, to
configure auto-adjustments of all controls.
They are used to make AutoCaptureMechanism more configurable and provide a
fallback to detect the bugs that the adjustments intended to avoid.
@see AdjustFlags
*/
enum GlobalAdjustFlags
{
/**
This is the default. All adjustments instructed in
AutoCaptureMechanism::RegisterControl() will be performed.
*/
AJ_NormalAll = 0,
/**
Disable region adjustment for all controls.
*/
AJ_DisableRegionAdjust = 1 << 0,
/**
Enable region adjustment for all controls.
If AJ_DisableRegionAdjust and AJ_AlwaysRegionAdjust are both specified,
current implementation will ignore AJ_DisableRegionAdjust.
*/
AJ_AlwaysRegionAdjust = 1 << 1,
/**
Disable name adjustment for all controls.
*/
AJ_DisableNameAdjust = 1 << 2,
/**
For all the "Drop-down Controls", e.g. wxChoice, do not prompt the user
about whether to capture their drop-down state, and always capture only
its non-drop-down state.
*/
AJ_DisableDropdown = 1 << 3
};
/**
AdjustFlags works with AutoCaptureMechanism::RegisterControl() to specify
how to adjust the screenshot of the current control.
They are used to avoid bugs, look better or interact with user etc.
@see GlobalAdjustFlags
*/
enum AdjustFlags
{
/**
This is the default. Perform no adjustment for this control.
*/
AJ_Normal = 0,
/**
Perform region adjustment for this control.
On some platforms and for some controls, wxWindow::GetScreenRect() will
return a smaller or deflected region. In these cases, the screenshots
we get are incomplete. It's recommended for everyone to fix the
controls' code, yet this flag provides a workaround to get a guaranteed
correct region without using wxWindow::GetScreenRect().
This workaround ("label trick") is inspired by (or say stolen from)
Auria's work.
*/
AJ_RegionAdjust = 1 << 0,
/**
This flag provides a way to capture the drop-down state of "Drop-down
Controls", e.g. wxChoice.
For all the "Drop-down Controls", prompt the user about whether to
capture their drop-down state, if the user chooses YES, he should drop
down the control in about 3 seconds and wait util it's captured in that
state.
*/
AJ_Dropdown = 1 << 1,
/**
This flag is used internally by RegisterPageTurn(). Don't use it
directly unless you know what you are doing.
*/
AJ_TurnPage = 1 << 2,
/**
This flag provides a functionality to union screenshots of different
modes/states of a control into one image. e.g. the single-line /
multi-line modes of a wxTextCtrl.
For a series of controls to be unioned, you should specify AJ_Union for
the first, and AJ_UnionEnd for the last. For the controls between them,
you can either specify AJ_Union or not.
The filename of the generated screenshot is the name of the first
control in the series.
*/
AJ_Union = 1 << 3,
/**
@see AJ_Union.
*/
AJ_UnionEnd = 1 << 4
};
/**
@class AutoCaptureMechanism
AutoCaptureMechanism provides an easy-to-use and adjustable facility to
take the screenshots for all controls fully automatically and correctly. It
also provides an advanced feature to union screenshots of different
states/modes of a control.
@section tag_filename_convention Screenshot File Name Convention
All screenshots are generated as PNG files. For a control named wxName, its
screenshot file name would be "name.png", e.g. "button.png" for wxButton.
This is the protocol with the doxygen document of wxWidgets.
By default, screenshots are generated under the subdirectory "screenshots"
of current working directory. During updating or adding new screenshots,
first make sure screenshots are generated correctly, and then copy them to
the "docs/doxygen/images" folder directly.
@section tag_gui_assumption The Assumption of GUI
Unfortunately, this class have an assumption about the structure of GUI: It
must have the following top-down structure:
wxNotebook->wxPanel->wxSizer->wxControl
That means, in the wxNotebook associated with this class, controls that
needs to be taken screenshots are placed on different panels(for grouping)
and laid out by wxSizers.
@section tag_tutorial Tutorial
In the construction, you should associate a wxNotebook with this class, in
that wxNotebook, controls that needs to be captured are placed on different
panels(for grouping).
When you register controls, you should do it in order: Register the
controls on the first panel(using RegisterControl()), and then register a
page turn(using RegisterPageTurn()), so this class can turn a page of the
wxNotebook to present the second page. And then you register the controls
on the second panel, then a page turn, and so on.
When you are done, simply call CaptureAll(), then screenshots of all
controls will be automatically generated.
@section tag_autoadjust Make Use of Auto Adjustments
First take a look at the document of RegisterControl(), enum AdjustFlags
and GlobalAdjustFlags.
And then, ScreenshotFrame::OnCaptureAllControls() is a good example of
making use of auto adjustment. Taking a look at it will get you started.
@section tag_developer_note Notes for Developers
@subsection tag_cnc CaptureAll() and Capture()
The implementation of Auto Adjustments is in CaptureAll() and Capture(),
the code is short, quite readable and well commented, please read the codes
before any modification.
If you need the class to do something special for you, consider introducing
a new flag and implement it in them. For an operation performed on multiple
controls, implement its logic in CaptureAll(), otherwise in the private
member Capture().
@subsection tag_yield_issue wxYield Issues
Not quite a good habit, but this class made a lot of use of wxYield() /
wxYieldIfNeeded(). They are used to ensure the update of GUI (e.g. the
page turn of wxNotebook) is done before any further screenshot-taking, or
to do the timing(in Delay()). Without their use, there would be subtle
bugs.
I've read documents about wxYield() and understand the down side of it
before using it. But I didn't find a better approach to do those things,
and I used them carefully. So please DO NOT remove any of these wxYield()s
unless you're sure that it won't cause problems on all of MS Windows
XP/Vista, Linux(Ubuntu/Fedora), Mac OS Tiger/Leopard. And please help me
to find a better approach, thank you :)
*/
class AutoCaptureMechanism
{
public:
/**
Constructor.
@param notebook
The wxNotebook associated with this class. Please see
@ref tag_gui_assumption and @ref tag_tutorial.
@param flag
It's one of or a combination of GlobalAdjustFlags, to disable /
enable some auto-adjustment for all controls.
@param margin
It's the margin around every control in the screenshots.
*/
AutoCaptureMechanism(wxNotebook *notebook,
int flag = AJ_NormalAll,
int margin = 5);
~AutoCaptureMechanism() { }
/**
Register a control and perform specified auto adjustments.
@param ctrl
The pointer to the control to be taken a screenshot.
@param name
If you find out that the screenshot for this control was generated
under an incorrect file name, specify @a name. e.g. for wxButton,
"wxButton" or "button" are both OK.
@param flag
If you end up with an a smaller or deflected screenshot, use
AJ_RegionAdjust.
If you want to capture the "drop-down" state of a "drop-down"
control, use AJ_Dropdown.
If you want to present different states of a control in one
screenshot, use AJ_Union and AJ_UnionEnd.
Please read the document of enum AdjustFlags, and notice that this
flag could be enabled / disabled by global flag GlobalAdjustFlags.
*/
void RegisterControl(wxWindow* ctrl,
wxString name = wxT(""),
int flag = AJ_Normal)
{
m_controlList.push_back(Control(ctrl, name, flag));
}
/**
Register a control and perform specifid auto adjustments.
This calls RegisterControl(wxWindow* ctrl, wxString name, int flag)
with an empty name. This is useful when you only want to auto-adjust
something other than name adjustment.
*/
void RegisterControl(wxWindow* ctrl, int flag)
{
RegisterControl(ctrl, wxT(""), flag);
}
/**
Register a page turn.
When you finished registering the controls on a panel, remember to
call it to turn the wxNotebook to the next panel.
*/
void RegisterPageTurn()
{
m_controlList.push_back(Control(0, wxT(""), AJ_TurnPage));
}
/**
Capture all registered controls of the associated wxNotebook.
*/
void CaptureAll();
/*
Static Members
*/
/**
Take a screenshot for the given region.
@param bitmap
Bitmap to save the screenshot to.
@param rect
Given rectangular region.
@param delay
Only useful for Mac, for fixing a delay bug. It seems that it
didn't fix the bug, so it might be removed soon.
*/
static bool Capture(wxBitmap* bitmap, wxRect rect, int delay = 0);
/**
Take a screenshot for the given region.
@see Capture(wxBitmap*,wxRect,int)
*/
static bool Capture(wxBitmap* bitmap,
int x, int y, int width, int height,
int delay = 0);
/**
Save the screenshot as the name of @a fileName in the default
directory.
@a fileName should be without ".png".
*/
static void Save(wxBitmap* screenshot, const wxString& fileName);
/**
Set the default directory where the screenshots will be generated.
*/
static void SetDefaultDirectory(const wxString& dir) { default_dir = dir; }
/**
Get the default directory where the screenshots will be generated.
*/
static wxString GetDefaultDirectory() { return default_dir; }
/**
Get the absolute path of the default directory where the screenshots
will be generated.
*/
static wxString GetDefaultDirectoryAbsPath();
private:
/*
Internal Data Structures
They might go public in future to provide reuse of ControlList.
*/
struct Control
{
Control() {}
Control(wxWindow * _ctrl, wxString _name, int _flag)
: ctrl(_ctrl), name(_name), flag(_flag) {}
wxWindow * ctrl;
wxString name;
int flag;
};
typedef std::vector<Control> ControlList;
/*
Internal Functions
They are only used to clearify the logic of some public functions and
it's nonsense to call them elsewhere.
*/
/*
Capture and auto adjust the control. Used by CaptureAll().
*/
bool Capture(wxBitmap* bitmap, Control& ctrl);
/*
Get the correct rectangular region that the control occupies. Used by
Capture(Control & ctrl).
If AJ_RegionAdjust is specified, it will use the "label trick" to
perform region auto adjustment.
The "label trick" is to reattach the control to a wxFlexGridSizer
m_grid, surround the control with labels and get the control's region
by label's positions. Just like this:
+---------+-----------+---------+
| 0 | label | 1 |
+---------+-----------+---------+
| label | ctrl | label |
+---------+-----------+---------+
| 2 | label | 3 |
+---------+-----------+---------+
So, there will be a side effect: the control is moved to a new
position. So after taking the screenshot, Capture(Control & ctrl)
should call PutBack(wxWindow * ctrl) to put it back.
If AJ_RegionAdjust isn't specified, it will simply call
wxWindow::GetScreenRect().
*/
wxRect GetRect(wxWindow* ctrl, int flag);
/*
Put the control back after the label trick used in GetRect(). Used by
Capture(Control & ctrl).
*/
void PutBack(wxWindow * ctrl);
/*
Union two screenshots in the vertical direction, and leave a gap
between the screenshots. Used by CaptureAll().
The gap is 20 pixels by default. Currently it isn't configurable.
*/
static bool Union(wxBitmap* top, wxBitmap* bottom, wxBitmap* result);
/*
Delay a few seconds without blocking GUI.
*/
static void Delay(int seconds);
/*
Data Members
*/
ControlList m_controlList;
wxNotebook* m_notebook;
int m_flag;
int m_margin;
wxFlexGridSizer* m_grid;
static wxString default_dir;
};
#endif // _AUTOCAPTURE_H_

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,187 @@
/////////////////////////////////////////////////////////////////////////////
// Name: customcombo.cpp
// Purpose: Implement some custom wxComboCtrls
// Author: Utensil Candel (UtensilCandel@@gmail.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// for all others, include the necessary headers
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#if !wxUSE_COMBOCTRL
#error "Please set wxUSE_COMBOCTRL to 1 and rebuild the library."
#endif
#include "customcombo.h"
wxBEGIN_EVENT_TABLE(ListViewComboPopup, wxListView)
EVT_MOTION(ListViewComboPopup::OnMouseMove)
// NOTE: Left down event is used instead of left up right now
// since MSW wxListCtrl doesn't seem to emit left ups
// consistently.
EVT_LEFT_DOWN(ListViewComboPopup::OnMouseClick)
wxEND_EVENT_TABLE()
wxBEGIN_EVENT_TABLE(TreeCtrlComboPopup, wxTreeCtrl)
EVT_MOTION(TreeCtrlComboPopup::OnMouseMove)
// NOTE: Left down event is used instead of left up right now
// since MSW wxTreeCtrl doesn't seem to emit left ups
// consistently.
EVT_LEFT_DOWN(TreeCtrlComboPopup::OnMouseClick)
wxEND_EVENT_TABLE()
// ----------------------------------------------------------------------------
// PenStyleComboBox
// ----------------------------------------------------------------------------
void PenStyleComboBox::OnDrawItem( wxDC& dc,
const wxRect& rect,
int item,
int flags ) const
{
if ( item == wxNOT_FOUND )
return;
wxRect r(rect);
r.Deflate(3);
r.height -= 2;
wxPenStyle penStyle = wxPENSTYLE_SOLID;
// if ( item == 1 )
// penStyle = wxPENSTYLE_TRANSPARENT;
// else if ( item == 2 )
// penStyle = wxPENSTYLE_DOT;
// else if ( item == 3 )
// penStyle = wxPENSTYLE_LONG_DASH;
// else if ( item == 4 )
// penStyle = wxPENSTYLE_SHORT_DASH;
if ( item == 0 )
penStyle = wxPENSTYLE_DOT_DASH;
else if ( item == 1 )
penStyle = wxPENSTYLE_BDIAGONAL_HATCH;
else if ( item == 2 )
penStyle = wxPENSTYLE_CROSSDIAG_HATCH;
// else if ( item == 8 )
// penStyle = wxPENSTYLE_FDIAGONAL_HATCH;
// else if ( item == 9 )
// penStyle = wxPENSTYLE_CROSS_HATCH;
// else if ( item == 10 )
// penStyle = wxPENSTYLE_HORIZONTAL_HATCH;
// else if ( item == 11 )
// penStyle = wxPENSTYLE_VERTICAL_HATCH;
wxPen pen( dc.GetTextForeground(), 3, penStyle );
// Get text colour as pen colour
dc.SetPen( pen );
if ( !(flags & wxODCB_PAINTING_CONTROL) )
{
dc.DrawText(GetString( item ),
r.x + 3,
(r.y + 0) + ( (r.height/2) - dc.GetCharHeight() )/2
);
dc.DrawLine( r.x+5, r.y+((r.height/4)*3), r.x+r.width - 5, r.y+((r.height/4)*3) );
}
else
{
dc.DrawLine( r.x+5, r.y+r.height/2, r.x+r.width - 5, r.y+r.height/2 );
}
}
void PenStyleComboBox::OnDrawBackground( wxDC& dc, const wxRect& rect,
int item, int flags ) const
{
// If item is selected or even, or we are painting the
// combo control itself, use the default rendering.
if ( (flags & (wxODCB_PAINTING_CONTROL|wxODCB_PAINTING_SELECTED)) ||
(item & 1) == 0 )
{
wxOwnerDrawnComboBox::OnDrawBackground(dc,rect,item,flags);
return;
}
// Otherwise, draw every other background with different colour.
wxColour bgCol(240,240,250);
dc.SetBrush(wxBrush(bgCol));
dc.SetPen(wxPen(bgCol));
dc.DrawRectangle(rect);
}
inline wxCoord PenStyleComboBox::OnMeasureItem( size_t item ) const
{
// Simply demonstrate the ability to have variable-height items
if ( item & 1 )
return 36;
else
return 24;
}
inline wxCoord PenStyleComboBox::OnMeasureItemWidth( size_t WXUNUSED(item) ) const
{
return -1; // default - will be measured from text width
}
PenStyleComboBox * PenStyleComboBox::CreateSample(wxWindow* parent)
{
PenStyleComboBox* odc;
// Common list of items for all dialogs.
wxArrayString arrItems;
// Create common strings array
// arrItems.Add( wxT("Solid") );
// arrItems.Add( wxT("Transparent") );
// arrItems.Add( wxT("Dot") );
// arrItems.Add( wxT("Long Dash") );
// arrItems.Add( wxT("Short Dash") );
// Comment the following since we don't need too long a drop list
arrItems.Add( wxT("Dot Dash") );
arrItems.Add( wxT("Backward Diagonal Hatch") );
arrItems.Add( wxT("Cross-diagonal Hatch") );
// arrItems.Add( wxT("Forward Diagonal Hatch") );
// arrItems.Add( wxT("Cross Hatch") );
// arrItems.Add( wxT("Horizontal Hatch") );
// arrItems.Add( wxT("Vertical Hatch") );
// When defining derivative class for callbacks, we need
// to use two-stage creation (or redefine the common wx
// constructor).
odc = new PenStyleComboBox();
odc->Create(parent,wxID_ANY,wxEmptyString,
wxDefaultPosition, wxDefaultSize,
arrItems,
wxCB_READONLY //wxNO_BORDER | wxCB_READONLY
);
odc->SetSelection(0);
// Load images from disk
wxImage imgNormal(wxT("bitmaps/dropbutn.png"));
wxImage imgPressed(wxT("bitmaps/dropbutp.png"));
wxImage imgHover(wxT("bitmaps/dropbuth.png"));
if ( imgNormal.IsOk() && imgPressed.IsOk() && imgHover.IsOk() )
{
wxBitmap bmpNormal(imgNormal);
wxBitmap bmpPressed(imgPressed);
wxBitmap bmpHover(imgHover);
odc->SetButtonBitmaps(bmpNormal,false,bmpPressed,bmpHover);
}
else
wxLogError(wxT("Dropbutton images not found"));
return odc;
}

View File

@@ -0,0 +1,248 @@
/////////////////////////////////////////////////////////////////////////////
// Name: custom_combo.h
// Purpose: Define some custom wxComboCtrls
// Author: Utensil Candel (UtensilCandel@@gmail.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef WX_CUSTOM_COMBO_H
#define WX_CUSTOM_COMBO_H
// ----------------------------------------------------------------------------
// class PenStyleComboBox
// This class is a modified version of the one from samples/combo.cpp
// ----------------------------------------------------------------------------
#include <wx/odcombo.h>
class PenStyleComboBox : public wxOwnerDrawnComboBox
{
public:
virtual void OnDrawItem( wxDC& dc,
const wxRect& rect,
int item,
int flags ) const;
virtual void OnDrawBackground( wxDC& dc, const wxRect& rect,
int item, int flags ) const;
virtual wxCoord OnMeasureItem( size_t item ) const;
virtual wxCoord OnMeasureItemWidth( size_t WXUNUSED(item) ) const;
static PenStyleComboBox* CreateSample(wxWindow* parent);
};
// ----------------------------------------------------------------------------
// wxListView Custom popup interface
// This class is a modified version of the one from samples/combo.cpp
// ----------------------------------------------------------------------------
#include <wx/listctrl.h>
class ListViewComboPopup : public wxListView, public wxComboPopup
{
public:
virtual void Init()
{
m_value = -1;
m_itemHere = -1; // hot item in list
}
virtual bool Create( wxWindow* parent )
{
return wxListView::Create(parent,1,
wxPoint(0,0),wxDefaultSize,
wxLC_LIST|wxLC_VRULES|wxBORDER_THEME);
}
virtual wxWindow *GetControl()
{ return this; }
virtual void SetStringValue( const wxString& s )
{
int n = wxListView::FindItem(-1,s);
if ( n >= 0 && n < GetItemCount() )
wxListView::Select(n);
}
virtual wxString GetStringValue() const
{
if ( m_value >= 0 )
return wxListView::GetItemText(m_value);
return wxEmptyString;
}
//
// Popup event handlers
//
// Mouse hot-tracking
void OnMouseMove(wxMouseEvent& event)
{
// Move selection to cursor if it is inside the popup
int resFlags;
int itemHere = HitTest(event.GetPosition(),resFlags);
if ( itemHere >= 0 )
{
wxListView::Select(itemHere,true);
m_itemHere = itemHere;
}
event.Skip();
}
// On mouse left, set the value and close the popup
void OnMouseClick(wxMouseEvent& WXUNUSED(event))
{
m_value = m_itemHere;
// TODO: Send event
Dismiss();
}
//
// Utilies for item manipulation
//
void AddSelection( const wxString& selstr )
{
wxListView::InsertItem(GetItemCount(),selstr);
}
protected:
int m_value; // current item index
int m_itemHere; // hot item in popup
private:
wxDECLARE_EVENT_TABLE();
};
// ----------------------------------------------------------------------------
// wxTreeCtrl Custom popup interface
// This class is a modified version of the one from samples/combo.cpp
// ----------------------------------------------------------------------------
#include <wx/treectrl.h>
class TreeCtrlComboPopup : public wxTreeCtrl, public wxComboPopup
{
public:
virtual void Init()
{
}
virtual bool Create( wxWindow* parent )
{
return wxTreeCtrl::Create(parent,1,
wxPoint(0,0),wxDefaultSize,
wxTR_HAS_BUTTONS|wxTR_SINGLE|
wxTR_LINES_AT_ROOT|wxBORDER_THEME);
}
virtual void OnShow()
{
// make sure selected item is visible
if ( m_value.IsOk() )
EnsureVisible(m_value);
}
virtual wxSize GetAdjustedSize( int minWidth,
int WXUNUSED(prefHeight),
int maxHeight )
{
return wxSize(minWidth, wxMin(80, maxHeight));
}
virtual wxWindow *GetControl()
{ return this; }
// Needed by SetStringValue
wxTreeItemId FindItemByText( wxTreeItemId parent, const wxString& text )
{
wxTreeItemIdValue cookie;
wxTreeItemId child = GetFirstChild(parent,cookie);
while ( child.IsOk() )
{
if ( GetItemText(child) == text )
{
return child;
}
if ( ItemHasChildren(child) )
{
wxTreeItemId found = FindItemByText(child,text);
if ( found.IsOk() )
return found;
}
child = GetNextChild(parent,cookie);
}
return wxTreeItemId();
}
virtual void SetStringValue( const wxString& s )
{
wxTreeItemId root = GetRootItem();
if ( !root.IsOk() )
return;
wxTreeItemId found = FindItemByText(root,s);
if ( found.IsOk() )
{
m_value = m_itemHere = found;
wxTreeCtrl::SelectItem(found);
}
}
virtual wxString GetStringValue() const
{
if ( m_value.IsOk() )
return wxTreeCtrl::GetItemText(m_value);
return wxEmptyString;
}
//
// Popup event handlers
//
// Mouse hot-tracking
void OnMouseMove(wxMouseEvent& event)
{
int resFlags;
wxTreeItemId itemHere = HitTest(event.GetPosition(),resFlags);
if ( itemHere.IsOk() && (resFlags & wxTREE_HITTEST_ONITEMLABEL) )
{
wxTreeCtrl::SelectItem(itemHere,true);
m_itemHere = itemHere;
}
event.Skip();
}
// On mouse left, set the value and close the popup
void OnMouseClick(wxMouseEvent& event)
{
int resFlags;
wxTreeItemId itemHere = HitTest(event.GetPosition(),resFlags);
if ( itemHere.IsOk() && (resFlags & wxTREE_HITTEST_ONITEMLABEL) )
{
m_itemHere = itemHere;
m_value = itemHere;
Dismiss();
// TODO: Send event
}
event.Skip();
}
protected:
wxTreeItemId m_value; // current item index
wxTreeItemId m_itemHere; // hot item in popup
private:
wxDECLARE_EVENT_TABLE();
};
#endif // WX_CUSTOM_COMBO_H

View File

@@ -0,0 +1,498 @@
/////////////////////////////////////////////////////////////////////////////
// Name: guiframe.cpp
// Purpose: Implement the Application Frame
// Author: Utensil Candel (UtensilCandel@@gmail.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// for all others, include the necessary headers wxWidgets headers)
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "guiframe.h"
///////////////////////////////////////////////////////////////////////////
GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
AddMenuBar();
wxBoxSizer* bSizer0;
bSizer0 = new wxBoxSizer( wxVERTICAL );
m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_commonExpandFlags = wxSizerFlags(1).Expand().Border(wxALL, FromDIP(20));
//Add panels into m_notebook1
//Tiny Controls
AddPanel_1();
//Multiple choice Controls
AddPanel_2();
//[Rich]Text Controls
AddPanel_3();
//Picker Controls
AddPanel_4();
//Drop-down Controls
AddPanel_5();
m_notebook1->ChangeSelection(0);
bSizer0->Add( m_notebook1, 1, wxEXPAND | wxALL, 0 );
this->SetSizer( bSizer0 );
this->Layout();
bSizer0->Fit( this );
statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
// Connect Events
Bind(wxEVT_CLOSE_WINDOW, &GUIFrame::OnClose, this);
}
void GUIFrame::AddMenuBar()
{
mbar = new wxMenuBar( 0 );
//File Menu
fileMenu = new wxMenu();
wxMenuItem* m_menuSeeScr;
m_menuSeeScr = new wxMenuItem( fileMenu, wxID_ZOOM_IN, wxString( _("&Open screenshots folder...") ) + wxT('\t') + wxT("Ctrl+O"), _("Opens the directory where the screenshots are saved."), wxITEM_NORMAL );
fileMenu->Append( m_menuSeeScr );
fileMenu->AppendSeparator();
wxMenuItem* m_menuFileQuit;
m_menuFileQuit = new wxMenuItem( fileMenu, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("Alt+F4"), _("Quits the application."), wxITEM_NORMAL );
fileMenu->Append( m_menuFileQuit );
mbar->Append( fileMenu, _("&File") );
//Capture Menu
captureMenu = new wxMenu();
wxMenuItem* m_menuCapFullScreen;
m_menuCapFullScreen = new wxMenuItem( captureMenu, idMenuCapFullScreen, wxString( _("&Full Screen") ) + wxT('\t') + wxT("Ctrl+Alt+F"), _("Takes a screenshot of the entire screen."), wxITEM_NORMAL );
captureMenu->Append( m_menuCapFullScreen );
wxMenuItem* m_menuCapAll;
m_menuCapAll = new wxMenuItem( captureMenu, idMenuCapAll, wxString( _("Capture All") ) + wxT('\t') + wxT("Ctrl+Alt+A"), _("Takes screenshots for all controls automatically."), wxITEM_NORMAL );
captureMenu->Append( m_menuCapAll );
mbar->Append( captureMenu, _("&Capture") );
//Help Menu
helpMenu = new wxMenu();
wxMenuItem* m_menuHelpAbout;
m_menuHelpAbout = new wxMenuItem( helpMenu, wxID_ABOUT, wxString( _("&About") ) + wxT('\t') + wxT("F1"), _("Shows info about this application."), wxITEM_NORMAL );
helpMenu->Append( m_menuHelpAbout );
mbar->Append( helpMenu, _("&Help") );
this->SetMenuBar( mbar );
// Connect Events
Bind(wxEVT_MENU, &GUIFrame::OnSeeScreenshots, this, m_menuSeeScr->GetId());
Bind(wxEVT_MENU, &GUIFrame::OnQuit, this, m_menuFileQuit->GetId());
Bind(wxEVT_MENU, &GUIFrame::OnCaptureFullScreen, this, m_menuCapFullScreen->GetId());
Bind(wxEVT_MENU, &GUIFrame::OnCaptureAllControls, this, m_menuCapAll->GetId());
Bind(wxEVT_MENU, &GUIFrame::OnAbout, this, m_menuHelpAbout->GetId());
}
void GUIFrame::AddPanel_1()
{
m_panel1 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
m_button1 = new wxButton( m_panel1, wxID_ANY, _("wxButton"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_button1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_staticText1 = new wxStaticText( m_panel1, wxID_ANY, _("wxStaticText"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 );
fgSizer1->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_checkBox1 = new wxCheckBox( m_panel1, wxID_ANY, _("Checked"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkBox1->SetValue(true);
m_checkBox1->SetToolTip( _("wxCheckBox") );
fgSizer1->Add( m_checkBox1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_checkBox2 = new wxCheckBox( m_panel1, wxID_ANY, _("Unchecked"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkBox2->SetToolTip( _("wxCheckBox") );
fgSizer1->Add( m_checkBox2, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 );
/*
NB: under wxGTK for the radio button "unchecked" to be unchecked, it's
important to put the wxRB_GROUP style on the first wxRadioButton
(the one "checked") and no flags on the second one.
*/
m_radioBtn1 = new wxRadioButton( m_panel1, wxID_ANY, _("Checked"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_radioBtn1->SetValue( true );
m_radioBtn1->SetToolTip( _("wxRadioButton") );
fgSizer1->Add( m_radioBtn1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_radioBtn2 = new wxRadioButton( m_panel1, wxID_ANY, _("Unchecked"), wxDefaultPosition, wxDefaultSize, 0 );
m_radioBtn2->SetToolTip( _("wxRadioButton") );
fgSizer1->Add( m_radioBtn2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_bpButton1 = new wxBitmapButton( m_panel1, wxID_ANY, wxBitmap( wxT("bitmaps/wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
m_bpButton1->SetToolTip( _("wxBitmapButton") );
m_bpButton1->SetToolTip( _("wxBitmapButton") );
fgSizer1->Add( m_bpButton1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_bitmap1 = new wxStaticBitmap( m_panel1, wxID_ANY, wxBitmap( wxT("bitmaps/wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
m_bitmap1->SetToolTip( _("wxStaticBitmap") );
fgSizer1->Add( m_bitmap1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_gauge1 = new wxGauge( m_panel1, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL, wxDefaultValidator, wxT("_Gauge") );
m_gauge1->SetValue( 50 );
m_gauge1->SetToolTip( _("wxGauge") );
fgSizer1->Add(m_gauge1, m_commonExpandFlags);
m_slider1 = new wxSlider( m_panel1, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL );
m_slider1->SetToolTip( _("wxSlider") );
fgSizer1->Add(m_slider1, m_commonExpandFlags);
m_toggleBtn1 = new wxToggleButton( m_panel1, wxID_ANY, _("Untoggled"), wxDefaultPosition, wxDefaultSize, 0 );
m_toggleBtn1->SetToolTip( _("wxToggleButton") );
fgSizer1->Add( m_toggleBtn1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_toggleBtn2 = new wxToggleButton( m_panel1, wxID_ANY, _("Toggled"), wxDefaultPosition, wxDefaultSize, 0 );
m_toggleBtn2->SetValue( true );
m_toggleBtn2->SetToolTip( _("wxToggleButton") );
fgSizer1->Add( m_toggleBtn2, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 );
m_hyperlink1 = new wxHyperlinkCtrl( m_panel1, wxID_ANY, _("www.wxwidgets.org"), wxT("http://www.wxwidgets.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
m_hyperlink1->SetToolTip( _("wxHyperlinkCtrl") );
fgSizer1->Add( m_hyperlink1, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 );
m_spinCtrl1 = new wxSpinCtrl( m_panel1, wxID_ANY, wxT("5"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10, 0 );
m_spinCtrl1->SetToolTip( _("wxSpinCtrl") );
fgSizer1->Add( m_spinCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_spinBtn1 = new wxSpinButton( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_spinBtn1->SetToolTip( _("wxSpinButton") );
fgSizer1->Add( m_spinBtn1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_scrollBar1 = new wxScrollBar( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_HORIZONTAL );
m_scrollBar1->SetScrollbar(50, 1, 100, 1);
m_scrollBar1->SetToolTip( _("wxScrollBar") );
fgSizer1->Add(m_scrollBar1, m_commonExpandFlags);
m_panel1->SetSizer( fgSizer1 );
m_panel1->Layout();
fgSizer1->Fit( m_panel1 );
m_notebook1->AddPage( m_panel1, _("Tiny Controls"), true );
}
void GUIFrame::AddPanel_2()
{
m_panel2 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxFlexGridSizer* fgSizer2;
fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
fgSizer2->SetFlexibleDirection( wxBOTH );
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
wxString m_checkList1Choices[] = { _("wxCheckListBox"), _("Item1"), _("Item2") };
int m_checkList1NChoices = sizeof( m_checkList1Choices ) / sizeof( wxString );
m_checkList1 = new wxCheckListBox( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkList1NChoices, m_checkList1Choices, 0 );
m_checkList1->Check(0);
fgSizer2->Add(m_checkList1, m_commonExpandFlags);
m_listBox1 = new wxListBox( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr, 0 );
m_listBox1->Append( _("wxListBox") );
m_listBox1->Append( _("Item1") );
m_listBox1->Append( _("Item2") );
fgSizer2->Add(m_listBox1, m_commonExpandFlags);
wxString m_radioBox1Choices[] = { _("Item1"), _("Item2") };
int m_radioBox1NChoices = sizeof( m_radioBox1Choices ) / sizeof( wxString );
m_radioBox1 = new wxRadioBox( m_panel2, wxID_ANY, _("wxRadioBox"), wxDefaultPosition, wxDefaultSize, m_radioBox1NChoices, m_radioBox1Choices, 1, wxRA_SPECIFY_COLS );
m_radioBox1->SetSelection( 0 );
fgSizer2->Add( m_radioBox1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_staticBox1 = new wxStaticBox(m_panel2,wxID_ANY, _("wxStaticBox"), wxDefaultPosition, wxDefaultSize, 0, _("_StaticBox"));
fgSizer2->Add(m_staticBox1, m_commonExpandFlags);
m_treeCtrl1 = new wxTreeCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER );
wxTreeItemId root = m_treeCtrl1->AddRoot(_("wxTreeCtrl"));
m_treeCtrl1->AppendItem(root, _("Node1"));
wxTreeItemId node2 = m_treeCtrl1->AppendItem(root, _("Node2"));
m_treeCtrl1->AppendItem(node2, _("Node3"));
m_treeCtrl1->ExpandAll();
fgSizer2->Add( m_treeCtrl1, m_commonExpandFlags);
m_listCtrl1 = new wxListCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxSize(220,120), wxLC_REPORT|wxSUNKEN_BORDER );
m_listCtrl1->InsertColumn(0, "Names");
m_listCtrl1->InsertColumn(1, "Values");
for(long index = 0; index < 5; index++) {
m_listCtrl1->InsertItem( index, wxString::Format(_("Item%ld"),index));
m_listCtrl1->SetItem(index, 1, wxString::Format("%ld", index));
}
m_listCtrl1->SetToolTip( _("wxListCtrl") );
fgSizer2->Add( m_listCtrl1, m_commonExpandFlags);
m_animationCtrl1 = new wxAnimationCtrl(m_panel2, wxID_ANY);
m_animationCtrl1->SetToolTip(_("wxAnimationCtrl"));
if (m_animationCtrl1->LoadFile(wxT("bitmaps/throbber.gif")))
m_animationCtrl1->Play();
fgSizer2->Add( m_animationCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
//wxCollapsiblePane 1
m_collPane1 = new wxCollapsiblePane(m_panel2, -1, wxT("Collapsed"));
wxWindow *win = m_collPane1->GetPane();
m_collPane1->SetToolTip(_("wxCollapsiblePane"));
wxBoxSizer * collbSizer = new wxBoxSizer(wxVERTICAL);
wxStaticText* m_collSText = new wxStaticText(win, -1, wxT("You can place"));
wxButton* m_collBut = new wxButton(win, -1, wxT("anything"));
wxTextCtrl* m_collText = new wxTextCtrl(win, -1, wxT("inside a wxCollapsiblePane"));
collbSizer->Add( m_collSText, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 );
collbSizer->Add( m_collBut, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 );
collbSizer->Add( m_collText, wxSizerFlags().Expand() );
win->SetSizer(collbSizer);
fgSizer2->Add( m_collPane1, wxSizerFlags().Expand().Border(wxALL) );
//wxCollapsiblePane 2
m_collPane2 = new wxCollapsiblePane(m_panel2, -1, wxT("Expanded"));
wxWindow *win2 = m_collPane2->GetPane();
m_collPane2->SetToolTip(_("wxCollapsiblePane"));
wxBoxSizer * collbSizer2 = new wxBoxSizer(wxVERTICAL);
wxStaticText* m_collSText2 = new wxStaticText(win2, -1, wxT("You can place"));
wxButton* m_collBut2 = new wxButton(win2, -1, wxT("anything"));
wxTextCtrl* m_collText2 = new wxTextCtrl(win2, -1, wxT("inside a wxCollapsiblePane"));
collbSizer2->Add( m_collSText2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 );
collbSizer2->Add( m_collBut2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 );
collbSizer2->Add( m_collText2, wxSizerFlags().Expand() );
win2->SetSizer(collbSizer2);
m_collPane2->Expand();
fgSizer2->Add( m_collPane2, wxSizerFlags().Expand().Border(wxALL) );
m_panel2->SetSizer( fgSizer2 );
m_panel2->Layout();
fgSizer2->Fit( m_panel2 );
m_notebook1->AddPage( m_panel2, _("Multiple choice Controls"), false );
}
void GUIFrame::AddPanel_3()
{
m_panel3 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer2;
bSizer2 = new wxBoxSizer( wxVERTICAL );
m_textCtrl1 = new wxTextCtrl( m_panel3, wxID_ANY, _("Single-line"), wxDefaultPosition, wxDefaultSize, 0 );
m_textCtrl1->SetToolTip( _("wxTextCtrl") );
bSizer2->Add( m_textCtrl1, 0, wxTOP|wxRIGHT|wxLEFT, 20 );
bSizer2->Add( 0, 10, 0, 0, 5 );
m_textCtrl2 = new wxTextCtrl( m_panel3, wxID_ANY, _("Multi-line\nLine1\nLine2\n"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
m_textCtrl2->SetToolTip( _("wxTextCtrl") );
bSizer2->Add( m_textCtrl2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 20 );
m_richText1 = new wxRichTextCtrl( m_panel3, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0|wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS );
m_richText1->LoadFile(wxT("richtext.xml"));
m_richText1->SetToolTip( _("wxRichTextCtrl") );
m_richText1->SetMinSize( wxSize( 200,200 ) );
bSizer2->Add( m_richText1, 0, wxALL, 20 );
m_panel3->SetSizer( bSizer2 );
m_panel3->Layout();
bSizer2->Fit( m_panel3 );
m_notebook1->AddPage( m_panel3, _("[Rich]Text Controls"), false );
}
void GUIFrame::AddPanel_4()
{
m_panel4 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxFlexGridSizer* fgSizer5;
fgSizer5 = new wxFlexGridSizer( 0, 2, 10, 10 );
fgSizer5->SetFlexibleDirection( wxBOTH );
fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_colourPicker1 = new wxColourPickerCtrl( m_panel4, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
m_colourPicker1->SetToolTip( _("wxColourPickerCtrl") );
fgSizer5->Add( m_colourPicker1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_fontPicker1 = new wxFontPickerCtrl( m_panel4, wxID_ANY, wxNullFont, wxDefaultPosition, wxDefaultSize, wxFNTP_DEFAULT_STYLE );
m_fontPicker1->SetMaxPointSize( 100 );
m_fontPicker1->SetToolTip( _("wxFontPickerCtrl") );
fgSizer5->Add( m_fontPicker1, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 20 );
m_filePicker1 = new wxFilePickerCtrl( m_panel4, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE, wxDefaultValidator, wxT("_FilePickerCtrl") );
#if defined(__WXMSW__)
const wxString a_file = "C:\\Windows\\explorer.exe";
#else
const wxString a_file = "/bin/bash";
#endif
m_filePicker1->SetPath(a_file);
m_filePicker1->SetToolTip( _("wxFilePickerCtrl") );
fgSizer5->Add( m_filePicker1, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 20 );
fgSizer5->Add( 0, 0, 1, wxEXPAND, 5 );
m_calendar1 = new wxCalendarCtrl( m_panel4, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS );
m_calendar1->SetToolTip( _("wxCalendarCtrl") );
fgSizer5->Add( m_calendar1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_datePicker1 = new wxDatePickerCtrl( m_panel4, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT );
m_datePicker1->SetToolTip( _("wxDatePickerCtrl") );
fgSizer5->Add( m_datePicker1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_genericDirCtrl1 = new wxGenericDirCtrl( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, wxEmptyString, 0, wxT("_GenericDirCtrl") );
m_genericDirCtrl1->ShowHidden( false );
m_genericDirCtrl1->SetToolTip( _("wxGenericDirCtrl") );
m_genericDirCtrl1->SetMinSize( wxSize( -1,150 ) );
fgSizer5->Add(m_genericDirCtrl1, m_commonExpandFlags);
m_dirPicker1 = new wxDirPickerCtrl( m_panel4, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE, wxDefaultValidator, wxT("_DirPickerCtrl") );
#if defined(__WXMSW__)
const wxString a_dir = "C:\\Windows";
#else
const wxString a_dir = "/home";
#endif
m_dirPicker1->SetPath(a_dir);
m_dirPicker1->SetToolTip( _("wxDirPickerCtrl") );
fgSizer5->Add( m_dirPicker1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_panel4->SetSizer( fgSizer5 );
m_panel4->Layout();
fgSizer5->Fit( m_panel4 );
m_notebook1->AddPage( m_panel4, _("Picker Controls"), false );
}
void GUIFrame::AddPanel_5()
{
m_panel5 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxFlexGridSizer* fgSizer4;
fgSizer4 = new wxFlexGridSizer( 0, 2, 0, 0 );
fgSizer4->SetFlexibleDirection( wxBOTH );
fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
wxString m_choice1Choices[] = { _("wxChoice"), _("Item1"), _("Item2"), _("Item3"), _("Item4") };
int m_choice1NChoices = sizeof( m_choice1Choices ) / sizeof( wxString );
m_choice1 = new wxChoice( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choice1NChoices, m_choice1Choices, 0 );
m_choice1->SetSelection( 0 );
fgSizer4->Add( m_choice1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
m_comboBox1 = new wxComboBox( m_panel5, wxID_ANY, _("wxComboBox"), wxDefaultPosition, wxDefaultSize, 0, nullptr, 0 );
m_comboBox1->Append( _("wxComboBox") );
m_comboBox1->Append( _("Item1") );
m_comboBox1->Append( _("Item2") );
m_comboBox1->Append( _("Item3") );
m_comboBox1->Append( _("Item4") );
m_comboBox1->Select(0);
// To look better under gtk
#ifdef __WXGTK__
m_comboBox1->Delete(4);
#endif
fgSizer4->Add( m_comboBox1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
fgSizer4->Add( 0, 120, 1, wxEXPAND, 5 );
fgSizer4->Add( 0, 120, 1, wxEXPAND, 5 );
/*
Create the wxBitmapComboBox control with wxCB_READONLY to ensure
it shows a bitmap next to the edit field which is more suitable
for a screenshot.
*/
m_bmpComboBox1 = new wxBitmapComboBox(m_panel5, wxID_ANY,_("Item1"),
wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY);
m_bmpComboBox1->Append(_("Item1"), wxBitmap(wxT("bitmaps/bell.png"),wxBITMAP_TYPE_PNG));
m_bmpComboBox1->Append(_("Item2"), wxBitmap(wxT("bitmaps/sound.png"),wxBITMAP_TYPE_PNG));
m_bmpComboBox1->Append(_("Item3"), wxBitmap(wxT("bitmaps/bell.png"),wxBITMAP_TYPE_PNG));
m_bmpComboBox1->Append(_("Item4"), wxBitmap(wxT("bitmaps/sound.png"),wxBITMAP_TYPE_PNG));
m_bmpComboBox1->SetToolTip(_("wxBitmapComboBox"));
m_bmpComboBox1->SetSelection(0);
fgSizer4->Add(m_bmpComboBox1, m_commonExpandFlags);
m_ownerDrawnComboBox1 = PenStyleComboBox::CreateSample(m_panel5);
m_ownerDrawnComboBox1->SetToolTip(_("wxOwnerDrawnComboBox"));
fgSizer4->Add(m_ownerDrawnComboBox1, m_commonExpandFlags);
fgSizer4->Add( 0, 90, 1, wxEXPAND, 5 );
fgSizer4->Add( 0, 90, 1, wxEXPAND, 5 );
//wxComboCtrl 1
m_comboCtrl1 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString);
// first of all, set the popup control!
ListViewComboPopup* popupList = new ListViewComboPopup();
m_comboCtrl1->SetPopupControl(popupList);
m_comboCtrl1->SetPopupMaxHeight(80);
m_comboCtrl1->SetText(wxT("wxComboCtrl"));
m_comboCtrl1->SetToolTip(_("wxComboCtrl"));
// Populate using wxListView methods
popupList->InsertItem(popupList->GetItemCount(),wxT("wxComboCtrl"));
popupList->InsertItem(popupList->GetItemCount(),wxT("with"));
popupList->InsertItem(popupList->GetItemCount(),wxT("wxListView"));
popupList->InsertItem(popupList->GetItemCount(),wxT("popup"));
popupList->InsertItem(popupList->GetItemCount(),wxT("Item1"));
popupList->InsertItem(popupList->GetItemCount(),wxT("Item2"));
popupList->InsertItem(popupList->GetItemCount(),wxT("Item3"));
popupList->Select(0, true);
fgSizer4->Add(m_comboCtrl1, m_commonExpandFlags);
//wxComboCtrl 2
m_comboCtrl2 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString);
// first of all, set the popup control!
TreeCtrlComboPopup* popupTree = new TreeCtrlComboPopup();
m_comboCtrl2->SetPopupControl(popupTree);
m_comboCtrl2->SetPopupMaxHeight(80);
m_comboCtrl2->SetText(wxT("wxComboCtrl"));
m_comboCtrl2->SetToolTip(_("wxComboCtrl"));
//Add a root and some nodes using wxTreeCtrl methods
wxTreeItemId root = popupTree->AddRoot(_("wxComboCtrl"));
popupTree->AppendItem(root, _("with"));
popupTree->AppendItem(root, _("wxTreeCtrl"));
wxTreeItemId node2 = popupTree->AppendItem(root, _("popout"));
popupTree->AppendItem(node2, _("Node1"));
popupTree->AppendItem(node2, _("Node2"));
popupTree->ExpandAll();
fgSizer4->Add(m_comboCtrl2, m_commonExpandFlags);
m_panel5->SetSizer( fgSizer4 );
m_panel5->Layout();
fgSizer4->Fit( m_panel5 );
m_notebook1->AddPage( m_panel5, _("Drop-down Controls"), false );
}
GUIFrame::~GUIFrame()
{
// Disconnect Events
Unbind(wxEVT_CLOSE_WINDOW, &GUIFrame::OnClose, this);
Unbind(wxEVT_MENU, &GUIFrame::OnSeeScreenshots, this);
Unbind(wxEVT_MENU, &GUIFrame::OnQuit, this);
Unbind(wxEVT_MENU, &GUIFrame::OnCaptureFullScreen, this);
Unbind(wxEVT_MENU, &GUIFrame::OnCaptureAllControls, this);
Unbind(wxEVT_MENU, &GUIFrame::OnAbout, this);
}

View File

@@ -0,0 +1,126 @@
/////////////////////////////////////////////////////////////////////////////
// Name: guiframe.h
// Purpose: Defines the window containing all controls.
// Author: Utensil Candel (UtensilCandel@@gmail.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _GUIFRAME_H_
#define _GUIFRAME_H_
#include "wx/animate.h"
#include "wx/bmpcbox.h"
#include "wx/calctrl.h"
#include "wx/clrpicker.h"
#include "wx/collpane.h"
#include "wx/datectrl.h"
#include "wx/dirctrl.h"
#include "wx/filepicker.h"
#include "wx/fontpicker.h"
#include "wx/hyperlink.h"
#include "wx/listctrl.h"
#include "wx/notebook.h"
#include "wx/richtext/richtextctrl.h"
#include "wx/spinbutt.h"
#include "wx/spinctrl.h"
#include "wx/tglbtn.h"
#include "wx/treectrl.h"
#include "customcombo.h"
class GUIFrame : public wxFrame
{
public:
GUIFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("wxWidgets Control Screenshot Generator"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
~GUIFrame();
protected:
enum
{
idMenuCapFullScreen = 1000,
idMenuCapAll
};
wxMenuBar* mbar;
wxMenu* fileMenu;
wxMenu* captureMenu;
wxMenu* helpMenu;
wxStatusBar* statusBar;
wxNotebook* m_notebook1;
wxPanel* m_panel1;
wxButton* m_button1;
wxStaticText* m_staticText1;
wxCheckBox* m_checkBox1;
wxCheckBox* m_checkBox2;
wxRadioButton* m_radioBtn1;
wxRadioButton* m_radioBtn2;
wxBitmapButton* m_bpButton1;
wxStaticBitmap* m_bitmap1;
wxGauge* m_gauge1;
wxSlider* m_slider1;
wxToggleButton* m_toggleBtn1;
wxToggleButton* m_toggleBtn2;
wxHyperlinkCtrl* m_hyperlink1;
wxSpinCtrl* m_spinCtrl1;
wxSpinButton* m_spinBtn1;
wxScrollBar* m_scrollBar1;
wxPanel* m_panel2;
wxCheckListBox* m_checkList1;
wxListBox* m_listBox1;
wxRadioBox* m_radioBox1;
wxStaticBox * m_staticBox1;
wxTreeCtrl* m_treeCtrl1;
wxListCtrl* m_listCtrl1;
wxAnimationCtrl * m_animationCtrl1;
wxCollapsiblePane *m_collPane1;
wxCollapsiblePane *m_collPane2;
wxPanel* m_panel3;
wxTextCtrl* m_textCtrl1;
wxTextCtrl* m_textCtrl2;
wxRichTextCtrl* m_richText1;
wxPanel* m_panel4;
wxColourPickerCtrl* m_colourPicker1;
wxFontPickerCtrl* m_fontPicker1;
wxFilePickerCtrl* m_filePicker1;
wxCalendarCtrl* m_calendar1;
wxDatePickerCtrl* m_datePicker1;
wxGenericDirCtrl* m_genericDirCtrl1;
wxDirPickerCtrl* m_dirPicker1;
wxPanel* m_panel5;
wxChoice* m_choice1;
wxComboBox* m_comboBox1;
wxBitmapComboBox * m_bmpComboBox1;
PenStyleComboBox * m_ownerDrawnComboBox1;
wxComboCtrl * m_comboCtrl1;
wxComboCtrl * m_comboCtrl2;
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ){ event.Skip(); }
virtual void OnSeeScreenshots( wxCommandEvent& event ){ event.Skip(); }
virtual void OnQuit( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCaptureFullScreen( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCaptureAllControls( wxCommandEvent& event ){ event.Skip(); }
virtual void OnAbout( wxCommandEvent& event ){ event.Skip(); }
private:
void AddMenuBar();
void AddPanel_1();
void AddPanel_2();
void AddPanel_3();
void AddPanel_4();
void AddPanel_5();
wxSizerFlags m_commonExpandFlags;
};
#endif //_GUIFRAME_H_

View File

@@ -0,0 +1,268 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
include ../../../build/msw/config.gcc
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
CPPDEPS = -MT$@ -MF$@.d -MD -MP
WX_RELEASE_NODOT = 33
COMPILER_PREFIX = gcc
OBJS = \
$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
LIBDIRNAME = \
.\..\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
SETUPHDIR = $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)
SCREENSHOTGEN_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG) \
-D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
-I$(SETUPHDIR) -I.\..\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_p) -W \
-Wall -I. $(__DLLFLAG_p) -I.\..\..\..\samples -DNOPCH $(__RTTIFLAG_5) \
$(__EXCEPTIONSFLAG_6) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
SCREENSHOTGEN_OBJECTS = \
$(OBJS)\screenshotgen_screenshot_app.o \
$(OBJS)\screenshotgen_screenshot_main.o \
$(OBJS)\screenshotgen_guiframe.o \
$(OBJS)\screenshotgen_customcombo.o \
$(OBJS)\screenshotgen_autocapture.o \
$(OBJS)\screenshotgen_screenshotgen_rc.o
### Conditionally set variables: ###
ifeq ($(USE_GUI),0)
PORTNAME = base
endif
ifeq ($(USE_GUI),1)
PORTNAME = msw$(TOOLKIT_VERSION)
endif
ifeq ($(OFFICIAL_BUILD),1)
COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
endif
ifeq ($(BUILD),debug)
WXDEBUGFLAG = d
endif
ifeq ($(WXUNIV),1)
WXUNIVNAME = univ
endif
ifeq ($(SHARED),1)
WXDLLFLAG = dll
endif
ifeq ($(SHARED),0)
LIBTYPE_SUFFIX = lib
endif
ifeq ($(SHARED),1)
LIBTYPE_SUFFIX = dll
endif
ifeq ($(MONOLITHIC),0)
EXTRALIBS_FOR_BASE =
endif
ifeq ($(MONOLITHIC),1)
EXTRALIBS_FOR_BASE =
endif
ifeq ($(BUILD),debug)
__OPTIMIZEFLAG_2 = -O0
endif
ifeq ($(BUILD),release)
__OPTIMIZEFLAG_2 = -O2
endif
ifeq ($(USE_RTTI),0)
__RTTIFLAG_5 = -fno-rtti
endif
ifeq ($(USE_RTTI),1)
__RTTIFLAG_5 =
endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONSFLAG_6 = -fno-exceptions
endif
ifeq ($(USE_EXCEPTIONS),1)
__EXCEPTIONSFLAG_6 =
endif
ifeq ($(WXUNIV),1)
__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
endif
ifeq ($(WXUNIV),1)
__WXUNIV_DEFINE_p_1 = --define __WXUNIVERSAL__
endif
ifeq ($(DEBUG_FLAG),0)
__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
endif
ifeq ($(DEBUG_FLAG),0)
__DEBUG_DEFINE_p_1 = --define wxDEBUG_LEVEL=0
endif
ifeq ($(BUILD),release)
__NDEBUG_DEFINE_p = -DNDEBUG
endif
ifeq ($(BUILD),release)
__NDEBUG_DEFINE_p_1 = --define NDEBUG
endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONS_DEFINE_p_1 = --define wxNO_EXCEPTIONS
endif
ifeq ($(USE_RTTI),0)
__RTTI_DEFINE_p = -DwxNO_RTTI
endif
ifeq ($(USE_RTTI),0)
__RTTI_DEFINE_p_1 = --define wxNO_RTTI
endif
ifeq ($(USE_THREADS),0)
__THREAD_DEFINE_p = -DwxNO_THREADS
endif
ifeq ($(USE_THREADS),0)
__THREAD_DEFINE_p_1 = --define wxNO_THREADS
endif
ifeq ($(USE_CAIRO),1)
____CAIRO_INCLUDEDIR_FILENAMES_p = -I$(CAIRO_ROOT)\include\cairo
endif
ifeq ($(USE_CAIRO),1)
__CAIRO_INCLUDEDIR_p = --include-dir $(CAIRO_ROOT)/include/cairo
endif
ifeq ($(SHARED),1)
__DLLFLAG_p = -DWXUSINGDLL
endif
ifeq ($(SHARED),1)
__DLLFLAG_p_1 = --define WXUSINGDLL
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_AUI_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_RICHTEXT_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_HTML_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_XML_p = \
-lwxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_CORE_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_BASE_p = -lwxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
endif
ifeq ($(MONOLITHIC),1)
__WXLIB_MONO_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
endif
ifeq ($(MONOLITHIC),1)
ifeq ($(USE_STC),1)
__LIB_SCINTILLA_IF_MONO_p = -lwxscintilla$(WXDEBUGFLAG)
endif
endif
ifeq ($(MONOLITHIC),1)
ifeq ($(USE_STC),1)
__LIB_LEXILLA_IF_MONO_p = $(__LIB_LEXILLA_p)
endif
endif
ifeq ($(USE_STC),1)
__LIB_LEXILLA_p = -lwxlexilla$(WXDEBUGFLAG)
endif
ifeq ($(USE_GUI),1)
__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
endif
ifeq ($(USE_GUI),1)
__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
endif
ifeq ($(USE_GUI),1)
__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
endif
ifeq ($(USE_GUI),1)
__LIB_WEBP_p = -lwxwebp$(WXDEBUGFLAG)
endif
ifeq ($(USE_CAIRO),1)
__CAIRO_LIB_p = -lcairo
endif
ifeq ($(USE_CAIRO),1)
____CAIRO_LIBDIR_FILENAMES_p = -L$(CAIRO_ROOT)\lib
endif
ifeq ($(BUILD),debug)
ifeq ($(DEBUG_INFO),default)
__DEBUGINFO = -g
endif
endif
ifeq ($(BUILD),release)
ifeq ($(DEBUG_INFO),default)
__DEBUGINFO =
endif
endif
ifeq ($(DEBUG_INFO),0)
__DEBUGINFO =
endif
ifeq ($(DEBUG_INFO),1)
__DEBUGINFO = -g
endif
ifeq ($(USE_THREADS),0)
__THREADSFLAG =
endif
ifeq ($(USE_THREADS),1)
__THREADSFLAG = -mthreads
endif
all: $(OBJS)
$(OBJS):
-if not exist $(OBJS) mkdir $(OBJS)
### Targets: ###
all: $(OBJS)\screenshotgen.exe bitmaps xml
clean:
-if exist $(OBJS)\*.o del $(OBJS)\*.o
-if exist $(OBJS)\*.d del $(OBJS)\*.d
-if exist $(OBJS)\screenshotgen.exe del $(OBJS)\screenshotgen.exe
$(OBJS)\screenshotgen.exe: $(SCREENSHOTGEN_OBJECTS) $(OBJS)\screenshotgen_screenshotgen_rc.o
$(foreach f,$(subst \,/,$(SCREENSHOTGEN_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp))
@move /y $@.rsp.tmp $@.rsp >nul
$(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) $(__WXLIB_AUI_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_HTML_p) $(__WXLIB_XML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_WEBP_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lgdiplus -lmsimg32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme
@-del $@.rsp
bitmaps:
if not exist $(OBJS)\bitmaps mkdir $(OBJS)\bitmaps
for %%f in (wxwin32x32.png bell.png sound.png dropbuth.png dropbutn.png dropbutp.png throbber.gif) do if not exist $(OBJS)\bitmaps\%%f copy .\bitmaps\%%f $(OBJS)\bitmaps
xml:
if not exist $(OBJS) mkdir $(OBJS)
for %%f in (richtext.xml) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS)
$(OBJS)\screenshotgen_screenshot_app.o: ./screenshot_app.cpp
$(CXX) -c -o $@ $(SCREENSHOTGEN_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\screenshotgen_screenshot_main.o: ./screenshot_main.cpp
$(CXX) -c -o $@ $(SCREENSHOTGEN_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\screenshotgen_guiframe.o: ./guiframe.cpp
$(CXX) -c -o $@ $(SCREENSHOTGEN_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\screenshotgen_customcombo.o: ./customcombo.cpp
$(CXX) -c -o $@ $(SCREENSHOTGEN_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\screenshotgen_autocapture.o: ./autocapture.cpp
$(CXX) -c -o $@ $(SCREENSHOTGEN_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\screenshotgen_screenshotgen_rc.o: ./screenshotgen.rc
$(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) --include-dir $(SETUPHDIR) --include-dir ./../../../include $(__CAIRO_INCLUDEDIR_p) --include-dir . $(__DLLFLAG_p_1) --define wxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST) --include-dir ./../../../samples --define NOPCH
.PHONY: all clean bitmaps xml
SHELL := $(COMSPEC)
# Dependencies tracking:
-include $(OBJS)/*.d

View File

@@ -0,0 +1,481 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
!include <../../../build/msw/config.vc>
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
WX_RELEASE_NODOT = 33
COMPILER_PREFIX = vc
OBJS = \
$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
LIBDIRNAME = \
.\..\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(LIBTYPE_SUFFIX)$(CFG)
SETUPHDIR = $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)
SCREENSHOTGEN_CXXFLAGS = /M$(__RUNTIME_LIBS_10)$(__DEBUGRUNTIME_4) /DWIN32 \
$(__DEBUGINFO_0) /Fd$(OBJS)\screenshotgen.pdb $(____DEBUGRUNTIME_3_p) \
$(__OPTIMIZEFLAG_6) /D_CRT_SECURE_NO_DEPRECATE=1 \
/D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \
$(__NO_VC_CRTDBG_p) $(__TARGET_CPU_COMPFLAG_p) /D__WXMSW__ \
$(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
/I$(SETUPHDIR) /I.\..\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_p) /W4 \
/I. $(__DLLFLAG_p) /D_WINDOWS /I.\..\..\..\samples /DNOPCH $(__RTTIFLAG_11) \
$(__EXCEPTIONSFLAG_12) $(CPPFLAGS) $(CXXFLAGS)
SCREENSHOTGEN_OBJECTS = \
$(OBJS)\screenshotgen_screenshot_app.obj \
$(OBJS)\screenshotgen_screenshot_main.obj \
$(OBJS)\screenshotgen_guiframe.obj \
$(OBJS)\screenshotgen_customcombo.obj \
$(OBJS)\screenshotgen_autocapture.obj
SCREENSHOTGEN_RESOURCES = \
$(OBJS)\screenshotgen_screenshotgen.res
### Conditionally set variables: ###
!if "$(TARGET_CPU)" == "AMD64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "ARM"
ARCH_SUFFIX = _arm
!endif
!if "$(TARGET_CPU)" == "ARM64"
ARCH_SUFFIX = _arm64
!endif
!if "$(TARGET_CPU)" == "IA64"
ARCH_SUFFIX = _ia64
!endif
!if "$(TARGET_CPU)" == "X64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "amd64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "arm"
ARCH_SUFFIX = _arm
!endif
!if "$(TARGET_CPU)" == "arm64"
ARCH_SUFFIX = _arm64
!endif
!if "$(TARGET_CPU)" == "ia64"
ARCH_SUFFIX = _ia64
!endif
!if "$(TARGET_CPU)" == "x64"
ARCH_SUFFIX = _x64
!endif
!if "$(USE_GUI)" == "0"
PORTNAME = base
!endif
!if "$(USE_GUI)" == "1"
PORTNAME = msw$(TOOLKIT_VERSION)
!endif
!if "$(OFFICIAL_BUILD)" == "1"
COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
WXDEBUGFLAG = d
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
WXDEBUGFLAG = d
!endif
!if "$(WXUNIV)" == "1"
WXUNIVNAME = univ
!endif
!if "$(SHARED)" == "1"
WXDLLFLAG = dll
!endif
!if "$(SHARED)" == "0"
LIBTYPE_SUFFIX = lib
!endif
!if "$(SHARED)" == "1"
LIBTYPE_SUFFIX = dll
!endif
!if "$(TARGET_CPU)" == "AMD64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "ARM"
LINK_TARGET_CPU = /MACHINE:ARM
!endif
!if "$(TARGET_CPU)" == "ARM64"
LINK_TARGET_CPU = /MACHINE:ARM64
!endif
!if "$(TARGET_CPU)" == "IA64"
LINK_TARGET_CPU = /MACHINE:IA64
!endif
!if "$(TARGET_CPU)" == "X64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "amd64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "arm"
LINK_TARGET_CPU = /MACHINE:ARM
!endif
!if "$(TARGET_CPU)" == "arm64"
LINK_TARGET_CPU = /MACHINE:ARM64
!endif
!if "$(TARGET_CPU)" == "ia64"
LINK_TARGET_CPU = /MACHINE:IA64
!endif
!if "$(TARGET_CPU)" == "x64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "1" && "$(VISUALSTUDIOVERSION)" == "14.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "1" && "$(VISUALSTUDIOVERSION)" == "15.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "1" && "$(VISUALSTUDIOVERSION)" == "16.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "1" && "$(VISUALSTUDIOVERSION)" == "17.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "2" && "$(VISUALSTUDIOVERSION)" == "14.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware_pmv2.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "2" && "$(VISUALSTUDIOVERSION)" == "15.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware_pmv2.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "2" && "$(VISUALSTUDIOVERSION)" == "16.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware_pmv2.manifest
!endif
!if "$(USE_DPI_AWARE_MANIFEST)" == "2" && "$(VISUALSTUDIOVERSION)" == "17.0"
WIN32_DPI_LINKFLAG = /MANIFEST:EMBED \
/MANIFESTINPUT:./../../../include/wx/msw/wx_dpi_aware_pmv2.manifest
!endif
!if "$(MONOLITHIC)" == "0"
EXTRALIBS_FOR_BASE =
!endif
!if "$(MONOLITHIC)" == "1"
EXTRALIBS_FOR_BASE =
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_0 = /Zi
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_0 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_0 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_0 = /Zi
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_1 = /DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_1 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_1 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_1 = /DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_2 = $(__DEBUGRUNTIME_5)
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_2 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_2 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_2 = $(__DEBUGRUNTIME_5)
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p = /D_DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
____DEBUGRUNTIME_3_p =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
____DEBUGRUNTIME_3_p = /D_DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p_1 = /d _DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p_1 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
____DEBUGRUNTIME_3_p_1 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
____DEBUGRUNTIME_3_p_1 = /d _DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_4 = d
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_4 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__DEBUGRUNTIME_4 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
__DEBUGRUNTIME_4 = d
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_5 =
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_5 = /opt:ref /opt:icf
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__DEBUGRUNTIME_5 = /opt:ref /opt:icf
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
__DEBUGRUNTIME_5 =
!endif
!if "$(BUILD)" == "debug"
__OPTIMIZEFLAG_6 = /Od
!endif
!if "$(BUILD)" == "release"
__OPTIMIZEFLAG_6 = /O2
!endif
!if "$(USE_THREADS)" == "0"
__THREADSFLAG_9 = L
!endif
!if "$(USE_THREADS)" == "1"
__THREADSFLAG_9 = T
!endif
!if "$(RUNTIME_LIBS)" == "dynamic"
__RUNTIME_LIBS_10 = D
!endif
!if "$(RUNTIME_LIBS)" == "static"
__RUNTIME_LIBS_10 = $(__THREADSFLAG_9)
!endif
!if "$(USE_RTTI)" == "0"
__RTTIFLAG_11 = /GR-
!endif
!if "$(USE_RTTI)" == "1"
__RTTIFLAG_11 = /GR
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONSFLAG_12 =
!endif
!if "$(USE_EXCEPTIONS)" == "1"
__EXCEPTIONSFLAG_12 = /EHsc
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__
!endif
!if "$(TARGET_CPU)" == ""
__TARGET_CPU_COMPFLAG_p = /DTARGET_CPU_COMPFLAG=0
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
__TARGET_CPU_COMPFLAG_p =
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
__TARGET_CPU_COMPFLAG_p =
!endif
!if "$(TARGET_CPU)" == ""
__TARGET_CPU_COMPFLAG_p_1 = /d TARGET_CPU_COMPFLAG=0
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
__TARGET_CPU_COMPFLAG_p_1 =
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
__TARGET_CPU_COMPFLAG_p_1 =
!endif
!if "$(WXUNIV)" == "1"
__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
!endif
!if "$(WXUNIV)" == "1"
__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__
!endif
!if "$(DEBUG_FLAG)" == "0"
__DEBUG_DEFINE_p = /DwxDEBUG_LEVEL=0
!endif
!if "$(DEBUG_FLAG)" == "0"
__DEBUG_DEFINE_p_1 = /d wxDEBUG_LEVEL=0
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__NDEBUG_DEFINE_p = /DNDEBUG
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__NDEBUG_DEFINE_p = /DNDEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__NDEBUG_DEFINE_p_1 = /d NDEBUG
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__NDEBUG_DEFINE_p_1 = /d NDEBUG
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONS_DEFINE_p_1 = /d wxNO_EXCEPTIONS
!endif
!if "$(USE_RTTI)" == "0"
__RTTI_DEFINE_p = /DwxNO_RTTI
!endif
!if "$(USE_RTTI)" == "0"
__RTTI_DEFINE_p_1 = /d wxNO_RTTI
!endif
!if "$(USE_THREADS)" == "0"
__THREAD_DEFINE_p = /DwxNO_THREADS
!endif
!if "$(USE_THREADS)" == "0"
__THREAD_DEFINE_p_1 = /d wxNO_THREADS
!endif
!if "$(USE_CAIRO)" == "1"
____CAIRO_INCLUDEDIR_FILENAMES_p = /I$(CAIRO_ROOT)\include\cairo
!endif
!if "$(USE_CAIRO)" == "1"
____CAIRO_INCLUDEDIR_FILENAMES_1_p = /i $(CAIRO_ROOT)\include\cairo
!endif
!if "$(SHARED)" == "1"
__DLLFLAG_p = /DWXUSINGDLL
!endif
!if "$(SHARED)" == "1"
__DLLFLAG_p_1 = /d WXUSINGDLL
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_AUI_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_RICHTEXT_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_HTML_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_XML_p = \
wxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_CORE_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_BASE_p = \
wxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
!if "$(MONOLITHIC)" == "1"
__WXLIB_MONO_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
!if "$(MONOLITHIC)" == "1" && "$(USE_STC)" == "1"
__LIB_SCINTILLA_IF_MONO_p = wxscintilla$(WXDEBUGFLAG).lib
!endif
!if "$(MONOLITHIC)" == "1" && "$(USE_STC)" == "1"
__LIB_LEXILLA_IF_MONO_p = $(__LIB_LEXILLA_p)
!endif
!if "$(USE_STC)" == "1"
__LIB_LEXILLA_p = wxlexilla$(WXDEBUGFLAG).lib
!endif
!if "$(USE_GUI)" == "1"
__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
!endif
!if "$(USE_GUI)" == "1"
__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
!endif
!if "$(USE_GUI)" == "1"
__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
!endif
!if "$(USE_GUI)" == "1"
__LIB_WEBP_p = wxwebp$(WXDEBUGFLAG).lib
!endif
!if "$(USE_CAIRO)" == "1"
__CAIRO_LIB_p = cairo.lib
!endif
!if "$(USE_CAIRO)" == "1"
____CAIRO_LIBDIR_FILENAMES_p = /LIBPATH:$(CAIRO_ROOT)\lib
!endif
all: $(OBJS)
$(OBJS):
-if not exist $(OBJS) mkdir $(OBJS)
### Targets: ###
all: $(OBJS)\screenshotgen.exe bitmaps xml
clean:
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
-if exist $(OBJS)\*.res del $(OBJS)\*.res
-if exist $(OBJS)\*.pch del $(OBJS)\*.pch
-if exist $(OBJS)\screenshotgen.exe del $(OBJS)\screenshotgen.exe
-if exist $(OBJS)\screenshotgen.ilk del $(OBJS)\screenshotgen.ilk
-if exist $(OBJS)\screenshotgen.pdb del $(OBJS)\screenshotgen.pdb
$(OBJS)\screenshotgen.exe: $(SCREENSHOTGEN_OBJECTS) $(OBJS)\screenshotgen_screenshotgen.res
link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\screenshotgen.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(WIN32_DPI_LINKFLAG) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<<
$(SCREENSHOTGEN_OBJECTS) $(SCREENSHOTGEN_RESOURCES) $(__WXLIB_AUI_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_HTML_p) $(__WXLIB_XML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_WEBP_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib gdiplus.lib msimg32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib
<<
bitmaps:
if not exist $(OBJS)\bitmaps mkdir $(OBJS)\bitmaps
for %f in (wxwin32x32.png bell.png sound.png dropbuth.png dropbutn.png dropbutp.png throbber.gif) do if not exist $(OBJS)\bitmaps\%f copy .\bitmaps\%f $(OBJS)\bitmaps
xml:
if not exist $(OBJS) mkdir $(OBJS)
for %f in (richtext.xml) do if not exist $(OBJS)\%f copy .\%f $(OBJS)
$(OBJS)\screenshotgen_screenshot_app.obj: .\screenshot_app.cpp
$(CXX) /c /nologo /TP /Fo$@ $(SCREENSHOTGEN_CXXFLAGS) .\screenshot_app.cpp
$(OBJS)\screenshotgen_screenshot_main.obj: .\screenshot_main.cpp
$(CXX) /c /nologo /TP /Fo$@ $(SCREENSHOTGEN_CXXFLAGS) .\screenshot_main.cpp
$(OBJS)\screenshotgen_guiframe.obj: .\guiframe.cpp
$(CXX) /c /nologo /TP /Fo$@ $(SCREENSHOTGEN_CXXFLAGS) .\guiframe.cpp
$(OBJS)\screenshotgen_customcombo.obj: .\customcombo.cpp
$(CXX) /c /nologo /TP /Fo$@ $(SCREENSHOTGEN_CXXFLAGS) .\customcombo.cpp
$(OBJS)\screenshotgen_autocapture.obj: .\autocapture.cpp
$(CXX) /c /nologo /TP /Fo$@ $(SCREENSHOTGEN_CXXFLAGS) .\autocapture.cpp
$(OBJS)\screenshotgen_screenshotgen.res: .\screenshotgen.rc
rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_3_p_1) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_1) $(__TARGET_CPU_COMPFLAG_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) /i $(SETUPHDIR) /i .\..\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_1_p) /i . $(__DLLFLAG_p_1) /d _WINDOWS /i .\..\..\..\samples /d NOPCH .\screenshotgen.rc

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<richtext version="1.0.0.0" xmlns="http://www.wxwidgets.org">
<paragraphlayout textcolor="#000000" fontsize="12" fontstyle="90" fontweight="90" fontunderlined="0" fontface="serif" alignment="1" parspacingafter="10" parspacingbefore="0" linespacing="10">
<paragraph fontweight="92" alignment="2" parspacingafter="20" parspacingbefore="0">
<text fontsize="14" fontweight="92">wxRichTextCtrl</text>
<text fontsize="14"></text>
</paragraph>
<paragraph parspacingafter="20" parspacingbefore="0">
<text fontsize="14">"What can you do with this control?"</text>
<image imagetype="15">
<data>89504E470D0A1A0A0000000D4948445200000020000000200806000000737A7AF40000000473424954080808087C0864880000013A494441545885ED57D116C2200845D787EDD3F763450FC622075E3477D643BC5483EEBD03454C292F74A5DD46FEC48F3BD7CF525ED2A90234291FE889527AFB7BC424540221B6487DD0B8908CC899FBC8894A3CB35DAADACC0C8CBCB54FF0FA74B2E1666006B9E0B4B271102069B72C818A223F1480C8997D12E4F7B2D05C8435B800D524C8DF12B10BF0DE5E836B20F43B5A0E98010DDEB306A28B385482332D13B5179F361413C5D0EBE03732F01780ACB7C3F5C467A2725044B6D8B41875308507924D0110D9FD4162D62868548074B6CD10A28985BC6F7851F300EA0722C2B308F97009883E7BBC16B22A7F0F7979564D44D1AED8DBF72D7222631B467684908ECC8B50C02E6468CAB771BCB72FFEC6581E2D47931C8CE6CD4E28E518E98411F2121BBC1BE29B91FA3EF36684C48C907E2D60A65D7E1C3F01DF3DAE9FE1B576060000000049454E44AE426082</data>
</image>
<text>" You can change "</text>
<text textcolor="#FF0000">"text foreground colour "</text>
<text>"and "</text>
<text textcolor="#0000FF" bgcolor="#00FF00">"text background colour."</text>
<text>" Naturally you can make things "</text>
<text fontweight="92">"bold, "</text>
<text fontstyle="93">"italic "</text>
<text fontunderlined="1">or underlined.</text>
<text fontsize="14">" Different font sizes on the same line is allowed, too."</text>
</paragraph>
</paragraphlayout>
</richtext>

View File

@@ -0,0 +1,40 @@
/////////////////////////////////////////////////////////////////////////////
// Name: screenshot_app.cpp
// Purpose: Implement Application Class
// Author: Utensil Candel (UtensilCandel@@gmail.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// for all others, include the necessary headers wxWidgets headers)
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/richtext/richtextxml.h"
#include "screenshot_app.h"
#include "screenshot_main.h"
// ----------------------------------------------------------------------------
// ScreenshotApp
// ----------------------------------------------------------------------------
wxIMPLEMENT_APP(ScreenshotApp);
bool ScreenshotApp::OnInit()
{
// Init all Image handlers
wxInitAllImageHandlers();
// Add richtext extra handlers (plain text is automatically added)
wxRichTextBuffer::AddHandler(new wxRichTextXMLHandler);
ScreenshotFrame* frame = new ScreenshotFrame(0L);
frame->Show();
return true;
}

View File

@@ -0,0 +1,19 @@
/////////////////////////////////////////////////////////////////////////////
// Name: screenshot_app.h
// Purpose: Defines the Application Class
// Author: Utensil Candel (UtensilCandel@@gmail.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _SCREENSHOT_APP_H_
#define _SCREENSHOT_APP_H_
#include "wx/app.h"
class ScreenshotApp : public wxApp
{
public:
virtual bool OnInit();
};
#endif // _SCREENSHOT_APP_H_

View File

@@ -0,0 +1,186 @@
/////////////////////////////////////////////////////////////////////////////
// Name: screenshot_main.cpp
// Purpose: Implements the window containing all controls.
// Author: Utensil Candel (UtensilCandel@@gmail.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// for all others, include the necessary headers wxWidgets headers)
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/aboutdlg.h"
#include "wx/dir.h"
#include "screenshot_main.h"
#include "autocapture.h"
// ----------------------------------------------------------------------------
// ScreenshotFrame
// ----------------------------------------------------------------------------
ScreenshotFrame::ScreenshotFrame(wxFrame *frame) : GUIFrame(frame)
{
#if wxUSE_STATUSBAR
statusBar->SetStatusText(_("Welcome to the Automatic Screenshot Generator!"), 0);
#endif
// set minimum size hints
GetSizer()->SetSizeHints(this);
}
// ----------------------------------------------------------------------------
// ScreenshotFrame - event handlers
// ----------------------------------------------------------------------------
void ScreenshotFrame::OnClose(wxCloseEvent& WXUNUSED(event))
{
Destroy();
}
void ScreenshotFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
Destroy();
}
void ScreenshotFrame::OnSeeScreenshots(wxCommandEvent& WXUNUSED(event))
{
wxString defaultDir = AutoCaptureMechanism::GetDefaultDirectoryAbsPath();
if (wxFileName::DirExists(defaultDir))
wxLaunchDefaultBrowser(defaultDir);
else
wxMessageBox(_("There isn't any screenshots yet."));
}
void ScreenshotFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxAboutDialogInfo info;
info.SetName(_("Automatic Screenshot Generator"));
info.SetVersion(_("1.0"));
info.SetDescription(_("This utility automatically creates screenshots of wxWidgets controls for use in wxWidgets documentation."));
info.SetCopyright(wxT("(C) 2008 Utensil Candel"));
wxAboutBox(info);
}
void ScreenshotFrame::OnCaptureFullScreen(wxCommandEvent& WXUNUSED(event))
{
// Create a DC for the whole screen area
wxScreenDC dcScreen;
// Get the size of the screenDC
wxCoord screenWidth, screenHeight;
dcScreen.GetSize(&screenWidth, &screenHeight);
wxBitmap fullscreen(1, 1);
AutoCaptureMechanism::Capture(&fullscreen, 0, 0, screenWidth, screenHeight);
AutoCaptureMechanism::Save(&fullscreen, wxT("fullscreen"));
wxMessageBox(_("A screenshot of the entire screen was saved as:\n\n ")
+ AutoCaptureMechanism::GetDefaultDirectoryAbsPath() + wxT("fullscreen.png"),
_("Full screen capture"), wxICON_INFORMATION|wxOK, this);
}
void ScreenshotFrame::OnCaptureAllControls(wxCommandEvent& WXUNUSED(event))
{
wxString dir = AutoCaptureMechanism::GetDefaultDirectoryAbsPath();
// check if there are other screenshots taken before
if (wxFileName::DirExists(dir))
{
int choice = wxMessageBox(
_("It seems that you have already generated some screenshots.\n\nClick YES to delete them all (recommended) or NO to preserve them.\nClick CANCEL to cancel this auto-capture operation."),
_("Delete existing screenshots?"),
wxYES_NO | wxCANCEL | wxICON_QUESTION, this);
switch(choice)
{
case wxYES:
{
wxArrayString files;
wxDir::GetAllFiles(dir, &files, wxT("*.png"), wxDIR_FILES);
// remove all PNG files from the screenshots folder
int n = files.GetCount();
for (int i = 0; i < n; ++i)
wxRemoveFile(files[i]);
}
break;
case wxNO: break;
case wxCANCEL: return;
}
}
// proceed with the automatic screenshot capture
this->Maximize();
AutoCaptureMechanism auto_cap(m_notebook1);
auto_cap.RegisterControl(m_button1);
auto_cap.RegisterControl(m_staticText1);
auto_cap.RegisterControl(m_checkBox1, AJ_Union);
auto_cap.RegisterControl(m_checkBox2, AJ_UnionEnd);
auto_cap.RegisterControl(m_radioBtn1, AJ_Union);
auto_cap.RegisterControl(m_radioBtn2, AJ_UnionEnd);
auto_cap.RegisterControl(m_bpButton1);
auto_cap.RegisterControl(m_bitmap1);
auto_cap.RegisterControl(m_gauge1, wxT("wxGauge"));
auto_cap.RegisterControl(m_slider1);
auto_cap.RegisterControl(m_toggleBtn1, AJ_Union);
auto_cap.RegisterControl(m_toggleBtn2, AJ_UnionEnd);
auto_cap.RegisterControl(m_hyperlink1, wxT("wxHyperlinkCtrl"));
auto_cap.RegisterControl(m_spinCtrl1, AJ_RegionAdjust);
auto_cap.RegisterControl(m_spinBtn1);
auto_cap.RegisterControl(m_scrollBar1);
auto_cap.RegisterPageTurn();
auto_cap.RegisterControl(m_checkList1);
auto_cap.RegisterControl(m_listBox1);
auto_cap.RegisterControl(m_radioBox1);
auto_cap.RegisterControl(m_staticBox1);
auto_cap.RegisterControl(m_treeCtrl1);
auto_cap.RegisterControl(m_listCtrl1, wxT("wxListCtrl"));
auto_cap.RegisterControl(m_animationCtrl1);
auto_cap.RegisterControl(m_collPane1, wxT("wxCollapsiblePane"), AJ_Union);
auto_cap.RegisterControl(m_collPane2, AJ_UnionEnd);
auto_cap.RegisterPageTurn();
auto_cap.RegisterControl(m_textCtrl1, AJ_Union);
auto_cap.RegisterControl(m_textCtrl2, AJ_UnionEnd);
auto_cap.RegisterControl(m_richText1);
auto_cap.RegisterPageTurn();
auto_cap.RegisterControl(m_colourPicker1, wxT("wxColourPickerCtrl"));
auto_cap.RegisterControl(m_fontPicker1, wxT("wxFontPickerCtrl"));
auto_cap.RegisterControl(m_filePicker1, wxT("wxFilePickerCtrl"), AJ_RegionAdjust);
auto_cap.RegisterControl(m_calendar1, wxT("wxCalendarCtrl"), AJ_RegionAdjust);
auto_cap.RegisterControl(m_datePicker1, wxT("wxDatePickerCtrl"));
auto_cap.RegisterControl(m_genericDirCtrl1, wxT("wxGenericDirCtrl"));
auto_cap.RegisterControl(m_dirPicker1, wxT("wxDirPickerCtrl"), AJ_RegionAdjust);
auto_cap.RegisterPageTurn();
auto_cap.RegisterControl(m_choice1, AJ_Dropdown);
auto_cap.RegisterControl(m_comboBox1, AJ_Dropdown);
auto_cap.RegisterControl(m_bmpComboBox1, AJ_Dropdown);
auto_cap.RegisterControl(m_ownerDrawnComboBox1, AJ_Dropdown);
auto_cap.RegisterControl(m_comboCtrl1, AJ_Dropdown|AJ_Union);
auto_cap.RegisterControl(m_comboCtrl2, AJ_Dropdown|AJ_UnionEnd);
auto_cap.CaptureAll();
wxMessageBox(_("All screenshots were generated successfully in the folder:\n ") + dir,
_("Success"), wxOK|wxICON_INFORMATION, this);
}

View File

@@ -0,0 +1,30 @@
/////////////////////////////////////////////////////////////////////////////
// Name: screenshot_main.h
// Purpose: Defines the Application Frame
// Author: Utensil Candel (UtensilCandel@@gmail.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _SCREENSHOT_MAIN_H_
#define _SCREENSHOT_MAIN_H_
#include "guiframe.h"
class ScreenshotFrame : public GUIFrame
{
public:
ScreenshotFrame(wxFrame *frame);
~ScreenshotFrame() {}
protected: // event handlers
virtual void OnClose(wxCloseEvent& event);
virtual void OnQuit(wxCommandEvent& event);
virtual void OnAbout(wxCommandEvent& event);
virtual void OnSeeScreenshots( wxCommandEvent& event);
virtual void OnCaptureFullScreen( wxCommandEvent& event );
virtual void OnCaptureAllControls( wxCommandEvent& event );
};
#endif // _SCREENSHOT_MAIN_H_

View File

@@ -0,0 +1,62 @@
<?xml version="1.0" ?>
<makefile>
<include file="../../../build/bakefiles/common_samples.bkl"/>
<exe id="screenshotgen" template="wx_util" template_append="wx_append">
<if cond="FORMAT=='autoconf'">
<!-- we need this for correct install_name_tool operations on Mac: -->
<ldflags>$(HEADER_PAD_OPTION)</ldflags>
<wx-mac-app-bundle/>
</if>
<sources>
screenshot_app.cpp
screenshot_main.cpp
guiframe.cpp
customcombo.cpp
autocapture.cpp
</sources>
<headers>
screenshot_app.h
screenshot_main.h
guiframe.h
customcombo.h
autocapture.h
</headers>
<wx-lib>aui</wx-lib>
<wx-lib>richtext</wx-lib>
<wx-lib>html</wx-lib>
<wx-lib>xml</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>screenshotgen.rc</win32-res>
<install-to>$(BINDIR)</install-to>
</exe>
<wx-data id="bitmaps">
<dstdir>$(BUILDDIR)/bitmaps</dstdir>
<srcdir>$(SRCDIR)/bitmaps</srcdir>
<files>
wxwin32x32.png
bell.png
sound.png
dropbuth.png
dropbutn.png
dropbutp.png
throbber.gif
</files>
</wx-data>
<wx-data id="xml">
<files>
richtext.xml
</files>
</wx-data>
</makefile>

View File

@@ -0,0 +1 @@
#include "wx/msw/wx.rc"

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" ?>
<makefile>
<include file="../build/bakefiles/config.bkl"/>
<template id="sub">
<dependency-of>all</dependency-of>
</template>
<subproject id="helpview" template="sub">
<dir>helpview/src</dir>
<installable>no</installable>
</subproject>
<subproject id="hhp2cached" template="sub">
<dir>hhp2cached</dir>
<installable>no</installable>
</subproject>
<subproject id="ifacecheck" template="sub">
<dir>ifacecheck/src</dir>
<installable>yes</installable>
</subproject>
<subproject id="screenshotgen" template="sub">
<dir>screenshotgen/src</dir>
<installable>yes</installable>
</subproject>
<subproject id="wxrc" template="sub">
<dir>wxrc</dir>
<installable>yes</installable>
</subproject>
</makefile>

View File

@@ -0,0 +1,44 @@
#!/bin/bash
# Usage example:
#
# The following command line:
# './GenerateBigXRCFile.sh' 2000 >'MyInputFileReferencingManyResources.xrc'
# will generate an XRC file referencing 2000 small PNG images.
#
# Compiling this XRC file using `wxrc` and further compiling the generated C++ source code
# can help us tune our code and avoid slow C++ compilation process
# (when thousands of input resource files have been given as input).
function GenerateExampleImages
{
set -e -o pipefail
local folder_images='ExampleImages'
mkdir -p "${folder_images}/"
local i
local n="${1:-10000}"
printf '<?xml version="1.0" encoding="UTF-8"?>\n'
printf '<resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">\n'
for ((i = 0; i < n; ++i)); do
local pathname_image; printf -v pathname_image "%s/Example_%04Xh.png" "${folder_images}" "$((i))"
rm -f "${pathname_image}"
printf >>"${pathname_image}" \
'%s' \
"\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52" \
"\x00\x00\x00\x10\x00\x00\x00\x10\x08\x02\x00\x00\x00\x90\x91\x68" \
"\x36\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0E\xC4\x00\x00\x0E" \
"\xC4\x01\x95\x2B\x0E\x1B\x00\x00\x00\x1A\x49\x44\x41\x54\x28\xCF" \
"\x63\x6C\x60\xF8\xCF\x40\x0A\x60\x62\x20\x11\x8C\x6A\x18\xD5\x30" \
"\x74\x34\x00\x00\xC5\xBF\x01\x9F\x22\x91\xFF\xBD\x00\x00\x00\x00"
"\x49\x45\x4E\x44\xAE\x42\x60\x82"
printf ' <object class="wxBitmap" name="Cat_%04Xh">%s</object>\n' "$((i))" "${pathname_image}"
done
printf '</resource>\n'
}
GenerateExampleImages "$@"

View File

@@ -0,0 +1,136 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
@MAKE_SET@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
INSTALL = @INSTALL@
EXEEXT = @EXEEXT@
LN_S = @LN_S@
STRIP = @STRIP@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DIR = @INSTALL_DIR@
BK_DEPS = @BK_DEPS@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
bindir = @bindir@
LIBS = @LIBS@
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
WX_FLAVOUR = @WX_FLAVOUR@
WX_LIB_FLAVOUR = @WX_LIB_FLAVOUR@
TOOLKIT = @TOOLKIT@
TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@
TOOLKIT_VERSION = @TOOLKIT_VERSION@
EXTRALIBS = @EXTRALIBS@
EXTRALIBS_XML = @EXTRALIBS_XML@
EXTRALIBS_GUI = @EXTRALIBS_GUI@
WX_CPPFLAGS = @WX_CPPFLAGS@
WX_CXXFLAGS = @WX_CXXFLAGS@
WX_LDFLAGS = @WX_LDFLAGS@
HOST_SUFFIX = @HOST_SUFFIX@
DYLIB_RPATH_FLAG = @DYLIB_RPATH_FLAG@
wx_top_builddir = @wx_top_builddir@
### Variables: ###
DESTDIR =
WX_RELEASE = 3.3
LIBDIRNAME = $(wx_top_builddir)/lib
WXRC_CXXFLAGS = $(WX_CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
$(__THREAD_DEFINE_p) -I$(srcdir) $(__DLLFLAG_p) -DwxUSE_GUI=0 $(WX_CXXFLAGS) \
$(CPPFLAGS) $(CXXFLAGS)
WXRC_OBJECTS = \
wxrc_wxrc.o
### Conditionally set variables: ###
@COND_DEPS_TRACKING_0@CXXC = $(CXX)
@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX)
@COND_USE_GUI_0@PORTNAME = base
@COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
@COND_TOOLKIT_MAC@WXBASEPORT = _carbon
@COND_BUILD_debug@WXDEBUGFLAG = d
@COND_WXUNIV_1@WXUNIVNAME = univ
@COND_MONOLITHIC_0@EXTRALIBS_FOR_BASE = $(EXTRALIBS)
@COND_MONOLITHIC_1@EXTRALIBS_FOR_BASE = $(EXTRALIBS) \
@COND_MONOLITHIC_1@ $(EXTRALIBS_XML) $(EXTRALIBS_GUI)
@COND_USE_XML_1@__wxrc___depname = wxrc$(EXEEXT)
@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
@COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
@COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI
@COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS
@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL
COND_MONOLITHIC_0___WXLIB_XML_p = \
-lwx_base$(WXBASEPORT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_XML_p = $(COND_MONOLITHIC_0___WXLIB_XML_p)
COND_MONOLITHIC_0___WXLIB_BASE_p = \
-lwx_base$(WXBASEPORT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
@COND_USE_XML_1@__install_wxrc___depname = install_wxrc
@COND_USE_XML_1@__uninstall_wxrc___depname = uninstall_wxrc
COND_MONOLITHIC_1___WXLIB_MONO_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
@COND_MONOLITHIC_1@__LIB_PNG_IF_MONO_p = $(__LIB_PNG_p)
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@__LIB_PNG_p \
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@ = \
@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@ -lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_ZLIB_builtin@__LIB_ZLIB_p = \
@COND_wxUSE_ZLIB_builtin@ -lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_REGEX_builtin@__LIB_REGEX_p = \
@COND_wxUSE_REGEX_builtin@ -lwxregexu$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_wxUSE_EXPAT_builtin@__LIB_EXPAT_p = \
@COND_wxUSE_EXPAT_builtin@ -lwxexpat$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
### Targets: ###
all: $(__wxrc___depname)
install: $(__install_wxrc___depname)
uninstall: $(__uninstall_wxrc___depname)
install-strip: install
$(STRIP) $(DESTDIR)$(bindir)/wxrc$(EXEEXT)
clean:
rm -rf ./.deps ./.pch
rm -f ./*.o
rm -f wxrc$(EXEEXT)
distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch Makefile
@COND_USE_XML_1@wxrc$(EXEEXT): $(WXRC_OBJECTS)
@COND_USE_XML_1@ $(CXX) -o $@ $(WXRC_OBJECTS) -L$(LIBDIRNAME) $(DYLIB_RPATH_FLAG) $(LDFLAGS) $(WX_LDFLAGS) $(__WXLIB_XML_p) $(EXTRALIBS_XML) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
@COND_USE_XML_1@install_wxrc: $(__wxrc___depname)
@COND_USE_XML_1@ $(INSTALL_DIR) $(DESTDIR)$(bindir)
@COND_USE_XML_1@ $(INSTALL_PROGRAM) wxrc$(EXEEXT) $(DESTDIR)$(bindir)
@COND_USE_XML_1@ rm -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT) $(DESTDIR)$(bindir)/wxrc-$(WX_RELEASE)$(WX_FLAVOUR)$(EXEEXT)
@COND_USE_XML_1@ $(INSTALL_PROGRAM) wxrc$(EXEEXT) $(DESTDIR)$(bindir)
@COND_USE_XML_1@ mv -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT) $(DESTDIR)$(bindir)/wxrc-$(WX_RELEASE)$(WX_FLAVOUR)$(EXEEXT)
@COND_USE_XML_1@ (cd $(DESTDIR)$(bindir) && $(LN_S) wxrc-$(WX_RELEASE)$(WX_FLAVOUR)$(EXEEXT) wxrc$(EXEEXT))
@COND_USE_XML_1@uninstall_wxrc:
@COND_USE_XML_1@ rm -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT)
wxrc_wxrc.o: $(srcdir)/wxrc.cpp
$(CXXC) -c -o $@ $(WXRC_CXXFLAGS) $(srcdir)/wxrc.cpp
# Include dependency info, if present:
@IF_GNU_MAKE@-include ./.deps/*.d
.PHONY: all install uninstall clean distclean install_wxrc uninstall_wxrc

View File

@@ -0,0 +1,186 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
include ../../build/msw/config.gcc
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
CPPDEPS = -MT$@ -MF$@.d -MD -MP
WX_RELEASE_NODOT = 33
COMPILER_PREFIX = gcc
OBJS = \
$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
LIBDIRNAME = \
.\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
SETUPHDIR = $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)
WXRC_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG) -D__WXMSW__ \
$(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
-I$(SETUPHDIR) -I.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_p) -W \
-Wall -I. $(__DLLFLAG_p) -DwxUSE_GUI=0 $(__RTTIFLAG_5) $(__EXCEPTIONSFLAG_6) \
-Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
WXRC_OBJECTS = \
$(OBJS)\wxrc_wxrc.o
### Conditionally set variables: ###
ifeq ($(USE_GUI),0)
PORTNAME = base
endif
ifeq ($(USE_GUI),1)
PORTNAME = msw$(TOOLKIT_VERSION)
endif
ifeq ($(OFFICIAL_BUILD),1)
COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
endif
ifeq ($(BUILD),debug)
WXDEBUGFLAG = d
endif
ifeq ($(WXUNIV),1)
WXUNIVNAME = univ
endif
ifeq ($(SHARED),1)
WXDLLFLAG = dll
endif
ifeq ($(SHARED),0)
LIBTYPE_SUFFIX = lib
endif
ifeq ($(SHARED),1)
LIBTYPE_SUFFIX = dll
endif
ifeq ($(MONOLITHIC),0)
EXTRALIBS_FOR_BASE =
endif
ifeq ($(MONOLITHIC),1)
EXTRALIBS_FOR_BASE =
endif
ifeq ($(USE_XML),1)
__wxrc___depname = $(OBJS)\wxrc.exe
endif
ifeq ($(BUILD),debug)
__OPTIMIZEFLAG_2 = -O0
endif
ifeq ($(BUILD),release)
__OPTIMIZEFLAG_2 = -O2
endif
ifeq ($(USE_RTTI),0)
__RTTIFLAG_5 = -fno-rtti
endif
ifeq ($(USE_RTTI),1)
__RTTIFLAG_5 =
endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONSFLAG_6 = -fno-exceptions
endif
ifeq ($(USE_EXCEPTIONS),1)
__EXCEPTIONSFLAG_6 =
endif
ifeq ($(WXUNIV),1)
__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
endif
ifeq ($(DEBUG_FLAG),0)
__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
endif
ifeq ($(BUILD),release)
__NDEBUG_DEFINE_p = -DNDEBUG
endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
endif
ifeq ($(USE_RTTI),0)
__RTTI_DEFINE_p = -DwxNO_RTTI
endif
ifeq ($(USE_THREADS),0)
__THREAD_DEFINE_p = -DwxNO_THREADS
endif
ifeq ($(USE_CAIRO),1)
____CAIRO_INCLUDEDIR_FILENAMES_p = -I$(CAIRO_ROOT)\include\cairo
endif
ifeq ($(SHARED),1)
__DLLFLAG_p = -DWXUSINGDLL
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_XML_p = \
-lwxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml
endif
ifeq ($(MONOLITHIC),0)
__WXLIB_BASE_p = -lwxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
endif
ifeq ($(MONOLITHIC),1)
__WXLIB_MONO_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
endif
ifeq ($(MONOLITHIC),1)
__LIB_PNG_IF_MONO_p = $(__LIB_PNG_p)
endif
ifeq ($(USE_GUI),1)
__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
endif
ifeq ($(USE_CAIRO),1)
__CAIRO_LIB_p = -lcairo
endif
ifeq ($(USE_CAIRO),1)
____CAIRO_LIBDIR_FILENAMES_p = -L$(CAIRO_ROOT)\lib
endif
ifeq ($(BUILD),debug)
ifeq ($(DEBUG_INFO),default)
__DEBUGINFO = -g
endif
endif
ifeq ($(BUILD),release)
ifeq ($(DEBUG_INFO),default)
__DEBUGINFO =
endif
endif
ifeq ($(DEBUG_INFO),0)
__DEBUGINFO =
endif
ifeq ($(DEBUG_INFO),1)
__DEBUGINFO = -g
endif
ifeq ($(USE_THREADS),0)
__THREADSFLAG =
endif
ifeq ($(USE_THREADS),1)
__THREADSFLAG = -mthreads
endif
all: $(OBJS)
$(OBJS):
-if not exist $(OBJS) mkdir $(OBJS)
### Targets: ###
all: $(__wxrc___depname)
clean:
-if exist $(OBJS)\*.o del $(OBJS)\*.o
-if exist $(OBJS)\*.d del $(OBJS)\*.d
-if exist $(OBJS)\wxrc.exe del $(OBJS)\wxrc.exe
ifeq ($(USE_XML),1)
$(OBJS)\wxrc.exe: $(WXRC_OBJECTS)
$(foreach f,$(subst \,/,$(WXRC_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp))
@move /y $@.rsp.tmp $@.rsp >nul
$(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) $(__WXLIB_XML_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lgdiplus -lmsimg32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme
@-del $@.rsp
endif
$(OBJS)\wxrc_wxrc.o: ./wxrc.cpp
$(CXX) -c -o $@ $(WXRC_CXXFLAGS) $(CPPDEPS) $<
.PHONY: all clean
SHELL := $(COMSPEC)
# Dependencies tracking:
-include $(OBJS)/*.d

View File

@@ -0,0 +1,340 @@
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.13 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
!include <../../build/msw/config.vc>
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
WX_RELEASE_NODOT = 33
COMPILER_PREFIX = vc
OBJS = \
$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
LIBDIRNAME = \
.\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(LIBTYPE_SUFFIX)$(CFG)
SETUPHDIR = $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)
WXRC_CXXFLAGS = /M$(__RUNTIME_LIBS_10)$(__DEBUGRUNTIME_4) /DWIN32 \
$(__DEBUGINFO_0) /Fd$(OBJS)\wxrc.pdb $(____DEBUGRUNTIME_3_p) \
$(__OPTIMIZEFLAG_6) /D_CRT_SECURE_NO_DEPRECATE=1 \
/D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \
$(__NO_VC_CRTDBG_p) $(__TARGET_CPU_COMPFLAG_p) /D__WXMSW__ \
$(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \
$(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
/I$(SETUPHDIR) /I.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_p) /W4 /I. \
$(__DLLFLAG_p) /D_CONSOLE /DwxUSE_GUI=0 $(__RTTIFLAG_11) \
$(__EXCEPTIONSFLAG_12) $(CPPFLAGS) $(CXXFLAGS)
WXRC_OBJECTS = \
$(OBJS)\wxrc_wxrc.obj
### Conditionally set variables: ###
!if "$(TARGET_CPU)" == "AMD64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "ARM"
ARCH_SUFFIX = _arm
!endif
!if "$(TARGET_CPU)" == "ARM64"
ARCH_SUFFIX = _arm64
!endif
!if "$(TARGET_CPU)" == "IA64"
ARCH_SUFFIX = _ia64
!endif
!if "$(TARGET_CPU)" == "X64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "amd64"
ARCH_SUFFIX = _x64
!endif
!if "$(TARGET_CPU)" == "arm"
ARCH_SUFFIX = _arm
!endif
!if "$(TARGET_CPU)" == "arm64"
ARCH_SUFFIX = _arm64
!endif
!if "$(TARGET_CPU)" == "ia64"
ARCH_SUFFIX = _ia64
!endif
!if "$(TARGET_CPU)" == "x64"
ARCH_SUFFIX = _x64
!endif
!if "$(USE_GUI)" == "0"
PORTNAME = base
!endif
!if "$(USE_GUI)" == "1"
PORTNAME = msw$(TOOLKIT_VERSION)
!endif
!if "$(OFFICIAL_BUILD)" == "1"
COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
WXDEBUGFLAG = d
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
WXDEBUGFLAG = d
!endif
!if "$(WXUNIV)" == "1"
WXUNIVNAME = univ
!endif
!if "$(SHARED)" == "1"
WXDLLFLAG = dll
!endif
!if "$(SHARED)" == "0"
LIBTYPE_SUFFIX = lib
!endif
!if "$(SHARED)" == "1"
LIBTYPE_SUFFIX = dll
!endif
!if "$(TARGET_CPU)" == "AMD64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "ARM"
LINK_TARGET_CPU = /MACHINE:ARM
!endif
!if "$(TARGET_CPU)" == "ARM64"
LINK_TARGET_CPU = /MACHINE:ARM64
!endif
!if "$(TARGET_CPU)" == "IA64"
LINK_TARGET_CPU = /MACHINE:IA64
!endif
!if "$(TARGET_CPU)" == "X64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "amd64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(TARGET_CPU)" == "arm"
LINK_TARGET_CPU = /MACHINE:ARM
!endif
!if "$(TARGET_CPU)" == "arm64"
LINK_TARGET_CPU = /MACHINE:ARM64
!endif
!if "$(TARGET_CPU)" == "ia64"
LINK_TARGET_CPU = /MACHINE:IA64
!endif
!if "$(TARGET_CPU)" == "x64"
LINK_TARGET_CPU = /MACHINE:X64
!endif
!if "$(MONOLITHIC)" == "0"
EXTRALIBS_FOR_BASE =
!endif
!if "$(MONOLITHIC)" == "1"
EXTRALIBS_FOR_BASE =
!endif
!if "$(USE_XML)" == "1"
__wxrc___depname = $(OBJS)\wxrc.exe
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_0 = /Zi
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_0 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_0 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_0 = /Zi
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_1 = /DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_1 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_1 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_1 = /DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_2 = $(__DEBUGRUNTIME_5)
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO_2 =
!endif
!if "$(DEBUG_INFO)" == "0"
__DEBUGINFO_2 =
!endif
!if "$(DEBUG_INFO)" == "1"
__DEBUGINFO_2 = $(__DEBUGRUNTIME_5)
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p = /D_DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME_3_p =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
____DEBUGRUNTIME_3_p =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
____DEBUGRUNTIME_3_p = /D_DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_4 = d
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_4 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__DEBUGRUNTIME_4 =
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
__DEBUGRUNTIME_4 = d
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_5 =
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME_5 = /opt:ref /opt:icf
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__DEBUGRUNTIME_5 = /opt:ref /opt:icf
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "1"
__DEBUGRUNTIME_5 =
!endif
!if "$(BUILD)" == "debug"
__OPTIMIZEFLAG_6 = /Od
!endif
!if "$(BUILD)" == "release"
__OPTIMIZEFLAG_6 = /O2
!endif
!if "$(USE_THREADS)" == "0"
__THREADSFLAG_9 = L
!endif
!if "$(USE_THREADS)" == "1"
__THREADSFLAG_9 = T
!endif
!if "$(RUNTIME_LIBS)" == "dynamic"
__RUNTIME_LIBS_10 = D
!endif
!if "$(RUNTIME_LIBS)" == "static"
__RUNTIME_LIBS_10 = $(__THREADSFLAG_9)
!endif
!if "$(USE_RTTI)" == "0"
__RTTIFLAG_11 = /GR-
!endif
!if "$(USE_RTTI)" == "1"
__RTTIFLAG_11 = /GR
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONSFLAG_12 =
!endif
!if "$(USE_EXCEPTIONS)" == "1"
__EXCEPTIONSFLAG_12 = /EHsc
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
!if "$(TARGET_CPU)" == ""
__TARGET_CPU_COMPFLAG_p = /DTARGET_CPU_COMPFLAG=0
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "x64"
__TARGET_CPU_COMPFLAG_p =
!endif
!if "$(TARGET_CPU)" == "" && "$(VISUALSTUDIOPLATFORM)" == "X64"
__TARGET_CPU_COMPFLAG_p =
!endif
!if "$(WXUNIV)" == "1"
__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
!endif
!if "$(DEBUG_FLAG)" == "0"
__DEBUG_DEFINE_p = /DwxDEBUG_LEVEL=0
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__NDEBUG_DEFINE_p = /DNDEBUG
!endif
!if "$(DEBUG_RUNTIME_LIBS)" == "0"
__NDEBUG_DEFINE_p = /DNDEBUG
!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS
!endif
!if "$(USE_RTTI)" == "0"
__RTTI_DEFINE_p = /DwxNO_RTTI
!endif
!if "$(USE_THREADS)" == "0"
__THREAD_DEFINE_p = /DwxNO_THREADS
!endif
!if "$(USE_CAIRO)" == "1"
____CAIRO_INCLUDEDIR_FILENAMES_p = /I$(CAIRO_ROOT)\include\cairo
!endif
!if "$(SHARED)" == "1"
__DLLFLAG_p = /DWXUSINGDLL
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_XML_p = \
wxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib
!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_BASE_p = \
wxbase$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
!if "$(MONOLITHIC)" == "1"
__WXLIB_MONO_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
!if "$(MONOLITHIC)" == "1"
__LIB_PNG_IF_MONO_p = $(__LIB_PNG_p)
!endif
!if "$(USE_GUI)" == "1"
__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
!endif
!if "$(USE_CAIRO)" == "1"
__CAIRO_LIB_p = cairo.lib
!endif
!if "$(USE_CAIRO)" == "1"
____CAIRO_LIBDIR_FILENAMES_p = /LIBPATH:$(CAIRO_ROOT)\lib
!endif
all: $(OBJS)
$(OBJS):
-if not exist $(OBJS) mkdir $(OBJS)
### Targets: ###
all: $(__wxrc___depname)
clean:
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
-if exist $(OBJS)\*.res del $(OBJS)\*.res
-if exist $(OBJS)\*.pch del $(OBJS)\*.pch
-if exist $(OBJS)\wxrc.exe del $(OBJS)\wxrc.exe
-if exist $(OBJS)\wxrc.ilk del $(OBJS)\wxrc.ilk
-if exist $(OBJS)\wxrc.pdb del $(OBJS)\wxrc.pdb
!if "$(USE_XML)" == "1"
$(OBJS)\wxrc.exe: $(WXRC_OBJECTS)
link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\wxrc.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<<
$(WXRC_OBJECTS) $(__WXLIB_XML_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib gdiplus.lib msimg32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib
<<
!endif
$(OBJS)\wxrc_wxrc.obj: .\wxrc.cpp
$(CXX) /c /nologo /TP /Fo$@ $(WXRC_CXXFLAGS) .\wxrc.cpp

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" ?>
<makefile>
<include file="../../build/bakefiles/common_samples.bkl"/>
<exe id="wxrc" cond="USE_XML=='1'"
template="wx_util_console" template_append="wx_append_base">
<sources>wxrc.cpp</sources>
<wx-lib>xml</wx-lib>
<wx-lib>base</wx-lib>
<install-to>$(BINDIR)</install-to>
</exe>
<if cond="FORMAT=='autoconf'">
<!-- Install wxrc as $prefix/bin/wxrc-$version$flavour with a wxrc
symlink pointing to it, so that users can use wxrc from different
versions. -->
<set var="versioned_name">wxrc-$(WX_RELEASE)$(WX_FLAVOUR)$(EXEEXT)</set>
<modify-target target="install_wxrc">
<command>
rm -f $(DESTDIR)$(BINDIR)/wxrc$(EXEEXT) $(DESTDIR)$(BINDIR)/$(versioned_name)
$(INSTALL_PROGRAM) wxrc$(EXEEXT) $(DESTDIR)$(BINDIR)
mv -f $(DESTDIR)$(BINDIR)/wxrc$(EXEEXT) $(DESTDIR)$(BINDIR)/$(versioned_name)
(cd $(DESTDIR)$(BINDIR) &amp;&amp; $(LN_S) $(versioned_name) wxrc$(EXEEXT))
</command>
</modify-target>
</if>
</makefile>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
mondrian ICON "mondrian.ico"
#include "wx/msw/wx.rc"

View File

@@ -0,0 +1,446 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="DLL Debug|Win32">
<Configuration>DLL Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="DLL Debug|x64">
<Configuration>DLL Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="DLL Release|Win32">
<Configuration>DLL Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="DLL Release|x64">
<Configuration>DLL Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}</ProjectGuid>
</PropertyGroup>
<Import Project="..\..\build\msw\wx_config.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="..\..\build\msw\wx_setup.props" />
<Import Project="..\..\build\msw\wx_local.props" Condition="Exists('..\..\build\msw\wx_local.props')" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>14.0.24720.0</_ProjectFileVersion>
<OutDir>$(wxIntRootDir)</OutDir>
<IntDir>$(wxIntRootDir)$(ProjectName)\</IntDir>
<GenerateManifest>true</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>wxbase$(wxShortVersionString)ud_xml.lib;wxbase$(wxShortVersionString)ud.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>.\..\..\lib\$(wxOutDirName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<Manifest>
<AdditionalManifestFiles>./../../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>wxbase$(wxShortVersionString)u_xml.lib;wxbase$(wxShortVersionString)u.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;shlwapi.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;version.lib;ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>.\..\..\lib\$(wxOutDirName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<Manifest>
<AdditionalManifestFiles>./../../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">
<Midl>
<PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>wxbase$(wxShortVersionString)ud_xml.lib;wxbase$(wxShortVersionString)ud.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;shlwapi.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;version.lib;ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>.\..\..\lib\$(wxOutDirName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<Manifest>
<AdditionalManifestFiles>./../../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|Win32'">
<Midl>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>wxbase$(wxShortVersionString)u_xml.lib;wxbase$(wxShortVersionString)u.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;shlwapi.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;version.lib;ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>.\..\..\lib\$(wxOutDirName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<Manifest>
<AdditionalManifestFiles>./../../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>wxbase$(wxShortVersionString)ud_xml.lib;wxbase$(wxShortVersionString)ud.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;shlwapi.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;version.lib;ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>.\..\..\lib\$(wxOutDirName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<Manifest>
<AdditionalManifestFiles>./../../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>wxbase$(wxShortVersionString)u_xml.lib;wxbase$(wxShortVersionString)u.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;shlwapi.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;version.lib;ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>.\..\..\lib\$(wxOutDirName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<Manifest>
<AdditionalManifestFiles>./../../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">
<Midl>
<PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>wxbase$(wxShortVersionString)ud_xml.lib;wxbase$(wxShortVersionString)ud.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;shlwapi.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;version.lib;ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>.\..\..\lib\$(wxOutDirName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<Manifest>
<AdditionalManifestFiles>./../../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">
<Midl>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>.\..\..\lib\$(wxOutDirName)\$(wxIncSubDir);.\..\..\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>wxbase$(wxShortVersionString)u_xml.lib;wxbase$(wxShortVersionString)u.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;shlwapi.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;version.lib;ws2_32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>.\..\..\lib\$(wxOutDirName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<Manifest>
<AdditionalManifestFiles>./../../include/wx/msw/wx_dpi_aware_pmv2.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="wxrc.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="wxrc.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,80 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxrc", "wxrc.vcxproj", "{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}"
ProjectSection(ProjectDependencies) = postProject
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "..\..\build\msw\wx_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "..\..\build\msw\wx_xml.vcxproj", "{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
DLL Debug|Win32 = DLL Debug|Win32
DLL Debug|x64 = DLL Debug|x64
DLL Release|Win32 = DLL Release|Win32
DLL Release|x64 = DLL Release|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|Win32.ActiveCfg = Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|Win32.Build.0 = Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|x64.ActiveCfg = Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|x64.Build.0 = Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|x64.Build.0 = DLL Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|Win32.Build.0 = DLL Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|x64.ActiveCfg = DLL Release|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|x64.Build.0 = DLL Release|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|Win32.ActiveCfg = Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|Win32.Build.0 = Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|x64.ActiveCfg = Release|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|x64.Build.0 = Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.ActiveCfg = Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.Build.0 = Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.ActiveCfg = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.Build.0 = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.Build.0 = DLL Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.Build.0 = DLL Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.ActiveCfg = DLL Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.Build.0 = DLL Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.ActiveCfg = Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.Build.0 = Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.ActiveCfg = Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.Build.0 = Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.ActiveCfg = Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.Build.0 = Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.ActiveCfg = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.Build.0 = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.Build.0 = DLL Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.Build.0 = DLL Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.ActiveCfg = DLL Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.Build.0 = DLL Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.ActiveCfg = Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.Build.0 = Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.ActiveCfg = Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,80 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.25920.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxrc", "wxrc.vcxproj", "{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}"
ProjectSection(ProjectDependencies) = postProject
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "..\..\build\msw\wx_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "..\..\build\msw\wx_xml.vcxproj", "{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
DLL Debug|Win32 = DLL Debug|Win32
DLL Debug|x64 = DLL Debug|x64
DLL Release|Win32 = DLL Release|Win32
DLL Release|x64 = DLL Release|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|Win32.ActiveCfg = Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|Win32.Build.0 = Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|x64.ActiveCfg = Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|x64.Build.0 = Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|x64.Build.0 = DLL Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|Win32.Build.0 = DLL Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|x64.ActiveCfg = DLL Release|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|x64.Build.0 = DLL Release|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|Win32.ActiveCfg = Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|Win32.Build.0 = Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|x64.ActiveCfg = Release|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|x64.Build.0 = Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.ActiveCfg = Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.Build.0 = Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.ActiveCfg = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.Build.0 = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.Build.0 = DLL Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.Build.0 = DLL Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.ActiveCfg = DLL Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.Build.0 = DLL Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.ActiveCfg = Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.Build.0 = Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.ActiveCfg = Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.Build.0 = Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.ActiveCfg = Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.Build.0 = Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.ActiveCfg = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.Build.0 = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.Build.0 = DLL Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.Build.0 = DLL Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.ActiveCfg = DLL Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.Build.0 = DLL Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.ActiveCfg = Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.Build.0 = Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.ActiveCfg = Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,80 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29020.237
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxrc", "wxrc.vcxproj", "{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}"
ProjectSection(ProjectDependencies) = postProject
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "..\..\build\msw\wx_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "..\..\build\msw\wx_xml.vcxproj", "{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
DLL Debug|Win32 = DLL Debug|Win32
DLL Debug|x64 = DLL Debug|x64
DLL Release|Win32 = DLL Release|Win32
DLL Release|x64 = DLL Release|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|Win32.ActiveCfg = Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|Win32.Build.0 = Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|x64.ActiveCfg = Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|x64.Build.0 = Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|x64.Build.0 = DLL Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|Win32.Build.0 = DLL Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|x64.ActiveCfg = DLL Release|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|x64.Build.0 = DLL Release|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|Win32.ActiveCfg = Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|Win32.Build.0 = Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|x64.ActiveCfg = Release|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|x64.Build.0 = Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.ActiveCfg = Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.Build.0 = Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.ActiveCfg = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.Build.0 = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.Build.0 = DLL Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.Build.0 = DLL Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.ActiveCfg = DLL Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.Build.0 = DLL Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.ActiveCfg = Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.Build.0 = Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.ActiveCfg = Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.Build.0 = Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.ActiveCfg = Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.Build.0 = Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.ActiveCfg = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.Build.0 = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.Build.0 = DLL Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.Build.0 = DLL Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.ActiveCfg = DLL Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.Build.0 = DLL Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.ActiveCfg = Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.Build.0 = Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.ActiveCfg = Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,80 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31919.166
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxrc", "wxrc.vcxproj", "{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}"
ProjectSection(ProjectDependencies) = postProject
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "..\..\build\msw\wx_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "..\..\build\msw\wx_xml.vcxproj", "{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
DLL Debug|Win32 = DLL Debug|Win32
DLL Debug|x64 = DLL Debug|x64
DLL Release|Win32 = DLL Release|Win32
DLL Release|x64 = DLL Release|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|Win32.ActiveCfg = Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|Win32.Build.0 = Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|x64.ActiveCfg = Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Debug|x64.Build.0 = Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Debug|x64.Build.0 = DLL Debug|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|Win32.Build.0 = DLL Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|x64.ActiveCfg = DLL Release|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.DLL Release|x64.Build.0 = DLL Release|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|Win32.ActiveCfg = Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|Win32.Build.0 = Release|Win32
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|x64.ActiveCfg = Release|x64
{AF3B845A-1816-49F3-AB4B-A1B418DF33A8}.Release|x64.Build.0 = Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.ActiveCfg = Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.Build.0 = Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.ActiveCfg = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.Build.0 = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.Build.0 = DLL Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.Build.0 = DLL Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.ActiveCfg = DLL Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.Build.0 = DLL Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.ActiveCfg = Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.Build.0 = Release|Win32
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.ActiveCfg = Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.Build.0 = Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.ActiveCfg = Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.Build.0 = Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.ActiveCfg = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.Build.0 = Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.Build.0 = DLL Debug|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.Build.0 = DLL Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.ActiveCfg = DLL Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.Build.0 = DLL Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.ActiveCfg = Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.Build.0 = Release|Win32
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.ActiveCfg = Release|x64
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal