Merge remote-tracking branch 'remotes/upstream/master'

This commit is contained in:
2018-12-06 12:02:55 +01:00
307 changed files with 2817 additions and 1316 deletions

View File

@@ -1,34 +1,55 @@
AliKet <aliket1435@gmail.com>
Anil Kumar <Anil.Kumar@efi.com> <anilkumar8753@gmail.com>
ARATA Mizuki <minorinoki@gmail.com>
Artur Sochirca <arturs@bricsys.com> <arturs@trac.wxwidgets.org>
Artur Wieczorek <artwik@wp.pl>
Daniel Kulp <dan@kulp.com> <dkulp@apache.org>
Blake Eryx <seasweptdreams@gmail.com> <Blake-Eryx@users.noreply.github.com>
Bogdan Iordanescu <bogdan_iordanescu@yahoo.com>
Cătălin Răceanu <maildus@gmail.com>
<maildus@gmail.com> <catalinr@users.noreply.github.com>
Danny Scott <doscott@doscott.ca> <doscott@gmail.com>
<maildus@gmail.com> <catalinraceanu2@gmail.com>
Danny Scott <doscott@doscott.ca>
<doscott@doscott.ca> <doscott@gmail.com>
Dimitri Schoolwerth <dimitri.schoolwerth@gmail.com> <dimitri@schoolwerth.com>
Hashir Ahmad <hashirahmadleo@gmail.com>
Frédéric Bron <frederic.bron@m4x.org> <ufospoke@gmail.com>
Hubert Talbot <hubert.talbot64@gmail.com>
Igor Korot <ikorot01@gmail.com>
Ilya Bizyaev <bizyaev.game@yandex.ru>
Jens Göpfert <jens.goepfert@tracetronic.de> <jensgoe@users.noreply.github.com>
John Roberts <johnr@iinet.net.au> <johnr@jjbone.com>
Jouk Jansen <joukj@hrem.nano.tudelft.nl>
Jose Lorenzo <josee.loren@gmail.com> <isleo11@gmail.com>
Julian Smart <julian@anthemion.co.uk>
Jevgenijs Protopopovs <jprotopopov1122@gmail.com>
Hartwig Wiesmann <git@skywind.eu>
<git@skywind.eu> <hartwig.wiesmann@wanadoo.nl>
Kinaou Hervé <kinaouherve@gmail.com>
Kolya Kosenko <kolya.kosenko@gmail.com> <kosenko@trac.wxwidgets.org>
Lauri Nurmi <lanurmi@iki.fi> <lauri@ksenos.fi>
Lynn C. Rees <lcrees@gmail.com>
Maarten Bent <MaartenBent@users.noreply.github.com>
Manuel Martin <mmartin@ceyd.es>
Martin Ettl <ettl.martin78@googlemail.com> <ettl.martin78@gmail.com>
Markus Juergens <mj@be-enabled.de> <markusj@trac.wxwidgets.org>
Martin Ettl <ettl.martin78@googlemail.com>
Martin Ettl <ettl.martin78@googlemail.com> <ettl.martin78@gmail.com>
Martin Ettl <ettl.martin78@googlemail.com> <orbitcowboy@web.de>
Mathew Maidment <mathew1800@gmail.com>
Micha Ahrweiler <mbaschnitzi@users.noreply.github.com>
ousnius <ousnius@users.noreply.github.com> <denis41@hotmail.de>
Paul Cornett <paulcor@bullseye.com> <paulcor@users.noreply.github.com>
Paul Kulchenko <paul@kulchenko.com> <paulclinger@gmail.com>
Pavel O. <pavelxdd@users.noreply.github.com>
Pavel O. <pavelxdd@users.noreply.github.com> <pavel.otchertsov@gmail.com>
Pavel Tyunin <36256989+pavel-t@users.noreply.github.com>
PB <PBfordev@gmail.com> <pbfordev@gmail.com>
<PBfordev@gmail.com> <PBforDev@gmail.com>
Prashant Kumar Nirmal <prashantkn94@gmail.com> <ohhereim@gmail.com>
René Kijewski <rene.kijewski@fu-berlin.de> <kijewski@mi.fu-berlin.de>
Richard Fath <richard.fath@t-online.de>
Richard Powell <rmpowell77@me.com>
Roberto Boriotti <roberto.boriotti@canon-europe.com>
Steve Browne <swbrowne@gmail.com> <sbrowne@unknown>
<swbrowne@gmail.com> <amn3sia@gmail.com>
Tim Kosse <tim.kosse@gmx.de> <tim.kosse@filezilla-project.org>
@@ -41,4 +62,6 @@ Václav Slavík <vaclav@slavik.io> <vslavik@fastmail.fm>
Václav Slavík <vaclav@slavik.io>
Vadim Zeitlin <vadim@wxwidgets.org> <vz-github@zeitlins.org>
<vadim@wxwidgets.org> <vadim@zeitlins.org>
Wolfgang Stöggl <c72578@yahoo.de>
Xlord2 <b1146285@trbvn.com> <b1223723@trbvn.com>
Iwbnwif Yiw <iwbnwif@gmail.com>

2
3rdparty/catch vendored

View File

@@ -206,8 +206,10 @@ WXTIFF_OBJECTS = \
wxtiff_tif_tile.o \
wxtiff_tif_version.o \
wxtiff_tif_warning.o \
wxtiff_tif_webp.o \
wxtiff_tif_write.o \
wxtiff_tif_zip.o
wxtiff_tif_zip.o \
wxtiff_tif_zstd.o
WXEXPAT_CFLAGS = -DNDEBUG -I./src/expat/expat -DHAVE_EXPAT_CONFIG_H \
$(____SHARED) $(CPPFLAGS) $(CFLAGS)
WXEXPAT_OBJECTS = \
@@ -15026,12 +15028,18 @@ wxtiff_tif_version.o: $(srcdir)/src/tiff/libtiff/tif_version.c
wxtiff_tif_warning.o: $(srcdir)/src/tiff/libtiff/tif_warning.c
$(CCC) -c -o $@ $(WXTIFF_CFLAGS) $(srcdir)/src/tiff/libtiff/tif_warning.c
wxtiff_tif_webp.o: $(srcdir)/src/tiff/libtiff/tif_webp.c
$(CCC) -c -o $@ $(WXTIFF_CFLAGS) $(srcdir)/src/tiff/libtiff/tif_webp.c
wxtiff_tif_write.o: $(srcdir)/src/tiff/libtiff/tif_write.c
$(CCC) -c -o $@ $(WXTIFF_CFLAGS) $(srcdir)/src/tiff/libtiff/tif_write.c
wxtiff_tif_zip.o: $(srcdir)/src/tiff/libtiff/tif_zip.c
$(CCC) -c -o $@ $(WXTIFF_CFLAGS) $(srcdir)/src/tiff/libtiff/tif_zip.c
wxtiff_tif_zstd.o: $(srcdir)/src/tiff/libtiff/tif_zstd.c
$(CCC) -c -o $@ $(WXTIFF_CFLAGS) $(srcdir)/src/tiff/libtiff/tif_zstd.c
@COND_PLATFORM_UNIX_1@wxtiff_tif_unix.o: $(srcdir)/src/tiff/libtiff/tif_unix.c
@COND_PLATFORM_UNIX_1@ $(CCC) -c -o $@ $(WXTIFF_CFLAGS) $(srcdir)/src/tiff/libtiff/tif_unix.c

View File

@@ -13,5 +13,5 @@ control.
After doing this, please proceed with the build as with any official
release, i.e. follow the instructions in the port-specific files, e.g.
[wxMSW](docs/msw/install.txt), [wxGTK](docs/gtk/install.txt),
[wxOSX](docs/osx/install.txt) and so on.
[wxMSW](docs/msw/install.md), [wxGTK](docs/gtk/install.md),
[wxOSX](docs/osx/install.md) and so on.

View File

@@ -3287,7 +3287,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<!-- Misc plugin sources: -->
<!-- ====================================================================== -->
<set var="UNIX_SOUND_SRC_SDL" hints="files">
<set var="UNIX_SOUND_SDL_SRC" hints="files">
src/unix/sound_sdl.cpp
</set>
@@ -3708,7 +3708,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<!-- wxAdv sources -->
<set var="PLUGIN_SRC">
<if cond="FORMAT=='autoconf' and PLATFORM_UNIX=='1' and USE_PLUGINS=='0'">
$(UNIX_SOUND_SRC_SDL)
$(UNIX_SOUND_SDL_SRC)
</if>
</set>

View File

@@ -7,7 +7,7 @@
<!-- ================================================================ -->
<wx-base-plugin id="sound_sdl" cond="WITH_PLUGIN_SDL=='1'">
<sources>$(UNIX_SOUND_SRC_SDL)</sources>
<sources>$(UNIX_SOUND_SDL_SRC)</sources>
<ldlibs>$(EXTRALIBS_SDL)</ldlibs>
</wx-base-plugin>

View File

@@ -93,8 +93,10 @@
src/tiff/libtiff/tif_tile.c
src/tiff/libtiff/tif_version.c
src/tiff/libtiff/tif_warning.c
src/tiff/libtiff/tif_webp.c
src/tiff/libtiff/tif_write.c
src/tiff/libtiff/tif_zip.c
src/tiff/libtiff/tif_zstd.c
</sources>
</lib>

View File

@@ -44,7 +44,7 @@ function(wx_write_config)
# TODO: set variables
set(includedir "$")
wx_string_append(libdir "{prefix}/include")
wx_string_append(includedir "{prefix}/include")
set(libdir "$")
wx_string_append(libdir "{exec_prefix}/lib")
set(bindir "$")

View File

@@ -2869,6 +2869,14 @@ set(WEBVIEW_GTK_SRC
src/gtk/webview_webkit.cpp
)
set(WEBVIEW2_GTK_SRC
src/gtk/webview_webkit2.cpp
)
set(WEBVIEW_WEBKIT2_EXTENSION_SRC
src/gtk/webview_webkit2_extension.cpp
)
set(XRC_SRC
src/xrc/xh_activityindicator.cpp
src/xrc/xh_animatctrl.cpp
@@ -3049,7 +3057,7 @@ set(OPENGL_OSX_SHARED_SRC
src/osx/glcanvas_osx.cpp
)
set(UNIX_SOUND_SRC_SDL
set(UNIX_SOUND_SDL_SRC
src/unix/sound_sdl.cpp
)

View File

@@ -223,13 +223,40 @@ if(wxUSE_GUI)
endif()
endif()
if(wxUSE_WEBVIEW AND WXGTK)
if(wxUSE_WEBVIEW)
if(WXGTK)
if(wxUSE_WEBVIEW_WEBKIT)
find_package(LibSoup)
find_package(Webkit)
if(NOT WEBKIT_FOUND OR NOT LIBSOUP_FOUND)
message(WARNING "webkit not found, wxWebview won't be available")
if(WXGTK2)
find_package(Webkit 1.0)
elseif(WXGTK3)
find_package(Webkit2)
if(NOT WEBKIT2_FOUND)
find_package(Webkit 3.0)
endif()
endif()
endif()
set(wxUSE_WEBVIEW_WEBKIT OFF)
set(wxUSE_WEBVIEW_WEBKIT2 OFF)
if(WEBKIT_FOUND AND LIBSOUP_FOUND)
set(wxUSE_WEBVIEW_WEBKIT ON)
elseif(WEBKIT2_FOUND AND LIBSOUP_FOUND)
set(wxUSE_WEBVIEW_WEBKIT2 ON)
else()
message(WARNING "webkit not found or enabled, wxWebview won't be available")
wx_option_force_value(wxUSE_WEBVIEW OFF)
endif()
elseif(WXMSW)
if(NOT wxUSE_WEBVIEW_IE)
message(WARNING "WebviewIE not found or enabled, wxWebview won't be available")
wx_option_force_value(wxUSE_WEBVIEW OFF)
endif()
elseif(APPLE)
if(NOT wxUSE_WEBVIEW_WEBKIT)
message(WARNING "webkit not found or enabled, wxWebview won't be available")
wx_option_force_value(wxUSE_WEBVIEW OFF)
endif()
endif()
endif()
if(wxUSE_PRIVATE_FONTS AND WXGTK)
@@ -257,4 +284,15 @@ if(wxUSE_GUI)
wx_option_force_value(wxUSE_MEDIACTRL OFF)
endif()
endif()
if(UNIX AND wxUSE_LIBSDL)
find_package(SDL2)
if(NOT SDL2_FOUND)
find_package(SDL)
endif()
if(NOT SDL2_FOUND AND NOT SDL_FOUND)
message(WARNING "SDL not found, SDL Audio back-end won't be available")
wx_option_force_value(wxUSE_LIBSDL OFF)
endif()
endif()
endif()

View File

@@ -20,10 +20,32 @@ if(MSVC)
DIRECTORY "${wxSOURCE_DIR}/include/msvc"
DESTINATION "include")
endif()
# setup header and wx-config
if(MSVC OR MINGW)
wx_install(
DIRECTORY "${wxSETUP_HEADER_PATH}"
DESTINATION "lib${wxPLATFORM_LIB_DIR}")
elseif(UNIX)
wx_install(
DIRECTORY "${wxSETUP_HEADER_PATH}"
DESTINATION "lib/wx/include")
wx_install(
FILES "${wxOUTPUT_DIR}/wx/config/${wxBUILD_FILE_ID}"
DESTINATION "lib/wx/config"
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ
)
install(DIRECTORY DESTINATION "bin")
install(CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E create_symlink \
${CMAKE_INSTALL_PREFIX}/lib/wx/config/${wxBUILD_FILE_ID} \
${CMAKE_INSTALL_PREFIX}/bin/wx-config \
)"
)
endif()
# uninstall target
@@ -34,6 +56,12 @@ else()
endif()
if(NOT TARGET ${UNINST_NAME})
# these files are not added to the install manifest
set(WX_EXTRA_UNINSTALL_FILES
"${CMAKE_INSTALL_PREFIX}/bin/wx-config"
"${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}"
)
configure_file(
"${wxSOURCE_DIR}/build/cmake/uninstall.cmake.in"
"${wxBINARY_DIR}/uninstall.cmake"

View File

@@ -27,28 +27,35 @@ elseif(UNIX)
endif()
wx_add_library(base IS_BASE ${BASE_FILES})
wx_lib_link_libraries(base PRIVATE
${ZLIB_LIBRARIES}
${REGEX_LIBRARIES}
)
if(NOT wxBUILD_MONOLITHIC)
wx_lib_compile_definitions(base PRIVATE wxUSE_BASE=1)
endif()
if(wxUSE_ZLIB)
wx_lib_include_directories(base PRIVATE ${ZLIB_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${ZLIB_LIBRARIES})
endif()
if(wxUSE_REGEX)
wx_lib_include_directories(base PRIVATE ${REGEX_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${REGEX_LIBRARIES})
endif()
if(LIBSECRET_FOUND)
if(wxUSE_LIBLZMA)
wx_lib_include_directories(base PRIVATE ${LIBLZMA_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${LIBLZMA_LIBRARIES})
endif()
if(UNIX AND wxUSE_SECRETSTORE)
wx_lib_include_directories(base PRIVATE ${LIBSECRET_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${LIBSECRET_LIBRARIES})
endif()
if(wxUSE_LIBICONV AND ICONV_LIBRARIES)
if(wxUSE_LIBICONV AND ICONV_FOUND)
wx_lib_include_directories(base PRIVATE ${ICONV_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${ICONV_LIBRARIES})
endif()
if(wxUSE_THREADS AND CMAKE_THREAD_LIBS_INIT)
wx_lib_link_libraries(base PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif()
if(APPLE)
wx_lib_link_libraries(base
PRIVATE
@@ -60,10 +67,7 @@ if(APPLE)
"-framework IOKit"
)
elseif(UNIX)
wx_lib_link_libraries(base PRIVATE
dl
${LIBSECRET_LIBRARIES}
)
wx_lib_link_libraries(base PRIVATE dl)
endif()
wx_finalize_lib(base)

View File

@@ -15,6 +15,9 @@ if(WIN32)
wx_append_sources(CORE_SRC BASE_AND_GUI_WIN32)
elseif(UNIX)
wx_append_sources(CORE_SRC UNIX)
if(wxUSE_LIBSDL)
wx_append_sources(CORE_SRC UNIX_SOUND_SDL)
endif()
endif()
if(WXMSW)
@@ -62,27 +65,26 @@ foreach(lib JPEG PNG TIFF)
endforeach()
if(WIN32)
wx_lib_link_libraries(core PRIVATE
winmm
)
wx_lib_link_libraries(core PRIVATE winmm)
endif()
if(WXOSX_COCOA)
wx_lib_link_libraries(core PUBLIC
"-framework AudioToolbox"
)
wx_lib_link_libraries(core PUBLIC "-framework AudioToolbox")
if(wxUSE_WEBKIT)
wx_lib_link_libraries(core PUBLIC
"-framework WebKit"
)
wx_lib_link_libraries(core PUBLIC "-framework WebKit")
endif()
endif()
if(WXGTK AND wxUSE_PRIVATE_FONTS)
wx_lib_include_directories(core PUBLIC
${FONTCONFIG_INCLUDE_DIR}
)
wx_lib_link_libraries(core PUBLIC
${FONTCONFIG_LIBRARIES}
)
wx_lib_include_directories(core PUBLIC ${FONTCONFIG_INCLUDE_DIR})
wx_lib_link_libraries(core PUBLIC ${FONTCONFIG_LIBRARIES})
endif()
if(UNIX AND wxUSE_LIBSDL)
if(SDL2_FOUND)
wx_lib_include_directories(core PUBLIC ${SDL2_INCLUDE_DIR})
wx_lib_link_libraries(core PUBLIC ${SDL2_LIBRARY})
elseif(SDL_FOUND)
wx_lib_include_directories(core PUBLIC ${SDL_INCLUDE_DIR})
wx_lib_link_libraries(core PUBLIC ${SDL_LIBRARY})
endif()
endif()
wx_finalize_lib(core)

View File

@@ -167,10 +167,10 @@ target_compile_definitions(wxscintilla PUBLIC
if(wxBUILD_PRECOMP)
# The auto-generated header causes undefined members and identifiers in the
# standard c++ headers when using clang on macOS or Windows.
# standard c++ headers when using clang.
# Do not disable precompiled headers entirely but use the main Scintilla
# header as prefix header so there is at least a small speedup.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND (APPLE OR WIN32))
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(wxSCINTILLA_PREC_HEADER "${wxSOURCE_DIR}/src/stc/scintilla/include/Scintilla.h")
endif()
wx_target_enable_precomp(wxscintilla ${wxSCINTILLA_PREC_HEADER})

View File

@@ -59,8 +59,10 @@ if(wxUSE_LIBTIFF STREQUAL "builtin")
src/tiff/libtiff/tif_tile.c
src/tiff/libtiff/tif_version.c
src/tiff/libtiff/tif_warning.c
src/tiff/libtiff/tif_webp.c
src/tiff/libtiff/tif_write.c
src/tiff/libtiff/tif_zip.c
src/tiff/libtiff/tif_zstd.c
)
if(WIN32)
# define this to get rid of a warning about using POSIX lfind():

View File

@@ -14,25 +14,70 @@ wx_append_sources(WEBVIEW_FILES WEBVIEW_CMN)
if(WXMSW)
wx_append_sources(WEBVIEW_FILES WEBVIEW_MSW)
elseif(WXGTK)
if(wxUSE_WEBVIEW_WEBKIT2)
wx_append_sources(WEBVIEW_FILES WEBVIEW2_GTK)
elseif(wxUSE_WEBVIEW_WEBKIT)
wx_append_sources(WEBVIEW_FILES WEBVIEW_GTK)
endif()
elseif(APPLE)
wx_append_sources(WEBVIEW_FILES WEBVIEW_OSX_SHARED)
endif()
wx_add_library(webview ${WEBVIEW_FILES})
if(APPLE)
wx_lib_link_libraries(webview PUBLIC
"-framework WebKit"
)
elseif(WXGTK)
wx_lib_include_directories(webview PUBLIC
${WEBKIT_INCLUDE_DIR}
${LIBSOUP_INCLUDE_DIRS}
)
wx_lib_link_libraries(webview PUBLIC
${WEBKIT_LIBRARIES}
${LIBSOUP_LIBRARIES}
if(WXGTK AND wxUSE_WEBVIEW_WEBKIT2)
set(WX_WEB_EXTENSIONS_DIRECTORY "lib/wx/${wxMAJOR_VERSION}.${wxMINOR_VERSION}/web-extensions")
wx_lib_compile_definitions(webview PRIVATE
-DWX_WEB_EXTENSIONS_DIRECTORY="${CMAKE_INSTALL_PREFIX}/${WX_WEB_EXTENSIONS_DIRECTORY}"
)
endif()
if(APPLE)
wx_lib_link_libraries(webview PUBLIC "-framework WebKit")
elseif(WXGTK)
if(LIBSOUP_FOUND)
wx_lib_include_directories(webview PUBLIC ${LIBSOUP_INCLUDE_DIRS})
wx_lib_link_libraries(webview PUBLIC ${LIBSOUP_LIBRARIES})
endif()
if(wxUSE_WEBVIEW_WEBKIT2)
wx_lib_include_directories(webview PUBLIC ${WEBKIT2_INCLUDE_DIR})
wx_lib_link_libraries(webview PUBLIC ${WEBKIT2_LIBRARIES})
elseif(wxUSE_WEBVIEW_WEBKIT)
wx_lib_include_directories(webview PUBLIC ${WEBKIT_INCLUDE_DIR})
wx_lib_link_libraries(webview PUBLIC ${WEBKIT_LIBRARIES})
endif()
endif()
wx_finalize_lib(webview)
# webkit extension plugin
# we can't use (all of the) macros and functions because this library should
# always be build as a shared libary, and not included in the monolithic build.
if(WXGTK AND wxUSE_WEBVIEW_WEBKIT2)
wx_append_sources(WEBKIT2_EXT_FILES WEBVIEW_WEBKIT2_EXTENSION)
add_library(webkit2_ext SHARED ${WEBKIT2_EXT_FILES})
wx_set_target_properties(webkit2_ext false)
# Change output name to match expected name in webview_webkit2.cpp: webkit2_ext*
if(wxUSE_UNICODE)
set(lib_unicode u)
endif()
set_target_properties(webkit2_ext PROPERTIES PREFIX "")
set_target_properties(webkit2_ext PROPERTIES
OUTPUT_NAME "webkit2_ext${lib_unicode}-${wxMAJOR_VERSION}.${wxMINOR_VERSION}"
OUTPUT_NAME_DEBUG "webkit2_ext${lib_unicode}d-${wxMAJOR_VERSION}.${wxMINOR_VERSION}"
)
target_include_directories(webkit2_ext PUBLIC
${LIBSOUP_INCLUDE_DIRS}
${WEBKIT2_INCLUDE_DIR}
)
target_link_libraries(webkit2_ext PUBLIC
${LIBSOUP_LIBRARIES}
${WEBKIT2_LIBRARIES}
)
wx_install(TARGETS webkit2_ext LIBRARY DESTINATION ${WX_WEB_EXTENSIONS_DIRECTORY})
add_dependencies(webview webkit2_ext)
endif()

View File

@@ -11,9 +11,7 @@ include(../../source_groups.cmake)
wx_append_sources(XML_FILES XML)
wx_add_library(xml IS_BASE ${XML_FILES})
wx_lib_link_libraries(xml
PRIVATE ${EXPAT_LIBRARIES}
)
wx_lib_link_libraries(xml PRIVATE ${EXPAT_LIBRARIES})
wx_lib_include_directories(xml PRIVATE ${EXPAT_INCLUDE_DIRS})
wx_finalize_lib(xml)

View File

@@ -0,0 +1,175 @@
# This module defines
# SDL2_LIBRARY, the name of the library to link against
# SDL2_FOUND, if false, do not try to link to SDL2
# SDL2_INCLUDE_DIR, where to find SDL.h
#
# This module responds to the the flag:
# SDL2_BUILDING_LIBRARY
# If this is defined, then no SDL2main will be linked in because
# only applications need main().
# Otherwise, it is assumed you are building an application and this
# module will attempt to locate and set the the proper link flags
# as part of the returned SDL2_LIBRARY variable.
#
# Don't forget to include SDLmain.h and SDLmain.m your project for the
# OS X framework based version. (Other versions link to -lSDL2main which
# this module will try to find on your behalf.) Also for OS X, this
# module will automatically add the -framework Cocoa on your behalf.
#
#
# Additional Note: If you see an empty SDL2_LIBRARY_TEMP in your configuration
# and no SDL2_LIBRARY, it means CMake did not find your SDL2 library
# (SDL2.dll, libsdl2.so, SDL2.framework, etc).
# Set SDL2_LIBRARY_TEMP to point to your SDL2 library, and configure again.
# Similarly, if you see an empty SDL2MAIN_LIBRARY, you should set this value
# as appropriate. These values are used to generate the final SDL2_LIBRARY
# variable, but when these values are unset, SDL2_LIBRARY does not get created.
#
#
# $SDL2DIR is an environment variable that would
# correspond to the ./configure --prefix=$SDL2DIR
# used in building SDL2.
# l.e.galup 9-20-02
#
# Modified by Eric Wing.
# Added code to assist with automated building by using environmental variables
# and providing a more controlled/consistent search behavior.
# Added new modifications to recognize OS X frameworks and
# additional Unix paths (FreeBSD, etc).
# Also corrected the header search path to follow "proper" SDL guidelines.
# Added a search for SDL2main which is needed by some platforms.
# Added a search for threads which is needed by some platforms.
# Added needed compile switches for MinGW.
#
# On OSX, this will prefer the Framework version (if found) over others.
# People will have to manually change the cache values of
# SDL2_LIBRARY to override this selection or set the CMake environment
# CMAKE_INCLUDE_PATH to modify the search paths.
#
# Note that the header path has changed from SDL2/SDL.h to just SDL.h
# This needed to change because "proper" SDL convention
# is #include "SDL.h", not <SDL2/SDL.h>. This is done for portability
# reasons because not all systems place things in SDL2/ (see FreeBSD).
#=============================================================================
# Copyright 2003-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# message("<FindSDL2.cmake>")
SET(SDL2_SEARCH_PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
${SDL2_PATH}
)
FIND_PATH(SDL2_INCLUDE_DIR SDL.h
HINTS
$ENV{SDL2DIR}
PATH_SUFFIXES include/SDL2 include
PATHS ${SDL2_SEARCH_PATHS}
)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(PATH_SUFFIXES lib64 lib/x64 lib)
else()
set(PATH_SUFFIXES lib/x86 lib)
endif()
FIND_LIBRARY(SDL2_LIBRARY_TEMP
NAMES SDL2
HINTS
$ENV{SDL2DIR}
PATH_SUFFIXES ${PATH_SUFFIXES}
PATHS ${SDL2_SEARCH_PATHS}
)
IF(NOT SDL2_BUILDING_LIBRARY)
IF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
# Non-OS X framework versions expect you to also dynamically link to
# SDL2main. This is mainly for Windows and OS X. Other (Unix) platforms
# seem to provide SDL2main for compatibility even though they don't
# necessarily need it.
FIND_LIBRARY(SDL2MAIN_LIBRARY
NAMES SDL2main
HINTS
$ENV{SDL2DIR}
PATH_SUFFIXES ${PATH_SUFFIXES}
PATHS ${SDL2_SEARCH_PATHS}
)
ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
ENDIF(NOT SDL2_BUILDING_LIBRARY)
# SDL2 may require threads on your system.
# The Apple build may not need an explicit flag because one of the
# frameworks may already provide it.
# But for non-OSX systems, I will use the CMake Threads package.
IF(NOT APPLE)
FIND_PACKAGE(Threads)
ENDIF(NOT APPLE)
# MinGW needs an additional link flag, -mwindows
# It's total link flags should look like -lmingw32 -lSDL2main -lSDL2 -mwindows
IF(MINGW)
SET(MINGW32_LIBRARY mingw32 "-mwindows" CACHE STRING "mwindows for MinGW")
ENDIF(MINGW)
IF(SDL2_LIBRARY_TEMP)
# For SDL2main
IF(NOT SDL2_BUILDING_LIBRARY)
IF(SDL2MAIN_LIBRARY)
SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP})
ENDIF(SDL2MAIN_LIBRARY)
ENDIF(NOT SDL2_BUILDING_LIBRARY)
# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
# CMake doesn't display the -framework Cocoa string in the UI even
# though it actually is there if I modify a pre-used variable.
# I think it has something to do with the CACHE STRING.
# So I use a temporary variable until the end so I can set the
# "real" variable in one-shot.
IF(APPLE)
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
ENDIF(APPLE)
# For threads, as mentioned Apple doesn't need this.
# In fact, there seems to be a problem if I used the Threads package
# and try using this line, so I'm just skipping it entirely for OS X.
IF(NOT APPLE)
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
ENDIF(NOT APPLE)
# For MinGW library
IF(MINGW)
SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP})
ENDIF(MINGW)
# Set the final string here so the GUI reflects the final state.
SET(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL2 Library can be found")
# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
ENDIF(SDL2_LIBRARY_TEMP)
# message("</FindSDL2.cmake>")
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)
MARK_AS_ADVANCED(SDL2MAIN_LIBRARY SDL2_LIBRARY SDL2_INCLUDE_DIR)

View File

@@ -1,16 +1,18 @@
# - Find Webkit-3.0
# Find the Webkit-3.0 includes and library
# - Find Webkit
# Find the Webkit includes and library
#
# WEBKIT_INCLUDE_DIR - Where to find webkit include sub-directory.
# WEBKIT_LIBRARIES - List of libraries when using Webkit-3.0.
# WEBKIT_FOUND - True if Webkit-3.0 found.
# WEBKIT_LIBRARIES - List of libraries when using Webkit.
# WEBKIT_FOUND - True if Webkit found.
SET( WEBKIT_VERSION "1.0")
SET(WEBKIT_VERSION 1.0)
if(DEFINED Webkit_FIND_VERSION)
SET(WEBKIT_VERSION ${Webkit_FIND_VERSION})
endif()
IF (WEBKIT_INCLUDE_DIR)
# Already in cache, be silent.
SET(WEBKIT_FIND_QUIETLY TRUE)
ENDIF (WEBKIT_INCLUDE_DIR)
SET(WEBKIT_INCLUDE_DIR WEBKIT_INCLUDE_DIR-NOTFOUND)
SET(WEBKIT_LIBRARY WEBKIT_LIBRARY-NOTFOUND)
SET(WEBKIT_LIBRARIES WEBKIT_LIBRARIES-NOTFOUND)
FIND_PATH(WEBKIT_INCLUDE_DIR webkit/webkit.h
PATH_SUFFIXES "webkitgtk-${WEBKIT_VERSION}"
@@ -35,4 +37,4 @@ ELSE(WEBKIT_FOUND)
SET( WEBKIT_LIBRARIES )
ENDIF(WEBKIT_FOUND)
MARK_AS_ADVANCED( WEBKIT_LIBRARY WEBKIT_INCLUDE_DIR )
MARK_AS_ADVANCED(WEBKIT_LIBRARY WEBKIT_LIBRARIES WEBKIT_INCLUDE_DIR)

View File

@@ -0,0 +1,37 @@
# - Find Webkit2
# Find the Webkit2 includes and library
#
# WEBKIT2_INCLUDE_DIR - Where to find Webkit2 include sub-directory.
# WEBKIT2_LIBRARIES - List of libraries when using Webkit2.
# WEBKIT2_FOUND - True if Webkit2 found.
SET( WEBKIT2_VERSION 4.0)
set(WEBKIT2_INCLUDE_DIR WEBKIT2_INCLUDE_DIR-NOTFOUND)
set(WEBKIT2_LIBRARY WEBKIT2_LIBRARY-NOTFOUND)
set(WEBKIT2_LIBRARIES WEBKIT2_LIBRARIES-NOTFOUND)
FIND_PATH(WEBKIT2_INCLUDE_DIR webkit2/webkit2.h
PATH_SUFFIXES "webkitgtk-${WEBKIT2_VERSION}"
)
SET(WEBKIT2_NAMES "webkit2gtk-${WEBKIT2_VERSION}")
FIND_LIBRARY(WEBKIT2_LIBRARY
NAMES ${WEBKIT2_NAMES}
)
# Handle the QUIETLY and REQUIRED arguments and set WEBKIT2_FOUND to
# TRUE if all listed variables are TRUE.
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
WEBKIT2 DEFAULT_MSG
WEBKIT2_LIBRARY WEBKIT2_INCLUDE_DIR
)
IF(WEBKIT2_FOUND)
SET( WEBKIT2_LIBRARIES ${WEBKIT2_LIBRARY} )
ELSE(WEBKIT2_FOUND)
SET( WEBKIT2_LIBRARIES )
ENDIF(WEBKIT2_FOUND)
MARK_AS_ADVANCED(WEBKIT2_LIBRARY WEBKIT2_LIBRARIES WEBKIT2_INCLUDE_DIR)

View File

@@ -37,7 +37,7 @@ else()
set(wxCXX_STANDARD_DEFAULT COMPILER_DEFAULT)
endif()
wx_option(wxBUILD_CXX_STANDARD "C++ standard used to build wxWidgets targets"
${wxCXX_STANDARD_DEFAULT} STRINGS COMPILER_DEFAULT 98 11 14)
${wxCXX_STANDARD_DEFAULT} STRINGS COMPILER_DEFAULT 98 11 14 17)
endif()
if(WIN32)
@@ -74,6 +74,7 @@ wx_option(wxUSE_LIBLZMA "use LZMA compression" OFF)
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_LIBLZMA "use liblzma for LZMA compression")
wx_option(wxUSE_OPENGL "use OpenGL (or Mesa)")
wx_option(wxUSE_LIBSDL "use SDL for audio on Unix")
if(NOT WIN32)
wx_option(wxUSE_LIBICONV "use libiconv (character conversion)")
@@ -356,7 +357,6 @@ wx_option(wxUSE_DRAGIMAGE "use wxDragImage")
wx_option(wxUSE_UIACTIONSIMULATOR "use wxUIActionSimulator (experimental)")
wx_option(wxUSE_DC_TRANSFORM_MATRIX "use wxDC::SetTransformMatrix and related")
wx_option(wxUSE_WEBVIEW_WEBKIT "use wxWebView WebKit backend")
# TODO: wxUSE_WEBVIEW_WEBKIT2
if(WIN32 OR APPLE)
set(wxUSE_PRIVATE_FONTS_DEFAULT ON)
else()

View File

@@ -53,3 +53,8 @@ if(POLICY CMP0067)
# Honor language standard in try_compile() source-file signature.
cmake_policy(SET CMP0067 NEW)
endif()
if(POLICY CMP0072)
# FindOpenGL prefers GLVND by default when available.
cmake_policy(SET CMP0072 NEW)
endif()

View File

@@ -152,7 +152,10 @@ wx_add_sample(typetest typetest.cpp typetest.h)
wx_add_sample(uiaction DEPENDS wxUSE_UIACTIONSIMULATOR)
wx_add_sample(validate validate.cpp validate.h DEPENDS wxUSE_VALIDATORS)
wx_add_sample(vscroll vstest.cpp)
wx_add_sample(webview LIBRARIES webview stc NAME webviewsample DEPENDS wxUSE_WEBVIEW)
wx_add_sample(webview LIBRARIES webview NAME webviewsample DEPENDS wxUSE_WEBVIEW)
if(TARGET webviewsample AND wxUSE_STC)
wx_exe_link_libraries(webviewsample stc)
endif()
# widgets Sample
set(SAMPLE_WIDGETS_SRC
activityindicator.cpp

View File

@@ -13,6 +13,7 @@ endif()
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
list(APPEND files @WX_EXTRA_UNINSTALL_FILES@)
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")

View File

@@ -17,8 +17,24 @@ if(wxUSE_XRC)
wx_exe_link_libraries(wxrc xml)
endif()
wx_exe_link_libraries(wxrc base)
# TODO: install
set_target_properties(wxrc PROPERTIES FOLDER "Utilities")
if(UNIX)
wx_install(TARGETS wxrc RUNTIME DESTINATION "bin")
install(CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E rename \
${CMAKE_INSTALL_PREFIX}/bin/wxrc \
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION} \
)"
)
install(CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E create_symlink \
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION} \
${CMAKE_INSTALL_PREFIX}/bin/wxrc \
)"
)
endif()
endif()
# TODO: build targets for other utils

View File

@@ -2812,6 +2812,12 @@ WEBVIEW_GTK_HDR =
WEBVIEW_GTK_SRC =
src/gtk/webview_webkit.cpp
WEBVIEW2_GTK_SRC =
src/gtk/webview_webkit2.cpp
WEBVIEW_WEBKIT2_EXTENSION_SRC =
src/gtk/webview_webkit2_extension.cpp
# wxXRC
XRC_SRC =
@@ -2991,7 +2997,7 @@ OPENGL_OSX_SHARED_SRC =
# Misc plugin sources:
UNIX_SOUND_SRC_SDL =
UNIX_SOUND_SDL_SRC =
src/unix/sound_sdl.cpp
# wxAUI

View File

@@ -185,8 +185,10 @@ WXTIFF_OBJECTS = \
$(OBJS)\wxtiff_tif_tile.obj \
$(OBJS)\wxtiff_tif_version.obj \
$(OBJS)\wxtiff_tif_warning.obj \
$(OBJS)\wxtiff_tif_webp.obj \
$(OBJS)\wxtiff_tif_write.obj \
$(OBJS)\wxtiff_tif_zip.obj
$(OBJS)\wxtiff_tif_zip.obj \
$(OBJS)\wxtiff_tif_zstd.obj
WXEXPAT_CFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
$(__OPTIMIZEFLAG) $(__THREADSFLAG) -DNDEBUG -I$(LIBDIRNAME) -w-8004 -w-8008 \
-w-8012 -w-8057 -w-8066 $(CPPFLAGS) $(CFLAGS)
@@ -5950,12 +5952,18 @@ $(OBJS)\wxtiff_tif_version.obj: ..\..\src\tiff\libtiff\tif_version.c
$(OBJS)\wxtiff_tif_warning.obj: ..\..\src\tiff\libtiff\tif_warning.c
$(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_warning.c
$(OBJS)\wxtiff_tif_webp.obj: ..\..\src\tiff\libtiff\tif_webp.c
$(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_webp.c
$(OBJS)\wxtiff_tif_write.obj: ..\..\src\tiff\libtiff\tif_write.c
$(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_write.c
$(OBJS)\wxtiff_tif_zip.obj: ..\..\src\tiff\libtiff\tif_zip.c
$(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_zip.c
$(OBJS)\wxtiff_tif_zstd.obj: ..\..\src\tiff\libtiff\tif_zstd.c
$(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_zstd.c
$(OBJS)\wxexpat_xmlparse.obj: ..\..\src\expat\expat\lib\xmlparse.c
$(CC) -q -c -P- -o$@ $(WXEXPAT_CFLAGS) ..\..\src\expat\expat\lib\xmlparse.c

View File

@@ -174,8 +174,10 @@ WXTIFF_OBJECTS = \
$(OBJS)\wxtiff_tif_tile.o \
$(OBJS)\wxtiff_tif_version.o \
$(OBJS)\wxtiff_tif_warning.o \
$(OBJS)\wxtiff_tif_webp.o \
$(OBJS)\wxtiff_tif_write.o \
$(OBJS)\wxtiff_tif_zip.o
$(OBJS)\wxtiff_tif_zip.o \
$(OBJS)\wxtiff_tif_zstd.o
WXEXPAT_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \
-DHAVE_W32API_H -DNDEBUG -I$(LIBDIRNAME) $(CPPFLAGS) $(CFLAGS)
WXEXPAT_OBJECTS = \
@@ -6132,12 +6134,18 @@ $(OBJS)\wxtiff_tif_version.o: ../../src/tiff/libtiff/tif_version.c
$(OBJS)\wxtiff_tif_warning.o: ../../src/tiff/libtiff/tif_warning.c
$(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $<
$(OBJS)\wxtiff_tif_webp.o: ../../src/tiff/libtiff/tif_webp.c
$(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $<
$(OBJS)\wxtiff_tif_write.o: ../../src/tiff/libtiff/tif_write.c
$(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $<
$(OBJS)\wxtiff_tif_zip.o: ../../src/tiff/libtiff/tif_zip.c
$(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $<
$(OBJS)\wxtiff_tif_zstd.o: ../../src/tiff/libtiff/tif_zstd.c
$(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $<
$(OBJS)\wxexpat_xmlparse.o: ../../src/expat/expat/lib/xmlparse.c
$(CC) -c -o $@ $(WXEXPAT_CFLAGS) $(CPPDEPS) $<

View File

@@ -191,8 +191,10 @@ WXTIFF_OBJECTS = \
$(OBJS)\wxtiff_tif_tile.obj \
$(OBJS)\wxtiff_tif_version.obj \
$(OBJS)\wxtiff_tif_warning.obj \
$(OBJS)\wxtiff_tif_webp.obj \
$(OBJS)\wxtiff_tif_write.obj \
$(OBJS)\wxtiff_tif_zip.obj
$(OBJS)\wxtiff_tif_zip.obj \
$(OBJS)\wxtiff_tif_zstd.obj
WXEXPAT_CFLAGS = /M$(__RUNTIME_LIBS_85)$(__DEBUGRUNTIME) /DWIN32 \
$(__DEBUGINFO) /Fd$(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).pdb \
$(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \
@@ -6659,12 +6661,18 @@ $(OBJS)\wxtiff_tif_version.obj: ..\..\src\tiff\libtiff\tif_version.c
$(OBJS)\wxtiff_tif_warning.obj: ..\..\src\tiff\libtiff\tif_warning.c
$(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_warning.c
$(OBJS)\wxtiff_tif_webp.obj: ..\..\src\tiff\libtiff\tif_webp.c
$(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_webp.c
$(OBJS)\wxtiff_tif_write.obj: ..\..\src\tiff\libtiff\tif_write.c
$(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_write.c
$(OBJS)\wxtiff_tif_zip.obj: ..\..\src\tiff\libtiff\tif_zip.c
$(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_zip.c
$(OBJS)\wxtiff_tif_zstd.obj: ..\..\src\tiff\libtiff\tif_zstd.c
$(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_zstd.c
$(OBJS)\wxexpat_xmlparse.obj: ..\..\src\expat\expat\lib\xmlparse.c
$(CC) /c /nologo /TC /Fo$@ $(WXEXPAT_CFLAGS) ..\..\src\expat\expat\lib\xmlparse.c

View File

@@ -351,6 +351,9 @@
<File
RelativePath="..\..\src\tiff\libtiff\tif_warning.c">
</File>
<File
RelativePath="..\..\src\tiff\libtiff\tif_webp.c">
</File>
<File
RelativePath="..\..\src\tiff\libtiff\tif_win32.c">
</File>
@@ -360,6 +363,9 @@
<File
RelativePath="..\..\src\tiff\libtiff\tif_zip.c">
</File>
<File
RelativePath="..\..\src\tiff\libtiff\tif_zstd.c">
</File>
</Filter>
</Files>
<Globals>

View File

@@ -814,6 +814,10 @@
RelativePath="..\..\src\tiff\libtiff\tif_warning.c"
>
</File>
<File
RelativePath="..\..\src\tiff\libtiff\tif_webp.c"
>
</File>
<File
RelativePath="..\..\src\tiff\libtiff\tif_win32.c"
>
@@ -826,6 +830,10 @@
RelativePath="..\..\src\tiff\libtiff\tif_zip.c"
>
</File>
<File
RelativePath="..\..\src\tiff\libtiff\tif_zstd.c"
>
</File>
</Filter>
</Files>
<Globals>

View File

@@ -810,6 +810,10 @@
RelativePath="..\..\src\tiff\libtiff\tif_warning.c"
>
</File>
<File
RelativePath="..\..\src\tiff\libtiff\tif_webp.c"
>
</File>
<File
RelativePath="..\..\src\tiff\libtiff\tif_win32.c"
>
@@ -822,6 +826,10 @@
RelativePath="..\..\src\tiff\libtiff\tif_zip.c"
>
</File>
<File
RelativePath="..\..\src\tiff\libtiff\tif_zstd.c"
>
</File>
</Filter>
</Files>
<Globals>

View File

@@ -418,8 +418,11 @@
<ClCompile Include="..\..\src\tiff\libtiff\tif_fax3sm.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_flush.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_getimage.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_jbig.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_jpeg.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_jpeg_12.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_luv.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_lzma.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_lzw.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_next.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_ojpeg.c" />
@@ -435,9 +438,11 @@
<ClCompile Include="..\..\src\tiff\libtiff\tif_tile.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_version.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_warning.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_webp.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_win32.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_write.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_zip.c" />
<ClCompile Include="..\..\src\tiff\libtiff\tif_zstd.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@@ -115,5 +115,20 @@
<ClCompile Include="..\..\src\tiff\libtiff\tif_zip.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\tiff\libtiff\tif_jbig.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\tiff\libtiff\tif_jpeg_12.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\tiff\libtiff\tif_lzma.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\tiff\libtiff\tif_webp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\tiff\libtiff\tif_zstd.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@@ -3885,7 +3885,7 @@
0116581B77DF3A5D889B8D17 /* dndcmn.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dndcmn.cpp; path = ../../src/common/dndcmn.cpp; sourceTree = "<group>"; };
018B15DE6F3A3D49B9CDE9DE /* hidjoystick.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = hidjoystick.cpp; path = ../../src/osx/core/hidjoystick.cpp; sourceTree = "<group>"; };
01BA6D45FE4C381493EB4372 /* validate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = validate.cpp; path = ../../src/common/validate.cpp; sourceTree = "<group>"; };
027D2F04BE933ED6B9BA1518 /* imaglist.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = imaglist.cpp; path = ../../src/osx/imaglist.cpp; sourceTree = "<group>"; };
027D2F04BE933ED6B9BA1518 /* imaglist.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = imaglist.cpp; path = ../../src/generic/imaglist.cpp; sourceTree = "<group>"; };
029486D6A2EC3DE0902A6A24 /* jfdctfst.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jfdctfst.c; path = ../../src/jpeg/jfdctfst.c; sourceTree = "<group>"; };
02D2E8B5C89939CE90B99E2B /* archive.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = archive.cpp; path = ../../src/common/archive.cpp; sourceTree = "<group>"; };
02D9332D5C5632E981936E29 /* jquant2.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = jquant2.c; path = ../../src/jpeg/jquant2.c; sourceTree = "<group>"; };

5
configure vendored
View File

@@ -23373,8 +23373,11 @@ fi
fi
fi
if test "$wxUSE_LIBLZMA" = "no" -a "$wxUSE_LIBTIFF" = "builtin"; then
if test "$wxUSE_LIBTIFF" = "builtin"; then
ac_configure_args="$ac_configure_args --disable-webp --disable-zstd"
if test "$wxUSE_LIBLZMA" = "no"; then
ac_configure_args="$ac_configure_args --disable-lzma"
fi
fi

View File

@@ -2585,12 +2585,15 @@ if test "$wxUSE_LIBLZMA" != "no"; then
fi
fi
dnl We need to disable the use of lzma in built-in libtiff explicitly, as
dnl otherwise we'd depend on the system lzma library, which is typically
dnl undesirable when using builtin libraries. We also disable the use of lzma
dnl if it's not available anyhow, just to speed up libtiff configure a little.
if test "$wxUSE_LIBLZMA" = "no" -a "$wxUSE_LIBTIFF" = "builtin"; then
dnl Disable the use of lzma, webp and zstd in built-in libtiff explicitly, as
dnl otherwise we'd depend on the system libraries, which is typically
dnl undesirable when using builtin libraries. If we use lzma ourselves, keep it
dnl enabled.
if test "$wxUSE_LIBTIFF" = "builtin"; then
ac_configure_args="$ac_configure_args --disable-webp --disable-zstd"
if test "$wxUSE_LIBLZMA" = "no"; then
ac_configure_args="$ac_configure_args --disable-lzma"
fi
fi
dnl ------------------------------------------------------------------------

View File

@@ -27,17 +27,17 @@ public:
{
m_width = m_height = 0;
m_field = NULL;
};
}
~BombsGame();
int GetWidth() const { return m_width; };
int GetHeight() const { return m_height; };
int GetWidth() const { return m_width; }
int GetHeight() const { return m_height; }
int Get(int x, int y) const
{
return m_field[x+y*m_width];
};
}
int IsFocussed(int x, int y) const
{
@@ -47,42 +47,42 @@ public:
int IsHidden(int x, int y) const
{
return Get(x,y) & BG_HIDDEN;
};
}
int IsMarked(int x, int y) const
{
return Get(x,y) & BG_MARKED;
};
}
int IsBomb(int x, int y) const
{
return Get(x,y) & BG_BOMB;
};
}
int IsExploded(int x, int y) const
{
return Get(x,y) & BG_EXPLODED;
};
}
int IsSelected(int x, int y) const
{
return Get(x,y) & BG_SELECTED;
};
}
int GetNumBombs() const
{
return m_numBombCells;
};
}
int GetNumRemainingCells() const
{
return m_numRemainingCells;
};
}
int GetNumMarkedCells() const
{
return m_numMarkedCells;
};
}
bool Init(int width, int height, bool easyCorner = false);

View File

@@ -165,7 +165,7 @@ void Card::Draw(wxDC& dc, int x, int y)
if (m_wayUp == facedown)
{
dc.SetBackground(* wxRED_BRUSH);
dc.SetBackgroundMode(wxSOLID);
dc.SetBackgroundMode(wxBRUSHSTYLE_SOLID);
wxBrush* brush = wxTheBrushList->FindOrCreateBrush(
*wxBLACK, wxBRUSHSTYLE_CROSSDIAG_HATCH
);
@@ -183,7 +183,7 @@ void Card::Draw(wxDC& dc, int x, int y)
memoryDC.SelectObject(*m_symbolBmap);
// dc.SetBackgroundMode(wxTRANSPARENT);
// dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
dc.SetTextBackground(*wxWHITE);
switch (m_suit)

View File

@@ -43,7 +43,7 @@ class Card {
public:
Card(int value, WayUp way_up = facedown);
virtual ~Card(){};
virtual ~Card(){}
void Draw(wxDC& pDC, int x, int y);
static void DrawNullCard(wxDC& pDC, int x, int y); // Draw card place-holder
@@ -55,9 +55,9 @@ public:
Suit GetSuit() const { return m_suit; }
SuitColour GetColour() const { return m_colour; }
static void SetScale(double scale);
static int GetHeight() { return m_height; };
static int GetWidth() { return m_width; };
static double GetScale() { return m_scale; };
static int GetHeight() { return m_height; }
static int GetWidth() { return m_width; }
static double GetScale() { return m_scale; }
private:
Suit m_suit;

View File

@@ -38,7 +38,7 @@ class FortyFrame: public wxFrame
{
public:
FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size, bool largecards);
virtual ~FortyFrame(){};
virtual ~FortyFrame(){}
void OnCloseWindow(wxCloseEvent& event);

View File

@@ -795,7 +795,7 @@ void Pack::Redraw(wxDC& dc)
wxString str;
str.Printf(wxT("%d "), m_topCard + 1);
dc.SetBackgroundMode( wxSOLID );
dc.SetBackgroundMode( wxBRUSHSTYLE_SOLID );
dc.SetTextBackground(FortyApp::BackgroundColour());
dc.SetTextForeground(FortyApp::TextColour());
dc.DrawText(str, m_x + CardWidth + 5, m_y + CardHeight / 2);

View File

@@ -41,7 +41,7 @@ const int NumCards = 2 * PackSize;
class Pile {
public:
Pile(int x, int y, int dx = 0, int dy = 0);
virtual ~Pile(){};
virtual ~Pile(){}
// General functions
virtual void ResetPile() { m_topCard = -1; }
@@ -68,7 +68,7 @@ public:
virtual bool AcceptCard(Card*) { return false; }
virtual void AddCard(Card* card); // Add card to top of pile
virtual void AddCard(wxDC& pDC, Card* card); // Add card + redraw it
void SetPos(int x,int y) {m_x = x;m_y = y;};
void SetPos(int x,int y) {m_x = x;m_y = y;}
protected:
int m_x, m_y; // Position of the pile on the screen

View File

@@ -16,7 +16,7 @@ class PlayerSelectionDialog : public wxDialog
{
public:
PlayerSelectionDialog(wxWindow* parent, ScoreFile* file);
virtual ~PlayerSelectionDialog(){};
virtual ~PlayerSelectionDialog(){}
const wxString& GetPlayersName();
void ButtonCallback(wxCommandEvent& event);

View File

@@ -16,7 +16,7 @@ class ScoreDialog : public wxDialog
{
public:
ScoreDialog(wxWindow* parent, ScoreFile* file);
virtual ~ScoreDialog(){};
virtual ~ScoreDialog(){}
void Display();

View File

@@ -925,7 +925,7 @@ class LifeModule: public wxModule
wxDECLARE_DYNAMIC_CLASS(LifeModule);
public:
LifeModule() {};
LifeModule() {}
bool OnInit() wxOVERRIDE;
void OnExit() wxOVERRIDE;
};

View File

@@ -29,7 +29,7 @@ public:
m_description = description;
m_rules = rules;
m_shape = shape;
};
}
// A more convenient ctor for the built-in samples
LifePattern(wxString name,
@@ -58,7 +58,7 @@ public:
m_shape.Add( tmp );
}
};
}
wxString m_name;
wxString m_description;
@@ -90,9 +90,9 @@ public:
~Life();
// accessors
inline wxUint32 GetNumCells() const { return m_numcells; };
inline wxString GetRules() const { return m_rules; };
inline wxString GetDescription() const { return m_description; };
inline wxUint32 GetNumCells() const { return m_numcells; }
inline wxString GetRules() const { return m_rules; }
inline wxString GetDescription() const { return m_description; }
bool IsAlive(wxInt32 x, wxInt32 y);
void SetCell(wxInt32 x, wxInt32 y, bool alive = true);
void SetPattern(const LifePattern &pattern);

View File

@@ -534,7 +534,7 @@ void LifeFrame::OnNavigate(wxCommandEvent& event)
case ID_CENTER: c = m_life->FindCenter(); break;
default :
wxFAIL;
// Fall through!
wxFALLTHROUGH;
case ID_ORIGIN: c.i = c.j = 0; break;
}

View File

@@ -31,7 +31,7 @@ public:
virtual ~LifeCanvas();
// view management
int GetCellSize() const { return m_cellsize; };
int GetCellSize() const { return m_cellsize; }
void SetCellSize(int cellsize);
void Recenter(wxInt32 i, wxInt32 j);
@@ -54,10 +54,10 @@ private:
void OnEraseBackground(wxEraseEvent& event);
// conversion between cell and screen coordinates
inline wxInt32 XToCell(wxCoord x) const { return (x / m_cellsize) + m_viewportX; };
inline wxInt32 YToCell(wxCoord y) const { return (y / m_cellsize) + m_viewportY; };
inline wxCoord CellToX(wxInt32 i) const { return (i - m_viewportX) * m_cellsize; };
inline wxCoord CellToY(wxInt32 j) const { return (j - m_viewportY) * m_cellsize; };
inline wxInt32 XToCell(wxCoord x) const { return (x / m_cellsize) + m_viewportX; }
inline wxInt32 YToCell(wxCoord y) const { return (y / m_cellsize) + m_viewportY; }
inline wxCoord CellToX(wxInt32 i) const { return (i - m_viewportX) * m_cellsize; }
inline wxCoord CellToY(wxInt32 j) const { return (j - m_viewportY) * m_cellsize; }
// what is the user doing?
enum MouseStatus

View File

@@ -22,14 +22,14 @@ class LifeReader
public:
LifeReader(wxInputStream& is);
inline bool IsOk() const { return m_ok; };
inline wxString GetDescription() const { return m_description; };
inline wxString GetRules() const { return m_rules; };
inline wxArrayString GetShape() const { return m_shape; };
inline bool IsOk() const { return m_ok; }
inline wxString GetDescription() const { return m_description; }
inline wxString GetRules() const { return m_rules; }
inline wxArrayString GetShape() const { return m_shape; }
inline LifePattern GetPattern() const
{
return LifePattern(wxEmptyString, m_description, m_rules, m_shape);
};
}
private:
bool m_ok;

View File

@@ -168,7 +168,7 @@ void MainWindow::ScanBuffer(wxDC *dc, bool DrawIt, int *max_x, int *max_y)
dc->SetBrush(*wxLIGHT_GREY_BRUSH);
dc->SetPen(*wxGREY_PEN);
dc->DrawRectangle(0, 0, width, height);
dc->SetBackgroundMode(wxTRANSPARENT);
dc->SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
}
// See what ACTUAL char height is
@@ -686,6 +686,8 @@ void MyCanvas::OnChar(wxKeyEvent& event)
case WXK_ESCAPE:
TheMainWindow->Close(true);
break;
default:
break;
}

View File

@@ -54,6 +54,12 @@ Changes in behaviour not resulting in compilation errors
- wxEVT_AUINOTEBOOK_PAGE_CHANGED event is now sent after changing the page,
as expected, and not before doing it.
- wxJoystickEvent::GetButtonChange() now returns "1 << N" for the events
generated by the button number N under all platforms, whereas it used to
return just "N" under Linux and macOS. Use the new GetButtonOrdinal() to
update the existing code if necessary.
Changes in behaviour which may result in build errors
-----------------------------------------------------
@@ -109,6 +115,7 @@ All:
- Avoid spurious errors on thread creation under NetBSD.
- Improve high DPI support in wxAui (Simon Rozman).
- Fix a bug with parsing time zones in wxDateTime::ParseFormat() (evileye).
- Update all 3rd party libraries to their latest versions (Maarten Bent).
All (GUI):
@@ -131,6 +138,11 @@ All (GUI):
- Add wxGrid::SetCornerLabelValue() (Pavel Kalugin).
- Add strikethrough support for fonts defined in XRC.
- Add wxDisplay::GetPPI().
- Add wxJoystickEvent::GetButtonOrdinal() (Mick Phillips).
- Add wxGraphicsContext::GetWindow() and implement wxGraphicsContext::GetDPI().
- Add wxToolbook::EnablePage() (Stefan Ziegler).
- Adapt AUI colours to system colour changes (Daniel Kulp).
- Fix removing and inserting pages in wxToolbook (Stefan Ziegler).
wxGTK:
@@ -141,6 +153,7 @@ wxGTK:
- Fix the build with glib < 2.32 (e.g. CentOS 6).
- Fix field widths in wxStatusBar showing a size grip.
- Fill column value in wxEVT_DATAVIEW_ITEM_ACTIVATED events.
- Implement wxDataViewCtrl::GetItemRect() (MrMeesek).
wxMSW:
@@ -158,14 +171,16 @@ wxMSW:
- Improve wxNotebook themed background drawing (Arrigo Marchiori).
- Send wxEVT_WEBVIEW_NAVIGATING when redirecting (Josue Andrade Gomes).
- Fix build with MSVS 2005 broken in 3.1.1.
- Add wxwidgets.props property sheet file for MSVS users.
wxOSX:
- Fix dispatching pending events (and CallAfter()) in console applications.
- Implement wxDataViewColumn::UnsetAsSortKey() (Daniel Kulp).
- supporting native image formst like NSImage and UIImage in wxBitmap
- native implementation for wxStaticBitmap for correct rendering of template images
- Change wxBitmap to use native image format like NSImage and UIImage.
- Implement wxStaticBitmap natively for correct rendering of template images.
- Fill column value in wxEVT_DATAVIEW_ITEM_ACTIVATED events (Igor Korot).
- Make wxFrame::EnableFullScreenView() work under macOS 10.11+ (Andy Robinson).
wxQt:

View File

@@ -42,7 +42,14 @@ one:
$ git push --set-upstream git@github.com:wxWidgets/libexpat.git wx
3. Updating the main repository
3. Generating build files (libexpat, libtiff)
---------------------------------------------
We include the generated build files of libexpat and libtiff. For libexpat run
`buildconf.sh`. For libtiff run `autogen.sh`. Commit the changes.
4. Updating the main repository
-------------------------------
If there are any changes to the source files used by the library, update the
@@ -54,7 +61,7 @@ manually.
Commit these changes and the submodule and create a PR to test them as usual.
4. Special instructions for libpng
5. Special instructions for libpng
----------------------------------
We use a special hack for libpng as we want to prefix all its symbols with

View File

@@ -78,7 +78,7 @@ if (dialog.ShowModal() == wxID_OK)
{
wxColourData retData = dialog.GetColourData();
wxColour col = retData.GetColour();
wxBrush brush(col, wxSOLID);
wxBrush brush(col, wxBRUSHSTYLE_SOLID);
myWindow->SetBackground(brush);
myWindow->Clear();
myWindow->Refresh();

View File

@@ -271,7 +271,7 @@ debugger is very good. To avoid linker errors you will need to add
The version 5.6 included in Borland C++ Builder 2006 works as well after the
following small change: please remove the test for `__WINDOWS__` from line 88
of the file BCCDIR\include\stl\_threads.h.
of the file `BCCDIR\include\stl\_threads.h`.
Compiling using the makefiles:
@@ -505,6 +505,10 @@ The full list of the build settings follows:
Building Applications Using wxWidgets {#msw_build_apps}
=====================================
If you use MSVS 2010 or later IDE for building your project, simply add
`wxwidgets.props` property sheet to (all) your project(s) using wxWidgets.
You don't need to do anything else.
If you want to use CMake for building your project, please see
@ref overview_cmake.
@@ -535,11 +539,11 @@ Here is what you need to do:
be used for debug builds only.
* Define the following symbols for the preprocessor:
- `__WXMSW__` to ensure you use the correct wxWidgets port.
- _UNICODE unless you want to use deprecated ANSI build of wxWidgets.
- NDEBUG if you want to build in release mode, i.e. disable asserts.
- WXUSINGDLL if you are using DLL build of wxWidgets.
- `_UNICODE` unless you want to use deprecated ANSI build of wxWidgets.
- `NDEBUG` if you want to build in release mode, i.e. disable asserts.
- `WXUSINGDLL` if you are using DLL build of wxWidgets.
* If using MSVC 7 only (i.e. not for later versions), also define
wxUSE_RC_MANIFEST=1 and WX_CPU_X86.
`wxUSE_RC_MANIFEST=1` and `WX_CPU_X86`.
* Add \<wx-lib-dir\> directory described above to the libraries path.
When using MSVC, the libraries are linked automatically using "#pragma

View File

@@ -344,6 +344,10 @@ public:
virtual int ShowDropDown(
wxWindow* wnd,
const wxAuiToolBarItemArray& items) = 0;
// Provide opportunity for subclasses to recalculate colours
virtual void UpdateColoursFromSystem() {}
};
@@ -429,6 +433,8 @@ public:
virtual int ShowDropDown(wxWindow* wnd,
const wxAuiToolBarItemArray& items) wxOVERRIDE;
virtual void UpdateColoursFromSystem() wxOVERRIDE;
protected:
wxBitmap m_buttonDropDownBmp;
@@ -651,6 +657,7 @@ protected: // handlers
void OnLeaveWindow(wxMouseEvent& evt);
void OnCaptureLost(wxMouseCaptureLostEvent& evt);
void OnSetCursor(wxSetCursorEvent& evt);
void OnSysColourChanged(wxSysColourChangedEvent& event);
protected:

View File

@@ -226,6 +226,7 @@ protected:
void OnKillFocus(wxFocusEvent& event);
void OnChar(wxKeyEvent& event);
void OnCaptureLost(wxMouseCaptureLostEvent& evt);
void OnSysColourChanged(wxSysColourChangedEvent& event);
protected:
@@ -408,6 +409,7 @@ protected:
void OnTabRightUp(wxAuiNotebookEvent& evt);
void OnTabBgDClick(wxAuiNotebookEvent& evt);
void OnNavigationKeyNotebook(wxNavigationKeyEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);
// set selection to the given window (which must be non-NULL and be one of
// our pages, otherwise an assert is raised)

View File

@@ -76,6 +76,9 @@ public:
int buttonState,
const wxRect& rect,
wxAuiPaneInfo& pane) = 0;
// Provide opportunity for subclasses to recalculate colours
virtual void UpdateColoursFromSystem() {}
};
@@ -136,6 +139,9 @@ public:
wxAuiPaneInfo& pane);
#endif
virtual void UpdateColoursFromSystem() wxOVERRIDE;
protected:
void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active);

View File

@@ -616,6 +616,7 @@ protected:
void OnChildFocus(wxChildFocusEvent& evt);
void OnHintFadeTimer(wxTimerEvent& evt);
void OnFindManager(wxAuiManagerEvent& evt);
void OnSysColourChanged(wxSysColourChangedEvent& event);
protected:

View File

@@ -109,6 +109,9 @@ public:
wxWindow* wnd,
const wxAuiNotebookPageArray& pages,
const wxSize& requiredBmpSize) = 0;
// Provide opportunity for subclasses to recalculate colours
virtual void UpdateColoursFromSystem() {}
};
@@ -185,6 +188,9 @@ public:
const wxAuiNotebookPageArray& pages,
const wxSize& requiredBmpSize) wxOVERRIDE;
// Provide opportunity for subclasses to recalculate colours
virtual void UpdateColoursFromSystem() wxOVERRIDE;
protected:
wxFont m_normalFont;

View File

@@ -455,7 +455,7 @@ public:
enum
{
Hidden = 0,
//Closing = 1,
Closing = 1,
Animating = 2,
Visible = 3
};

View File

@@ -49,6 +49,10 @@ public:
// primary display and the only one which is always supported
wxDisplay(unsigned n = 0);
// create display object corresponding to the display of the given window
// or the default one if the window display couldn't be found
explicit wxDisplay(const wxWindow* window);
// dtor is not virtual as this is a concrete class not meant to be derived
// from

View File

@@ -215,9 +215,11 @@ public:
// cannot handle types with size greater than pointer because of sorting
// ----------------------------------------------------------------------------
#define _WX_DEFINE_SORTED_TYPEARRAY_2(T, name, base, defcomp, classexp) \
// Note that "classdecl" here is intentionally not used because this class has
// only inline methods and so never needs to be exported from a DLL.
#define _WX_DEFINE_SORTED_TYPEARRAY_2(T, name, base, defcomp, classdecl) \
typedef wxBaseSortedArray<T> wxBaseSortedArrayFor##name; \
classexp name : public wxBaseSortedArrayFor##name \
class name : public wxBaseSortedArrayFor##name \
{ \
public: \
name(wxBaseSortedArrayFor##name::SCMPFUNC fn defcomp) \

View File

@@ -15,6 +15,7 @@
#include "wx/cpp.h"
#include "wx/object.h"
#include "wx/clntdata.h"
#include "wx/math.h"
#if wxUSE_GUI
#include "wx/gdicmn.h"
@@ -2760,6 +2761,7 @@ public:
int GetZPosition() const { return m_zPosition; }
int GetButtonState() const { return m_buttonState; }
int GetButtonChange() const { return m_buttonChange; }
int GetButtonOrdinal() const { return wxCTZ(m_buttonChange); }
int GetJoystick() const { return m_joyStick; }
void SetJoystick(int stick) { m_joyStick = stick; }

View File

@@ -409,7 +409,7 @@ class WXDLLIMPEXP_CORE wxDataViewCtrlAccessible: public wxWindowAccessible
{
public:
wxDataViewCtrlAccessible(wxDataViewCtrl* win);
virtual ~wxDataViewCtrlAccessible() {};
virtual ~wxDataViewCtrlAccessible() {}
virtual wxAccStatus HitTest(const wxPoint& pt, int* childId,
wxAccessible** childObject) wxOVERRIDE;

View File

@@ -98,6 +98,10 @@ private:
// column 1 but close enough to the divider separating it from column 0)
unsigned int FindColumnAtPoint(int x, bool *onSeparator = NULL) const;
// return the result of FindColumnAtPoint() if it is a valid column,
// otherwise the index of the last (rightmost) displayed column
unsigned int FindColumnClosestToPoint(int xPhysical) const;
// return true if a drag resizing operation is currently in progress
bool IsResizing() const;

View File

@@ -403,7 +403,7 @@ public:
// We don't implement bases support for floating point numbers, this is not
// very useful in practice.
virtual int GetBase() const wxOVERRIDE { return 10; }
virtual bool SetBase(int WXUNUSED(base)) wxOVERRIDE { return 0; }
virtual bool SetBase(int WXUNUSED(base)) wxOVERRIDE { return false; }
protected:
virtual void DoSendEvent() wxOVERRIDE;

View File

@@ -452,7 +452,7 @@ private:
class WXDLLIMPEXP_CORE wxGraphicsContext : public wxGraphicsObject
{
public:
wxGraphicsContext(wxGraphicsRenderer* renderer);
wxGraphicsContext(wxGraphicsRenderer* renderer, wxWindow* window = NULL);
virtual ~wxGraphicsContext();
@@ -490,6 +490,9 @@ public:
// create a context that can be used for measuring texts only, no drawing allowed
static wxGraphicsContext * Create();
// Return the window this context is associated with, if any.
wxWindow* GetWindow() const { return m_window; }
// begin a new document (relevant only for printing / pdf etc) if there is a progress dialog, message will be shown
virtual bool StartDoc( const wxString& message );
@@ -788,6 +791,12 @@ protected:
wxDouble angle,
const wxGraphicsBrush& backgroundBrush);
private:
// The associated window, if any, i.e. if one was passed directly to
// Create() or the associated window of the wxDC this context was created
// from.
wxWindow* const m_window;
wxDECLARE_NO_COPY_CLASS(wxGraphicsContext);
wxDECLARE_ABSTRACT_CLASS(wxGraphicsContext);
};

View File

@@ -17,6 +17,7 @@
#include "wx/html/htmltag.h"
#include "wx/html/htmldefs.h"
#include "wx/window.h"
#include "wx/brush.h"
class WXDLLIMPEXP_FWD_HTML wxHtmlWindowInterface;
@@ -81,7 +82,7 @@ enum wxHtmlSelectionState
class WXDLLIMPEXP_HTML wxHtmlRenderingState
{
public:
wxHtmlRenderingState() : m_selState(wxHTML_SEL_OUT) { m_bgMode = wxSOLID; }
wxHtmlRenderingState() : m_selState(wxHTML_SEL_OUT) { m_bgMode = wxBRUSHSTYLE_SOLID; }
void SetSelectionState(wxHtmlSelectionState s) { m_selState = s; }
wxHtmlSelectionState GetSelectionState() const { return m_selState; }

View File

@@ -150,6 +150,9 @@ inline int wxRound(double x)
inline double wxDegToRad(double deg) { return (deg * M_PI) / 180.0; }
inline double wxRadToDeg(double rad) { return (rad * 180.0) / M_PI; }
// Count trailing zeros.
WXDLLIMPEXP_BASE unsigned int wxCTZ(wxUint32 x);
#endif /* __cplusplus */

View File

@@ -290,9 +290,6 @@ private:
// false if we hit the limit set by SetMaxLength() and so didn't change it.
bool AdjustSpaceLimit();
wxDECLARE_EVENT_TABLE();
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl);
wxMenu* m_privateContextMenu;
bool m_isNativeCaretShown;
@@ -301,6 +298,8 @@ private:
int m_isInkEdit;
#endif
wxDECLARE_EVENT_TABLE();
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl);
};
#endif // _WX_TEXTCTRL_H_

View File

@@ -157,7 +157,6 @@ private:
wxIEContainer* m_container;
wxAutomationObject m_ie;
IWebBrowser2* m_webBrowser;
DWORD m_dwCookie;
wxCOMPtr<DocHostUIHandler> m_uiHandler;
//We store the current zoom type;

View File

@@ -192,7 +192,7 @@ protected:
private:
// Cached item widths (in pixels).
wxArrayInt m_widths;
wxVector<int> m_widths;
// Width of currently widest item.
int m_widestWidth;

View File

@@ -47,13 +47,8 @@ public:
// Construct a mask from a mono bitmap (black meaning show pixels, white meaning transparent)
wxMask(const wxBitmap& bitmap);
// implementation helper only : construct a mask from a 32 bit memory buffer
wxMask(const wxMemoryBuffer& buf, int width , int height , int bytesPerRow ) ;
virtual ~wxMask();
bool Create(const wxMemoryBuffer& buf, int width , int height , int bytesPerRow ) ;
wxBitmap GetBitmap() const;
// Implementation below
@@ -71,6 +66,9 @@ public:
WXHBITMAP GetHBITMAP() const ;
// implementation helper only : construct a mask from a 32 bit memory buffer
bool OSXCreate(const wxMemoryBuffer& buf, int width , int height , int bytesPerRow ) ;
protected:
// this function is called from Create() to free the existing mask data
virtual void FreeData() wxOVERRIDE;

View File

@@ -81,8 +81,11 @@ public:
// return the depth or 0 if unknown
virtual int GetDepth() const = 0;
// return the resolution of the display, uses GetSizeMM() by default but
// can be also overridden directly
// return the scale factor used to convert logical pixels to physical ones
virtual double GetScaleFactor() const { return 1.0; }
// return the resolution of the display, uses GetSize(), GetScaleFactor()
// and GetSizeMM() by default but can be also overridden directly
virtual wxSize GetPPI() const;
// return the physical size of the display or (0, 0) if unknown: this is
@@ -115,6 +118,11 @@ protected:
// create the object providing access to the display with the given index
wxDisplayImpl(unsigned n) : m_index(n) { }
// Compute PPI from the sizes in pixels and mm.
//
// Return (0, 0) if physical size (in mm) is not known, i.e. 0.
static wxSize ComputePPI(int pxX, int pxY, int mmX, int mmY);
// the index of this display (0 is always the primary one)
const unsigned m_index;

View File

@@ -2019,7 +2019,7 @@ protected:
wxVariant m_value;
wxPGAttributeStorage m_attributes;
wxArrayPGProperty m_children;
wxVector<wxPGProperty*> m_children;
// Extended cell information
wxVector<wxPGCell> m_cells;

View File

@@ -547,7 +547,7 @@ expdecl classname& classname##RefFromVariant( wxVariant& variant ) \
wxString::Format(wxS("Variant type should have been '%s'") \
wxS("instead of '%s'"), \
wxS(#classname), \
variant.GetType().c_str())); \
variant.GetType())); \
classname##VariantData *data = \
(classname##VariantData*) variant.GetData(); \
return data->GetValue();\
@@ -558,7 +558,7 @@ expdecl const classname& classname##RefFromVariant( const wxVariant& variant ) \
wxString::Format(wxS("Variant type should have been '%s'") \
wxS("instead of '%s'"), \
wxS(#classname), \
variant.GetType().c_str())); \
variant.GetType())); \
classname##VariantData *data = \
(classname##VariantData*) variant.GetData(); \
return data->GetValue();\
@@ -699,6 +699,67 @@ protected:
#define WX_PG_TOKENIZER2_END() \
}
// -----------------------------------------------------------------------
// wxVector utilities
// Utility to check if specific item is in a vector.
template<typename T>
inline bool wxPGItemExistsInVector(const wxVector<T>& vector, const T& item)
{
#if wxUSE_STL
return std::find(vector.begin(), vector.end(), item) != vector.end();
#else
for (typename wxVector<T>::const_iterator it = vector.begin(); it != vector.end(); ++it)
{
if ( *it == item )
return true;
}
return false;
#endif // wxUSE_STL/!wxUSE_STL
}
// Utility to determine the index of the item in the vector.
template<typename T>
inline int wxPGItemIndexInVector(const wxVector<T>& vector, const T& item)
{
#if wxUSE_STL
typename wxVector<T>::const_iterator it = std::find(vector.begin(), vector.end(), item);
if ( it != vector.end() )
return (int)(it - vector.begin());
return wxNOT_FOUND;
#else
for (typename wxVector<T>::const_iterator it = vector.begin(); it != vector.end(); ++it)
{
if ( *it == item )
return (int)(it - vector.begin());
}
return wxNOT_FOUND;
#endif // wxUSE_STL/!wxUSE_STL
}
// Utility to remove given item from the vector.
template<typename T>
inline void wxPGRemoveItemFromVector(wxVector<T>& vector, const T& item)
{
#if wxUSE_STL
typename wxVector<T>::iterator it = std::find(vector.begin(), vector.end(), item);
if ( it != vector.end() )
{
vector.erase(it);
}
#else
for (typename wxVector<T>::iterator it = vector.begin(); it != vector.end(); ++it)
{
if ( *it == item )
{
vector.erase(it);
return;
}
}
#endif // wxUSE_STL/!wxUSE_STL
}
// -----------------------------------------------------------------------
#endif // wxUSE_PROPGRID

View File

@@ -26,11 +26,12 @@ public:
// --------------
virtual void SetLabel( const wxString &label );
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
virtual QWidget *GetHandle() const;
protected:
virtual wxBitmap DoGetBitmap(State state) const wxOVERRIDE;
virtual void DoSetBitmap(const wxBitmap& bitmap, State which) wxOVERRIDE;
QPushButton *m_qtPushButton;
@@ -39,6 +40,7 @@ protected:
private:
typedef wxAnyButtonBase base_type;
wxBitmap m_bitmap;
wxDECLARE_NO_COPY_CLASS(wxAnyButton);
};

View File

@@ -32,6 +32,9 @@ public:
virtual void SetValue(bool value);
virtual bool GetValue() const;
virtual void SetLabel(const wxString& label) wxOVERRIDE;
virtual wxString GetLabel() const wxOVERRIDE;
virtual QWidget *GetHandle() const;
protected:

View File

@@ -44,6 +44,7 @@ public:
virtual wxMenu *Remove(size_t pos);
virtual void EnableTop(size_t pos, bool enable);
virtual bool IsEnabledTop(size_t pos) const wxOVERRIDE;
virtual void SetMenuLabel(size_t pos, const wxString& label);
virtual wxString GetMenuLabel(size_t pos) const;

View File

@@ -30,7 +30,8 @@ public:
long style = 0,
const wxString &name = wxStaticTextNameStr );
void SetLabel(const wxString& label);
virtual void SetLabel(const wxString& label) wxOVERRIDE;
virtual wxString GetLabel() const wxOVERRIDE;
virtual QWidget *GetHandle() const;

View File

@@ -92,6 +92,10 @@ public:
// get the underlying toolbar
wxToolBarBase* GetToolBar() const { return (wxToolBarBase*)m_bookctrl; }
// enable/disable a page
bool EnablePage(wxWindow *page, bool enable);
bool EnablePage(size_t page, bool enable);
// must be called in OnIdle or by application to realize the toolbar and
// select the initial page.
void Realize();
@@ -119,6 +123,14 @@ private:
// common part of all constructors
void Init();
// returns the tool identifier for the specified page
int PageToToolId(size_t page) const;
// returns the page index for the specified tool ID or
// wxNOT_FOUND if there is no page with that tool ID
int ToolIdToPage(int toolId) const;
wxDECLARE_EVENT_TABLE();
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxToolbook);
};

View File

@@ -145,6 +145,12 @@ public:
wxString GetBestTranslation(const wxString& domain,
const wxString& msgIdLanguage = "en");
// find best and all other suitable translation languages for given domain
wxArrayString GetAcceptableTranslations(const wxString& domain,
wxLanguage msgIdLanguage);
wxArrayString GetAcceptableTranslations(const wxString& domain,
const wxString& msgIdLanguage = "en");
// add standard wxWidgets catalog ("wxstd")
bool AddStdCatalog();

View File

@@ -228,10 +228,16 @@ private:
// wxNUM_VAL_ZERO_AS_BLANK flag.
wxString NormalizeValue(LongestValueType value) const
{
// We really want to compare with the exact 0 here, so disable gcc
// warning about doing this.
wxGCC_WARNING_SUPPRESS(float-equal)
wxString s;
if ( value != 0 || !BaseValidator::HasFlag(wxNUM_VAL_ZERO_AS_BLANK) )
s = this->ToString(value);
wxGCC_WARNING_RESTORE(float-equal)
return s;
}

View File

@@ -712,9 +712,6 @@ public:
Sets the depth member (does not affect the bitmap data).
@todo since these functions do not affect the bitmap data,
why they exist??
@param depth
Bitmap depth.

View File

@@ -1446,8 +1446,14 @@ public:
int GetIndent() const;
/**
Returns item rectangle. Coordinates of the rectangle are specified in
wxDataViewCtrl client area coordinates.
Returns item rectangle.
If item is not currently visible, either because its parent is
collapsed or it is outside of the visible part of the control due to
the current vertical scrollbar position, return an empty rectangle.
Coordinates of the rectangle are specified in wxDataViewCtrl client
area coordinates.
@param item
A valid item.
@@ -1455,10 +1461,6 @@ public:
If non-@NULL, the rectangle returned corresponds to the
intersection of the item with the specified column. If @NULL, the
rectangle spans all the columns.
@note This method is currently not implemented at all in wxGTK and only
implemented for non-@NULL @a col argument in wxOSX. It is fully
implemented in the generic version of the control.
*/
virtual wxRect GetItemRect(const wxDataViewItem& item,
const wxDataViewColumn* col = NULL) const;
@@ -1556,6 +1558,9 @@ public:
/**
Return @true if the item is expanded.
@note When using the native macOS version this method has a bug which
may result in returning @true even for items without children.
*/
virtual bool IsExpanded(const wxDataViewItem& item) const;

View File

@@ -26,6 +26,23 @@ public:
*/
wxDisplay(unsigned int index = 0);
/**
Constructor creating the display object associated with the given
window.
This is the most convenient way of finding the display on which the
given window is shown while falling back to the default display if it
is not shown at all or positioned outside of any display.
@param window
A valid, i.e. non-null, window.
@see GetFromWindow()
@since 3.1.2
*/
explicit wxDisplay(const wxWindow* window);
/**
Destructor.
*/

View File

@@ -1741,10 +1741,24 @@ public:
/**
Returns the identifier of the button changing state.
This is a @c wxJOY_BUTTONn identifier, where @c n is one of 1, 2, 3, 4.
The return value is @code 1 << n @endcode where @c n is the index of the
button changing state, which can also be retrieved using GetButtonOrdinal().
Note that for @c n equal to 1, 2, 3 or 4 there are predefined @c wxJOY_BUTTONn
constants which can be used for more clarity, however these constants are not
defined for the buttons beyond the first four.
*/
int GetButtonChange() const;
/**
Returns the 0-indexed ordinal of the button changing state.
@see GetButtonChange()
@since 3.1.2.
*/
int GetButtonOrdinal() const;
/**
Returns the down state of the buttons.

View File

@@ -1095,6 +1095,19 @@ public:
*/
virtual void GetDPI( wxDouble* dpiX, wxDouble* dpiY);
/**
Returns the associated window if any.
If this context was created using Create() overload taking wxWindow or
wxWindowDC, this method returns the corresponding window. Otherwise
returns @NULL.
@return A possibly @NULL window pointer.
@since 3.1.2
*/
wxWindow* GetWindow() const;
/** @}
*/

View File

@@ -2319,7 +2319,7 @@ public:
wxPen MidiGrid::GetRowGridLinePen(int row)
{
if ( row % 12 == 7 )
return wxPen(*wxBLACK, 1, wxSOLID);
return wxPen(*wxBLACK, 1, wxPENSTYLE_SOLID);
else
return GetDefaultGridLinePen();
}

View File

@@ -75,6 +75,19 @@ double wxDegToRad(double deg);
*/
double wxRadToDeg(double rad);
/**
Count the number of trailing zeros.
This function returns the number of trailing zeros in the binary notation
of its argument @a x. E.g. for @a x equal to 4, or 0b100, the return value
is 2.
@param x Strictly positive, i.e. non-zero, 32 bit number.
@since 3.1.2
*/
unsigned int wxCTZ(wxUint32 x);
/**
Small wrapper around round().
*/

View File

@@ -23,6 +23,9 @@ wxEventType wxEVT_TOOLBOOK_PAGE_CHANGING;
refer to that class documentation for now. You can also use the
@ref page_samples_notebook to see wxToolbook in action.
One feature of this class not supported by wxBookCtrlBase is the support
for disabling some of the pages, see EnablePage().
@beginStyleTable
@style{wxTBK_BUTTONBAR}
Use wxButtonToolBar-based implementation under OS X (ignored under
@@ -82,5 +85,44 @@ public:
Returns the wxToolBarBase associated with the control.
*/
wxToolBarBase* GetToolBar() const;
/**
Enables or disables the specified page.
Using this function, a page can be disabled when it can't be used, while
still remaining present to let the users know that more functionality is
available, even if currently inaccessible.
Icons for disabled pages are created by wxBitmap::ConvertToDisabled().
@param page
The index of the page.
@param enable
@true to enable the page and @false to disable it.
@return @true if successful, @false otherwise (currently only if the
index is invalid).
@since 3.1.2
*/
bool EnablePage(size_t page, bool enable);
/**
Enables or disables the specified page.
This is similar to the overload above, but finds the index of the
specified page.
@param page
Pointer of a page windows inside the book control.
@param enable
@true to enable the page and @false to disable it.
@return @true if successful, @false otherwise, e.g. if @a page is not
one of the pages of this control.
@since 3.1.2
*/
bool EnablePage(wxWindow *page, bool enable);
};

View File

@@ -136,6 +136,34 @@ public:
wxString GetBestTranslation(const wxString& domain,
const wxString& msgIdLanguage = "en");
/**
Returns the languages of all translations that can be used for the @a
domain.
This is a more general version of GetBestTranslation(), which returns
the whole list of preferred UI languages for which a translation for
the @a domain was found instead of just the first, i.e. the most
preferred, element of this list.
@param domain
The catalog domain to look for.
@param msgIdLanguage
Specifies the language of "msgid" strings in source code (i.e.
arguments to GetString(), wxGetTranslation() and the _() macro).
@return An array of language codes if any suitable matches were found,
empty array otherwise.
@since 3.1.2
*/
wxArrayString GetAcceptableTranslations(const wxString& domain,
wxLanguage msgIdLanguage);
/// @overload
wxArrayString GetAcceptableTranslations(const wxString& domain,
const wxString& msgIdLanguage = "en");
/**
Add standard wxWidgets catalogs ("wxstd" and possible port-specific
catalogs).
@@ -147,9 +175,10 @@ public:
bool AddStdCatalog();
/**
Add a catalog for use with the current locale.
Add a catalog for the preferred UI language. In case of multiple
preferences, add catalog for each language, if available.
By default, it is searched for in standard places (see
By default, the catalog is searched for in standard places (see
wxFileTranslationsLoader), but you may also prepend additional
directories to the search path with
wxFileTranslationsLoader::AddCatalogLookupPathPrefix().
@@ -173,8 +202,9 @@ public:
code are used instead.
@return
@true if catalog was successfully loaded, @false otherwise (which might
mean that the catalog is not found or that it isn't in the correct format).
@true if catalog in the most preferred language was successfully loaded,
@false otherwise (which might mean that the catalog is not found or that
it isn't in the correct format).
*/
bool AddCatalog(const wxString& domain,
wxLanguage msgIdLanguage = wxLANGUAGE_ENGLISH_US);
@@ -200,8 +230,9 @@ public:
in case they use 8-bit characters (e.g. German or French strings).
@return
@true if catalog was successfully loaded, @false otherwise (which might
mean that the catalog is not found or that it isn't in the correct format).
@true if catalog in the most preferred language was successfully loaded,
@false otherwise (which might mean that the catalog is not found or that
it isn't in the correct format).
*/
bool AddCatalog(const wxString& domain,
wxLanguage msgIdLanguage,

View File

@@ -14,6 +14,20 @@
# in wxLookupFunction at the bottom of this file.
import datetime
import gdb
import itertools
import sys
if sys.version_info[0] > 2:
# Python 3
Iterator = object
long = int
else:
# Python 2, we need to make an adaptor, so we can use Python 3 iterator implementations.
class Iterator:
def next(self):
return self.__next__()
# shamelessly stolen from std::string example
class wxStringPrinter:
@@ -26,6 +40,41 @@ class wxStringPrinter:
def display_hint(self):
return 'string'
class wxArrayStringPrinter:
class _iterator(Iterator):
def __init__ (self, firstItem, count):
self.item = firstItem
self.count = count
self.current = 0
def __iter__(self):
return self
def __next__(self):
current = self.current
self.current = self.current + 1
if current == self.count:
raise StopIteration
elt = self.item.dereference()
self.item = self.item + 1
return ('[%d]' % current, elt)
def __init__(self, val):
self.val = val
def children(self):
return self._iterator(self.val['m_pItems'], self.val['m_nCount'])
def to_string(self):
count = self.val['m_nCount']
capacity = self.val['m_nSize']
return ('length %d, capacity %d' % (int (count), int (capacity)))
def display_hint(self):
return 'array'
class wxDateTimePrinter:
def __init__(self, val):
self.val = val
@@ -81,6 +130,7 @@ def wxLookupFunction(val):
# Using a list is probably ok for so few items but consider switching to a
# set (or a dict and cache class types as the keys in it?) if needed later.
types = ['wxString',
'wxArrayString',
'wxDateTime',
'wxFileName',
'wxPoint',

View File

@@ -126,8 +126,14 @@ static void FillBitmaps(wxImageList *images, wxListCtrl *list,
#include "null.xpm"
const int SIZE_CHOICE_ID = ::wxNewId();
// Bitmap sizes that can be chosen in the size selection wxChoice.
static const int bitmapSizes[] = { -1, 16, 32, 64, 128, 256, 0 };
wxBEGIN_EVENT_TABLE(wxArtBrowserDialog, wxDialog)
EVT_LIST_ITEM_SELECTED(wxID_ANY, wxArtBrowserDialog::OnSelectItem)
EVT_CHOICE(SIZE_CHOICE_ID, wxArtBrowserDialog::OnChangeSize)
EVT_CHOICE(wxID_ANY, wxArtBrowserDialog::OnChooseClient)
wxEND_EVENT_TABLE()
@@ -136,6 +142,8 @@ wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
{
m_currentArtId = wxART_ERROR;
wxSizer *sizer = new wxBoxSizer(wxVERTICAL);
wxSizer *subsizer;
@@ -152,16 +160,28 @@ wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
m_list = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(250, 300),
wxLC_REPORT | wxSUNKEN_BORDER);
m_list->AppendColumn("wxArtID");
subsizer->Add(m_list, 1, wxEXPAND | wxRIGHT, 10);
subsizer->Add(m_list, 0, wxEXPAND | wxRIGHT, 10);
wxSizer *subsub = new wxBoxSizer(wxVERTICAL);
m_sizes = new wxChoice( this, SIZE_CHOICE_ID );
for ( const int* p = bitmapSizes; *p; ++p )
{
if ( *p == -1 )
m_sizes->Append( "Default" );
else
m_sizes->Append( wxString::Format("%d x %d", *p, *p ) );
}
m_sizes->SetSelection(0);
subsub->Add(m_sizes, 0, wxALL, 4);
m_text = new wxStaticText(this, wxID_ANY, "Size: 333x333");
subsub->Add(m_text);
subsub->Add(m_text, 0, wxALL, 4);
m_canvas = new wxStaticBitmap(this, wxID_ANY, wxBitmap(null_xpm));
subsub->Add(m_canvas);
subsub->Add(100, 100);
subsizer->Add(subsub);
subsub->Add(256, 256);
subsizer->Add(subsub, 1, wxLEFT, 4 );
sizer->Add(subsizer, 1, wxEXPAND | wxLEFT|wxRIGHT, 10);
@@ -176,6 +196,13 @@ wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
}
wxSize wxArtBrowserDialog::GetSelectedBitmapSize() const
{
const int size = bitmapSizes[m_sizes->GetSelection()];
return wxSize(size, size);
}
void wxArtBrowserDialog::SetArtClient(const wxArtClient& client)
{
wxBusyCursor bcur;
@@ -201,7 +228,13 @@ void wxArtBrowserDialog::SetArtClient(const wxArtClient& client)
void wxArtBrowserDialog::OnSelectItem(wxListEvent &event)
{
const char *data = (const char*)event.GetData();
SetArtBitmap(data, m_client, wxDefaultSize);
m_currentArtId = wxString( data );
SetArtBitmap(data, m_client, GetSelectedBitmapSize());
}
void wxArtBrowserDialog::OnChangeSize(wxCommandEvent& WXUNUSED(event))
{
SetArtBitmap(m_currentArtId, m_client, GetSelectedBitmapSize() );
}
void wxArtBrowserDialog::OnChooseClient(wxCommandEvent &event)

View File

@@ -28,12 +28,17 @@ public:
private:
void OnSelectItem(wxListEvent &event);
void OnChangeSize(wxCommandEvent &event);
void OnChooseClient(wxCommandEvent &event);
wxSize GetSelectedBitmapSize() const;
wxListCtrl *m_list;
wxStaticBitmap *m_canvas;
wxStaticText *m_text;
wxString m_client;
wxChoice *m_sizes;
wxString m_currentArtId;
wxDECLARE_EVENT_TABLE();
};

View File

@@ -625,7 +625,7 @@ void MyFrame::OnCalRClick(wxMouseEvent& event)
{
default:
wxFAIL_MSG( "unexpected" );
// fall through
wxFALLTHROUGH;
case wxCAL_HITTEST_NOWHERE:
msg += "nowhere";

View File

@@ -479,7 +479,7 @@ void MyCanvas::OnChar( wxKeyEvent &event )
wxCaretSuspend cs(this);
wxClientDC dc(this);
dc.SetFont(m_font);
dc.SetBackgroundMode(wxSOLID); // overwrite old value
dc.SetBackgroundMode(wxBRUSHSTYLE_SOLID); // overwrite old value
dc.DrawText(ch, m_xMargin + m_xCaret * m_widthChar,
m_yMargin + m_yCaret * m_heightChar );

View File

@@ -1017,14 +1017,14 @@ void MyFrame::OnShowComparison( wxCommandEvent& WXUNUSED(event) )
groupSizer->AddStretchSpacer();
//
// Disabled ODComboBox
groupSizer->Add( new wxStaticText(dlg,wxID_ANY,"Disabled:"),
// Disabled read-only ODComboBox
groupSizer->Add( new wxStaticText(dlg,wxID_ANY,"Read-only disabled:"),
wxSizerFlags().Border(wxRIGHT, border) );
odc = new wxOwnerDrawnComboBox(dlg,wxID_ANY,wxEmptyString,
wxDefaultPosition, wxDefaultSize,
m_arrItems,
wxCB_SORT|wxCB_READONLY // wxNO_BORDER|wxCB_READONLY
wxCB_READONLY // wxNO_BORDER|wxCB_READONLY
);
odc->SetValue("Dot Dash");
@@ -1032,6 +1032,18 @@ void MyFrame::OnShowComparison( wxCommandEvent& WXUNUSED(event) )
groupSizer->Add( odc, wxSizerFlags(3).Expand().Border(wxALL, border) );
// Disabled ODComboBox
groupSizer->Add(new wxStaticText(dlg, wxID_ANY, "Disabled:"),
wxSizerFlags().Border(wxRIGHT, border));
odc = new wxOwnerDrawnComboBox(dlg, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize, m_arrItems);
odc->SetValue("Dot Dash");
odc->Enable(false);
groupSizer->Add(odc, wxSizerFlags(3).Expand().Border(wxALL, border));
rowSizer->Add( groupSizer, 1, wxEXPAND|wxALL, border );
@@ -1077,14 +1089,14 @@ void MyFrame::OnShowComparison( wxCommandEvent& WXUNUSED(event) )
groupSizer->AddStretchSpacer();
//
// Disabled wxComboBox
groupSizer->Add( new wxStaticText(dlg,wxID_ANY,"Disabled:"),
// Disabled read-only wxComboBox
groupSizer->Add( new wxStaticText(dlg,wxID_ANY,"Read-only disabled:"),
wxSizerFlags().Border(wxRIGHT, border) );
cb = new wxComboBox(dlg,wxID_ANY,wxEmptyString,
wxDefaultPosition, wxDefaultSize,
m_arrItems,
wxCB_SORT|wxCB_READONLY // wxNO_BORDER|wxCB_READONLY
wxCB_READONLY // wxNO_BORDER|wxCB_READONLY
);
cb->SetValue("Dot Dash");
@@ -1092,6 +1104,19 @@ void MyFrame::OnShowComparison( wxCommandEvent& WXUNUSED(event) )
groupSizer->Add( cb, wxSizerFlags(3).Expand().Border(wxALL, border) );
//
// Disabled wxComboBox
groupSizer->Add(new wxStaticText(dlg, wxID_ANY, "Disabled:"),
wxSizerFlags().Border(wxRIGHT, border));
cb = new wxComboBox(dlg, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize, m_arrItems);
cb->SetValue("Dot Dash");
cb->Enable(false);
groupSizer->Add(cb, wxSizerFlags(3).Expand().Border(wxALL, border));
rowSizer->Add( groupSizer, 1, wxEXPAND|wxALL, border );
colSizer->Add( rowSizer, 1, wxEXPAND|wxALL, border );

View File

@@ -525,6 +525,7 @@ bool MyListModel::GetAttrByRow( unsigned int row, unsigned int col,
return true;
}
}
wxFALLTHROUGH;
case Col_Custom:
// do what the labels defined in GetValueByRow() hint at

Some files were not shown because too many files have changed in this diff Show More