Compare commits
1 Commits
wxPy-2.8.4
...
WX_MAC_2_8
Author | SHA1 | Date | |
---|---|---|---|
|
fadf3261aa |
17
Makefile.in
17
Makefile.in
@@ -2830,7 +2830,6 @@ COND_USE_GUI_1_WXUNIV_1_GUI_CORE_HEADERS = \
|
||||
wx/univ/stdrend.h \
|
||||
wx/univ/textctrl.h \
|
||||
wx/univ/theme.h \
|
||||
wx/univ/tglbtn.h \
|
||||
wx/univ/toolbar.h \
|
||||
wx/univ/toplevel.h \
|
||||
wx/univ/window.h
|
||||
@@ -13556,8 +13555,8 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monodll_utils.o: $(srcdir)/src/motif/utils.cpp $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/motif/utils.cpp
|
||||
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monodll_utils.o: $(srcdir)/src/cocoa/utils.mm $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/cocoa/utils.mm
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monodll_utils.o: $(srcdir)/src/cocoa/utils.cpp $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/cocoa/utils.cpp
|
||||
|
||||
@COND_PLATFORM_WIN32_1@monodll_utilsexc.o: $(srcdir)/src/msw/utilsexc.cpp $(MONODLL_ODEP)
|
||||
@COND_PLATFORM_WIN32_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/utilsexc.cpp
|
||||
@@ -17678,8 +17677,8 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monolib_utils.o: $(srcdir)/src/motif/utils.cpp $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/motif/utils.cpp
|
||||
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monolib_utils.o: $(srcdir)/src/cocoa/utils.mm $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/cocoa/utils.mm
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monolib_utils.o: $(srcdir)/src/cocoa/utils.cpp $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/cocoa/utils.cpp
|
||||
|
||||
@COND_PLATFORM_WIN32_1@monolib_utilsexc.o: $(srcdir)/src/msw/utilsexc.cpp $(MONOLIB_ODEP)
|
||||
@COND_PLATFORM_WIN32_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/utilsexc.cpp
|
||||
@@ -22322,8 +22321,8 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@coredll_utils.o: $(srcdir)/src/motif/utils.cpp $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/motif/utils.cpp
|
||||
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@coredll_utils.o: $(srcdir)/src/cocoa/utils.mm $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/cocoa/utils.mm
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@coredll_utils.o: $(srcdir)/src/cocoa/utils.cpp $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/cocoa/utils.cpp
|
||||
|
||||
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@coredll_caret.o: $(srcdir)/src/generic/caret.cpp $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/caret.cpp
|
||||
@@ -25280,8 +25279,8 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@corelib_utils.o: $(srcdir)/src/motif/utils.cpp $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/motif/utils.cpp
|
||||
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@corelib_utils.o: $(srcdir)/src/cocoa/utils.mm $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/cocoa/utils.mm
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@corelib_utils.o: $(srcdir)/src/cocoa/utils.cpp $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/cocoa/utils.cpp
|
||||
|
||||
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@corelib_caret.o: $(srcdir)/src/generic/caret.cpp $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/caret.cpp
|
||||
|
@@ -132,7 +132,7 @@ AC_DEFUN([WX_CPP_NEW_HEADERS],
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
|
||||
AC_CHECK_HEADERS(iostream,,, [ ])
|
||||
AC_CHECK_HEADER(iostream,,, [ ])
|
||||
|
||||
if test "$ac_cv_header_iostream" = "yes" ; then
|
||||
ifelse([$1], , :, [$1])
|
||||
|
@@ -1,26 +0,0 @@
|
||||
# Created: 2005/03/12
|
||||
# Author: David Elliott
|
||||
|
||||
# For autoconf: Debian in their infinite wisdom decided to improve upon
|
||||
# the standard autoconf 2.59 macros. Thus Debian's autoconf generates
|
||||
# a totally different configure script. This fixes it to look
|
||||
# mostly like Debian's. There are also some fixes pulled in from the OS/2
|
||||
# fork of autoconf.
|
||||
|
||||
# Rule to freeze the m4 so autoconf will actually use it.
|
||||
# NOTE: VERY important to cd to somewhere there are no .m4 files.
|
||||
# or at least no aclocal.m4 or else autom4te helpfully picks it up.
|
||||
.PHONY: all
|
||||
all: autoconf/autoconf.m4f
|
||||
|
||||
AUTOCONF_SOURCES = \
|
||||
autoconf/c.m4 \
|
||||
autoconf/general.m4 \
|
||||
autoconf/libs.m4 \
|
||||
autoconf/status.m4
|
||||
|
||||
AUTOM4TE=autom4te
|
||||
|
||||
autoconf/autoconf.m4f: $(AUTOCONF_SOURCES)
|
||||
$(AUTOM4TE) -B . --language=Autoconf --freeze --output=autoconf/autoconf.m4f
|
||||
|
@@ -1,22 +0,0 @@
|
||||
wxAutohacks
|
||||
|
||||
wxAutohacks is a way of ensuring the configure script remains consistent
|
||||
between developer commits. Previous releases include a build/aclocal_include
|
||||
which has now been moved into the wxWidgets build/aclocal directory.
|
||||
|
||||
At the moment, it is intended to be copied and or symlinked into a wxWidgets
|
||||
source tree. For example, assume you have wxWidgets checked out in the
|
||||
/home/myname/wxCVS/wxWidgets/ path. Then from /home/myname/wxCVS do this:
|
||||
cvs -d :pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets checkout wxAutohacks
|
||||
|
||||
You will now have wxAutohacks in /home/myname/wxCVS/wxAutohacks/. Now go into
|
||||
the wxWidgets build (/home/myname/wxCVS/wxWidgets/build/) and do this:
|
||||
ln -s ../../wxAutohacks/build/autoconf_prepend-include .
|
||||
|
||||
From now on from the root of your wxWidgets source tree when you do this:
|
||||
make -f build/autogen.mk
|
||||
you will also build an autoconf.m4f file which will ensure the configure
|
||||
script stays consistent.
|
||||
|
||||
Alternatively you can do this:
|
||||
make -f build/autogen.mk AUTOHACKS_PREPEND_INCLUDE_DIR=../wxAutohacks/build/autoconf_prepend-include
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,498 +0,0 @@
|
||||
# This file is part of Autoconf. -*- Autoconf -*-
|
||||
# Checking for libraries.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
# 2002 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception, the Free Software Foundation gives unlimited
|
||||
# permission to copy, distribute and modify the configure scripts that
|
||||
# are the output of Autoconf. You need not follow the terms of the GNU
|
||||
# General Public License when using or distributing such scripts, even
|
||||
# though portions of the text of Autoconf appear in them. The GNU
|
||||
# General Public License (GPL) does govern all other use of the material
|
||||
# that constitutes the Autoconf program.
|
||||
#
|
||||
# Certain portions of the Autoconf source text are designed to be copied
|
||||
# (in certain cases, depending on the input) into the output of
|
||||
# Autoconf. We call these the "data" portions. The rest of the Autoconf
|
||||
# source text consists of comments plus executable code that decides which
|
||||
# of the data portions to output in any given case. We call these
|
||||
# comments and executable code the "non-data" portions. Autoconf never
|
||||
# copies any of the non-data portions into its output.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of Autoconf
|
||||
# released by the Free Software Foundation. When you make and
|
||||
# distribute a modified version of Autoconf, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well, *unless*
|
||||
# your modified version has the potential to copy into its output some
|
||||
# of the text that was the non-data portion of the version that you started
|
||||
# with. (In other words, unless your change moves or copies text from
|
||||
# the non-data portions to the data portions.) If your modification has
|
||||
# such potential, you must delete any notice of this special exception
|
||||
# to the GPL from your modified version.
|
||||
#
|
||||
# Written by David MacKenzie, with help from
|
||||
# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
|
||||
# Roland McGrath, Noah Friedman, david d zuhn, and many others.
|
||||
|
||||
# Table of contents
|
||||
#
|
||||
# 1. Generic tests for libraries
|
||||
# 2. Tests for specific libraries
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## 1. Generic tests for libraries.## ##
|
||||
## --------------------------------- ##
|
||||
|
||||
|
||||
|
||||
# AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [OTHER-LIBRARIES])
|
||||
# --------------------------------------------------------
|
||||
# Search for a library defining FUNC, if it's not already available.
|
||||
AC_DEFUN([AC_SEARCH_LIBS],
|
||||
[AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
|
||||
[ac_func_search_save_LIBS=$LIBS
|
||||
ac_cv_search_$1=no
|
||||
AC_LINK_IFELSE([AC_LANG_CALL([], [$1])],
|
||||
[ac_cv_search_$1="none required"])
|
||||
if test "$ac_cv_search_$1" = no; then
|
||||
for ac_lib in $2; do
|
||||
LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_CALL([], [$1])],
|
||||
[ac_cv_search_$1="-l$ac_lib"
|
||||
break])
|
||||
done
|
||||
fi
|
||||
LIBS=$ac_func_search_save_LIBS])
|
||||
AS_IF([test "$ac_cv_search_$1" != no],
|
||||
[test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
|
||||
$3],
|
||||
[$4])dnl
|
||||
])
|
||||
|
||||
|
||||
|
||||
# AC_CHECK_LIB(LIBRARY, FUNCTION,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [OTHER-LIBRARIES])
|
||||
# ------------------------------------------------------
|
||||
#
|
||||
# Use a cache variable name containing both the library and function name,
|
||||
# because the test really is for library $1 defining function $2, not
|
||||
# just for library $1. Separate tests with the same $1 and different $2s
|
||||
# may have different results.
|
||||
#
|
||||
# Note that using directly AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])
|
||||
# is asking for troubles, since AC_CHECK_LIB($lib, fun) would give
|
||||
# ac_cv_lib_$lib_fun, which is definitely not what was meant. Hence
|
||||
# the AS_LITERAL_IF indirection.
|
||||
#
|
||||
# FIXME: This macro is extremely suspicious. It DEFINEs unconditionally,
|
||||
# whatever the FUNCTION, in addition to not being a *S macro. Note
|
||||
# that the cache does depend upon the function we are looking for.
|
||||
#
|
||||
# It is on purpose we used `ac_check_lib_save_LIBS' and not just
|
||||
# `ac_save_LIBS': there are many macros which don't want to see `LIBS'
|
||||
# changed but still want to use AC_CHECK_LIB, so they save `LIBS'.
|
||||
# And ``ac_save_LIBS' is too tempting a name, so let's leave them some
|
||||
# freedom.
|
||||
AC_DEFUN([AC_CHECK_LIB],
|
||||
[m4_ifval([$3], , [AH_CHECK_LIB([$1])])dnl
|
||||
AS_LITERAL_IF([$1],
|
||||
[AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])],
|
||||
[AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1''_$2])])dnl
|
||||
AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
|
||||
[ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-l$1 $5 $LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_CALL([], [$2])],
|
||||
[AS_VAR_SET(ac_Lib, yes)],
|
||||
[AS_VAR_SET(ac_Lib, no)])
|
||||
LIBS=$ac_check_lib_save_LIBS])
|
||||
AS_IF([test AS_VAR_GET(ac_Lib) = yes],
|
||||
[m4_default([$3], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1))
|
||||
LIBS="-l$1 $LIBS"
|
||||
])],
|
||||
[$4])dnl
|
||||
AS_VAR_POPDEF([ac_Lib])dnl
|
||||
])# AC_CHECK_LIB
|
||||
|
||||
|
||||
# AH_CHECK_LIB(LIBNAME)
|
||||
# ---------------------
|
||||
m4_define([AH_CHECK_LIB],
|
||||
[AH_TEMPLATE(AS_TR_CPP(HAVE_LIB$1),
|
||||
[Define to 1 if you have the `]$1[' library (-l]$1[).])])
|
||||
|
||||
|
||||
# AC_HAVE_LIBRARY(LIBRARY,
|
||||
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
||||
# [OTHER-LIBRARIES])
|
||||
# ---------------------------------------------------------
|
||||
#
|
||||
# This macro is equivalent to calling `AC_CHECK_LIB' with a FUNCTION
|
||||
# argument of `main'. In addition, LIBRARY can be written as any of
|
||||
# `foo', `-lfoo', or `libfoo.a'. In all of those cases, the compiler
|
||||
# is passed `-lfoo'. However, LIBRARY cannot be a shell variable;
|
||||
# it must be a literal name.
|
||||
AU_DEFUN([AC_HAVE_LIBRARY],
|
||||
[m4_pushdef([AC_Lib_Name],
|
||||
m4_bpatsubst(m4_bpatsubst([[$1]],
|
||||
[lib\([^\.]*\)\.a], [\1]),
|
||||
[-l], []))dnl
|
||||
AC_CHECK_LIB(AC_Lib_Name, main, [$2], [$3], [$4])dnl
|
||||
ac_cv_lib_[]AC_Lib_Name()=ac_cv_lib_[]AC_Lib_Name()_main
|
||||
m4_popdef([AC_Lib_Name])dnl
|
||||
])
|
||||
|
||||
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## 2. Tests for specific libraries. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
|
||||
|
||||
# --------------------- #
|
||||
# Checks for X window. #
|
||||
# --------------------- #
|
||||
|
||||
|
||||
# _AC_PATH_X_XMKMF
|
||||
# ----------------
|
||||
# Internal subroutine of _AC_PATH_X.
|
||||
# Set ac_x_includes and/or ac_x_libraries.
|
||||
m4_define([_AC_PATH_X_XMKMF],
|
||||
[rm -fr conftest.dir
|
||||
if mkdir conftest.dir; then
|
||||
cd conftest.dir
|
||||
# Make sure to not put "make" in the Imakefile rules, since we grep it out.
|
||||
cat >Imakefile <<'_ACEOF'
|
||||
acfindx:
|
||||
@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
|
||||
_ACEOF
|
||||
if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
|
||||
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
|
||||
eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
|
||||
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
|
||||
for ac_extension in a so sl; do
|
||||
if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
|
||||
test -f $ac_im_libdir/libX11.$ac_extension; then
|
||||
ac_im_usrlibdir=$ac_im_libdir; break
|
||||
fi
|
||||
done
|
||||
# Screen out bogus values from the imake configuration. They are
|
||||
# bogus both because they are the default anyway, and because
|
||||
# using them would break gcc on systems where it needs fixed includes.
|
||||
case $ac_im_incroot in
|
||||
/usr/include) ;;
|
||||
*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
|
||||
esac
|
||||
case $ac_im_usrlibdir in
|
||||
/usr/lib | /lib) ;;
|
||||
*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
|
||||
esac
|
||||
fi
|
||||
cd ..
|
||||
rm -fr conftest.dir
|
||||
fi
|
||||
])# _AC_PATH_X_XMKMF
|
||||
|
||||
|
||||
# _AC_PATH_X_DIRECT
|
||||
# -----------------
|
||||
# Internal subroutine of _AC_PATH_X.
|
||||
# Set ac_x_includes and/or ac_x_libraries.
|
||||
m4_define([_AC_PATH_X_DIRECT],
|
||||
[# Standard set of common directories for X headers.
|
||||
# Check X11 before X11Rn because it is often a symlink to the current release.
|
||||
ac_x_header_dirs='
|
||||
/usr/X11/include
|
||||
/usr/X11R6/include
|
||||
/usr/X11R5/include
|
||||
/usr/X11R4/include
|
||||
|
||||
/usr/include/X11
|
||||
/usr/include/X11R6
|
||||
/usr/include/X11R5
|
||||
/usr/include/X11R4
|
||||
|
||||
/usr/local/X11/include
|
||||
/usr/local/X11R6/include
|
||||
/usr/local/X11R5/include
|
||||
/usr/local/X11R4/include
|
||||
|
||||
/usr/local/include/X11
|
||||
/usr/local/include/X11R6
|
||||
/usr/local/include/X11R5
|
||||
/usr/local/include/X11R4
|
||||
|
||||
/usr/X386/include
|
||||
/usr/x386/include
|
||||
/usr/XFree86/include/X11
|
||||
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/usr/unsupported/include
|
||||
/usr/athena/include
|
||||
/usr/local/x11r5/include
|
||||
/usr/lpp/Xamples/include
|
||||
|
||||
/usr/openwin/include
|
||||
/usr/openwin/share/include'
|
||||
|
||||
if test "$ac_x_includes" = no; then
|
||||
# Guess where to find include files, by looking for a specified header file.
|
||||
# First, try using that file with no special directory specified.
|
||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Intrinsic.h>])],
|
||||
[# We can compile using X headers with no special include directory.
|
||||
ac_x_includes=],
|
||||
[for ac_dir in $ac_x_header_dirs; do
|
||||
if test -r "$ac_dir/X11/Intrinsic.h"; then
|
||||
ac_x_includes=$ac_dir
|
||||
break
|
||||
fi
|
||||
done])
|
||||
fi # $ac_x_includes = no
|
||||
|
||||
if test "$ac_x_libraries" = no; then
|
||||
# Check for the libraries.
|
||||
# See if we find them without any special options.
|
||||
# Don't add to $LIBS permanently.
|
||||
ac_save_LIBS=$LIBS
|
||||
LIBS="-lXt $LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Intrinsic.h>],
|
||||
[XtMalloc (0)])],
|
||||
[LIBS=$ac_save_LIBS
|
||||
# We can link X programs with no special library path.
|
||||
ac_x_libraries=],
|
||||
[LIBS=$ac_save_LIBS
|
||||
for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
|
||||
do
|
||||
# Don't even attempt the hair of trying to link an X program!
|
||||
for ac_extension in a so sl; do
|
||||
if test -r $ac_dir/libXt.$ac_extension; then
|
||||
ac_x_libraries=$ac_dir
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done])
|
||||
fi # $ac_x_libraries = no
|
||||
])# _AC_PATH_X_DIRECT
|
||||
|
||||
|
||||
# _AC_PATH_X
|
||||
# ----------
|
||||
# Compute ac_cv_have_x.
|
||||
AC_DEFUN([_AC_PATH_X],
|
||||
[AC_CACHE_VAL(ac_cv_have_x,
|
||||
[# One or both of the vars are not set, and there is no cached value.
|
||||
ac_x_includes=no ac_x_libraries=no
|
||||
_AC_PATH_X_XMKMF
|
||||
_AC_PATH_X_DIRECT
|
||||
if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
|
||||
# Didn't find X anywhere. Cache the known absence of X.
|
||||
ac_cv_have_x="have_x=no"
|
||||
else
|
||||
# Record where we found X for the cache.
|
||||
ac_cv_have_x="have_x=yes \
|
||||
ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
|
||||
fi])dnl
|
||||
])
|
||||
|
||||
|
||||
# AC_PATH_X
|
||||
# ---------
|
||||
# If we find X, set shell vars x_includes and x_libraries to the
|
||||
# paths, otherwise set no_x=yes.
|
||||
# Uses ac_ vars as temps to allow command line to override cache and checks.
|
||||
# --without-x overrides everything else, but does not touch the cache.
|
||||
AN_HEADER([X11/Xlib.h], [AC_PATH_X])
|
||||
AC_DEFUN([AC_PATH_X],
|
||||
[dnl Document the X abnormal options inherited from history.
|
||||
m4_divert_once([HELP_BEGIN], [
|
||||
X features:
|
||||
--x-includes=DIR X include files are in DIR
|
||||
--x-libraries=DIR X library files are in DIR])dnl
|
||||
|
||||
if test "x$ac_path_x_has_been_run" != xyes; then
|
||||
AC_MSG_CHECKING([for X])
|
||||
|
||||
ac_path_x_has_been_run=yes
|
||||
AC_ARG_WITH(x, [ --with-x use the X Window System])
|
||||
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
|
||||
if test "x$with_x" = xno; then
|
||||
# The user explicitly disabled X.
|
||||
have_x=disabled
|
||||
else
|
||||
if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
|
||||
# Both variables are already set.
|
||||
have_x=yes
|
||||
else
|
||||
_AC_PATH_X
|
||||
fi
|
||||
eval "$ac_cv_have_x"
|
||||
fi # $with_x != no
|
||||
|
||||
if test "$have_x" != yes; then
|
||||
AC_MSG_RESULT([$have_x])
|
||||
no_x=yes
|
||||
else
|
||||
# If each of the values was on the command line, it overrides each guess.
|
||||
test "x$x_includes" = xNONE && x_includes=$ac_x_includes
|
||||
test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
|
||||
# Update the cache value to reflect the command line values.
|
||||
ac_cv_have_x="have_x=yes \
|
||||
ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
|
||||
# It might be that x_includes is empty (headers are found in the
|
||||
# standard search path. Then output the corresponding message
|
||||
ac_out_x_includes=$x_includes
|
||||
test "x$x_includes" = x && ac_out_x_includes="in standard search path"
|
||||
AC_MSG_RESULT([libraries $x_libraries, headers $ac_out_x_includes])
|
||||
fi
|
||||
|
||||
fi])# AC_PATH_X
|
||||
|
||||
|
||||
|
||||
# AC_PATH_XTRA
|
||||
# ------------
|
||||
# Find additional X libraries, magic flags, etc.
|
||||
AC_DEFUN([AC_PATH_XTRA],
|
||||
[AC_REQUIRE([AC_PATH_X])dnl
|
||||
if test "$no_x" = yes; then
|
||||
# Not all programs may use this symbol, but it does not hurt to define it.
|
||||
AC_DEFINE([X_DISPLAY_MISSING], 1,
|
||||
[Define to 1 if the X Window System is missing or not being used.])
|
||||
X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
|
||||
else
|
||||
if test -n "$x_includes"; then
|
||||
X_CFLAGS="$X_CFLAGS -I$x_includes"
|
||||
fi
|
||||
|
||||
# It would also be nice to do this for all -L options, not just this one.
|
||||
if test -n "$x_libraries"; then
|
||||
X_LIBS="$X_LIBS -L$x_libraries"
|
||||
dnl FIXME: banish uname from this macro!
|
||||
# For Solaris; some versions of Sun CC require a space after -R and
|
||||
# others require no space. Words are not sufficient . . . .
|
||||
case `(uname -sr) 2>/dev/null` in
|
||||
"SunOS 5"*)
|
||||
AC_MSG_CHECKING([whether -R must be followed by a space])
|
||||
ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_R_nospace=yes, ac_R_nospace=no)
|
||||
if test $ac_R_nospace = yes; then
|
||||
AC_MSG_RESULT([no])
|
||||
X_LIBS="$X_LIBS -R$x_libraries"
|
||||
else
|
||||
LIBS="$ac_xsave_LIBS -R $x_libraries"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_R_space=yes, ac_R_space=no)
|
||||
if test $ac_R_space = yes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
X_LIBS="$X_LIBS -R $x_libraries"
|
||||
else
|
||||
AC_MSG_RESULT([neither works])
|
||||
fi
|
||||
fi
|
||||
LIBS=$ac_xsave_LIBS
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check for system-dependent libraries X programs must link with.
|
||||
# Do this before checking for the system-independent R6 libraries
|
||||
# (-lICE), since we may need -lsocket or whatever for X linking.
|
||||
|
||||
if test "$ISC" = yes; then
|
||||
X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
|
||||
else
|
||||
# Martyn Johnson says this is needed for Ultrix, if the X
|
||||
# libraries were built with DECnet support. And Karl Berry says
|
||||
# the Alpha needs dnet_stub (dnet does not exist).
|
||||
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
|
||||
AC_LINK_IFELSE([AC_LANG_CALL([], [XOpenDisplay])],
|
||||
[],
|
||||
[AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
|
||||
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
|
||||
AC_CHECK_LIB(dnet_stub, dnet_ntoa,
|
||||
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
|
||||
fi])
|
||||
LIBS="$ac_xsave_LIBS"
|
||||
|
||||
# msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
|
||||
# to get the SysV transport functions.
|
||||
# Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
|
||||
# needs -lnsl.
|
||||
# The nsl library prevents programs from opening the X display
|
||||
# on Irix 5.2, according to T.E. Dickey.
|
||||
# The functions gethostbyname, getservbyname, and inet_addr are
|
||||
# in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
|
||||
AC_CHECK_FUNC(gethostbyname)
|
||||
if test $ac_cv_func_gethostbyname = no; then
|
||||
AC_CHECK_LIB(nsl, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
|
||||
if test $ac_cv_lib_nsl_gethostbyname = no; then
|
||||
AC_CHECK_LIB(bsd, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd")
|
||||
fi
|
||||
fi
|
||||
|
||||
# lieder@skyler.mavd.honeywell.com says without -lsocket,
|
||||
# socket/setsockopt and other routines are undefined under SCO ODT
|
||||
# 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
|
||||
# on later versions), says Simon Leinen: it contains gethostby*
|
||||
# variants that don't use the name server (or something). -lsocket
|
||||
# must be given before -lnsl if both are needed. We assume that
|
||||
# if connect needs -lnsl, so does gethostbyname.
|
||||
AC_CHECK_FUNC(connect)
|
||||
if test $ac_cv_func_connect = no; then
|
||||
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
|
||||
$X_EXTRA_LIBS)
|
||||
fi
|
||||
|
||||
# Guillermo Gomez says -lposix is necessary on A/UX.
|
||||
AC_CHECK_FUNC(remove)
|
||||
if test $ac_cv_func_remove = no; then
|
||||
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
|
||||
fi
|
||||
|
||||
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
|
||||
AC_CHECK_FUNC(shmat)
|
||||
if test $ac_cv_func_shmat = no; then
|
||||
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc")
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for libraries that X11R6 Xt/Xaw programs need.
|
||||
ac_save_LDFLAGS=$LDFLAGS
|
||||
test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
|
||||
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
|
||||
# check for ICE first), but we must link in the order -lSM -lICE or
|
||||
# we get undefined symbols. So assume we have SM if we have ICE.
|
||||
# These have to be linked with before -lX11, unlike the other
|
||||
# libraries we check for below, so use a different variable.
|
||||
# John Interrante, Karl Berry
|
||||
AC_CHECK_LIB(ICE, IceConnectionNumber,
|
||||
[X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"], , $X_EXTRA_LIBS)
|
||||
LDFLAGS=$ac_save_LDFLAGS
|
||||
|
||||
fi
|
||||
AC_SUBST(X_CFLAGS)dnl
|
||||
AC_SUBST(X_PRE_LIBS)dnl
|
||||
AC_SUBST(X_LIBS)dnl
|
||||
AC_SUBST(X_EXTRA_LIBS)dnl
|
||||
])# AC_PATH_XTRA
|
File diff suppressed because it is too large
Load Diff
@@ -2436,7 +2436,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
src/cocoa/toolbar.mm
|
||||
src/cocoa/tooltip.mm
|
||||
src/cocoa/toplevel.mm
|
||||
src/cocoa/utils.mm
|
||||
src/cocoa/utils.cpp
|
||||
src/cocoa/utilsexc.mm
|
||||
src/cocoa/window.mm
|
||||
<!-- Generic implementations used by wxCocoa: -->
|
||||
@@ -2645,7 +2645,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
wx/univ/stdrend.h
|
||||
wx/univ/textctrl.h
|
||||
wx/univ/theme.h
|
||||
wx/univ/tglbtn.h
|
||||
wx/univ/toolbar.h
|
||||
wx/univ/toplevel.h
|
||||
wx/univ/window.h
|
||||
|
46
configure.in
46
configure.in
@@ -35,7 +35,7 @@ dnl wx_release_number += 1
|
||||
wx_major_version_number=2
|
||||
wx_minor_version_number=8
|
||||
wx_release_number=4
|
||||
wx_subrelease_number=2
|
||||
wx_subrelease_number=1
|
||||
|
||||
WX_RELEASE=$wx_major_version_number.$wx_minor_version_number
|
||||
WX_VERSION=$WX_RELEASE.$wx_release_number
|
||||
@@ -820,9 +820,6 @@ else
|
||||
DEFAULT_wxUSE_GTK2=yes
|
||||
fi
|
||||
|
||||
dnl Always default to no. Only special cases require this.
|
||||
DEFAULT_wxUSE_OBJC_UNIQUIFYING=no
|
||||
|
||||
|
||||
dnl WX_ARG_WITH should be used to select whether an external package will be
|
||||
dnl used or not, to configure compile-time features of this package itself,
|
||||
@@ -945,7 +942,6 @@ WX_ARG_ENABLE(compat26, [ --disable-compat26 disable wxWidgets 2.6 co
|
||||
|
||||
WX_ARG_ENABLE(rpath, [ --disable-rpath disable use of rpath for uninstalled builds], wxUSE_RPATH)
|
||||
|
||||
WX_ARG_ENABLE(objc_uniquifying,[ --enable-objc_uniquifying enable Objective-C class name uniquifying], wxUSE_OBJC_UNIQUIFYING)
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl (small) optional non GUI classes
|
||||
@@ -1841,7 +1837,7 @@ AC_CHECK_HEADERS(stdlib.h fnmatch.h langinfo.h malloc.h unistd.h wchar.h,,, [AC_
|
||||
|
||||
dnl maybe wchar_t is in wcstr.h if we don't have wchar.h?
|
||||
if test "$ac_cv_header_wchar_h" != "yes"; then
|
||||
AC_CHECK_HEADERS(wcstr.h,,, [AC_INCLUDES_DEFAULT()])
|
||||
AC_CHECK_HEADER(wcstr.h,,, [AC_INCLUDES_DEFAULT()])
|
||||
fi
|
||||
|
||||
case "${host}" in
|
||||
@@ -1859,7 +1855,7 @@ esac
|
||||
|
||||
dnl POSIX needs this for select(), but old systems don't have it
|
||||
if test "$USE_UNIX" = 1 ; then
|
||||
AC_CHECK_HEADERS([sys/select.h],,, [AC_INCLUDES_DEFAULT()])
|
||||
AC_CHECK_HEADER([sys/select.h],,, [AC_INCLUDES_DEFAULT()])
|
||||
fi
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
@@ -3015,7 +3011,7 @@ WIDGET_SET=
|
||||
dnl are we building for a win32 target environment?
|
||||
dnl If so, setup common stuff needed for both GUI and Base libs.
|
||||
if test "$USE_WIN32" = 1 ; then
|
||||
AC_CHECK_HEADERS(w32api.h,,, [ ])
|
||||
AC_CHECK_HEADER(w32api.h,,, [ ])
|
||||
AC_CHECK_HEADER(windows.h,,
|
||||
[
|
||||
AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
|
||||
@@ -3852,8 +3848,8 @@ dnl do this after test for X11 above so that we have a chance of finding Xlib.h
|
||||
if test "$wxUSE_GUI" = "yes"; then
|
||||
if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_PM" != 1; then
|
||||
dnl defines HAVE_X11_XKBLIB_H
|
||||
AC_CHECK_HEADERS(X11/Xlib.h,,, [ ])
|
||||
AC_CHECK_HEADERS([X11/XKBlib.h],,,
|
||||
AC_CHECK_HEADER(X11/Xlib.h,,, [ ])
|
||||
AC_CHECK_HEADER([X11/XKBlib.h],,,
|
||||
[
|
||||
#if HAVE_X11_XLIB_H
|
||||
#include <X11/Xlib.h>
|
||||
@@ -3936,7 +3932,7 @@ dnl ---------------------------------------------------------------------------
|
||||
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],Xxf86vm)
|
||||
if test "$ac_find_libraries" != "" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_CHECK_HEADERS([X11/extensions/xf86vmode.h],
|
||||
AC_CHECK_HEADER([X11/extensions/xf86vmode.h],
|
||||
[
|
||||
GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXxf86vm"
|
||||
],
|
||||
@@ -4680,7 +4676,7 @@ if test "$wxUSE_UNICODE" = yes; then
|
||||
#include <wchar.h>"
|
||||
case "${host}" in
|
||||
*-*-solaris2* )
|
||||
AC_CHECK_HEADERS(widec.h,,, [AC_INCLUDES_DEFAULT()])
|
||||
AC_CHECK_HEADER(widec.h,,, [AC_INCLUDES_DEFAULT()])
|
||||
if test "$ac_cv_header_widec_h" = "yes"; then
|
||||
wchar_headers="$wchar_headers
|
||||
#include <widec.h>"
|
||||
@@ -4953,7 +4949,7 @@ dnl check for timegm() used by datetime.cpp
|
||||
AC_CHECK_FUNCS(timegm)
|
||||
|
||||
dnl look for a function to modify the environment
|
||||
AC_CHECK_FUNCS(setenv putenv, break)
|
||||
AC_CHECK_FUNCS(putenv setenv, break)
|
||||
|
||||
HAVE_SOME_SLEEP_FUNC=0
|
||||
if test "$USE_BEOS" = 1; then
|
||||
@@ -5047,7 +5043,7 @@ dnl ------------------------------------------
|
||||
dnl Check for ESD:
|
||||
EXTRALIBS_ESD=
|
||||
AC_CHECK_LIB(esd, esd_close, [
|
||||
AC_CHECK_HEADERS([esd.h], [
|
||||
AC_CHECK_HEADER([esd.h], [
|
||||
EXTRALIBS_ESD="-lesd"
|
||||
],
|
||||
[],
|
||||
@@ -5286,7 +5282,7 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
|
||||
AC_DEFINE(wxHAVE_PTHREAD_CLEANUP)
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS(sched.h,,, [AC_INCLUDES_DEFAULT()])
|
||||
AC_CHECK_HEADER(sched.h,,, [AC_INCLUDES_DEFAULT()])
|
||||
if test "$ac_cv_header_sched_h" = "yes"; then
|
||||
AC_CHECK_FUNC(sched_yield,
|
||||
AC_DEFINE(HAVE_SCHED_YIELD),
|
||||
@@ -6082,9 +6078,6 @@ if test "$wxUSE_PRINTF_POS_PARAMS" = "yes"; then
|
||||
AC_DEFINE(wxUSE_PRINTF_POS_PARAMS)
|
||||
fi
|
||||
|
||||
if test "$wxUSE_OBJC_UNIQUIFYING" = "yes"; then
|
||||
AC_DEFINE(wxUSE_OBJC_UNIQUIFYING)
|
||||
fi
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl time/date functions
|
||||
@@ -6529,7 +6522,7 @@ if test "$wxUSE_GUI" = "yes" -a "$wxUSE_JOYSTICK" = "yes"; then
|
||||
dnl can't be compiled because of an error and with the default
|
||||
dnl AC_CHECK_HEADER semantics we'd still detect it in this case and
|
||||
dnl build would fail later
|
||||
AC_CHECK_HEADERS(linux/joystick.h, [wxUSE_JOYSTICK=yes],, [AC_INCLUDES_DEFAULT()])
|
||||
AC_CHECK_HEADER(linux/joystick.h, [wxUSE_JOYSTICK=yes],, [AC_INCLUDES_DEFAULT()])
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -6666,7 +6659,7 @@ if test "$USE_WIN32" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \
|
||||
-o "$wxUSE_CLIPBOARD" = "yes" \
|
||||
-o "$wxUSE_OLE" = "yes" \
|
||||
-o "$wxUSE_DRAG_AND_DROP" = "yes" \) ; then
|
||||
AC_CHECK_HEADERS(ole2.h,,, [ ])
|
||||
AC_CHECK_HEADER(ole2.h,,, [ ])
|
||||
|
||||
if test "$ac_cv_header_ole2_h" = "yes" ; then
|
||||
if test "$GCC" = yes ; then
|
||||
@@ -7240,8 +7233,13 @@ fi
|
||||
|
||||
if test "$wxUSE_SYSTEM_OPTIONS" = "yes"; then
|
||||
AC_DEFINE(wxUSE_SYSTEM_OPTIONS)
|
||||
if test "$TOOLKIT" = "MSW" -o "$TOOLKIT" = "GTK" -o "$TOOLKIT" = "X11" -o \
|
||||
"$TOOLKIT" = "MOTIF" -o "$TOOLKIT" = "COCOA"; then
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS taskbar"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test "$wxUSE_VALIDATORS" = "yes"; then
|
||||
AC_DEFINE(wxUSE_VALIDATORS)
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS validate"
|
||||
@@ -7547,12 +7545,14 @@ dnl all additional libraries (except wxWidgets itself) we link with
|
||||
|
||||
if test "$wxUSE_MAC" = 1 ; then
|
||||
if test "$wxUSE_SOUND" = "yes" || test "$wxUSE_MEDIACTRL" = "yes"; then
|
||||
if test "$USE_DARWIN" != 1; then
|
||||
if test "$USE_DARWIN" = 1; then
|
||||
LDFLAGS="$LDFLAGS -framework QuickTime"
|
||||
else
|
||||
LDFLAGS="$LDFLAGS -lQuickTimeLib"
|
||||
fi
|
||||
fi
|
||||
if test "$USE_DARWIN" = 1; then
|
||||
LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework System -framework QuickTime"
|
||||
LDFLAGS="$LDFLAGS -framework IOKit -framework Carbon -framework Cocoa -framework System"
|
||||
else
|
||||
LDFLAGS="$LDFLAGS -lCarbonLib"
|
||||
fi
|
||||
@@ -7578,7 +7578,7 @@ if test "$wxUSE_GUI" = "yes"; then
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS artprov controls dialogs drawing \
|
||||
dynamic erase event exec font image minimal mobile \
|
||||
mobile/wxedit mobile/styles propsize render \
|
||||
rotate shaped taskbar vscroll widgets"
|
||||
rotate shaped vscroll widgets"
|
||||
|
||||
if test "$wxUSE_MONOLITHIC" != "yes"; then
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS console"
|
||||
|
38
debian/changelog
vendored
38
debian/changelog
vendored
@@ -1,41 +1,3 @@
|
||||
wxwidgets2.8 (2.8.4.2-0) unstable; urgency=low
|
||||
|
||||
* Pacakges now support all Python versions in `pyversions -r`
|
||||
* If the system Python supports it a debug wxPython package is built that
|
||||
can be installed side-by-side with the non-debug package
|
||||
* Added colour normalization to PNM image handler (Ray Johnston).
|
||||
* Fixed selecting part of word from right to left in wxHTML (Michael Hieke).
|
||||
* Selecting text in wxHTML with character precision was made easier, it's
|
||||
enough to select half of a character (Michael Hieke).
|
||||
* Significantly improved startup times of XRC-based applications using
|
||||
embedded resources on Unix (requires resources recompilation).
|
||||
* Fixed freeing of "static" alpha data in wxImage (Axel Gembe).
|
||||
* Added tab mouse click events to wxAuiNotebook (Ben Williams).
|
||||
* Option for middle-click tab close in wxAuiNotebook (Ben Williams).
|
||||
* Added wxAuiNotebook::SetFont, GetTabCtrlHeight, GetHeightForPageHeight.
|
||||
* Added SetBitmap/GetBitmap to wxWizard, to allow e.g. on-the-fly creation
|
||||
of bitmap to fit page height.
|
||||
* Fixed wxXPMHandler::SaveFile for images with more than 92 colors.
|
||||
* Fixed a crash in wxGrid on creation due to OnSize being called too soon.
|
||||
* Fixed missing key events in wxGTK1 build.
|
||||
* Setting foreground colour of single line wxTextCtrl now works.
|
||||
* More work on setting defaults in GNOME print dialogs.
|
||||
* Also made landscape printing work as per wxMSW.
|
||||
* Add support for (rectangular) clipping in GNOME print backend.
|
||||
* Speed up wxBitmap::Rescale().
|
||||
* Add right button event for wxToolbar's tools (Tim Kosse).
|
||||
* Made wxWindow::SetScrollPos and wxScrollbar::SetThumbPos
|
||||
not emit any event.
|
||||
* Correct hyperactive mouse wheel support.
|
||||
* Correct grid line mode in wxListCtrl.
|
||||
* Don't unconditionally add wxCAPTION style to wxMiniFrame.
|
||||
* Fixed crash in file and dir pickers for GTK+ < 2.6 if compiled
|
||||
with GTK+ >= 2.6.
|
||||
* Generate wxEVT_COMMAND_LIST_END_LABEL_EDIT event even if label didn't change
|
||||
|
||||
|
||||
-- Robin Dunn <robin@alldunn.com> Thu, 19 Jul 2007 15:42:23 -0700
|
||||
|
||||
wxwidgets2.8 (2.8.4.0-0) unstable; urgency=low
|
||||
|
||||
* Fix bug in wxFileConfig when recreating a group (Steven Van Ingelgem)
|
||||
|
162
debian/control.in
vendored
162
debian/control.in
vendored
@@ -1,10 +1,9 @@
|
||||
Source: wxwidgets=V
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Build-Depends: debhelper (>=4.0), flex, bison, gettext, bc, libgtk2.0-dev, =PY_BUILD_DEPS, zlib1g-dev, libjpeg62-dev, libpng12-dev, libtiff4-dev, libsm-dev, libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, libesd0-dev, libgnomeprintui2.2-dev, libgconf2-dev, libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev
|
||||
Build-Depends: debhelper (>=4.0), flex, bison, gettext, libgtk2.0-dev, =PY, =PY-dev, zlib1g-dev, libjpeg62-dev, libpng12-dev, libtiff4-dev, libsm-dev, libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, libesd0-dev, libgnomeprintui2.2-dev, libgconf2-dev, libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev
|
||||
Maintainer: wxWidgets dev-team <wx-dev@lists.wxwidgets.org>
|
||||
XS-Python-Version: all
|
||||
Standards-Version: 3.7.2.1
|
||||
Standards-Version: 3.6.2.1
|
||||
|
||||
Package: libwxbase=SOV=U
|
||||
Architecture: any
|
||||
@@ -26,7 +25,7 @@ Description: wxBase library (runtime) - non-GUI support classes of wxWidgets too
|
||||
Package: libwxbase=V=U-dev
|
||||
Architecture: any
|
||||
Section: libdevel
|
||||
Depends: wx=V-headers (= ${Source-Version}), libwxbase=SOV=U (= ${Source-Version}), libc6-dev | libc-dev
|
||||
Depends: wx=V-headers (= ${Source-Version}), libwxbase=SOV=U (= ${Source-Version}), libc6-dev
|
||||
Suggests: wx=V-doc, gettext
|
||||
Description: wxBase library (development) - non-GUI support classes of wxWidgets toolkit
|
||||
wxBase is a collection of C++ classes providing basic data structures
|
||||
@@ -76,7 +75,7 @@ Description: wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
|
||||
Package: libwxgtk=V=U-dev
|
||||
Architecture: any
|
||||
Section: libdevel
|
||||
Depends: wx=V-headers (= ${Source-Version}), libwxgtk=SOV=U (= ${Source-Version}), libwxbase=V=U-dev (= ${Source-Version})
|
||||
Depends: wx=V-headers (= ${Source-Version}), libwxgtk=SOV=U (= ${Source-Version}), libwxbase=V=U-dev (= ${Source-Version}), libc6-dev
|
||||
Suggests: wx-common, wx=V-doc, libstdc++-dev, gettext, xlibmesa-gl-dev | libgl-dev, xlibmesa-glu-dev | libglu-dev
|
||||
Description: wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
|
||||
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
|
||||
@@ -91,7 +90,7 @@ Package: libwxgtk=V=U-dbg
|
||||
Architecture: any
|
||||
Section: libdevel
|
||||
Priority: extra
|
||||
Depends: wx=V-headers (= ${Source-Version}), libwxbase=V=U-dbg (= ${Source-Version})
|
||||
Depends: wx=V-headers (= ${Source-Version}), libwxbase=V=U-dbg (= ${Source-Version}), libc6-dev
|
||||
Description: wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
|
||||
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
|
||||
GUI components and other facilities on several popular platforms (and some
|
||||
@@ -102,6 +101,79 @@ Description: wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
|
||||
provides many internal checks by wxWidgets itself that are not performed on
|
||||
apps compiled with the 'release version' libs in the -dev package.
|
||||
|
||||
Package: python-wxgtk=V=U
|
||||
Architecture: any
|
||||
Section: python
|
||||
Depends: python-wxversion, =PY, ${shlibs:Depends}
|
||||
Suggests: wx=V-doc, wx=V-examples, =PY-xml
|
||||
Conflicts: libwxgtk2.6-0-python, wxpython2.6-0
|
||||
Replaces: libwxgtk2.6-0-python, wxpython2.6-0
|
||||
Description: wxWidgets Cross-platform C++ GUI toolkit (wxPython binding)
|
||||
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
|
||||
GUI components and other facilities on several popular platforms (and some
|
||||
unpopular ones as well). For more information see http://wxwidgets.org
|
||||
.
|
||||
This package provides a Python binding to the wxGTK library and the
|
||||
wxPython runtime support libraries. If you wish to use xrc you'll also
|
||||
need the =PY-xml package installed.
|
||||
|
||||
Package: python-wxgtk=V=U-dbg
|
||||
Architecture: any
|
||||
Section: python
|
||||
Depends: python-wxversion, =PY, ${shlibs:Depends}
|
||||
Conflicts: python-wxgtk=V=U
|
||||
Replaces: python-wxgtk=V=U
|
||||
Provides: python-wxgtk=V=U
|
||||
Description: wxWidgets Cross-platform C++ GUI toolkit (wxPython binding)
|
||||
wxWidgets is a class library for C++ providing GUI (Graphical User
|
||||
Interface) and other facilities on more than one platform. Version =V
|
||||
currently supports subsets of GTK+, Motif, and MS Windows.
|
||||
.
|
||||
This package provides a Python binding to the wxGTK debug library.
|
||||
It is useful for developers as many common errors may be caught, but
|
||||
you should _never_ upload packages to Debian that depend upon this
|
||||
package explicitly, use the python-wxgtk=V=U package instead.
|
||||
.
|
||||
If you wish to use xrc you'll also need the =PY-xml package installed.
|
||||
|
||||
Package: python-wxversion
|
||||
Architecture: all
|
||||
Section: python
|
||||
Conflicts: wxpython2.6-0
|
||||
Replaces: wxpython2.6-0
|
||||
Description: wxWidgets Cross-platform C++ GUI toolkit (wxPython version selector)
|
||||
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
|
||||
GUI components and other facilities on several popular platforms (and some
|
||||
unpopular ones as well). For more information see http://wxwidgets.org
|
||||
.
|
||||
This package provides the wxPython version selector.
|
||||
|
||||
Package: python-wxaddons
|
||||
Architecture: all
|
||||
Section: python
|
||||
Conflicts: python-wxgtk2.6
|
||||
Replaces:
|
||||
Description: wxWidgets Cross-platform C++ GUI toolkit (wxPython add-on packages base)
|
||||
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
|
||||
GUI components and other facilities on several popular platforms (and some
|
||||
unpopular ones as well). For more information see http://wxwidgets.org
|
||||
.
|
||||
This package provides a base Python package for 3rd party add-ons.
|
||||
|
||||
Package: python-wxtools
|
||||
Architecture: all
|
||||
Section: python
|
||||
Depends: python-wxgtk=V=U
|
||||
Conflicts: wxpython2.6-0
|
||||
Replaces: wxpython2.6-0, libwxgtk2.4-python, wxpython2.4-1
|
||||
Description: wxWidgets Cross-platform C++ GUI toolkit (wxPython common files)
|
||||
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
|
||||
GUI components and other facilities on several popular platforms (and some
|
||||
unpopular ones as well). For more information see http://wxwidgets.org
|
||||
.
|
||||
This package provides support utilities and common files for wxPython=V=U.
|
||||
If you wish to use xrced you'll also need the =PY-xml package installed.
|
||||
|
||||
Package: wx-common
|
||||
Architecture: any
|
||||
Section: devel
|
||||
@@ -187,81 +259,3 @@ Depends: wx=V-headers (= ${Source-Version})
|
||||
Description: Extra wxWidgets headers for mingw32msvc-cross
|
||||
Headers required by the wxWidgets mingw32msvc-cross libraries.
|
||||
|
||||
|
||||
|
||||
|
||||
Package: python-wxgtk=V=U
|
||||
Architecture: any
|
||||
Section: python
|
||||
Depends: python-wxversion, ${python:Depends}, ${shlibs:Depends}
|
||||
Suggests: wx=V-doc, wx=V-examples, python-xml
|
||||
Conflicts: libwxgtk2.6-0-python, wxpython2.6-0
|
||||
Replaces: libwxgtk2.6-0-python, wxpython2.6-0
|
||||
XB-Python-Version: ${python:Versions}
|
||||
Provides: ${python:Provides}
|
||||
Description: wxWidgets Cross-platform C++ GUI toolkit (wxPython binding)
|
||||
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
|
||||
GUI components and other facilities on several popular platforms (and some
|
||||
unpopular ones as well). For more information see http://wxwidgets.org
|
||||
.
|
||||
This package provides a Python binding to the wxGTK library and the
|
||||
wxPython runtime support libraries. If you wish to use xrc you'll also
|
||||
need the python-xml package installed.
|
||||
|
||||
Package: python-wxgtk=V=U-dbg
|
||||
Priority: extra
|
||||
Architecture: any
|
||||
Section: python
|
||||
Depends: python-wxgtk=V=U (= ${Source-Version}), python-dbg, ${shlibs:Depends}
|
||||
Suggests: python-xml-dbg
|
||||
XB-Python-Version: ${python:Versions}
|
||||
Description: wxWidgets Cross-platform C++ GUI toolkit (wxPython binding, debug version)
|
||||
wxWidgets is a class library for C++ providing GUI (Graphical User
|
||||
Interface) and other facilities on more than one platform. Version =V
|
||||
currently supports subsets of GTK+, Motif, and MS Windows.
|
||||
.
|
||||
This package provides a Python binding to the wxGTK debug library.
|
||||
This package contains the extensions built for the python debug interpreter.
|
||||
|
||||
Package: python-wxversion
|
||||
Architecture: all
|
||||
Section: python
|
||||
Depends: ${python:Depends}
|
||||
Conflicts: wxpython2.6-0
|
||||
Replaces: wxpython2.6-0
|
||||
XB-Python-Version: ${python:Versions}
|
||||
Description: wxWidgets Cross-platform C++ GUI toolkit (wxPython version selector)
|
||||
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
|
||||
GUI components and other facilities on several popular platforms (and some
|
||||
unpopular ones as well). For more information see http://wxwidgets.org
|
||||
.
|
||||
This package provides the wxPython version selector.
|
||||
|
||||
Package: python-wxaddons
|
||||
Architecture: all
|
||||
Section: python
|
||||
Conflicts: python-wxgtk2.6 (<< 2.6.4.0)
|
||||
Depends: ${python:Depends}, python-wxgtk=V=U
|
||||
XB-Python-Version: ${python:Versions}
|
||||
Description: wxWidgets Cross-platform C++ GUI toolkit (wxPython add-on packages base)
|
||||
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
|
||||
GUI components and other facilities on several popular platforms (and some
|
||||
unpopular ones as well). For more information see http://wxwidgets.org
|
||||
.
|
||||
This package provides a base Python package for 3rd party add-ons.
|
||||
|
||||
Package: python-wxtools
|
||||
Architecture: all
|
||||
Section: python
|
||||
Depends: python-wxgtk=V=U, ${python:Depends}
|
||||
Conflicts: wxpython2.6-0
|
||||
Replaces: wxpython2.6-0, libwxgtk2.4-python, wxpython2.4-1
|
||||
XB-Python-Version: ${python:Versions}
|
||||
Description: wxWidgets Cross-platform C++ GUI toolkit (wxPython common files)
|
||||
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
|
||||
GUI components and other facilities on several popular platforms (and some
|
||||
unpopular ones as well). For more information see http://wxwidgets.org
|
||||
.
|
||||
This package provides support utilities and common files for wxPython=V=U.
|
||||
If you wish to use xrced you'll also need the python-xml package installed.
|
||||
|
||||
|
8
debian/copyright
vendored
8
debian/copyright
vendored
@@ -1,13 +1,13 @@
|
||||
This package was debianized by Ron Lee <ron@debian.org> on
|
||||
Sun, 13 Feb 2000 18:40:00 +1030.
|
||||
|
||||
More information about wxWidgets, as well as the source these debs
|
||||
are produced from can be found at www.wxwidgets.org
|
||||
more information about wxWindows, as well as the source these debs
|
||||
are produced from can be found at www.wxwindows.org
|
||||
|
||||
Note for Debian users:
|
||||
======================
|
||||
|
||||
Most of the core wxWidgets library is licenced under the wxWindows Library
|
||||
Most of the core wxWindows library is licenced under the wxWindows Library
|
||||
Licence (included below), however some additional features of the library
|
||||
may include source licenced under terms which do not include the exception
|
||||
permitting you to licence binary object code versions of works based on the
|
||||
@@ -20,7 +20,7 @@ you wish to release your code under a licence which does not grant all of
|
||||
the same rights as the LGPL would assert but would be permitted under the
|
||||
terms of the exception, then you are strongly advised to either check the
|
||||
licencing terms of all components that these debs (and all future versions
|
||||
that you use) are built with, or build your own binaries of wxWidgets which
|
||||
that you use) are built with, or build your own binaries of wxWindows which
|
||||
include only such code as is definitely covered by the exception.
|
||||
|
||||
You should presume that these debs will fall under the provisions of the
|
||||
|
6
debian/python-wxaddons.postinst
vendored
6
debian/python-wxaddons.postinst
vendored
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
#DEBHELPER#
|
||||
|
6
debian/python-wxaddons.prerm
vendored
6
debian/python-wxaddons.prerm
vendored
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
#DEBHELPER#
|
||||
|
15
debian/python-wxgtk-dbg.postinst
vendored
15
debian/python-wxgtk-dbg.postinst
vendored
@@ -2,20 +2,15 @@
|
||||
|
||||
set -e
|
||||
|
||||
WXPYTHONDIR="=WXPYDIR"
|
||||
PYVERS="=PYVERS"
|
||||
WXPYTHONDIR="/=WXPYDIR"
|
||||
|
||||
if [ "$1" = "configure" ]; then
|
||||
for PY in $PYVERS; do
|
||||
$PY /usr/lib/$PY/compileall.py -q /usr/lib/$PY/site-pacakges/${WXPYTHONDIR}
|
||||
$PY -O /usr/lib/$PY/compileall.py -q /usr/lib/$PY/site-pacakges/${WXPYTHONDIR}
|
||||
done
|
||||
=PY /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR}
|
||||
=PY -O /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR}
|
||||
fi
|
||||
|
||||
for PY in $PYVERS; do
|
||||
update-alternatives --install /usr/lib/$PY/site-packages/wx.pth wx.pth \
|
||||
/usr/lib/wx/$PY/wx=V-dbg.pth $(( =PRIO - 10 ))
|
||||
done
|
||||
update-alternatives --install /usr/lib/=PY/site-packages/wx.pth wx.pth \
|
||||
/usr/lib/wx/python/wx=V-dbg.pth $(( =PRIO - 10 ))
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
4
debian/python-wxgtk-dbg.prerm
vendored
4
debian/python-wxgtk-dbg.prerm
vendored
@@ -5,9 +5,7 @@ set -e
|
||||
PACKAGE="python-wxgtk=V-dbg"
|
||||
dpkg --listfiles $PACKAGE | awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | xargs rm -f >&2
|
||||
|
||||
for PY in =PYVERS; do
|
||||
update-alternatives --remove wx.pth /usr/lib/wx/$PY/wx=V-dbg.pth
|
||||
done
|
||||
update-alternatives --remove wx.pth /usr/lib/wx/python/wx=V-dbg.pth
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
15
debian/python-wxgtk.postinst
vendored
15
debian/python-wxgtk.postinst
vendored
@@ -2,14 +2,15 @@
|
||||
|
||||
set -e
|
||||
|
||||
WXPYTHONDIR="=WXPYDIR"
|
||||
PYVERS="=PYVERS"
|
||||
WXPYTHONDIR="/=WXPYDIR"
|
||||
|
||||
for PY in $PYVERS; do
|
||||
update-alternatives --install /usr/lib/python$PY/site-packages/wx.pth \
|
||||
wx-python$PY.pth \
|
||||
/usr/lib/wx/python$PY/wx=V.pth =PRIO
|
||||
done
|
||||
if [ "$1" = "configure" ]; then
|
||||
=PY /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR}
|
||||
=PY -O /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR}
|
||||
fi
|
||||
|
||||
update-alternatives --install /usr/lib/=PY/site-packages/wx.pth wx.pth \
|
||||
/usr/lib/wx/python/wx=V.pth =PRIO
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
7
debian/python-wxgtk.prerm
vendored
7
debian/python-wxgtk.prerm
vendored
@@ -2,9 +2,10 @@
|
||||
|
||||
set -e
|
||||
|
||||
for PY in =PYVERS; do
|
||||
update-alternatives --remove wx-python$PY.pth /usr/lib/wx/python$PY/wx=V.pth
|
||||
done
|
||||
PACKAGE="python-wxgtk=V"
|
||||
dpkg --listfiles $PACKAGE | awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | xargs rm -f >&2
|
||||
|
||||
update-alternatives --remove wx.pth /usr/lib/wx/python/wx=V.pth
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
6
debian/python-wxversion.postinst
vendored
6
debian/python-wxversion.postinst
vendored
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
#DEBHELPER#
|
||||
|
6
debian/python-wxversion.prerm
vendored
6
debian/python-wxversion.prerm
vendored
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
#DEBHELPER#
|
||||
|
617
debian/rules
vendored
617
debian/rules
vendored
@@ -5,20 +5,24 @@
|
||||
# variously stolen code :-)
|
||||
# It makes copious use of the debhelper utilities written by
|
||||
# Joey Hess and others.
|
||||
#
|
||||
# Significantly hacked up in July 2007 by Robin Dunn
|
||||
#
|
||||
|
||||
#export DH_VERBOSE=1
|
||||
export DH_OPTIONS
|
||||
|
||||
ifdef CONCURRENCY_LEVEL
|
||||
|
||||
# A user who knows what they want, that's like gold...
|
||||
# respect their precious opinion of how much blue smoke to use.
|
||||
JOB_COUNT := $(CONCURRENCY_LEVEL)
|
||||
|
||||
else ifdef DISTCC_HOSTS
|
||||
|
||||
# Otherwise, if they have a cluster, try to put it to good use.
|
||||
JOB_COUNT := $(shell set $${DISTCC_HOSTS} > /dev/null 2>&1 ; echo $$\#)
|
||||
|
||||
# Not much faster, but it might keep you warm in winter...
|
||||
#JOB_COUNT := $(shell set $${DISTCC_HOSTS} > /dev/null 2>&1 ; echo $$(($$\# + $$\#)))
|
||||
|
||||
endif
|
||||
|
||||
ifdef JOB_COUNT
|
||||
@@ -27,37 +31,7 @@ else
|
||||
FAST_MAKE = $(MAKE)
|
||||
endif
|
||||
|
||||
|
||||
# Find the python version(s) to build for
|
||||
PYVERS := $(shell pyversions -vr 2> /dev/null || pyversions -vs 2> /dev/null)
|
||||
ifeq ($(strip $(PYVERS)),)
|
||||
PYVERS := $(shell python -c 'import sys; print sys.version[:3]')
|
||||
NO_PYCENTRAL = 1
|
||||
PY_BUILD_DEPS = python$(PYVERS), python$(PYVERS)-dbg, python$(PYVERS)-dev
|
||||
else
|
||||
DEB_PYTHON_SYSTEM=pycentral
|
||||
PY_BUILD_DEPS = python-all, python-all-dev, python-dbg, python-central
|
||||
endif
|
||||
|
||||
|
||||
# The python-dbg on Dapper had a configuration bug that makes trying
|
||||
# to use distutils with it error out. The problem seems to be that
|
||||
# the exec_prefix was set wrong. Try to detect that so we can skip
|
||||
# building the py -dbg pacakge there.
|
||||
ifeq (/usr, $(shell python-dbg -c "import sys;print sys.exec_prefix" 2> /dev/null))
|
||||
|
||||
# Also check if this python will put the _d on the end of the
|
||||
# extension modules as this is needed to allow them to be installed
|
||||
# side-by-side with the non-debug package. Ubuntu appears to be
|
||||
# handling this by adding a sys.pydebug attribute that is checked for
|
||||
# in distutils to know which config dir to use. We can use the same
|
||||
# thing here, but there should probably be a safer way to do it.
|
||||
ifeq (True, $(shell python-dbg -c "import sys; print hasattr(sys,'pydebug') and sys.pydebug" 2> /dev/null))
|
||||
|
||||
# This means it is ok to try and build the dbg wxPython package
|
||||
PY_DBG_OK = 1
|
||||
endif
|
||||
endif
|
||||
-include debian/python-version
|
||||
|
||||
|
||||
# If another source package is to supply the common binary packages
|
||||
@@ -66,7 +40,8 @@ endif
|
||||
# all if this is to be the default (or only) wx source package for the
|
||||
# target release.
|
||||
#
|
||||
#DEBIAN_WX_DEFAULT_VERSION = 2.8
|
||||
# for etch:
|
||||
#DEBIAN_WX_DEFAULT_VERSION = 2.6
|
||||
|
||||
|
||||
# This will extract a flavour out of the name of the source directory
|
||||
@@ -86,7 +61,6 @@ wx_major_version_number := $(shell sed -n 's/^wx_major_version_number=//p' confi
|
||||
wx_minor_version_number := $(shell sed -n 's/^wx_minor_version_number=//p' configure.in)
|
||||
wx_release_number := $(shell sed -n 's/^wx_release_number=//p' configure.in)
|
||||
wx_subrelease_number := $(shell sed -n 's/^wx_subrelease_number=//p' configure.in)
|
||||
full_version := $(wx_major_version_number).$(wx_minor_version_number).$(wx_release_number).$(wx_subrelease_number)
|
||||
|
||||
##release := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p' | sed 's/-ansi//')
|
||||
release := $(wx_major_version_number).$(wx_minor_version_number)
|
||||
@@ -114,6 +88,10 @@ endif
|
||||
# Base value for alternative priorities.
|
||||
alt_prio := $(subst .,,$(release))
|
||||
|
||||
pytoolkit := gtk2
|
||||
pydir := usr/lib/$(python_ver)/site-packages
|
||||
wxpydir := $(pydir)/wx-$(compatible_release)-$(pytoolkit)
|
||||
|
||||
cross_host := i586-mingw32msvc
|
||||
cross_build := $(shell ./config.guess)
|
||||
|
||||
@@ -145,7 +123,6 @@ GTK_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
|
||||
--with-libtiff=sys \
|
||||
|
||||
|
||||
pytoolkit := gtk2
|
||||
PY_WX_CONFIG_OPTIONS = --version=$(release) --toolkit=$(pytoolkit) --static=no
|
||||
|
||||
WX_UNICODE := 1
|
||||
@@ -154,8 +131,8 @@ WX_OPENGL := 1
|
||||
ifeq ($(WX_UNICODE),1)
|
||||
COMMON_CONFIGURE_OPTIONS += --enable-unicode
|
||||
PY_WX_CONFIG_OPTIONS += --unicode
|
||||
PY_UNICODE = UNICODE=1
|
||||
wxpydir := wx-$(compatible_release)-$(pytoolkit)-unicode
|
||||
PY_UNICODE="UNICODE=1"
|
||||
wxpydir := $(pydir)/wx-$(compatible_release)-$(pytoolkit)-unicode
|
||||
|
||||
# for compatibility with the existing 2.6 packages, we don't use "u" in
|
||||
# the Unicode (default) package names
|
||||
@@ -164,21 +141,15 @@ else
|
||||
# but we do need to use something for non-Unicode packages to distinguish
|
||||
# them
|
||||
unicode_suffix := -ansi
|
||||
PY_UNICODE = UNICODE=0
|
||||
wxpydir := wx-$(compatible_release)-$(pytoolkit)
|
||||
endif
|
||||
|
||||
ifeq ($(WX_OPENGL),1)
|
||||
GTK_CONFIGURE_OPTIONS += --with-opengl
|
||||
PY_OPENGL = BUILD_GLCANVAS=1
|
||||
else
|
||||
GTK_CONFIGURE_OPTIONS += --without-opengl
|
||||
PY_OPENGL = BUILD_GLCANVAS=0
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Packages to build
|
||||
|
||||
# Packages to build:
|
||||
package_wxbase_lib := libwxbase$(sorelease)$(unicode_suffix)
|
||||
package_wxbase_dev := libwxbase$(release)$(unicode_suffix)-dev
|
||||
package_wxbase_dbg := libwxbase$(release)$(unicode_suffix)-dbg
|
||||
@@ -187,44 +158,45 @@ package_gtk_lib := libwxgtk$(sorelease)$(unicode_suffix)
|
||||
package_gtk_dev := libwxgtk$(release)$(unicode_suffix)-dev
|
||||
package_gtk_dbg := libwxgtk$(release)$(unicode_suffix)-dbg
|
||||
|
||||
|
||||
|
||||
|
||||
package_gtk_py_lib := python-wxgtk$(release)$(unicode_suffix)
|
||||
package_gtk_py_ver = python-wxversion
|
||||
package_gtk_py_tools = python-wxtools
|
||||
package_gtk_py_addons = python-wxaddons
|
||||
|
||||
package_headers := wx$(release)-headers
|
||||
package_i18n := wx$(release)-i18n
|
||||
package_doc := wx$(release)-doc
|
||||
package_examples := wx$(release)-examples
|
||||
package_common = wx-common
|
||||
|
||||
package_gtk_py_lib := python-wxgtk$(release)$(unicode_suffix)
|
||||
package_gtk_py_ver = python-wxversion
|
||||
package_gtk_py_tools = python-wxtools
|
||||
package_gtk_py_addons = python-wxaddons
|
||||
package_gtk_dbg_py := python-wxgtk$(release)$(unicode_suffix)-dbg
|
||||
|
||||
|
||||
# The packages listed here are common to all wx versions, and may be provided
|
||||
# by another source package if more than one is in the release simultaneously.
|
||||
common_packages := $(package_common) $(package_gtk_py_ver) $(package_gtk_py_tools) $(package_gtk_py_addons)
|
||||
|
||||
|
||||
package_gtk_dbg_py := python-wxgtk$(release)$(unicode_suffix)-dbg
|
||||
|
||||
|
||||
|
||||
package_msw_dev := libwxmsw$(release)$(unicode_suffix)-dev
|
||||
package_msw_dbg := libwxmsw$(release)$(unicode_suffix)-dbg
|
||||
package_headers_msw := wx$(release)-headers-msw
|
||||
|
||||
# The packages listed here will not be built by default.
|
||||
extra_packages := $(package_msw_dev) $(package_msw_dbg) $(package_headers_msw)
|
||||
extra_packages := $(package_gtk_dbg_py) \
|
||||
$(package_msw_dev) $(package_msw_dbg) $(package_headers_msw)
|
||||
|
||||
ifdef DEBIAN_WX_DEFAULT_VERSION
|
||||
extra_packages += $(common_packages)
|
||||
endif
|
||||
|
||||
ifndef PY_DBG_OK
|
||||
extra_packages += $(package_gtk_dbg_py)
|
||||
extra_packages += $(common_packages)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build directories
|
||||
|
||||
# Build directories:
|
||||
objdir_wxbase_shared = objs_wxbase_sh
|
||||
objdir_wxbase_debug = objs_wxbase_d
|
||||
objdir_gtk_shared = objs_gtk_sh
|
||||
@@ -246,9 +218,6 @@ objdirs := $(objdir_wxbase_shared) $(objdir_wxbase_debug) \
|
||||
$(objdir_msw_shared) $(objdir_msw_static) $(objdir_msw_dbg) \
|
||||
$(objdir_msw_install)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build stamps:
|
||||
|
||||
# note that the i18n package is actually arch indep (once built)
|
||||
# but must be built (and installed) during the arch any phase as
|
||||
# it's pulled out of the wxGTK shared lib package.
|
||||
@@ -257,14 +226,11 @@ objdirs := $(objdir_wxbase_shared) $(objdir_wxbase_debug) \
|
||||
# all files for it are installed during the arch any phase.
|
||||
|
||||
|
||||
# Build stamps:
|
||||
build_arch_stamps = build-wxbase-shared-stamp build-wxbase-debug-stamp \
|
||||
build-gtk-shared-stamp build-gtk-shared-contrib-stamp \
|
||||
build-gtk-debug-stamp build-gtk-debug-contrib-stamp \
|
||||
build-i18n-stamp build-gtk-py-stamp
|
||||
|
||||
ifdef PY_DBG_OK
|
||||
build_arch_stamps += build-gtk-dbg-py-stamp
|
||||
endif
|
||||
build-i18n-stamp build-gtk-py-stamp
|
||||
|
||||
build_indep_stamps = build-examples-stamp build-doc-stamp
|
||||
|
||||
@@ -275,19 +241,16 @@ build_stamps_native := $(build_arch_stamps) $(build_indep_stamps)
|
||||
build_stamps := $(build_stamps_native) $(build_cross_stamps)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Install targets:
|
||||
|
||||
install_all_arch = install-wxbase-lib install-wxbase-dev install-wxbase-dbg \
|
||||
install-gtk-lib install-gtk-dev install-gtk-dbg \
|
||||
install-headers install-i18n install-gtk-py
|
||||
install_all_arch = install-wxbase-lib install-wxbase-dev install-wxbase-dbg \
|
||||
install-gtk-lib install-gtk-dev install-gtk-dbg \
|
||||
install-headers install-i18n \
|
||||
install-gtk-py
|
||||
|
||||
ifndef DEBIAN_WX_DEFAULT_VERSION
|
||||
install_all_arch += install-common
|
||||
endif
|
||||
|
||||
ifdef PY_DBG_OK
|
||||
install_all_arch += install-gtk-dbg-py
|
||||
install_all_arch += install-common
|
||||
|
||||
endif
|
||||
|
||||
install_all_indep = install-examples install-doc
|
||||
@@ -299,15 +262,25 @@ install_all_native := $(install_all_arch) $(install_all_indep)
|
||||
install_all := $(install_all_native) $(install_all_cross)
|
||||
|
||||
|
||||
# wxPython uses this to build in-tree
|
||||
wxconfig := $(shell pwd)/$(objdir_gtk_shared)/wx-config --no_rpath
|
||||
wxconfig-dbg := $(shell pwd)/$(objdir_gtk_debug)/wx-config --no_rpath
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Setup Rules:
|
||||
# and this after it is installed.
|
||||
py_wxconfig := wx-config $(PY_WX_CONFIG_OPTIONS) --debug=no
|
||||
pyd_wxconfig := wx-config $(PY_WX_CONFIG_OPTIONS) --debug
|
||||
|
||||
debian/control: debian/control.in debian/rules
|
||||
sed -e 's/=V/$(release)/g; '\
|
||||
' s/=SOV/$(sorelease)/g; '\
|
||||
' s/=U/$(unicode_suffix)/g; '\
|
||||
' s/=PY_BUILD_DEPS/$(PY_BUILD_DEPS)/g '\
|
||||
|
||||
#contrib_libs := $(subst CVS,,$(notdir $(wildcard contrib/include/wx/*)))
|
||||
|
||||
|
||||
# The Rules:
|
||||
|
||||
debian/python-version:
|
||||
echo python_ver := python$(shell python -c "import sys;print sys.version[:3]") > $@
|
||||
|
||||
debian/control: $(addprefix debian/,control.in python-version)
|
||||
sed -e 's/=V/$(release)/g;s/=SOV/$(sorelease)/g;s/=PY/$(python_ver)/g;s/=U/$(unicode_suffix)/g'\
|
||||
< debian/control.in > debian/control
|
||||
|
||||
control-files-stamp: debian/control
|
||||
@@ -342,13 +315,21 @@ control-files-stamp: debian/control
|
||||
done;
|
||||
@for f in docs postinst prerm; do \
|
||||
echo "generating control file $(package_gtk_py_lib).$$f"; \
|
||||
sed -e 's/=PYVERS/$(PYVERS)/g; '\
|
||||
sed -e 's/=PY/$(python_ver)/g; '\
|
||||
' s|=WXPYDIR|$(wxpydir)|g; '\
|
||||
' s/=V/$(release)/g; '\
|
||||
' s/=PRIO/$(alt_prio)/g' \
|
||||
< debian/python-wxgtk.$$f \
|
||||
> debian/$(package_gtk_py_lib).$$f; \
|
||||
done;
|
||||
@for f in postinst prerm; do \
|
||||
echo "generating control file $(package_gtk_dbg_py).$$f"; \
|
||||
sed -e 's/=PY/$(python_ver)/g; '\
|
||||
' s/=V/$(release)/g; '\
|
||||
' s/=PRIO/$(alt_prio)/g' \
|
||||
< debian/python-wxgtk-dbg.$$f \
|
||||
> debian/$(package_gtk_dbg_py).$$f; \
|
||||
done;
|
||||
@echo "generating control file $(package_gtk_dbg_py).docs";
|
||||
@cp debian/python-wxgtk.docs debian/$(package_gtk_dbg_py).docs;
|
||||
@for f in docs doc-base; do \
|
||||
@@ -386,9 +367,6 @@ control-files-stamp: debian/control
|
||||
> debian/lintian-override; \
|
||||
touch $@
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# wx Build rules
|
||||
|
||||
build_arch: control-files-stamp $(build_arch_stamps)
|
||||
build_all: control-files-stamp $(build_stamps_native)
|
||||
|
||||
@@ -405,10 +383,7 @@ build: build_arch
|
||||
# libwxbase. We need to configure it here in order to get the correct
|
||||
# config files to use it alone, but there is no point building it as the
|
||||
# wxgtk build is going to do that again anyway. We'll move the relevant
|
||||
# files out when that is done.
|
||||
#
|
||||
# TODO: Is this still necessary? Can we just take the wxbase files
|
||||
# from the wxgui build now without special treatment?
|
||||
# files out when that is done.
|
||||
|
||||
configure-wxbase-shared-stamp:
|
||||
dh_testdir
|
||||
@@ -475,17 +450,33 @@ build-gtk-debug-contrib-stamp: build-gtk-debug-stamp
|
||||
touch $@
|
||||
|
||||
|
||||
purge-dbg-py:
|
||||
@if [ ! -e build-gtk-py-stamp ]; then \
|
||||
$(MAKE) -f debian/rules clean-py; \
|
||||
fi
|
||||
$(RM) build-gtk-dbg-py-stamp
|
||||
|
||||
build-gtk-py-stamp: build-gtk-shared-stamp purge-dbg-py
|
||||
dh_testdir
|
||||
touch docs/lgpl.txt
|
||||
cd wxPython \
|
||||
&& $(python_ver) ./setup.py build \
|
||||
WX_CONFIG='$(wxconfig)' \
|
||||
WXPORT=$(pytoolkit) \
|
||||
$(PY_UNICODE) \
|
||||
FLAVOUR=$(DEBIAN_WXFLAVOUR)
|
||||
touch $@
|
||||
|
||||
build-doc-stamp: build-gtk-shared-stamp
|
||||
dh_testdir
|
||||
# the tarball may already have the generated docs in it
|
||||
@if [ ! -e docs/html/wx/index.html ]; then \
|
||||
echo Generating docs...; \
|
||||
if [ ! -e docs/html/wx/index.html ]; then \
|
||||
cd $(objdir_gtk_shared)/utils/tex2rtf/src && $(FAST_MAKE); \
|
||||
cd -; \
|
||||
rm -rf $(objdir_doc); \
|
||||
rm -rf $(objdir_doc_cruft); \
|
||||
mkdir -p $(objdir_doc); \
|
||||
mkdir -p $(objdir_doc_cruft); \
|
||||
mkdir $(objdir_doc); \
|
||||
mkdir $(objdir_doc_cruft); \
|
||||
cd $(objdir_doc_cruft); \
|
||||
LD_LIBRARY_PATH=../$(objdir_gtk_shared)/lib:$(LD_LIBRARY_PATH) \
|
||||
../$(objdir_gtk_shared)/utils/tex2rtf/src/tex2rtf \
|
||||
@@ -497,8 +488,7 @@ build-doc-stamp: build-gtk-shared-stamp
|
||||
rm -rf $(objdir_doc_cruft); \
|
||||
rm -f $(objdir_doc)/wx$(release)-manual.{con,hh*,htx,ref}; \
|
||||
else \
|
||||
echo Copying docs...; \
|
||||
mkdir -p $(objdir_doc); \
|
||||
mkdir $(objdir_doc); \
|
||||
cp docs/html/wx/* $(objdir_doc); \
|
||||
mv $(objdir_doc)/index.html $(objdir_doc)/wx-$(release)-manual_contents.html; \
|
||||
fi
|
||||
@@ -541,60 +531,24 @@ build-i18n-stamp: build-gtk-shared-stamp
|
||||
&& $(MAKE) allmo
|
||||
touch $@
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# wxPython build rules
|
||||
purge-release-py:
|
||||
@if [ ! -e build-gtk-dbg-py-stamp ]; then \
|
||||
$(MAKE) -f debian/rules clean-py; \
|
||||
fi
|
||||
$(RM) build-gtk-py-stamp
|
||||
|
||||
# wxPython uses this to build in-tree
|
||||
wxconfig := $(shell pwd)/$(objdir_gtk_shared)/wx-config --no_rpath
|
||||
wxconfig-dbg := $(shell pwd)/$(objdir_gtk_debug)/wx-config --no_rpath
|
||||
|
||||
# and this after it is installed.
|
||||
py_wxconfig := wx-config $(PY_WX_CONFIG_OPTIONS) --debug=no
|
||||
pyd_wxconfig := wx-config $(PY_WX_CONFIG_OPTIONS) --debug
|
||||
|
||||
|
||||
|
||||
build-gtk-py-stamp: build-gtk-shared-contrib-stamp $(PYVERS:%=build-gtk-py%-stamp)
|
||||
touch $@
|
||||
|
||||
# Notice the make magic here with the % sign. In effect this
|
||||
# duplicates this rule for every matching dependency, and then the
|
||||
# value of the match can be used in the recipe as $*. The
|
||||
# $(PYVERS...) substitution above gives us one dependency for every
|
||||
# version of Python that we are supporting.
|
||||
|
||||
build-gtk-py%-stamp:
|
||||
build-gtk-dbg-py-stamp: build-gtk-debug-stamp purge-release-py
|
||||
dh_testdir
|
||||
touch docs/lgpl.txt
|
||||
cd wxPython && \
|
||||
python$* ./setup.py build \
|
||||
WX_CONFIG='$(wxconfig)' \
|
||||
WXPORT=$(pytoolkit) \
|
||||
$(PY_UNICODE) \
|
||||
$(PY_OPENGL) \
|
||||
FLAVOUR=$(DEBIAN_WXFLAVOUR)
|
||||
cd wxPython \
|
||||
&& $(python_ver) ./setup.py build \
|
||||
WX_CONFIG='$(wxconfig-dbg)' \
|
||||
WXPORT=$(pytoolkit) \
|
||||
$(PY_UNICODE) \
|
||||
FLAVOUR=$(addsuffix -,$(DEBIAN_WXFLAVOUR))dbg
|
||||
touch $@
|
||||
|
||||
|
||||
build-gtk-dbg-py-stamp: build-gtk-debug-contrib-stamp $(PYVERS:%=build-gtk-dbg-py%-stamp)
|
||||
touch $@
|
||||
|
||||
build-gtk-dbg-py%-stamp:
|
||||
dh_testdir
|
||||
touch docs/lgpl.txt
|
||||
cd wxPython && \
|
||||
python$*-dbg ./setup.py build \
|
||||
WX_CONFIG='$(wxconfig-dbg)' \
|
||||
WXPORT=$(pytoolkit) \
|
||||
$(PY_UNICODE) \
|
||||
$(PY_OPENGL) \
|
||||
FLAVOUR=$(DEBIAN_WXFLAVOUR)
|
||||
touch $@
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# MSW cross build rules
|
||||
|
||||
configure-msw-shared-stamp:
|
||||
dh_testdir
|
||||
mkdir -p $(objdir_msw_shared)
|
||||
@@ -645,12 +599,16 @@ build-msw-dbg-stamp: configure-msw-dbg-stamp
|
||||
cd $(objdir_msw_dbg) && $(FAST_MAKE)
|
||||
touch $@
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Cleaning rules
|
||||
|
||||
clean-py:
|
||||
cd wxPython && rm -rf licence build* docs/xml-raw wx/*.py src/__version__.py
|
||||
cd wxPython && rm -rf licence build* docs/xml-raw wx/*.py
|
||||
|
||||
# What to do about src/__version__.py ???
|
||||
|
||||
|
||||
# We do the equivalent of this above by removing build, unfortunately
|
||||
# its not enough by itself to get the tree properly clean again.
|
||||
# && ./setup.py clean
|
||||
|
||||
clean: debian/control clean-py
|
||||
dh_testdir
|
||||
@@ -677,12 +635,6 @@ clean: debian/control clean-py
|
||||
rm -f debian/$(package_msw_dbg).*
|
||||
rm -f debian/lintian-override
|
||||
rm -f debian/unpack_examples.sh
|
||||
find -name '*.py[co]' | xargs -r rm -f
|
||||
rm -rf include/wx-$(release)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# wx Install Rules
|
||||
|
||||
install_arch: build_arch $(install_all_arch)
|
||||
|
||||
@@ -760,6 +712,97 @@ install-gtk-dbg: build-gtk-debug-stamp build-gtk-debug-contrib-stamp
|
||||
cp debian/lintian-override debian/$(package_gtk_dbg)/usr/share/lintian/overrides/$(package_gtk_dbg)
|
||||
|
||||
|
||||
install-gtk-py-lib: DH_OPTIONS=-p$(package_gtk_py_lib)
|
||||
install-gtk-py-lib: build-gtk-py-stamp
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs usr/lib/wx/python
|
||||
cd wxPython \
|
||||
&& $(python_ver) ./setup.py install \
|
||||
--prefix=`pwd`/../debian/$(package_gtk_py_lib)/usr \
|
||||
WX_CONFIG='$(wxconfig)' \
|
||||
SYS_WX_CONFIG='$(py_wxconfig)' \
|
||||
WXPORT=$(pytoolkit) \
|
||||
$(PY_UNICODE) \
|
||||
FLAVOUR=$(DEBIAN_WXFLAVOUR)
|
||||
|
||||
mv debian/$(package_gtk_py_lib)/$(pydir)/wx.pth \
|
||||
debian/$(package_gtk_py_lib)/usr/lib/wx/python/wx$(release).pth
|
||||
|
||||
find debian/$(package_gtk_py_lib)/$(pydir) -name '*.py?' -exec rm '{}' ';'
|
||||
|
||||
# This is rather bogus, its included in the main copyright file now though.
|
||||
rm -f debian/$(package_gtk_py_lib)/$(wxpydir)/wx/tools/XRCed/license.txt
|
||||
|
||||
install-gtk-py-ver: DH_OPTIONS=-p$(package_gtk_py_ver)
|
||||
install-gtk-py-ver: install-gtk-py-lib
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
|
||||
ifndef DEBIAN_WX_DEFAULT_VERSION
|
||||
|
||||
dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) $(pydir)/wxversion.py
|
||||
else
|
||||
rm debian/$(package_gtk_py_lib)/$(pydir)/wxversion.py
|
||||
endif
|
||||
|
||||
|
||||
|
||||
install-gtk-py-tools: DH_OPTIONS=-p$(package_gtk_py_tools)
|
||||
install-gtk-py-tools: install-gtk-py-ver
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
|
||||
ifndef DEBIAN_WX_DEFAULT_VERSION
|
||||
|
||||
dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) usr/bin
|
||||
|
||||
dh_installman debian/wxPython-tools.1
|
||||
dh_link usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2py.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2xpm.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2png.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pycrust.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyshell.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/xrced.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/helpviewer.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalacarte.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalamode.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywrap.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywxrc.1
|
||||
|
||||
dh_installdirs usr/share/lintian/overrides
|
||||
cp debian/lintian-override debian/$(package_gtk_py_tools)/usr/share/lintian/overrides/$(package_gtk_py_tools)
|
||||
endif
|
||||
mkdir -p debian/$(package_gtk_py_tools)/usr/share/pixmaps
|
||||
mkdir -p debian/$(package_gtk_py_tools)/usr/share/applications
|
||||
|
||||
cp wxPython/wx/py/PyCrust_32.png debian/$(package_gtk_py_tools)/usr/share/pixmaps/pycrust.png
|
||||
cp wxPython/wx/py/PyCrust_32.png debian/$(package_gtk_py_tools)/usr/share/pixmaps/pyshell.png
|
||||
cp wxPython/wx/tools/XRCed/XRCed_32.png debian/$(package_gtk_py_tools)/usr/share/pixmaps/xrced.png
|
||||
cp debian/pycrust.desktop debian/$(package_gtk_py_tools)/usr/share/applications
|
||||
cp debian/pyshell.desktop debian/$(package_gtk_py_tools)/usr/share/applications
|
||||
cp debian/xrced.desktop debian/$(package_gtk_py_tools)/usr/share/applications
|
||||
|
||||
rm -r debian/$(package_gtk_py_lib)/usr/bin
|
||||
|
||||
install-gtk-py-addons: DH_OPTIONS=-p$(package_gtk_py_addons)
|
||||
install-gtk-py-addons: install-gtk-py-tools
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
ifndef DEBIAN_WX_DEFAULT_VERSION
|
||||
|
||||
dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) $(pydir)/wxaddons
|
||||
else
|
||||
rm -r debian/$(package_gtk_py_lib)/$(pydir)/wxaddons
|
||||
endif
|
||||
|
||||
|
||||
install-gtk-py: install-gtk-py-addons
|
||||
|
||||
|
||||
install-common: DH_OPTIONS=-p$(package_common)
|
||||
install-common: install-gtk-shared-stamp
|
||||
@@ -793,13 +836,7 @@ install-headers: install-gtk-shared-stamp
|
||||
|
||||
# dh_movefiles --sourcedir=$(objdir_univ_install)
|
||||
dh_install $(objdir_gtk_install)/include usr
|
||||
|
||||
# TODO: Should probably use setup.py's install of the wxPython headers...
|
||||
mkdir -p debian/$(package_headers)/usr/include/wx-$(release)/wx/wxPython
|
||||
cp -p wxPython/include/wx/wxPython/*.h \
|
||||
debian/$(package_headers)/usr/include/wx-$(release)/wx/wxPython/
|
||||
|
||||
|
||||
|
||||
install-i18n: DH_OPTIONS=-p$(package_i18n)
|
||||
install-i18n: build-i18n-stamp install-gtk-shared-stamp
|
||||
dh_testdir
|
||||
@@ -807,163 +844,47 @@ install-i18n: build-i18n-stamp install-gtk-shared-stamp
|
||||
dh_clean -k
|
||||
dh_install $(objdir_gtk_install)/share/locale usr/share
|
||||
|
||||
|
||||
install-doc: DH_OPTIONS=-p$(package_doc)
|
||||
install-doc: build-doc-stamp
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_install $(objdir_doc) usr/share/doc/$(package_doc)
|
||||
|
||||
@# Link this monstrosity with an overly obfuscated name
|
||||
@# to something that both people and browsers can expect to find.
|
||||
dh_link usr/share/doc/$(package_doc)/wx-manual.html/wx-$(release)-manual_contents.html \
|
||||
usr/share/doc/$(package_doc)/wx-manual.html/index.html
|
||||
|
||||
|
||||
install-examples: DH_OPTIONS=-p$(package_examples)
|
||||
install-examples: build-examples-stamp
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# wxPython install rules
|
||||
|
||||
install-gtk-py-lib: DH_OPTIONS=-p$(package_gtk_py_lib)
|
||||
install-gtk-py-lib: build-gtk-py-stamp install-gtk-py-lib-prereq $(PYVERS:%=install-gtk-py%-lib)
|
||||
|
||||
install-gtk-py-lib-prereq:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
|
||||
# More makefile magic here to duplicate this rule for all supported Python versions
|
||||
install-gtk-py%-lib:
|
||||
dh_installdirs usr/lib/wx/python$*
|
||||
cd wxPython && \
|
||||
python$* ./setup.py install \
|
||||
--prefix=`pwd`/../debian/$(package_gtk_py_lib)/usr \
|
||||
WX_CONFIG='$(wxconfig)' \
|
||||
SYS_WX_CONFIG='$(py_wxconfig)' \
|
||||
WXPORT=$(pytoolkit) \
|
||||
$(PY_UNICODE) \
|
||||
$(PY_OPENGL) \
|
||||
FLAVOUR=$(DEBIAN_WXFLAVOUR)
|
||||
|
||||
mv debian/$(package_gtk_py_lib)/usr/lib/python$*/site-packages/wx.pth \
|
||||
debian/$(package_gtk_py_lib)/usr/lib/wx/python$*/wx$(release).pth
|
||||
|
||||
find debian/$(package_gtk_py_lib)/usr/lib/python$*/site-packages \
|
||||
-name '*.py?' -exec rm '{}' ';'
|
||||
|
||||
rm -f debian/$(package_gtk_py_lib)/usr/lib/python$*/site-packages/$(wxpydir)/wx/tools/XRCed/license.txt
|
||||
|
||||
ifndef DEBIAN_WX_DEFAULT_VERSION
|
||||
@# Move files out for the wxversion package
|
||||
DH_OPTIONS=-p$(package_gtk_py_ver) \
|
||||
dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) \
|
||||
usr/lib/python$*/site-packages/wxversion.py
|
||||
endif
|
||||
rm -f debian/$(package_gtk_py_lib)/usr/lib/python$*/site-packages/wxversion.py
|
||||
rm -f debian/$(package_gtk_py_lib)/usr/lib/python$*/site-packages/wxPython_common*.egg-info
|
||||
|
||||
ifndef DEBIAN_WX_DEFAULT_VERSION
|
||||
@# Move files out for the wxaddons package
|
||||
DH_OPTIONS=-p$(package_gtk_py_addons) \
|
||||
dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) \
|
||||
usr/lib/python$*/site-packages/wxaddons
|
||||
|
||||
if [ -e debian/$(package_gtk_py_lib)/usr/lib/python$*/site-packages/wxaddons-$(full_version).egg-info ]; then \
|
||||
DH_OPTIONS=-p$(package_gtk_py_addons) \
|
||||
dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) \
|
||||
usr/lib/python$*/site-packages/wxaddons-$(full_version).egg-info; \
|
||||
fi
|
||||
endif
|
||||
rm -rf debian/$(package_gtk_py_lib)/usr/lib/python$*/site-packages/wxaddons*
|
||||
|
||||
|
||||
|
||||
install-gtk-py-tools: DH_OPTIONS=-p$(package_gtk_py_tools)
|
||||
install-gtk-py-tools: install-gtk-py-lib
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
|
||||
ifndef DEBIAN_WX_DEFAULT_VERSION
|
||||
|
||||
dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) usr/bin
|
||||
|
||||
@# replace the pythonX.Y in the scripts with just python
|
||||
for f in debian/$(package_gtk_py_tools)/usr/bin/*; do \
|
||||
sed '1s,#!.*python[^ ]*\(.*\),#!/usr/bin/python\1,' $$f > $$f.tmp; \
|
||||
mv $$f.tmp $$f; \
|
||||
chmod +x $$f; \
|
||||
done
|
||||
|
||||
dh_installman debian/wxPython-tools.1
|
||||
dh_link usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2py.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2xpm.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2png.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pycrust.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyshell.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/xrced.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/helpviewer.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalacarte.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalamode.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywrap.1 \
|
||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywxrc.1
|
||||
|
||||
dh_installdirs usr/share/lintian/overrides
|
||||
cp debian/lintian-override debian/$(package_gtk_py_tools)/usr/share/lintian/overrides/$(package_gtk_py_tools)
|
||||
|
||||
mkdir -p debian/$(package_gtk_py_tools)/usr/share/pixmaps
|
||||
mkdir -p debian/$(package_gtk_py_tools)/usr/share/applications
|
||||
|
||||
cp wxPython/wx/py/PyCrust_32.png debian/$(package_gtk_py_tools)/usr/share/pixmaps/pycrust.png
|
||||
cp wxPython/wx/py/PyCrust_32.png debian/$(package_gtk_py_tools)/usr/share/pixmaps/pyshell.png
|
||||
cp wxPython/wx/tools/XRCed/XRCed_32.png debian/$(package_gtk_py_tools)/usr/share/pixmaps/xrced.png
|
||||
cp debian/pycrust.desktop debian/$(package_gtk_py_tools)/usr/share/applications
|
||||
cp debian/pyshell.desktop debian/$(package_gtk_py_tools)/usr/share/applications
|
||||
cp debian/xrced.desktop debian/$(package_gtk_py_tools)/usr/share/applications
|
||||
|
||||
endif
|
||||
rm -r debian/$(package_gtk_py_lib)/usr/bin
|
||||
|
||||
|
||||
|
||||
install-gtk-py: install-gtk-py-tools
|
||||
|
||||
|
||||
install-gtk-dbg-py: DH_OPTIONS=-p$(package_gtk_dbg_py)
|
||||
install-gtk-dbg-py: build-gtk-dbg-py-stamp install-gtk-dbg-py-prereq $(PYVERS:%=install-gtk-dbg-py%)
|
||||
|
||||
install-gtk-dbg-py-prereq:
|
||||
install-gtk-dbg-py: build-gtk-dbg-py-stamp
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs usr/lib/wx/python
|
||||
cd wxPython \
|
||||
&& $(python_ver) ./setup.py install \
|
||||
--prefix=`pwd`/../debian/$(package_gtk_dbg_py)/usr \
|
||||
WX_CONFIG='$(wxconfig-dbg)' \
|
||||
SYS_WX_CONFIG='$(pyd_wxconfig)' \
|
||||
WXPORT=$(pytoolkit) \
|
||||
$(PY_UNICODE) \
|
||||
FLAVOUR=$(addsuffix -,$(DEBIAN_WXFLAVOUR))dbg
|
||||
|
||||
install-gtk-dbg-py%:
|
||||
dh_installdirs usr/lib/wx/pythnon$*
|
||||
cd wxPython && \
|
||||
python$*-dbg ./setup.py install \
|
||||
--prefix=`pwd`/../debian/$(package_gtk_dbg_py)/usr \
|
||||
WX_CONFIG='$(wxconfig-dbg)' \
|
||||
SYS_WX_CONFIG='$(pyd_wxconfig)' \
|
||||
WXPORT=$(pytoolkit) \
|
||||
$(PY_UNICODE) \
|
||||
$(PY_OPENGL) \
|
||||
FLAVOUR=$(DEBIAN_WXFLAVOUR)
|
||||
mv debian/$(package_gtk_py_lib)/$(pydir)/wx.pth \
|
||||
debian/$(package_gtk_py_lib)/usr/lib/wx/python/wx$(release)-dbg.pth
|
||||
|
||||
# Remove all files but the *_d.so
|
||||
find debian/$(package_gtk_dbg_py) \
|
||||
! -type d ! \( -name '*_d.so' -o -name '*.h' \) | xargs rm -f
|
||||
find debian/$(package_gtk_dbg_py) -depth -empty -exec rmdir {} \;
|
||||
find debian/$(package_gtk_dbg_py)/$(pydir) -name '*.py?' -exec rm '{}' ';'
|
||||
rm -rf usr/bin $(pydir)/{wxversion.py,wx.pth}
|
||||
|
||||
# This is rather bogus, its included in the main copyright file now though.
|
||||
rm -f debian/$(package_gtk_dbg_py)/$(wxpydir)/wx/tools/XRCed/license.txt
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# MSW cross install rules
|
||||
|
||||
install-msw-dev: DH_OPTIONS=-p$(package_msw_dev)
|
||||
install-msw-dev: build-msw-shared-stamp build-msw-static-stamp
|
||||
@@ -1030,72 +951,52 @@ install-headers-msw:
|
||||
dh_install $(objdir_msw_install)/include/wx-$(release)/wx/msw usr/$(cross_host)/include/wx-$(release)/wx
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Tying it all together
|
||||
binary-common:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installdocs
|
||||
dh_installchangelogs
|
||||
dh_installexamples
|
||||
dh_installmenu
|
||||
dh_link
|
||||
|
||||
|
||||
binary-indep: build_all install
|
||||
dh_testdir -i
|
||||
dh_testroot -i
|
||||
dh_installdocs -i
|
||||
dh_installchangelogs -i
|
||||
dh_installexamples -i
|
||||
dh_installmenu -i
|
||||
ifdef NO_PYCENTRAL
|
||||
dh_python -i
|
||||
else
|
||||
dh_pycentral -i
|
||||
endif
|
||||
dh_link -i
|
||||
dh_compress -i
|
||||
dh_fixperms -i
|
||||
dh_installdeb -i
|
||||
dh_gencontrol -i
|
||||
dh_md5sums -i
|
||||
dh_builddeb -i
|
||||
|
||||
|
||||
binary-arch: DH_OPTIONS=$(addprefix -N,$(extra_packages))
|
||||
binary-arch: build_arch install_arch
|
||||
dh_testdir -a
|
||||
dh_testroot -a
|
||||
dh_installdocs -a
|
||||
dh_installchangelogs -a
|
||||
dh_installexamples -a
|
||||
dh_installmenu -a
|
||||
ifdef PY_DBG_OK
|
||||
rm -rf debian/$(package_gtk_dbg_py)/usr/share/doc/$(package_gtk_dbg_py)
|
||||
ln -s $(package_gtk_py_lib) debian/$(package_gtk_dbg_py)/usr/share/doc/$(package_gtk_dbg_py)
|
||||
else
|
||||
rm -rf debian/$(package_gtk_dbg_py)
|
||||
endif
|
||||
ifdef NO_PYCENTRAL
|
||||
dh_python -a
|
||||
else
|
||||
dh_pycentral -a
|
||||
endif
|
||||
|
||||
# Don't strip debug libs at all, and strip cross libs elsewhere
|
||||
# with the cross host tools until dh_strip gets smarter.
|
||||
dh_strip -p$(package_gtk_py_lib) --dbg-package=$(package_gtk_dbg_py)
|
||||
@# Don't strip debug libs at all, and strip cross libs elsewhere
|
||||
@# with the cross host tools until dh_strip gets smarter.
|
||||
dh_strip -N$(package_gtk_dbg) -N$(package_wxbase_dbg) \
|
||||
-N$(package_msw_dev) -N$(package_msw_dbg) \
|
||||
-N$(package_gtk_py_lib) -N$(package_gtk_dbg_py)
|
||||
-N$(package_msw_dev) -N$(package_msw_dbg)
|
||||
|
||||
dh_link -a
|
||||
dh_compress -a
|
||||
dh_fixperms -a
|
||||
dh_makeshlibs -N$(package_gtk_py_lib) -N$(package_gtk_dbg_py) -V
|
||||
dh_installdeb -a
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
|
||||
@# Don't do this for the dbg-py special build because dh_makeshlibs
|
||||
@# will crap out if it is called with no packages to act on.
|
||||
@if [ "x$(DH_OPTIONS)" != "-p$(package_gtk_dbg_py)" ]; then \
|
||||
echo "dh_makeshlibs -N$(package_gtk_py_lib) -V"; \
|
||||
dh_makeshlibs -N$(package_gtk_py_lib) -V; \
|
||||
fi
|
||||
|
||||
dh_installdeb
|
||||
dh_shlibdeps -ldebian/$(package_wxbase_lib)/usr/lib:debian/$(package_wxbase_dbg)/usr/lib:debian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_dbg)/usr/lib
|
||||
dh_gencontrol -a
|
||||
dh_md5sums -a
|
||||
dh_builddeb -a
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
# Build architecture-independent files here.
|
||||
# Note that you currently can't build the indep packages without first
|
||||
# building the arch specific package files needed to create them.
|
||||
binary-indep: build_all install
|
||||
$(MAKE) -f debian/rules \
|
||||
DH_OPTIONS="-i $(addprefix -N,$(extra_packages))" \
|
||||
binary-common
|
||||
|
||||
# Build just the architecture-dependent files here.
|
||||
binary-arch: build_arch install_arch
|
||||
$(MAKE) -f debian/rules \
|
||||
DH_OPTIONS="-a $(addprefix -N,$(extra_packages))" \
|
||||
binary-common
|
||||
|
||||
# Build all packages target.
|
||||
binary: binary-indep binary-arch
|
||||
|
||||
binary: binary-arch binary-indep
|
||||
|
||||
|
||||
# This is a special target for building the wxMSW-cross packages.
|
||||
@@ -1109,6 +1010,12 @@ binary-cross: control-files-stamp $(install_all_cross)
|
||||
binary-common
|
||||
|
||||
|
||||
# Build wxPython against libwxgtk-dbg. This package will conflict
|
||||
# with the release build one, but may be useful to some people.
|
||||
binary-dbg-py: control-files-stamp install-gtk-dbg-py
|
||||
$(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg_py)" binary-common
|
||||
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Some rules to build a subset of the complete list of packages that can be
|
||||
|
@@ -49,13 +49,10 @@ if [ "${1}/../include/wx/mac/setup0.h" -nt "${1}/../include/wx/mac/setup.h" ] ;
|
||||
echo "${0}:${LINENO}: warning: edit or replace \"include/wx/mac/setup.h\" to integrate changes"
|
||||
fi
|
||||
#
|
||||
# Copy user setup.h to build setup.h if the latter doesn't exist or is older
|
||||
# Copy setup.h to setup.h if setup.h doesn't exist
|
||||
#
|
||||
if [ ! -f "${2}/include/wx/setup.h" -o \
|
||||
"${1}/../include/wx/mac/setup.h" -nt "${2}/include/wx/setup.h" ] ; then
|
||||
cp "${1}/../include/wx/mac/setup.h" "${2}/include/wx/setup.h"
|
||||
if [ ! -f "${2}/include/wx/setup.h" ] ; then
|
||||
echo "${0}:${LINENO}: error: unable to create target setup file \"${2}/include/wx/setup.h\""
|
||||
exit 1
|
||||
fi
|
||||
cp "${1}/../include/wx/mac/setup.h" "${2}/include/wx/setup.h"
|
||||
if [ ! -f "${2}/include/wx/setup.h" ] ; then
|
||||
echo "${0}:${LINENO}: error: unable to create target setup file \"${2}/include/wx/setup.h\""
|
||||
exit 1
|
||||
fi
|
||||
|
@@ -19,52 +19,46 @@ UNICODE_OPTS="--enable-unicode"
|
||||
|
||||
ANSI_OPTS="--enable-ansi"
|
||||
|
||||
WXPYTHON_OPTS="--with-opengl \
|
||||
--enable-sound --with-sdl \
|
||||
--with-gnomeprint \
|
||||
--enable-graphics_ctx \
|
||||
--enable-mediactrl \
|
||||
--enable-display \
|
||||
--enable-geometry \
|
||||
--enable-debug_flag \
|
||||
--enable-optimise \
|
||||
--disable-debugreport \
|
||||
--enable-monolithic"
|
||||
WXPYTHON_OPTS="--enable-monolithic \
|
||||
--with-opengl \
|
||||
--enable-sound \
|
||||
--enable-mediactrl \
|
||||
--enable-display \
|
||||
--enable-geometry \
|
||||
--enable-debug_flag \
|
||||
--enable-optimise \
|
||||
--disable-debugreport "
|
||||
|
||||
|
||||
do_build(){
|
||||
OPTS=""
|
||||
if [ "$WXPYTHON" = "1" ]; then
|
||||
if [ "$WXPYTHON" == "1" ]; then
|
||||
OPTS="$WXPYTHON_OPTS"
|
||||
fi
|
||||
|
||||
if [ "$DEBUG" = "1" ]; then
|
||||
if [ "$DEBUG" == "1" ]; then
|
||||
OPTS="$OPTS $DEBUG_OPTS "
|
||||
fi
|
||||
|
||||
if [ "$UNICODE" = "1" ]; then
|
||||
if [ "$UNICODE" == "1" ]; then
|
||||
OPTS="$OPTS $UNICODE_OPTS "
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ "$STATIC" = "1" ]; then
|
||||
if [ "$STATIC" == "1" ]; then
|
||||
OPTS="$OPTS --enable-static"
|
||||
fi
|
||||
|
||||
OPTS="$OPTS $OTHER_OPTS"
|
||||
|
||||
echo "$WXROOT/configure --prefix=$BUILDPREFIX $OPTS"
|
||||
$WXROOT/configure --prefix=$BUILDPREFIX $OPTS
|
||||
make
|
||||
if [ $? != 0 ]; then
|
||||
echo "wxWidgets build failed."
|
||||
exit $?
|
||||
fi
|
||||
|
||||
# build the libs wxPython needs
|
||||
if [ "$WXPYTHON" = "1" ]; then
|
||||
if [ "$WXPYTHON" == "1" ]; then
|
||||
make -C contrib/src/animate
|
||||
make -C contrib/src/gizmos
|
||||
make -C contrib/src/stc
|
||||
fi
|
||||
}
|
||||
}
|
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
# you need to change this if you run from outside this dir.
|
||||
if [ "$WXROOT" = "" ]; then
|
||||
scriptDir="$(cd $(dirname $0);pwd)"
|
||||
WXROOT=$scriptDir/../../..
|
||||
WXROOT=../../..
|
||||
fi
|
||||
|
||||
. $WXROOT/distrib/scripts/includes/configure_build.inc
|
||||
@@ -20,33 +20,28 @@ for i in "$@"; do
|
||||
ansi) UNICODE=0 ;;
|
||||
debug) DEBUG=1 ;;
|
||||
wxpython) WXPYTHON=1 ;;
|
||||
gtk2) PORT="gtk2" ;;
|
||||
gtk) PORT="gtk" ;;
|
||||
x11) PORT="x11" ;;
|
||||
motif) PORT="motif" ;;
|
||||
static) STATIC=1 ;;
|
||||
*)
|
||||
usage
|
||||
exit
|
||||
;;
|
||||
gtk2) PORT="gtk2" ;;
|
||||
gtk) PORT="gtk" ;;
|
||||
x11) PORT="x11" ;;
|
||||
motif) PORT="motif" ;;
|
||||
static) STATIC=1 ;;
|
||||
*)
|
||||
usage
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$PORT" != "" ]; then
|
||||
OTHER_OPTS="--with-$PORT "
|
||||
fi
|
||||
OTHER_OPTS="--with-$PORT "
|
||||
|
||||
do_build
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
make prefix=$INSTALLDIR install
|
||||
|
||||
if [ "$WXPYTHON" = "1" ]; then
|
||||
make -C contrib/src/gizmos prefix=$INSTALLDIR install
|
||||
make -C contrib/src/stc prefix=$INSTALLDIR install
|
||||
if [ "$WXPYTHON" == "1" ]; then
|
||||
make -C contrib/src/animate prefix=$INSTALLDIR install
|
||||
make -C contrib/src/gizmos prefix=$INSTALLDIR install
|
||||
make -C contrib/src/stc prefix=$INSTALLDIR install
|
||||
fi
|
||||
|
||||
cd $OLDDIR
|
||||
cd $OLDDIR
|
118
docs/changes.txt
118
docs/changes.txt
@@ -93,56 +93,22 @@ Major new features in 2.8 release
|
||||
|
||||
All (GUI):
|
||||
|
||||
- Added colour normalization to PNM image handler (Ray Johnston).
|
||||
- Fixed selecting part of word from right to left in wxHTML (Michael Hieke).
|
||||
- Selecting text in wxHTML with character precision was made easier, it's
|
||||
enough to select half of a character (Michael Hieke).
|
||||
- Significantly improved startup times of XRC-based applications using
|
||||
embedded resources on Unix (requires resources recompilation).
|
||||
- Fixed freeing of "static" alpha data in wxImage (Axel Gembe).
|
||||
- Added tab mouse click events to wxAuiNotebook (Ben Williams).
|
||||
- Option for middle-click tab close in wxAuiNotebook (Ben Williams).
|
||||
- Added wxAuiNotebook::SetFont, GetTabCtrlHeight, GetHeightForPageHeight.
|
||||
- Added SetBitmap/GetBitmap to wxWizard, to allow e.g. on-the-fly creation
|
||||
of bitmap to fit page height.
|
||||
- Fixed wxXPMHandler::SaveFile for images with more than 92 colors.
|
||||
- Fixed a crash in wxGrid on creation due to OnSize being called too soon.
|
||||
- Added colour normalization to PNM image handler (Ray Johnston)
|
||||
|
||||
wxMSW:
|
||||
|
||||
- Fix crash when destroying a default button (Tim Kosse).
|
||||
- Correct problem with page setup dialog when using landscape mode.
|
||||
- Added msw.font.no-proof-quality system option, see manual for description.
|
||||
- Fix appearance of notebook with non-top tabs under Windows Vista.
|
||||
- Fixed bug with symbol resolving in wxStackWalker (Axel Gembe).
|
||||
- Fixed showing busy cursor for disabled windows and during wxExecute()
|
||||
- Fix crash when destroying a default button (Tim Kosse)
|
||||
- Correct problem with page setup dialog when using landscape mode
|
||||
- Added msw.font.no-proof-quality system option, see manual for description
|
||||
- Fix appearance of notebook with non-top tabs under Windows Vista
|
||||
|
||||
wxGTK:
|
||||
|
||||
- Fixed missing key events in wxGTK1 build.
|
||||
- Setting foreground colour of single line wxTextCtrl now works.
|
||||
- More work on setting defaults in GNOME print dialogs.
|
||||
- Also made landscape printing work as per wxMSW.
|
||||
- Add support for (rectangular) clipping in GNOME print backend.
|
||||
- Speed up wxBitmap::Rescale().
|
||||
- Add right button event for wxToolbar's tools (Tim Kosse).
|
||||
- Made wxWindow::SetScrollPos and wxScrollbar::SetThumbPos
|
||||
not emit any event.
|
||||
- Correct hyperactive mouse wheel support.
|
||||
- Correct grid line mode in wxListCtrl.
|
||||
- Don't unconditionally add wxCAPTION style to wxMiniFrame.
|
||||
- Fixed crash in file and dir pickers for GTK+ < 2.6 if compiled
|
||||
with GTK+ >= 2.6.
|
||||
- Generate wxEVT_COMMAND_LIST_END_LABEL_EDIT event even if label didn't change
|
||||
|
||||
wxMac:
|
||||
|
||||
- Fixed ability of non-native/installed toolbars to have controls,
|
||||
in native toolbar compilation mode.
|
||||
|
||||
wxMotif:
|
||||
|
||||
- Fix crash when using wxStaticBox with empty label
|
||||
- Add support for clipping in GNOME print backend.
|
||||
- Speed up wxBitmap::Rescale()
|
||||
- Add right button event for wxToolbar's tools (Tim Kosse)
|
||||
|
||||
|
||||
2.8.4
|
||||
@@ -150,66 +116,66 @@ wxMotif:
|
||||
|
||||
All:
|
||||
|
||||
- Fix bug in wxFileConfig when recreating a group (Steven Van Ingelgem).
|
||||
- Fix bug in wxFileConfig when recreating a group (Steven Van Ingelgem)
|
||||
- Fix wxStringOutputStream::Write() in Unicode build when the argument
|
||||
overlaps UTF-8 characters boundary.
|
||||
- Account for lines without newline at the end in wxExecute().
|
||||
overlaps UTF-8 characters boundary
|
||||
- Account for lines without newline at the end in wxExecute()
|
||||
- Added wxString::char_str(), wchar_str(), From8BitData(), To8BitData(),
|
||||
FromUTF8(), ToUTF8() and utf8_str() methods for forward compatiblity
|
||||
with wxWidgets 3.
|
||||
with wxWidgets 3
|
||||
|
||||
All (Unix):
|
||||
|
||||
- Handle socket shutdown by the peer correctly in wxSocket (Tim Kosse).
|
||||
- Handle socket shutdown by the peer correctly in wxSocket (Tim Kosse)
|
||||
|
||||
All (GUI):
|
||||
|
||||
- Allow status bar children in XRC (Edmunt Pienkowski).
|
||||
- Fix memory leak in wxWizard when not using sizers for the page layout.
|
||||
- Added wxListCtrl::SetItemPtrData().
|
||||
- wxHTML: Apply table background colour between the cells too (Michael Hieke).
|
||||
- Allow status bar children in XRC (Edmunt Pienkowski)
|
||||
- Fix memory leak in wxWizard when not using sizers for the page layout
|
||||
- Added wxListCtrl::SetItemPtrData()
|
||||
- wxHTML: Apply table background colour between the cells too (Michael Hieke)
|
||||
|
||||
wxMSW:
|
||||
|
||||
- Corrected wxStaticBox label appearance when its foreground colour was set:
|
||||
it didn't respect font size nor background colour then (Juan Antonio Ortega).
|
||||
- Don't lose combobox text when it's opened and closed (Kolya Kosenko).
|
||||
- Corrected GetChecked() for events from checkable menu items (smanders).
|
||||
- Fixed popup menus under Windows NT 4.
|
||||
- Fixed bug in wxThread::Wait() in console applications introduced in 2.8.3.
|
||||
- Support right-aligned/centered owner drawn items in wxListCtrl (troelsk).
|
||||
- Compilation fixed with WXWIN_COMPATIBILITY_2_6==0.
|
||||
- Fix wxComboCtrl colours under Windows Vista (Kolya Kosenko).
|
||||
it didn't respect font size nor background colour then (Juan Antonio Ortega)
|
||||
- Don't lose combobox text when it's opened and closed (Kolya Kosenko)
|
||||
- Corrected GetChecked() for events from checkable menu items (smanders)
|
||||
- Fixed popup menus under Windows NT 4
|
||||
- Fixed bug in wxThread::Wait() in console applications introduced in 2.8.3
|
||||
- Support right-aligned/centered owner drawn items in wxListCtrl (troelsk)
|
||||
- Compilation fixed with WXWIN_COMPATIBILITY_2_6==0
|
||||
- Fix wxComboCtrl colours under Windows Vista (Kolya Kosenko)
|
||||
|
||||
wxGTK:
|
||||
|
||||
- Fix infinite loop when adding a wxStaticText control to a toolbar.
|
||||
- Fix wxNO_BORDER style for wxRadioBox (David Hart).
|
||||
- wxComboBox::SetValue() doesn't emit EVT_TEXT anymore.
|
||||
- Fix wxTextCtrl::GetLineText() for empty lines (Marcin Wojdyr).
|
||||
- Fix support for wxFD_FILE_MUST_EXIST in wxFileDialog.
|
||||
- Fix infinite loop when adding a wxStaticText control to a toolbar
|
||||
- Fix wxNO_BORDER style for wxRadioBox (David Hart)
|
||||
- wxComboBox::SetValue() doesn't emit EVT_TEXT anymore
|
||||
- Fix wxTextCtrl::GetLineText() for empty lines (Marcin Wojdyr)
|
||||
- Fix support for wxFD_FILE_MUST_EXIST in wxFileDialog
|
||||
- Fix support for setting orientation, paper size and collate
|
||||
in GNOME print backend.
|
||||
in GNOME print backend
|
||||
- Support wxTEXT_ALIGNMENT_JUSTIFIED in wxTextCtrl if GTK+ version is at
|
||||
least 2.11 (Mart Raudsepp)..
|
||||
least 2.11 (Mart Raudsepp).
|
||||
|
||||
wxMac:
|
||||
|
||||
- Fix wxComboBox::SetSelection(wxNOT_FOUND) (Adrian Secord).
|
||||
- Fix wxComboBox::SetSelection(wxNOT_FOUND) (Adrian Secord)
|
||||
|
||||
wxUniv:
|
||||
|
||||
- Fix wxTextCtrl::SetSelection(-1, -1) to behave as documented (Anders Larsen).
|
||||
- Fix wxComboBox::SetSelection(wxNOT_FOUND).
|
||||
- Fix setting background colour for controls with transparent background.
|
||||
- Fix wxTextCtrl::SetSelection(-1, -1) to behave as documented (Anders Larsen)
|
||||
- Fix wxComboBox::SetSelection(wxNOT_FOUND)
|
||||
- Fix setting background colour for controls with transparent background
|
||||
|
||||
2.8.3
|
||||
-----
|
||||
|
||||
All:
|
||||
|
||||
- Shut down the sockets gracefully (Sergio Aguayo).
|
||||
- Fix extra indentation in wxHTML_ALIGN_JUSTIFY display (Chacal).
|
||||
- Shut down the sockets gracefully (Sergio Aguayo)
|
||||
- Fix extra indentation in wxHTML_ALIGN_JUSTIFY display (Chacal)
|
||||
|
||||
wxMac
|
||||
|
||||
@@ -223,7 +189,7 @@ wxMSW:
|
||||
|
||||
wxGTK:
|
||||
|
||||
- Fixed handling of accelerators using PageUp/Down keys.
|
||||
- Fixed handling of accelerators using PageUp/Down keys
|
||||
|
||||
|
||||
2.8.2
|
||||
@@ -244,9 +210,9 @@ All:
|
||||
- Fixed tab-related drawing and hit-testing bugs in wxRichTextCtrl.
|
||||
- Implemented background colour in wxRichTextCtrl.
|
||||
- Fixed crashes in helpview when opening a file.
|
||||
- Fixed detection of number of processors under Linux 2.6.
|
||||
- Fixed Base64 computation in wxHTTP (p_michalczyk).
|
||||
- Fix handling of wxSOCKET_REUSEADDR in wxDatagramSocket (troelsk).
|
||||
- Fixed detection of number of processors under Linux 2.6
|
||||
- Fixed Base64 computation in wxHTTP (p_michalczyk)
|
||||
- Fix handling of wxSOCKET_REUSEADDR in wxDatagramSocket (troelsk)
|
||||
|
||||
Unix Ports:
|
||||
|
||||
|
@@ -81,13 +81,6 @@ Deletes a page at the given index. Calling this method will generate a page cha
|
||||
|
||||
Returns the associated art provider.
|
||||
|
||||
\membersection{wxAuiNotebook::GetHeightForPageHeight}\label{wxauinotebookgetheightforpageheight}
|
||||
|
||||
\func{int}{GetHeightForPageHeight}{\param{int }{pageHeight}}
|
||||
|
||||
Returns the desired height of the notebook for the given page height. Use this to fit the notebook to
|
||||
a given page size.
|
||||
|
||||
\membersection{wxAuiNotebook::GetPage}\label{wxauinotebookgetpage}
|
||||
|
||||
\constfunc{wxWindow*}{GetPage}{\param{size\_t }{page\_idx}}
|
||||
@@ -125,12 +118,6 @@ Returns the tab label for the page.
|
||||
|
||||
Returns the currently selected page.
|
||||
|
||||
\membersection{wxAuiNotebook::GetTabCtrlHeight}\label{wxauinotebookgettabctrlheight}
|
||||
|
||||
\constfunc{int}{GetTabCtrlHeight}{\void}
|
||||
|
||||
Returns the height of the tab control.
|
||||
|
||||
\membersection{wxAuiNotebook::InsertPage}\label{wxauinotebookinsertpage}
|
||||
|
||||
\func{bool}{InsertPage}{\param{size\_t }{page\_idx}, \param{wxWindow* }{page}, \param{const wxString\& }{caption}, \param{bool }{select = false}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}}
|
||||
@@ -150,30 +137,6 @@ Removes a page, without deleting the window pointer.
|
||||
|
||||
Sets the art provider to be used by the notebook.
|
||||
|
||||
\membersection{wxAuiNotebook::SetFont}\label{wxauinotebooksetfont}
|
||||
|
||||
\func{bool}{SetFont}{\param{const wxFont\& }{font}}
|
||||
|
||||
Sets the font for drawing the tab labels, using a bold version of the font for selected tab labels.
|
||||
|
||||
\membersection{wxAuiNotebook::SetNormalFont}\label{wxauinotebooksetnormalfont}
|
||||
|
||||
\func{void}{SetNormalFont}{\param{const wxFont\& }{font}}
|
||||
|
||||
Sets the font for drawing unselected tab labels.
|
||||
|
||||
\membersection{wxAuiNotebook::SetSelectedFont}\label{wxauinotebooksetselectedfont}
|
||||
|
||||
\func{void}{SetSelectedFont}{\param{const wxFont\& }{font}}
|
||||
|
||||
Sets the font for drawing selected tab labels.
|
||||
|
||||
\membersection{wxAuiNotebook::SetMeasuringFont}\label{wxauinotebooksetmeasuringfont}
|
||||
|
||||
\func{void}{SetMeasuringFont}{\param{const wxFont\& }{font}}
|
||||
|
||||
Sets the font for measuring tab labels.
|
||||
|
||||
\membersection{wxAuiNotebook::SetPageBitmap}\label{wxauinotebooksetpagebitmap}
|
||||
|
||||
\func{bool}{SetPageBitmap}{\param{size\_t }{page}, \param{const wxBitmap\& }{bitmap}}
|
||||
|
@@ -181,7 +181,7 @@ that has longer life time than the event object.
|
||||
|
||||
\membersection{wxCommandEvent::SetExtraLong}\label{wxcommandeventsetextralong}
|
||||
|
||||
\func{void}{SetExtraLong}{\param{long}{ extraLong}}
|
||||
\func{void}{SetExtraLong}{\param{int}{ extraLong}}
|
||||
|
||||
Sets the {\bf m\_extraLong} member.
|
||||
|
||||
|
@@ -378,11 +378,7 @@ this is not present, but required, the application name will be used instead.}
|
||||
\docparam{style}{Can be one of wxCONFIG\_USE\_LOCAL\_FILE and
|
||||
wxCONFIG\_USE\_GLOBAL\_FILE. The style interpretation depends on the config
|
||||
class and is ignored by some implementations. For wxFileConfig, these styles
|
||||
determine whether a local or global config file is created or used: if
|
||||
wxCONFIG\_USE\_GLOBAL\_FILE is used, then settings are read from the global
|
||||
config file and if wxCONFIG\_USE\_LOCAL\_FILE is used, settings are read from
|
||||
and written to local config file (if they are both set, global file is read
|
||||
first, then local file, overwriting global settings). If the
|
||||
determine whether a local or global config file is created or used. If the
|
||||
flag is present but the parameter is empty, the parameter will be set to a
|
||||
default. If the parameter is present but the style flag not, the relevant flag
|
||||
will be added to the style. For wxRegConfig, thie GLOBAL flag refers to HKLM
|
||||
|
@@ -78,6 +78,10 @@ Constructor.
|
||||
|
||||
\func{static void}{AddFile}{\param{const wxString\& }{filename}, \param{const wxBitmap\& }{bitmap}, \param{long }{type}}
|
||||
|
||||
\func{static void}{AddFile}{\param{const wxString\& }{filename}, \param{const wxString\& }{textdata}}
|
||||
|
||||
\func{static void}{AddFile}{\param{const wxString\& }{filename}, \param{const void* }{binarydata}, \param{size\_t }{size}}
|
||||
|
||||
Add file to list of files stored in memory. Stored
|
||||
data (bitmap, text or raw data)
|
||||
will be copied into private memory stream and available under
|
||||
@@ -88,26 +92,6 @@ Note that you must use a \arg{type} value (aka image format)
|
||||
that wxWidgets can save (e.g. JPG, PNG, see \helpref{wxImage
|
||||
documentation}{wximage})!
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{AddFileWithMimeType}{wxmemoryfshandleraddfilewithmimetype}
|
||||
|
||||
|
||||
\membersection{wxMemoryFSHandler::AddFileWithMimeType}\label{wxmemoryfshandleraddfilewithmimetype}
|
||||
|
||||
\func{static void}{AddFileWithMimeType}{\param{const wxString\& }{filename}, \param{const wxString\& }{textdata}, \param{const wxString\& }{mimetype}}
|
||||
|
||||
\func{static void}{AddFileWithMimeType}{\param{const wxString\& }{filename}, \param{const void* }{binarydata}, \param{size\_t }{size}, \param{const wxString\& }{mimetype}}
|
||||
|
||||
Like \helpref{AddFile}{wxmemoryfshandleraddfile}, but lets you explicitly
|
||||
specify added file's MIME type. This version should be used whenever you know
|
||||
the MIME type, because it makes accessing the files faster.
|
||||
|
||||
\newsince{2.8.5}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{AddFile}{wxmemoryfshandleraddfile}
|
||||
|
||||
\membersection{wxMemoryFSHandler::RemoveFile}\label{wxmemoryfshandlerremovefile}
|
||||
|
||||
|
@@ -38,26 +38,6 @@ Constructor.
|
||||
|
||||
\docparam{parentWindow}{pointer to the window that will own the preview frame and setup dialogs. May be NULL.}
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::GetParentWindow}\label{wxhtmleasyprintinggetparentwindow}
|
||||
|
||||
\constfunc{wxWindow*}{GetParentWindow}{\void}
|
||||
|
||||
Gets the parent window for dialogs.
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::GetPrintData}\label{wxhtmleasyprintinggetprintdata}
|
||||
|
||||
\func{wxPrintData*}{GetPrintData}{\void}
|
||||
|
||||
Returns pointer to \helpref{wxPrintData}{wxprintdata} instance used by this class. You can
|
||||
set its parameters (via SetXXXX methods).
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::GetPageSetupData}\label{wxhtmleasyprintinggetpagesetupdata}
|
||||
|
||||
\func{wxPageSetupDialogData*}{GetPageSetupData}{\void}
|
||||
|
||||
Returns a pointer to \helpref{wxPageSetupDialogData}{wxpagesetupdialogdata} instance used by
|
||||
this class. You can set its parameters (via SetXXXX methods).
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::PreviewFile}\label{wxhtmleasyprintingpreviewfile}
|
||||
|
||||
\func{bool}{PreviewFile}{\param{const wxString\& }{htmlfile}}
|
||||
@@ -152,9 +132,17 @@ Set page footer. The following macros can be used inside it:
|
||||
|
||||
\docparam{pg}{one of wxPAGE\_ODD, wxPAGE\_EVEN and wxPAGE\_ALL constants.}
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::SetParentWindow}\label{wxhtmleasyprintingsetparentwindow}
|
||||
\membersection{wxHtmlEasyPrinting::GetPrintData}\label{wxhtmleasyprintinggetprintdata}
|
||||
|
||||
\func{void}{SetParentWindow}{\param{wxWindow*}{ window}}
|
||||
\func{wxPrintData*}{GetPrintData}{\void}
|
||||
|
||||
Sets the parent window for dialogs.
|
||||
Returns pointer to \helpref{wxPrintData}{wxprintdata} instance used by this class. You can
|
||||
set its parameters (via SetXXXX methods).
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::GetPageSetupData}\label{wxhtmleasyprintinggetpagesetupdata}
|
||||
|
||||
\func{wxPageSetupDialogData*}{GetPageSetupData}{\void}
|
||||
|
||||
Returns a pointer to \helpref{wxPageSetupDialogData}{wxpagesetupdialogdata} instance used by
|
||||
this class. You can set its parameters (via SetXXXX methods).
|
||||
|
||||
|
@@ -186,7 +186,7 @@ the embedded window to be destroyed independently of the help controller.
|
||||
|
||||
\func{}{wxHtmlHelpWindow}{\param{wxHtmlHelpData* }{data = NULL}}
|
||||
|
||||
\func{}{wxHtmlHelpWindow}{\param{wxWindow* }{parent}, \param{int }{wxWindowID}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ pos = wxDefaultSize}, \param{int }{style = wxTAB\_TRAVERSAL|wxTAB\_wxNO\_BORDER}, \param{int }{helpStyle = wxHF\_DEFAULT\_STYLE}, \param{wxHtmlHelpData* }{data = NULL}}
|
||||
\func{}{wxHtmlHelpWindow}{\param{wxWindow* }{parent}, \param{int }{wxWindowID}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ pos = wxDefaultSize}, \param{int }{style = wxTAB\_TRAVERSAL|wxTAB\_wxNO_BORDER}, \param{int }{helpStyle = wxHF\_DEFAULT\_STYLE}, \param{wxHtmlHelpData* }{data = NULL}}
|
||||
|
||||
Constructor.
|
||||
|
||||
@@ -194,7 +194,7 @@ Constructor. For the values of {\it helpStyle}, please see the documentation for
|
||||
|
||||
\membersection{wxHtmlHelpWindow::Create}\label{wxhtmlhelpwindowcreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ pos = wxDefaultSize}, \param{int }{style = wxTAB\_TRAVERSAL|wxTAB\_wxNO\_BORDER}, \param{int }{helpStyle = wxHF\_DEFAULT\_STYLE}, \param{wxHtmlHelpData* }{data = NULL}}
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ pos = wxDefaultSize}, \param{int }{style = wxTAB\_TRAVERSAL|wxTAB\_wxNO_BORDER}, \param{int }{helpStyle = wxHF\_DEFAULT\_STYLE}, \param{wxHtmlHelpData* }{data = NULL}}
|
||||
|
||||
Creates the help window. See \helpref{the constructor}{wxhtmlhelpwindowwxhtmlhelpwindow}
|
||||
for a description of the parameters.
|
||||
|
@@ -434,13 +434,6 @@ target but the log messages are also passed to the previous log target if any.
|
||||
|
||||
Destroys the previous log target.
|
||||
|
||||
\membersection{wxLogChain::DetachOldLog}\label{wxlogchaindetacholdlog}
|
||||
|
||||
\func{void}{DetachOldLog}{\void}
|
||||
|
||||
Detaches the old log target so it won't be destroyed when the wxLogChain object
|
||||
is destroyed.
|
||||
|
||||
\membersection{wxLogChain::GetOldLog}\label{wxlogchaingetoldlog}
|
||||
|
||||
\constfunc{wxLog *}{GetOldLog}{\void}
|
||||
|
@@ -51,7 +51,6 @@ No base class.
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Function groups}}}
|
||||
|
||||
|
||||
\membersection{Helper functions}\label{mimehelperfunctions}
|
||||
|
||||
All of these functions are static (i.e. don't need a wxMimeTypesManager object
|
||||
@@ -61,7 +60,6 @@ types using wxString functions.
|
||||
|
||||
\helpref{IsOfType}{wxmimetypesmanagerisoftype}
|
||||
|
||||
|
||||
\membersection{Constructor and destructor}\label{mimeconstructordestructor}
|
||||
|
||||
NB: You won't normally need to use more than one wxMimeTypesManager object in a
|
||||
@@ -70,18 +68,16 @@ program.
|
||||
\helpref{wxMimeTypesManager}{wxmimetypesmanagerctor}\\
|
||||
\helpref{\destruct{wxMimeTypesManager}}{wxmimetypesmanagerdtor}
|
||||
|
||||
|
||||
\membersection{Query database}\label{mimequerydatabase}
|
||||
|
||||
These functions are the heart of this class: they allow to find a \helpref{file type}{wxfiletype} object
|
||||
from either file extension or MIME type.
|
||||
If the function is successful, it returns a pointer to the wxFileType object
|
||||
which {\bf must} be deleted by the caller, otherwise \NULL will be returned.
|
||||
which {\bf must} be deleted by the caller, otherwise NULL will be returned.
|
||||
|
||||
\helpref{GetFileTypeFromMimeType}{wxmimetypesmanagergetfiletypefrommimetype}\\
|
||||
\helpref{GetFileTypeFromExtension}{wxmimetypesmanagergetfiletypefromextension}
|
||||
|
||||
|
||||
\membersection{Initialization functions}\label{wxmimetypesmanagerinit}
|
||||
|
||||
{\bf Unix:} These functions may be used to load additional files (except for the
|
||||
@@ -99,7 +95,6 @@ information in either mailcap(5) or mime.types(5) format.
|
||||
|
||||
}}
|
||||
|
||||
|
||||
\membersection{wxMimeTypesManager::wxMimeTypesManager}\label{wxmimetypesmanagerctor}
|
||||
|
||||
\func{}{wxMimeTypesManager}{\void}
|
||||
@@ -108,14 +103,12 @@ Constructor puts the object in the "working" state, no additional initialization
|
||||
are needed - but \helpref{ReadXXX}{wxmimetypesmanagerinit} may be used to load
|
||||
additional mailcap/mime.types files.
|
||||
|
||||
|
||||
\membersection{wxMimeTypesManager::\destruct{wxMimeTypesManager}}\label{wxmimetypesmanagerdtor}
|
||||
|
||||
\func{}{\destruct{wxMimeTypesManager}}{\void}
|
||||
|
||||
Destructor is not virtual, so this class should not be derived from.
|
||||
|
||||
|
||||
\membersection{wxMimeTypesManager::AddFallbacks}\label{wxmimetypesmanageraddfallbacks}
|
||||
|
||||
\func{void}{AddFallbacks}{\param{const wxFileTypeInfo *}{fallbacks}}
|
||||
@@ -127,28 +120,22 @@ and extensions that might not be present in the system MIME database.
|
||||
|
||||
Please see the typetest sample for an example of using it.
|
||||
|
||||
|
||||
\membersection{wxMimeTypesManager::GetFileTypeFromExtension}\label{wxmimetypesmanagergetfiletypefromextension}
|
||||
|
||||
\func{wxFileType*}{GetFileTypeFromExtension}{\param{const wxString\&}{ extension}}
|
||||
|
||||
Gather information about the files with given extension and return the
|
||||
corresponding \helpref{wxFileType}{wxfiletype} object or \NULL if the extension
|
||||
corresponding \helpref{wxFileType}{wxfiletype} object or NULL if the extension
|
||||
is unknown.
|
||||
|
||||
The \arg{extension} parameter may have, or not, the leading dot, if it has it,
|
||||
it is stripped automatically. It must not however be empty.
|
||||
|
||||
|
||||
\membersection{wxMimeTypesManager::GetFileTypeFromMimeType}\label{wxmimetypesmanagergetfiletypefrommimetype}
|
||||
|
||||
\func{wxFileType*}{GetFileTypeFromMimeType}{\param{const wxString\&}{ mimeType}}
|
||||
|
||||
Gather information about the files with given MIME type and return the
|
||||
corresponding \helpref{wxFileType}{wxfiletype} object or \NULL if the MIME type
|
||||
corresponding \helpref{wxFileType}{wxfiletype} object or NULL if the MIME type
|
||||
is unknown.
|
||||
|
||||
|
||||
\membersection{wxMimeTypesManager::IsOfType}\label{wxmimetypesmanagerisoftype}
|
||||
|
||||
\func{bool}{IsOfType}{\param{const wxString\&}{ mimeType}, \param{const wxString\&}{ wildcard}}
|
||||
@@ -161,7 +148,6 @@ same as {\it wildcard} or if it has the same category and the subtype of
|
||||
The comparison don by this function is case insensitive so it is not
|
||||
necessary to convert the strings to the same case before calling it.
|
||||
|
||||
|
||||
\membersection{wxMimeTypesManager::ReadMailcap}\label{wxmimetypesmanagerreadmailcap}
|
||||
|
||||
\func{bool}{ReadMailcap}{\param{const wxString\&}{ filename}, \param{bool}{ fallback = false}}
|
||||
@@ -179,7 +165,6 @@ will not happen if this parameter is set to true (default is false).
|
||||
The return value is true if there were no errors in the file or false
|
||||
otherwise.
|
||||
|
||||
|
||||
\membersection{wxMimeTypesManager::ReadMimeTypes}\label{wxmimetypesmanagerreadmimetypes}
|
||||
|
||||
\func{bool}{ReadMimeTypes}{\param{const wxString\&}{ filename}}
|
||||
|
@@ -157,11 +157,6 @@ This is useful if the decision about which pages to show is taken during
|
||||
run-time, as in this case, the wizard won't be able to get to all pages starting
|
||||
from a single one and you should call {\it Fit} separately for the others.
|
||||
|
||||
\membersection{wxWizard::GetBitmap}\label{wxwizardgetbitmap}
|
||||
|
||||
\constfunc{const wxBitmap\&}{GetBitmap}{\void}
|
||||
|
||||
Returns the bitmap used for the wizard.
|
||||
|
||||
\membersection{wxWizard::GetCurrentPage}\label{wxwizardgetcurrentpage}
|
||||
|
||||
@@ -246,11 +241,6 @@ Executes the wizard starting from the given page, returning {\tt true} if it was
|
||||
successfully finished or {\tt false} if user cancelled it. The {\it firstPage}
|
||||
can not be {\tt NULL}.
|
||||
|
||||
\membersection{wxWizard::SetBitmap}\label{wxwizardsetbitmap}
|
||||
|
||||
\func{void}{SetBitmap}{\param{const wxBitmap\& }{bitmap}}
|
||||
|
||||
Sets the bitmap used for the wizard.
|
||||
|
||||
\membersection{wxWizard::SetPageSize}\label{wxwizardsetpagesize}
|
||||
|
||||
|
@@ -45,14 +45,13 @@ enum wxAuiNotebookOption
|
||||
wxAUI_NB_CLOSE_BUTTON = 1 << 10,
|
||||
wxAUI_NB_CLOSE_ON_ACTIVE_TAB = 1 << 11,
|
||||
wxAUI_NB_CLOSE_ON_ALL_TABS = 1 << 12,
|
||||
wxAUI_NB_MIDDLE_CLICK_CLOSE = 1 << 13,
|
||||
|
||||
|
||||
|
||||
wxAUI_NB_DEFAULT_STYLE = wxAUI_NB_TOP |
|
||||
wxAUI_NB_TAB_SPLIT |
|
||||
wxAUI_NB_TAB_MOVE |
|
||||
wxAUI_NB_SCROLL_BUTTONS |
|
||||
wxAUI_NB_CLOSE_ON_ACTIVE_TAB |
|
||||
wxAUI_NB_MIDDLE_CLICK_CLOSE
|
||||
wxAUI_NB_CLOSE_ON_ACTIVE_TAB
|
||||
};
|
||||
|
||||
|
||||
@@ -83,10 +82,10 @@ public:
|
||||
|
||||
void SetSelection(int s) { selection = s; m_commandInt = s; }
|
||||
int GetSelection() const { return selection; }
|
||||
|
||||
|
||||
void SetOldSelection(int s) { old_selection = s; }
|
||||
int GetOldSelection() const { return old_selection; }
|
||||
|
||||
|
||||
void SetDragSource(wxAuiNotebook* s) { drag_source = s; }
|
||||
wxAuiNotebook* GetDragSource() const { return drag_source; }
|
||||
|
||||
@@ -139,13 +138,13 @@ public:
|
||||
|
||||
wxAuiTabArt() { }
|
||||
virtual ~wxAuiTabArt() { }
|
||||
|
||||
|
||||
virtual wxAuiTabArt* Clone() = 0;
|
||||
virtual void SetFlags(unsigned int flags) = 0;
|
||||
|
||||
virtual void SetSizingInfo(const wxSize& tab_ctrl_size,
|
||||
size_t tab_count) = 0;
|
||||
|
||||
|
||||
virtual void SetNormalFont(const wxFont& font) = 0;
|
||||
virtual void SetSelectedFont(const wxFont& font) = 0;
|
||||
virtual void SetMeasuringFont(const wxFont& font) = 0;
|
||||
@@ -162,8 +161,8 @@ public:
|
||||
int close_button_state,
|
||||
wxRect* out_tab_rect,
|
||||
wxRect* out_button_rect,
|
||||
int* x_extent) = 0;
|
||||
|
||||
int* x_extent) = 0;
|
||||
|
||||
virtual void DrawButton(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
@@ -172,7 +171,7 @@ public:
|
||||
int button_state,
|
||||
int orientation,
|
||||
wxRect* out_rect) = 0;
|
||||
|
||||
|
||||
virtual wxSize GetTabSize(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
@@ -181,18 +180,18 @@ public:
|
||||
bool active,
|
||||
int close_button_state,
|
||||
int* x_extent) = 0;
|
||||
|
||||
|
||||
virtual int ShowDropDown(
|
||||
wxWindow* wnd,
|
||||
const wxAuiNotebookPageArray& items,
|
||||
int active_idx) = 0;
|
||||
|
||||
|
||||
virtual int GetIndentSize() = 0;
|
||||
|
||||
|
||||
virtual int GetBestTabCtrlSize(
|
||||
wxWindow* wnd,
|
||||
const wxAuiNotebookPageArray& pages,
|
||||
const wxSize& required_bmp_size) = 0;
|
||||
const wxSize& required_bmp_size) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -203,7 +202,7 @@ public:
|
||||
|
||||
wxAuiDefaultTabArt();
|
||||
virtual ~wxAuiDefaultTabArt();
|
||||
|
||||
|
||||
wxAuiTabArt* Clone();
|
||||
void SetFlags(unsigned int flags);
|
||||
void SetSizingInfo(const wxSize& tab_ctrl_size,
|
||||
@@ -217,7 +216,7 @@ public:
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxRect& rect);
|
||||
|
||||
|
||||
void DrawTab(wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxAuiNotebookPage& pane,
|
||||
@@ -226,7 +225,7 @@ public:
|
||||
wxRect* out_tab_rect,
|
||||
wxRect* out_button_rect,
|
||||
int* x_extent);
|
||||
|
||||
|
||||
void DrawButton(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
@@ -235,9 +234,9 @@ public:
|
||||
int button_state,
|
||||
int orientation,
|
||||
wxRect* out_rect);
|
||||
|
||||
|
||||
int GetIndentSize();
|
||||
|
||||
|
||||
wxSize GetTabSize(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
@@ -246,7 +245,7 @@ public:
|
||||
bool active,
|
||||
int close_button_state,
|
||||
int* x_extent);
|
||||
|
||||
|
||||
int ShowDropDown(
|
||||
wxWindow* wnd,
|
||||
const wxAuiNotebookPageArray& items,
|
||||
@@ -254,7 +253,7 @@ public:
|
||||
|
||||
int GetBestTabCtrlSize(wxWindow* wnd,
|
||||
const wxAuiNotebookPageArray& pages,
|
||||
const wxSize& required_bmp_size);
|
||||
const wxSize& required_bmp_size);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -273,7 +272,7 @@ protected:
|
||||
wxBitmap m_disabled_right_bmp;
|
||||
wxBitmap m_active_windowlist_bmp;
|
||||
wxBitmap m_disabled_windowlist_bmp;
|
||||
|
||||
|
||||
int m_fixed_tab_width;
|
||||
int m_tab_ctrl_height;
|
||||
unsigned int m_flags;
|
||||
@@ -287,7 +286,7 @@ public:
|
||||
|
||||
wxAuiSimpleTabArt();
|
||||
virtual ~wxAuiSimpleTabArt();
|
||||
|
||||
|
||||
wxAuiTabArt* Clone();
|
||||
void SetFlags(unsigned int flags);
|
||||
|
||||
@@ -302,7 +301,7 @@ public:
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxRect& rect);
|
||||
|
||||
|
||||
void DrawTab(wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxAuiNotebookPage& pane,
|
||||
@@ -311,7 +310,7 @@ public:
|
||||
wxRect* out_tab_rect,
|
||||
wxRect* out_button_rect,
|
||||
int* x_extent);
|
||||
|
||||
|
||||
void DrawButton(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
@@ -320,9 +319,9 @@ public:
|
||||
int button_state,
|
||||
int orientation,
|
||||
wxRect* out_rect);
|
||||
|
||||
|
||||
int GetIndentSize();
|
||||
|
||||
|
||||
wxSize GetTabSize(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
@@ -331,7 +330,7 @@ public:
|
||||
bool active,
|
||||
int close_button_state,
|
||||
int* x_extent);
|
||||
|
||||
|
||||
int ShowDropDown(
|
||||
wxWindow* wnd,
|
||||
const wxAuiNotebookPageArray& items,
|
||||
@@ -339,7 +338,7 @@ public:
|
||||
|
||||
int GetBestTabCtrlSize(wxWindow* wnd,
|
||||
const wxAuiNotebookPageArray& pages,
|
||||
const wxSize& required_bmp_size);
|
||||
const wxSize& required_bmp_size);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -359,7 +358,7 @@ protected:
|
||||
wxBitmap m_disabled_right_bmp;
|
||||
wxBitmap m_active_windowlist_bmp;
|
||||
wxBitmap m_disabled_windowlist_bmp;
|
||||
|
||||
|
||||
int m_fixed_tab_width;
|
||||
unsigned int m_flags;
|
||||
};
|
||||
@@ -406,7 +405,7 @@ public:
|
||||
void SetMeasuringFont(const wxFont& measuring_font);
|
||||
void DoShowHide();
|
||||
void SetRect(const wxRect& rect);
|
||||
|
||||
|
||||
void RemoveButton(int id);
|
||||
void AddButton(int id,
|
||||
int location,
|
||||
@@ -415,7 +414,7 @@ public:
|
||||
|
||||
size_t GetTabOffset() const;
|
||||
void SetTabOffset(size_t offset);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
virtual void Render(wxDC* dc, wxWindow* wnd);
|
||||
@@ -445,11 +444,7 @@ public:
|
||||
long style = 0);
|
||||
|
||||
~wxAuiTabCtrl();
|
||||
|
||||
#if wxABI_VERSION >= 20805
|
||||
bool IsDragging() const { return m_is_dragging; }
|
||||
#endif
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
void OnPaint(wxPaintEvent& evt);
|
||||
@@ -457,17 +452,11 @@ protected:
|
||||
void OnSize(wxSizeEvent& evt);
|
||||
void OnLeftDown(wxMouseEvent& evt);
|
||||
void OnLeftUp(wxMouseEvent& evt);
|
||||
#if wxABI_VERSION >= 20805
|
||||
void OnMiddleDown(wxMouseEvent& evt);
|
||||
void OnMiddleUp(wxMouseEvent& evt);
|
||||
void OnRightDown(wxMouseEvent& evt);
|
||||
void OnRightUp(wxMouseEvent& evt);
|
||||
#endif
|
||||
void OnMotion(wxMouseEvent& evt);
|
||||
void OnLeaveWindow(wxMouseEvent& evt);
|
||||
void OnButton(wxAuiNotebookEvent& evt);
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
wxPoint m_click_pt;
|
||||
@@ -505,14 +494,14 @@ public:
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0);
|
||||
|
||||
|
||||
void SetWindowStyleFlag(long style);
|
||||
void SetArtProvider(wxAuiTabArt* art);
|
||||
wxAuiTabArt* GetArtProvider() const;
|
||||
|
||||
|
||||
virtual void SetUniformBitmapSize(const wxSize& size);
|
||||
virtual void SetTabCtrlHeight(int height);
|
||||
|
||||
|
||||
bool AddPage(wxWindow* page,
|
||||
const wxString& caption,
|
||||
bool select = false,
|
||||
@@ -526,7 +515,7 @@ public:
|
||||
|
||||
bool DeletePage(size_t page);
|
||||
bool RemovePage(size_t page);
|
||||
|
||||
|
||||
size_t GetPageCount() const;
|
||||
wxWindow* GetPage(size_t page_idx) const;
|
||||
int GetPageIndex(wxWindow* page_wnd) const;
|
||||
@@ -546,33 +535,13 @@ public:
|
||||
const wxAuiManager& GetAuiManager() const { return m_mgr; }
|
||||
#endif
|
||||
|
||||
#if wxABI_VERSION >= 20805
|
||||
// Sets the normal font
|
||||
void SetNormalFont(const wxFont& font);
|
||||
|
||||
// Sets the selected tab font
|
||||
void SetSelectedFont(const wxFont& font);
|
||||
|
||||
// Sets the measuring font
|
||||
void SetMeasuringFont(const wxFont& font);
|
||||
|
||||
// Sets the tab font
|
||||
virtual bool SetFont(const wxFont& font);
|
||||
|
||||
// Gets the tab control height
|
||||
int GetTabCtrlHeight() const;
|
||||
|
||||
// Gets the height of the notebook for a given page height
|
||||
int GetHeightForPageHeight(int pageHeight);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
// these can be overridden
|
||||
virtual void UpdateTabCtrlHeight();
|
||||
virtual int CalculateTabCtrlHeight();
|
||||
virtual wxSize CalculateNewSplitSize();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
void DoSizing();
|
||||
@@ -583,7 +552,7 @@ protected:
|
||||
bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
|
||||
void RemoveEmptyTabFrames();
|
||||
void UpdateHintWindowSize();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
void OnChildFocus(wxChildFocusEvent& evt);
|
||||
@@ -594,13 +563,7 @@ protected:
|
||||
void OnTabDragMotion(wxCommandEvent& evt);
|
||||
void OnTabEndDrag(wxCommandEvent& evt);
|
||||
void OnTabButton(wxCommandEvent& evt);
|
||||
#if wxABI_VERSION >= 20805
|
||||
void OnTabMiddleDown(wxCommandEvent& evt);
|
||||
void OnTabMiddleUp(wxCommandEvent& evt);
|
||||
void OnTabRightDown(wxCommandEvent& evt);
|
||||
void OnTabRightUp(wxCommandEvent& evt);
|
||||
#endif
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
wxAuiManager m_mgr;
|
||||
@@ -614,7 +577,7 @@ protected:
|
||||
wxFont m_selected_font;
|
||||
wxFont m_normal_font;
|
||||
int m_tab_ctrl_height;
|
||||
|
||||
|
||||
int m_last_drag_x;
|
||||
unsigned int m_flags;
|
||||
|
||||
@@ -640,19 +603,13 @@ BEGIN_DECLARE_EVENT_TYPES()
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 0)
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 0)
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 0)
|
||||
#if wxABI_VERSION >= 20805
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 0)
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 0)
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 0)
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 0)
|
||||
#endif
|
||||
END_DECLARE_EVENT_TYPES()
|
||||
|
||||
typedef void (wxEvtHandler::*wxAuiNotebookEventFunction)(wxAuiNotebookEvent&);
|
||||
|
||||
#define wxAuiNotebookEventHandler(func) \
|
||||
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxAuiNotebookEventFunction, &func)
|
||||
|
||||
|
||||
#define EVT_AUINOTEBOOK_PAGE_CLOSE(winid, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, winid, wxAuiNotebookEventHandler(fn))
|
||||
#define EVT_AUINOTEBOOK_PAGE_CHANGED(winid, fn) \
|
||||
@@ -670,17 +627,6 @@ typedef void (wxEvtHandler::*wxAuiNotebookEventFunction)(wxAuiNotebookEvent&);
|
||||
#define EVT_AUINOTEBOOK_ALLOW_DND(winid, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, winid, wxAuiNotebookEventHandler(fn))
|
||||
|
||||
#if wxABI_VERSION >= 20805
|
||||
#define EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, winid, wxAuiNotebookEventHandler(fn))
|
||||
#define EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, winid, wxAuiNotebookEventHandler(fn))
|
||||
#define EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, winid, wxAuiNotebookEventHandler(fn))
|
||||
#define EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, winid, wxAuiNotebookEventHandler(fn))
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
// wxpython/swig event work
|
||||
|
@@ -12,57 +12,22 @@
|
||||
#ifndef _WX_COCOA_NSAPPLICATION_H__
|
||||
#define _WX_COCOA_NSAPPLICATION_H__
|
||||
|
||||
#include "wx/cocoa/objc/objc_uniquifying.h"
|
||||
|
||||
// ========================================================================
|
||||
// wxNSApplicationDelegate
|
||||
// ========================================================================
|
||||
/*!
|
||||
@class wxNSApplicationDelegate
|
||||
@discussion Implements an NSApplication delegate which can respond to messages sent by Cocoa to change Cocoa's behavior.
|
||||
|
||||
wxCocoa will set a singleton instance of this class as the NSApplication delegate upon startup unless wxWidgets is running
|
||||
in a "plugin" manner in which case it would not be appropriate to do this.
|
||||
|
||||
Although Cocoa will send notifications to the delegate it is also possible to register a different object to listen for
|
||||
them. Because we want to support the plugin case, we use a separate notification observer object when we can.
|
||||
*/
|
||||
@interface wxNSApplicationDelegate : NSObject
|
||||
{
|
||||
}
|
||||
|
||||
// Delegate methods
|
||||
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication;
|
||||
@end // interface wxNSApplicationDelegate : NSObject
|
||||
WX_DECLARE_GET_OBJC_CLASS(wxNSApplicationDelegate,NSObject)
|
||||
|
||||
// ========================================================================
|
||||
// wxNSApplicationObserver
|
||||
// ========================================================================
|
||||
/*!
|
||||
@class wxNSApplicationObserver
|
||||
@discussion Observes most notifications sent by the NSApplication singleton.
|
||||
|
||||
wxCocoa will create a singleton instance of this class upon startup and register it with the default notification center to
|
||||
listen for several events sent by the NSApplication singleton.
|
||||
|
||||
Because there can be any number of notification observers, this method allows wxCocoa to function properly even when it is
|
||||
running as a plugin of some other (most likely not wxWidgets) application.
|
||||
*/
|
||||
@interface wxNSApplicationObserver : NSObject
|
||||
{
|
||||
}
|
||||
|
||||
// Methods defined as (but not used here) as NSApplication delegate methods.
|
||||
- (void)applicationWillBecomeActive:(NSNotification *)notification;
|
||||
- (void)applicationDidBecomeActive:(NSNotification *)notification;
|
||||
- (void)applicationWillResignActive:(NSNotification *)notification;
|
||||
- (void)applicationDidResignActive:(NSNotification *)notification;
|
||||
- (void)applicationWillUpdate:(NSNotification *)notification;
|
||||
|
||||
// Other notifications
|
||||
- (void)controlTintChanged:(NSNotification *)notification;
|
||||
@end // interface wxNSApplicationObserver : NSObject
|
||||
WX_DECLARE_GET_OBJC_CLASS(wxNSApplicationObserver,NSObject)
|
||||
@end // interface wxNSApplicationDelegate : NSObject
|
||||
|
||||
#endif //ndef _WX_COCOA_NSAPPLICATION_H__
|
||||
|
@@ -15,12 +15,7 @@
|
||||
#include "wx/hashmap.h"
|
||||
#include "wx/cocoa/ObjcAssociate.h"
|
||||
|
||||
#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
|
||||
typedef struct CGRect NSRect;
|
||||
#else
|
||||
typedef struct _NSRect NSRect;
|
||||
#endif
|
||||
|
||||
class wxWindow;
|
||||
|
||||
WX_DECLARE_OBJC_HASHMAP(NSView);
|
||||
@@ -37,9 +32,6 @@ public:
|
||||
virtual wxWindow* GetWxWindow() const
|
||||
{ return NULL; }
|
||||
virtual void Cocoa_FrameChanged(void) = 0;
|
||||
#if 0 // ABI incompatibility
|
||||
virtual void Cocoa_synthesizeMouseMoved(void) = 0;
|
||||
#endif
|
||||
virtual bool Cocoa_acceptsFirstMouse(bool &acceptsFirstMouse, WX_NSEvent theEvent)
|
||||
{ return false; }
|
||||
virtual bool Cocoa_drawRect(const NSRect &rect)
|
||||
@@ -70,12 +62,6 @@ public:
|
||||
{ return false; }
|
||||
virtual bool Cocoa_resetCursorRects()
|
||||
{ return false; }
|
||||
#if 0 // ABI incompatibility
|
||||
virtual bool Cocoa_viewDidMoveToWindow()
|
||||
{ return false; }
|
||||
virtual bool Cocoa_viewWillMoveToWindow(WX_NSWindow newWindow)
|
||||
{ return false; }
|
||||
#endif
|
||||
virtual ~wxCocoaNSView() { }
|
||||
};
|
||||
|
||||
|
@@ -12,11 +12,6 @@
|
||||
#ifndef _WX_COCOA_APP_H_
|
||||
#define _WX_COCOA_APP_H_
|
||||
|
||||
typedef struct __CFRunLoopObserver * CFRunLoopObserverRef;
|
||||
typedef const struct __CFString * CFStringRef;
|
||||
|
||||
#include "wx/mac/corefoundation/cfref.h"
|
||||
|
||||
// ========================================================================
|
||||
// wxApp
|
||||
// ========================================================================
|
||||
@@ -31,10 +26,7 @@ class WXDLLEXPORT wxApp: public wxAppBase
|
||||
// ------------------------------------------------------------------------
|
||||
public:
|
||||
wxApp();
|
||||
// ABI compatibility warning: This was implemented inline. wxCocoa apps
|
||||
// compiled against < 2.8.5 won't call the new implementation which cleans up
|
||||
// the CFRunLoop idle observer. Fortunately, Cleanup does that in 2.8.
|
||||
virtual ~wxApp();
|
||||
virtual ~wxApp() {}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Cocoa specifics
|
||||
@@ -45,9 +37,6 @@ public:
|
||||
virtual void CocoaDelegate_applicationDidBecomeActive();
|
||||
virtual void CocoaDelegate_applicationWillResignActive();
|
||||
virtual void CocoaDelegate_applicationDidResignActive();
|
||||
/* The following two cannot be virtual due to 2.8 ABI compatibility */
|
||||
/*virtual*/ void CocoaDelegate_applicationWillUpdate();
|
||||
/*virtual*/ void CF_ObserveMainRunLoopBeforeWaiting(CFRunLoopObserverRef observer, int activity);
|
||||
protected:
|
||||
WX_NSApplication m_cocoaApp;
|
||||
struct objc_object *m_cocoaAppDelegate;
|
||||
@@ -76,8 +65,6 @@ public:
|
||||
bool IsInAssert() const { return m_isInAssert; }
|
||||
#endif // __WXDEBUG__
|
||||
|
||||
// Set true _before_ initializing wx to force embedded mode (no app delegate, etc.)
|
||||
static bool sm_isEmbedded;
|
||||
private:
|
||||
#ifdef __WXDEBUG__
|
||||
bool m_isInAssert;
|
||||
|
@@ -43,9 +43,6 @@ public:
|
||||
// Construct a mask from a mono bitmap (copies the bitmap).
|
||||
wxMask(const wxBitmap& bitmap);
|
||||
|
||||
// Copy constructor
|
||||
wxMask(const wxMask& src);
|
||||
|
||||
virtual ~wxMask();
|
||||
|
||||
bool Create(const wxBitmap& bitmap, const wxColour& colour);
|
||||
|
@@ -59,8 +59,6 @@ public:
|
||||
virtual void SetValue(bool);
|
||||
virtual bool GetValue() const;
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxString GetLabel() const;
|
||||
|
||||
protected:
|
||||
virtual void DoSet3StateValue(wxCheckBoxState state);
|
||||
virtual wxCheckBoxState DoGet3StateValue() const;
|
||||
|
@@ -61,20 +61,8 @@ public:
|
||||
|
||||
// Enables the control
|
||||
virtual void CocoaSetEnabled(bool enable);
|
||||
|
||||
wxString GetLabel() const;
|
||||
void SetLabel(const wxString& label);
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
// Provides a common implementation of title setting which strips mnemonics
|
||||
// and then calls setTitle: with the stripped string. May be implemented
|
||||
// to call setTitleWithMnemonic: on OpenStep-compatible systems. Only
|
||||
// intended for use by views or cells which implement at least setTitle:
|
||||
// and possibly setTitleWithMnemonic: such as NSBox and NSButton or NSCell
|
||||
// classes, for example as used by wxRadioBox. Not usable with classes like
|
||||
// NSTextField which expect setStringValue:.
|
||||
static void CocoaSetLabelForObject(const wxString& labelWithWxMnemonic, struct objc_object *anObject);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -83,7 +83,7 @@ public:
|
||||
virtual void StartPage(void) {};
|
||||
virtual void EndPage(void) {};
|
||||
|
||||
virtual void SetFont(const wxFont& font);
|
||||
virtual void SetFont(const wxFont& font) {}
|
||||
virtual void SetPen(const wxPen& pen);
|
||||
virtual void SetBrush(const wxBrush& brush);
|
||||
virtual void SetBackground(const wxBrush& brush);
|
||||
|
@@ -73,8 +73,6 @@ private:
|
||||
// ========================================================================
|
||||
// wxMenuBar
|
||||
// ========================================================================
|
||||
// NOTE: wxCocoaNSMenu subclass is not needed but cannot be removed due to
|
||||
// ABI compatibility issues. It is removed in trunk (2.9)
|
||||
class WXDLLEXPORT wxMenuBar : public wxMenuBarBase, public wxCocoaNSMenu
|
||||
{
|
||||
public:
|
||||
|
@@ -1,28 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/cocoa/objc/NSMenu.h
|
||||
// Purpose: WXNSMenu class
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2007/04/20 (move from NSMenu.mm)
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2002 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_OBJC_NSMENU_H__
|
||||
#define __WX_COCOA_OBJC_NSMENU_H__
|
||||
|
||||
#import <AppKit/NSMenu.h>
|
||||
|
||||
// ============================================================================
|
||||
// @class WXNSMenu
|
||||
// ============================================================================
|
||||
@interface WXNSMenu : NSMenu
|
||||
{
|
||||
}
|
||||
|
||||
- (void)dealloc;
|
||||
|
||||
@end // WXNSMenu
|
||||
|
||||
#endif //ndef __WX_COCOA_OBJC_NSMENU_H__
|
@@ -1,45 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/cocoa/objc/NSView.h
|
||||
// Purpose: WXNSView class
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2007/04/20 (move from NSView.mm)
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_OBJC_NSVIEW_H__
|
||||
#define __WX_COCOA_OBJC_NSVIEW_H__
|
||||
|
||||
#include "wx/cocoa/objc/objc_uniquifying.h"
|
||||
|
||||
#import <AppKit/NSView.h>
|
||||
|
||||
// ============================================================================
|
||||
// @class WXNSView
|
||||
// ============================================================================
|
||||
@interface WXNSView : NSView
|
||||
{
|
||||
}
|
||||
|
||||
- (void)drawRect: (NSRect)rect;
|
||||
- (void)mouseDown:(NSEvent *)theEvent;
|
||||
- (void)mouseDragged:(NSEvent *)theEvent;
|
||||
- (void)mouseUp:(NSEvent *)theEvent;
|
||||
- (void)mouseMoved:(NSEvent *)theEvent;
|
||||
- (void)mouseEntered:(NSEvent *)theEvent;
|
||||
- (void)mouseExited:(NSEvent *)theEvent;
|
||||
- (void)rightMouseDown:(NSEvent *)theEvent;
|
||||
- (void)rightMouseDragged:(NSEvent *)theEvent;
|
||||
- (void)rightMouseUp:(NSEvent *)theEvent;
|
||||
- (void)otherMouseDown:(NSEvent *)theEvent;
|
||||
- (void)otherMouseDragged:(NSEvent *)theEvent;
|
||||
- (void)otherMouseUp:(NSEvent *)theEvent;
|
||||
- (void)resetCursorRects;
|
||||
- (void)viewDidMoveToWindow;
|
||||
- (void)viewWillMoveToWindow:(NSWindow *)newWindow;
|
||||
@end // WXNSView
|
||||
WX_DECLARE_GET_OBJC_CLASS(WXNSView,NSView)
|
||||
|
||||
#endif //ndef __WX_COCOA_OBJC_NSVIEW_H__
|
@@ -1,36 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/cocoa/objc/NSWindow.h
|
||||
// Purpose: WXNSWindow class
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2007/04/20 (move from NSWindow.mm)
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#import <AppKit/NSWindow.h>
|
||||
#import <AppKit/NSPanel.h>
|
||||
|
||||
// ============================================================================
|
||||
// @class WXNSWindow
|
||||
// ============================================================================
|
||||
@interface WXNSWindow : NSWindow
|
||||
{
|
||||
}
|
||||
|
||||
- (BOOL)canBecomeKeyWindow;
|
||||
- (BOOL)canBecomeMainWindow;
|
||||
@end // WXNSWindow
|
||||
|
||||
// ============================================================================
|
||||
// @class WXNSPanel
|
||||
// ============================================================================
|
||||
@interface WXNSPanel : NSPanel
|
||||
{
|
||||
}
|
||||
|
||||
- (BOOL)canBecomeKeyWindow;
|
||||
- (BOOL)canBecomeMainWindow;
|
||||
@end // WXNSPanel
|
||||
|
@@ -1,291 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/cocoa/objc/objc_uniquifying.h
|
||||
// Purpose: Allows wxWidgets code to get a direct pointer to a compiled
|
||||
// Objective-C class and provides a method to fix up the
|
||||
// name to include a unique identifier (currently the address
|
||||
// of the objc_class structure).
|
||||
// Author: David Elliott <dfe@cox.net>
|
||||
// Modified by:
|
||||
// Created: 2007/05/15
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2007 Software 2000 Ltd.
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_OBJC_CLASS_H__
|
||||
#define __WX_COCOA_OBJC_CLASS_H__
|
||||
|
||||
#if wxUSE_OBJC_UNIQUIFYING
|
||||
|
||||
// objc_getClass and stuff
|
||||
#include <objc/objc-runtime.h>
|
||||
|
||||
////////////// Objective-C uniquifying implementation //////////////
|
||||
|
||||
template <typename ObjcType>
|
||||
class wxObjcClassInitializer;
|
||||
|
||||
template <typename ObjcType>
|
||||
class UniquifiedName;
|
||||
|
||||
template <typename ObjcType>
|
||||
class wxObjcCompilerInformation
|
||||
{
|
||||
friend class wxObjcClassInitializer<ObjcType>;
|
||||
friend class UniquifiedName<ObjcType>;
|
||||
private:
|
||||
// GetCompiledClass must be partially specialized for an ObjcType
|
||||
// If you're not using it, implement an inline returning NULL
|
||||
inline static struct objc_class * GetCompiledClass();
|
||||
|
||||
// sm_theClassName must be partially specialized for each type
|
||||
static const char sm_theClassName[];
|
||||
|
||||
// GetSuperclass must be specialized. Typically one of two ways:
|
||||
// 1. objc_getClass("SomeRealClassName")
|
||||
// 2. wxGetObjcClass_SomeWxClassName();
|
||||
inline static struct objc_class *GetSuperclass();
|
||||
};
|
||||
|
||||
|
||||
template <typename ObjcType>
|
||||
struct UniquifiedName
|
||||
{
|
||||
// We're going for OriginalClassName@ClassStructureAddress
|
||||
// Therefore our size is the sizeof the original class name constant string (which includes the terminating NULL)
|
||||
// plus the sizeof a pointer to struct objc_class times two (two hex digits for each byte) plus 3 for "@0x"
|
||||
typedef char Type[sizeof(wxObjcCompilerInformation<ObjcType>::sm_theClassName) + (sizeof(struct objc_class*)<<1) + 3];
|
||||
static void Init(Type m_theString, const objc_class *aClass)
|
||||
{
|
||||
snprintf(const_cast<char*>(m_theString), sizeof(Type), "%s@%p", wxObjcCompilerInformation<ObjcType>::sm_theClassName, aClass);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename ObjcType>
|
||||
class wxObjcClassInitializer
|
||||
{
|
||||
public:
|
||||
static struct objc_class* Get()
|
||||
{
|
||||
static wxObjcClassInitializer<ObjcType> s_theInstance;
|
||||
s_theInstance.noop(); // Make the compiler think we need this instance
|
||||
return wxObjcCompilerInformation<ObjcType>::GetCompiledClass();
|
||||
}
|
||||
private:
|
||||
void noop()
|
||||
{}
|
||||
// This "constructor" operates solely on static data
|
||||
// It exists so that we can take advantage of a function-static
|
||||
// "instance" of this class to do the static data initialization.
|
||||
wxObjcClassInitializer()
|
||||
{
|
||||
// Objective-C class initialization occurs before C++ static initialization because the
|
||||
// libobjc.dylib gets notified directly by dyld on Tiger.
|
||||
// Therefore, even though we change the name, the class is still registered with the
|
||||
// original name. We unfortunately can't change that.
|
||||
|
||||
// The first time the class is loaded, Objective-C will already have fixed up the super_class
|
||||
// and isa->isa and isa->super_class variables so much of this won't do anything. But
|
||||
// the next time the class is loaded, Objective-C will ignore it and thus we need to
|
||||
// initialize the data structures appropriately.
|
||||
|
||||
// Ideally we'd have some sort of lock here, but we depend on the fact that we get called
|
||||
// just before the first time someone wants to send a class message so it should be
|
||||
// reasonably safe to do this without any locks.
|
||||
|
||||
struct objc_class &theClassData = *wxObjcCompilerInformation<ObjcType>::GetCompiledClass();
|
||||
// Initialize the uniquified class name
|
||||
UniquifiedName<ObjcType>::Init(sm_theUniquifiedClassName, &theClassData);
|
||||
|
||||
//////// Class Initialization ////////
|
||||
// Use objc_getClass to fix up the superclass pointer
|
||||
theClassData.super_class = wxObjcCompilerInformation<ObjcType>::GetSuperclass();
|
||||
// Fix up the compiler generated class struct to use the new name
|
||||
theClassData.name = sm_theUniquifiedClassName;
|
||||
|
||||
//////// Meta-Class Initialization ////////
|
||||
// theClassData.isa is the metaclass pointer
|
||||
// Globals on Darwin use PC-relative access (slow) so it's quicker to use theClassData.isa
|
||||
|
||||
// In any object hierarchy a metaclass's metaclass is always the root class's metaclass
|
||||
// Therefore, our superclass's metaclass's metaclass should already be the root class's metaclass
|
||||
theClassData.isa->isa = theClassData.super_class->isa->isa;
|
||||
// A metaclass's superclass is always the superclass's metaclass.
|
||||
theClassData.isa->super_class = theClassData.super_class->isa;
|
||||
// Fix up the compiler generated metaclass struct to use the new name
|
||||
theClassData.isa->name = sm_theUniquifiedClassName;
|
||||
|
||||
// We need to set the initialized flag because after we change the name, Objective-C can't
|
||||
// look us up by name because we're only registered with the original name.
|
||||
theClassData.isa->info |= CLS_INITIALIZED;
|
||||
}
|
||||
wxObjcClassInitializer(const wxObjcClassInitializer&); // NO COPY
|
||||
wxObjcClassInitializer& operator =(const wxObjcClassInitializer&); // NO ASSIGN
|
||||
static typename UniquifiedName<ObjcType>::Type sm_theUniquifiedClassName;
|
||||
};
|
||||
|
||||
template<typename ObjcType>
|
||||
typename UniquifiedName<ObjcType>::Type wxObjcClassInitializer<ObjcType>::sm_theUniquifiedClassName;
|
||||
|
||||
// WX_DECLARE_GET_OBJC_CLASS
|
||||
// Declares a function to get a direct pointer to an objective-C class.
|
||||
// The class is guaranteed to be usable.
|
||||
// When wxCocoa is built into a Mach-O bundle this function allows the wxCocoa
|
||||
// code to get a reference to the Objective-C class structure located in the
|
||||
// same bundle. This allows a static wxCocoa library to be built into
|
||||
// two different Mach-O bundles without having one bundle's Objective-C
|
||||
// classes trample on the other's.
|
||||
// Right now we toss the ObjcSuperClass parameter, but we might use it later.
|
||||
#define WX_DECLARE_GET_OBJC_CLASS(ObjcClass,ObjcSuperClass) \
|
||||
struct objc_class* wx_GetObjcClass_ ## ObjcClass();
|
||||
|
||||
// WX_IMPLEMENT_OBJC_GET_COMPILED_CLASS(ObjcClass)
|
||||
// Provides an architecture-dependent way to get the direct pointer to the
|
||||
// objc_class structure in the __OBJC segment.
|
||||
// This takes advantage of the fact that the Objective-C compiler uses guessable
|
||||
// local assembler labels for the class structures.
|
||||
// Those class structures are only available on the Objective-C file containing the
|
||||
// @implementation block.
|
||||
|
||||
#if 1
|
||||
// Generic implementation - Tested on i386 and PPC. Should work in all cases.
|
||||
// This is a hack that depends on GCC asm symbol names.
|
||||
// The static variable winds up being initialized with a direct reference to the appropriate
|
||||
// L_OBJC_CLASS and no global symbol reference is generated because nothing uses the global symbol
|
||||
// except for the static initializer which does it directly.
|
||||
// The generated assembler for s_objc_class_ptr is basically like this:
|
||||
// _s_objc_class_ptr_ObjcClass:
|
||||
// .long L_OBJC_CLASS_ObjcClass
|
||||
// Once that static symbol is defined, the function implementation is easy for GCC to generate.
|
||||
// Do note that return &s_objc_class_data_ObjcClass won't work. The code is wrong in the case.
|
||||
#define WX_IMPLEMENT_OBJC_GET_COMPILED_CLASS(ObjcClass) \
|
||||
extern "C" objc_class s_objc_class_data_ ## ObjcClass asm("L_OBJC_CLASS_" #ObjcClass); \
|
||||
static objc_class * s_objc_class_ptr_ ## ObjcClass = &s_objc_class_data_ ## ObjcClass; \
|
||||
template<> \
|
||||
inline objc_class * wxObjcCompilerInformation<ObjcClass>::GetCompiledClass() \
|
||||
{ \
|
||||
return s_objc_class_ptr_## ObjcClass; \
|
||||
}
|
||||
|
||||
#elif defined(__i386__)
|
||||
// Not used because the generic implementation seems to work fine.
|
||||
// But this is here since it was written beforehand and it also works.
|
||||
|
||||
// This is based on the code GCC generates for accessing file-static data on i386.
|
||||
// The i386 PC-relative addressing happens in this manner
|
||||
// 1. The program counter is placed into ecx using the code that GCC should have
|
||||
// already generated.
|
||||
// 2. A label is placed directly after the call to get the program counter.
|
||||
// 3. The Load Effective Address instruction is used to add the offset of the
|
||||
// local assembler label we're interested in minus the local assembler label
|
||||
// from step 2 to the program counter register in ecx and place the result
|
||||
// into the result register (typically eax if not inlined).
|
||||
#define WX_IMPLEMENT_OBJC_GET_COMPILED_CLASS(ObjcClass) \
|
||||
template<> \
|
||||
inline objc_class * wxObjcCompilerInformation<ObjcClass>::GetCompiledClass() \
|
||||
{ \
|
||||
register struct objc_class *retval; \
|
||||
asm \
|
||||
( "call ___i686.get_pc_thunk.cx\n" \
|
||||
"\"LPC_FOR_GET_CLASS_" #ObjcClass "\":\n\t" \
|
||||
"leal L_OBJC_CLASS_" #ObjcClass "-\"LPC_FOR_GET_CLASS_" #ObjcClass "\"(%%ecx), %0" \
|
||||
: "=r"(retval) \
|
||||
: \
|
||||
: "ecx" \
|
||||
); \
|
||||
return retval; \
|
||||
}
|
||||
|
||||
#elif defined(__ppc__)
|
||||
// Not used because the generic implementation seems to work fine.
|
||||
// But this is here since it was written beforehand and it also works.
|
||||
|
||||
// This is based on the code GCC generates for accessing file-static data on PPC.
|
||||
// The PowerPC PC-relative addressing happens in this manner
|
||||
// 1. The link register is saved (mflr) to a temporary (we re-use the output register for this)
|
||||
// 2. An unconditional branch instruction (bcl) "branches" to the following address (labeled)
|
||||
// 3. The link register (filled in by bcl) is saved to r10 (a temporary)
|
||||
// 4. The previous link register is restored (mtlr) (from the output register we were using as a temporary)
|
||||
// 5. The address of the LPC label as executed is added to the high 16 bits of the offset between that label and the static data we want
|
||||
// and stored in a temporary register (r2)
|
||||
// 6. That temporary register plus the low 16 bits of the offset are stored into the result register.
|
||||
#define WX_IMPLEMENT_OBJC_GET_COMPILED_CLASS(ObjcClass) \
|
||||
template<> \
|
||||
inline objc_class * wxObjcCompilerInformation<ObjcClass>::GetCompiledClass() \
|
||||
{ \
|
||||
register struct objc_class *retval; \
|
||||
asm \
|
||||
( "mflr %0" \
|
||||
"\n\tbcl 20, 31, \"LPC_FOR_GET_CLASS_" #ObjcClass "\"" \
|
||||
"\n\"LPC_FOR_GET_CLASS_" #ObjcClass "\":" \
|
||||
"\n\tmflr r10" \
|
||||
"\n\tmtlr %0" \
|
||||
"\n\taddis r2,r10,ha16(L_OBJC_CLASS_" #ObjcClass "-\"LPC_FOR_GET_CLASS_" #ObjcClass "\")" \
|
||||
"\n\tla %0,lo16(L_OBJC_CLASS_" #ObjcClass "-\"LPC_FOR_GET_CLASS_" #ObjcClass "\")(r2)" \
|
||||
: "=r" (retval) \
|
||||
: \
|
||||
: "r10","r2" \
|
||||
); \
|
||||
return retval; \
|
||||
}
|
||||
|
||||
// TODO: __x86_64__, __ppc64__
|
||||
#else // Can't wrie inline asm to bust into __OBJC segment
|
||||
// This won't be used since the generic implementation takes precedence.
|
||||
|
||||
#warning "Don't know how to implement wxObjcCompilerInformation<ObjcClass>::GetCompiledClass on this platform"
|
||||
|
||||
#endif // platforms
|
||||
|
||||
// The WX_IMPLEMENT_OBJC_GET_SUPERCLASS macro implements the template specialization
|
||||
// to get the superclass. This only works if it's a real superclass. If you are
|
||||
// deriving from a class that's already being uniquified then you'd need to
|
||||
// implement the specialization to call the appropriate get method instead.
|
||||
#define WX_IMPLEMENT_OBJC_GET_SUPERCLASS(ObjcClass,ObjcSuperClass) \
|
||||
template <> \
|
||||
inline objc_class* wxObjcCompilerInformation<ObjcClass>::GetSuperclass() \
|
||||
{ \
|
||||
return objc_getClass(#ObjcSuperClass); \
|
||||
}
|
||||
|
||||
// The WX_IMPLEMENT_OBJC_CLASS_NAME macro implements the template specialization
|
||||
// of the sm_theClassName constant. As soon as this specialization is in place
|
||||
// sizeof(sm_theClassName) will return the number of bytes at compile time.
|
||||
#define WX_IMPLEMENT_OBJC_CLASS_NAME(ObjcClass) \
|
||||
template <> \
|
||||
const char wxObjcCompilerInformation<ObjcClass>::sm_theClassName[] = #ObjcClass;
|
||||
|
||||
// The WX_IMPLEMENT_GET_OBJC_CLASS macro combines all of these together and adds
|
||||
// a global wx_GetObjcClass_ObjcClass() function.
|
||||
#define WX_IMPLEMENT_GET_OBJC_CLASS(ObjcClass,ObjcSuperClass) \
|
||||
WX_IMPLEMENT_OBJC_GET_COMPILED_CLASS(ObjcClass) \
|
||||
WX_IMPLEMENT_OBJC_GET_SUPERCLASS(ObjcClass,ObjcSuperClass) \
|
||||
WX_IMPLEMENT_OBJC_CLASS_NAME(ObjcClass) \
|
||||
objc_class* wx_GetObjcClass_ ## ObjcClass() \
|
||||
{ \
|
||||
return wxObjcClassInitializer<ObjcClass>::Get(); \
|
||||
}
|
||||
|
||||
// The WX_GET_OBJC_CLASS macro is intended to wrap the class name when the class
|
||||
// is used as a message receiver (e.g. for calling class methods). When
|
||||
// class name uniquifying is used, this calls the global function implemented
|
||||
// in the Objective-C file containing the class @implementation.
|
||||
#define WX_GET_OBJC_CLASS(ObjcClass) wx_GetObjcClass_ ## ObjcClass()
|
||||
|
||||
#else // wxUSE_OBJC_UNIQUIFYING
|
||||
|
||||
// Define WX_DECLARE_GET_OBJC_CLASS as nothing
|
||||
#define WX_DECLARE_GET_OBJC_CLASS(ObjcClass,ObjcSuperClass)
|
||||
// Define WX_IMPLEMENT_GET_OBJC_CLASS as nothing
|
||||
#define WX_IMPLEMENT_GET_OBJC_CLASS(ObjcClass,ObjcSuperClass)
|
||||
|
||||
// Define WX_GET_OBJC_CLASS macro to output the class name and let the compiler do the normal thing
|
||||
// The WX_GET_OBJC_CLASS macro is intended to wrap the class name when the class
|
||||
// is used as a message receiver (e.g. for calling class methods). When
|
||||
// class name uniquifying is not used, this is simply defined to be the class
|
||||
// name which will allow the compiler to do the normal thing.
|
||||
#define WX_GET_OBJC_CLASS(ObjcClass) ObjcClass
|
||||
|
||||
#endif // wxUSE_OBJC_UNIQUIFYING
|
||||
|
||||
#endif //ndef __WX_COCOA_OBJC_CLASS_H__
|
@@ -61,7 +61,7 @@ public:
|
||||
wxBitmap *GetStipple() const;
|
||||
|
||||
WX_NSColor GetNSColor();
|
||||
int GetCocoaLineDash(const CGFloat **pattern);
|
||||
int GetCocoaLineDash(const float **pattern);
|
||||
};
|
||||
|
||||
#endif // __WX_COCOA_PEN_H__
|
||||
|
@@ -13,7 +13,6 @@
|
||||
#define __WX_COCOA_RADIOBOX_H__
|
||||
|
||||
// #include "wx/cocoa/NSButton.h"
|
||||
DECLARE_WXCOCOA_OBJC_CLASS(NSMatrix);
|
||||
|
||||
// ========================================================================
|
||||
// wxRadioBox
|
||||
@@ -22,9 +21,7 @@ class WXDLLEXPORT wxRadioBox: public wxControl, public wxRadioBoxBase// , protec
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||
DECLARE_EVENT_TABLE()
|
||||
// NOTE: We explicitly skip NSControl because our primary cocoa view is
|
||||
// the NSBox but we want to receive action messages from the NSMatrix.
|
||||
WX_DECLARE_COCOA_OWNER(NSBox,NSView,NSView)
|
||||
// WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView)
|
||||
// ------------------------------------------------------------------------
|
||||
// initialization
|
||||
// ------------------------------------------------------------------------
|
||||
@@ -95,7 +92,6 @@ public:
|
||||
protected:
|
||||
// Static boxes cannot be enabled/disabled
|
||||
virtual void CocoaSetEnabled(bool enable) { }
|
||||
virtual void CocoaTarget_action(void);
|
||||
// ------------------------------------------------------------------------
|
||||
// Implementation
|
||||
// ------------------------------------------------------------------------
|
||||
@@ -110,29 +106,7 @@ public:
|
||||
virtual void SetString(unsigned int n, const wxString& label);
|
||||
// change the individual radio button state
|
||||
protected:
|
||||
// We don't want the typical wxCocoaNSBox behavior because our real
|
||||
// implementation is by using an NSMatrix as the NSBox's contentView.
|
||||
WX_NSMatrix GetNSMatrix() const;
|
||||
void AssociateNSBox(WX_NSBox theBox);
|
||||
void DisassociateNSBox(WX_NSBox theBox);
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
int GetRowForIndex(int n) const
|
||||
{
|
||||
if(m_windowStyle & wxRA_SPECIFY_COLS)
|
||||
return n / GetMajorDim();
|
||||
else
|
||||
return n % GetMajorDim();
|
||||
}
|
||||
|
||||
int GetColumnForIndex(int n) const
|
||||
{
|
||||
if(m_windowStyle & wxRA_SPECIFY_COLS)
|
||||
return n % GetMajorDim();
|
||||
else
|
||||
return n / GetMajorDim();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // __WX_COCOA_RADIOBOX_H__
|
||||
|
@@ -56,8 +56,6 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
protected:
|
||||
virtual void Cocoa_wxNSButtonAction(void);
|
||||
private:
|
||||
void Cocoa_DeselectOtherButtonsInTheGroup(void);
|
||||
// ------------------------------------------------------------------------
|
||||
// Implementation
|
||||
// ------------------------------------------------------------------------
|
||||
|
@@ -14,11 +14,7 @@
|
||||
|
||||
#include "wx/generic/region.h"
|
||||
|
||||
#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
|
||||
typedef struct CGRect NSRect;
|
||||
#else
|
||||
typedef struct _NSRect NSRect;
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT wxRegion : public wxRegionGeneric
|
||||
{
|
||||
|
@@ -41,9 +41,6 @@ public:
|
||||
long style = 0, const wxString& name = wxStaticBoxNameStr);
|
||||
virtual ~wxStaticBox();
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxString GetLabel() const;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Cocoa callbacks
|
||||
// ------------------------------------------------------------------------
|
||||
|
@@ -52,8 +52,8 @@ protected:
|
||||
// Implementation
|
||||
// ------------------------------------------------------------------------
|
||||
public:
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxString GetLabel() const;
|
||||
void SetLabel(const wxString& label);
|
||||
};
|
||||
|
||||
#endif // __WX_COCOA_STATTEXT_H__
|
||||
#endif
|
||||
// __WX_COCOA_STATTEXT_H__
|
||||
|
@@ -17,12 +17,7 @@
|
||||
// ========================================================================
|
||||
// wxToolBar
|
||||
// ========================================================================
|
||||
#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
|
||||
typedef struct CGPoint NSPoint;
|
||||
#else
|
||||
typedef struct _NSPoint NSPoint;
|
||||
#endif
|
||||
|
||||
class wxToolBarTool;
|
||||
|
||||
class wxToolBar : public wxToolBarBase
|
||||
|
@@ -106,8 +106,6 @@ public:
|
||||
virtual void SetTitle( const wxString& title);
|
||||
virtual wxString GetTitle() const;
|
||||
|
||||
// Default button (item)
|
||||
wxWindow *SetDefaultItem(wxWindow *win);
|
||||
|
||||
// Things I may/may not do
|
||||
// virtual void SetIcon(const wxIcon& icon);
|
||||
|
@@ -1,38 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/cocoa/trackingrectmanager.h
|
||||
// Purpose: wxCocoaTrackingRectManager
|
||||
// Notes: Source in window.mm
|
||||
// Author: David Elliott <dfe@cox.net>
|
||||
// Modified by:
|
||||
// Created: 2007/05/02
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2007 Software 2000 Ltd.
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef __WX_COCOA_TRACKINGRECTMANAGER_H__
|
||||
#define __WX_COCOA_TRACKINGRECTMANAGER_H__
|
||||
|
||||
#include <CoreFoundation/CFRunLoop.h>
|
||||
|
||||
class wxCocoaTrackingRectManager
|
||||
{
|
||||
DECLARE_NO_COPY_CLASS(wxCocoaTrackingRectManager)
|
||||
public:
|
||||
wxCocoaTrackingRectManager(wxWindow *window);
|
||||
void ClearTrackingRect();
|
||||
void BuildTrackingRect();
|
||||
void RebuildTrackingRect();
|
||||
bool IsOwnerOfEvent(NSEvent *anEvent);
|
||||
~wxCocoaTrackingRectManager();
|
||||
void BeginSynthesizingEvents();
|
||||
void StopSynthesizingEvents();
|
||||
protected:
|
||||
wxWindow *m_window;
|
||||
bool m_isTrackingRectActive;
|
||||
int m_trackingRectTag;
|
||||
CFRunLoopObserverRef m_runLoopObserver;
|
||||
private:
|
||||
wxCocoaTrackingRectManager();
|
||||
};
|
||||
|
||||
#endif // ndef __WX_COCOA_TRACKINGRECTMANAGER_H__
|
@@ -22,7 +22,6 @@ DECLARE_WXCOCOA_OBJC_CLASS(NSAffineTransform);
|
||||
|
||||
class wxWindowCocoaHider;
|
||||
class wxWindowCocoaScrollView;
|
||||
class wxCocoaTrackingRectManager;
|
||||
|
||||
// ========================================================================
|
||||
// wxWindowCocoa
|
||||
@@ -34,7 +33,6 @@ class WXDLLEXPORT wxWindowCocoa: public wxWindowBase, protected wxCocoaNSView
|
||||
DECLARE_EVENT_TABLE()
|
||||
friend wxWindow *wxWindowBase::GetCapture();
|
||||
friend class wxWindowCocoaScrollView;
|
||||
friend class wxCocoaTrackingRectManager;
|
||||
// ------------------------------------------------------------------------
|
||||
// initialization
|
||||
// ------------------------------------------------------------------------
|
||||
@@ -95,11 +93,6 @@ protected:
|
||||
void InitMouseEvent(wxMouseEvent &event, WX_NSEvent cocoaEvent);
|
||||
virtual wxWindow* GetWxWindow() const;
|
||||
virtual void Cocoa_FrameChanged(void);
|
||||
#if 0 // ABI incompatibility
|
||||
virtual void Cocoa_synthesizeMouseMoved(void);
|
||||
#else
|
||||
void Cocoa_synthesizeMouseMoved(void);
|
||||
#endif
|
||||
virtual bool Cocoa_drawRect(const NSRect &rect);
|
||||
virtual bool Cocoa_mouseDown(WX_NSEvent theEvent);
|
||||
virtual bool Cocoa_mouseDragged(WX_NSEvent theEvent);
|
||||
@@ -114,18 +107,11 @@ protected:
|
||||
virtual bool Cocoa_otherMouseDragged(WX_NSEvent theEvent);
|
||||
virtual bool Cocoa_otherMouseUp(WX_NSEvent theEvent);
|
||||
virtual bool Cocoa_resetCursorRects();
|
||||
#if 0 // ABI incompatibility
|
||||
virtual bool Cocoa_viewDidMoveToWindow();
|
||||
virtual bool Cocoa_viewWillMoveToWindow(WX_NSWindow newWindow);
|
||||
#endif
|
||||
void SetNSView(WX_NSView cocoaNSView);
|
||||
WX_NSView m_cocoaNSView;
|
||||
wxWindowCocoaHider *m_cocoaHider;
|
||||
wxWindowCocoaScrollView *m_wxCocoaScrollView;
|
||||
bool m_isInPaint;
|
||||
#if 0 // ABI incompatibility
|
||||
wxCocoaTrackingRectManager *m_visibleTrackingRectManager;
|
||||
#endif
|
||||
static wxWindow *sm_capturedWindow;
|
||||
virtual void CocoaReplaceView(WX_NSView oldView, WX_NSView newView);
|
||||
void SetInitialFrameRect(const wxPoint& pos, const wxSize& size);
|
||||
@@ -155,8 +141,6 @@ public:
|
||||
virtual void SetFocus();
|
||||
// Warp the pointer the given position
|
||||
virtual void WarpPointer(int x_pos, int y_pos) ;
|
||||
// Change the window's cursor
|
||||
virtual bool SetCursor( const wxCursor &cursor );
|
||||
// Send the window a refresh event
|
||||
virtual void Refresh(bool eraseBack = true, const wxRect *rect = NULL);
|
||||
// Set/get the window's font
|
||||
|
@@ -1678,7 +1678,7 @@ inline time_t wxDateTime::GetTicks() const
|
||||
return (time_t)-1;
|
||||
}
|
||||
|
||||
return (time_t)((m_time / (long)TIME_T_FACTOR).ToLong()) + WX_TIME_BASE_OFFSET;
|
||||
return (time_t)((m_time / (long)TIME_T_FACTOR).GetLo())+WX_TIME_BASE_OFFSET ;
|
||||
}
|
||||
|
||||
inline bool wxDateTime::SetToLastWeekDay(WeekDay weekday,
|
||||
|
@@ -1035,7 +1035,11 @@ typedef float wxFloat32;
|
||||
typedef double wxFloat64;
|
||||
#endif
|
||||
|
||||
typedef double wxDouble;
|
||||
#if defined( __WXMAC__ ) && !defined( __POWERPC__ )
|
||||
typedef long double wxDouble;
|
||||
#else
|
||||
typedef double wxDouble;
|
||||
#endif
|
||||
|
||||
/*
|
||||
Some (non standard) compilers typedef wchar_t as an existing type instead
|
||||
@@ -1295,8 +1299,7 @@ enum wxBorder
|
||||
wxBORDER_SIMPLE = 0x02000000,
|
||||
wxBORDER_RAISED = 0x04000000,
|
||||
wxBORDER_SUNKEN = 0x08000000,
|
||||
wxBORDER_DOUBLE = 0x10000000, /* deprecated */
|
||||
wxBORDER_THEME = 0x10000000,
|
||||
wxBORDER_DOUBLE = 0x10000000,
|
||||
|
||||
/* a mask to extract border style from the combination of flags */
|
||||
wxBORDER_MASK = 0x1f200000
|
||||
@@ -2416,36 +2419,6 @@ typedef void* WXDisplay;
|
||||
|
||||
#ifdef __WXCOCOA__
|
||||
|
||||
/* Definitions of 32-bit/64-bit types
|
||||
* These are typedef'd exactly the same way in newer OS X headers so
|
||||
* redefinition when real headers are included should not be a problem. If
|
||||
* it is, the types are being defined wrongly here.
|
||||
* The purpose of these types is so they can be used from public wx headers.
|
||||
* and also because the older (pre-Leopard) headers don't define them.
|
||||
*/
|
||||
|
||||
/* NOTE: We don't pollute namespace with CGFLOAT_MIN/MAX/IS_DOUBLE macros
|
||||
* since they are unlikely to be needed in a public header.
|
||||
*/
|
||||
#if defined(__LP64__) && __LP64__
|
||||
typedef double CGFloat;
|
||||
#else
|
||||
typedef float CGFloat;
|
||||
#endif
|
||||
|
||||
#if (defined(__LP64__) && __LP64__) || (defined(NS_BUILD_32_LIKE_64) && NS_BUILD_32_LIKE_64)
|
||||
typedef long NSInteger;
|
||||
typedef unsigned long NSUInteger;
|
||||
#else
|
||||
typedef int NSInteger;
|
||||
typedef unsigned int NSUInteger;
|
||||
#endif
|
||||
|
||||
/* Objective-C type declarations.
|
||||
* These are to be used in public headers in lieu of NSSomething* because
|
||||
* Objective-C class names are not available in C/C++ code.
|
||||
*/
|
||||
|
||||
/* NOTE: This ought to work with other compilers too, but I'm being cautious */
|
||||
#if (defined(__GNUC__) && defined(__APPLE__)) || defined(__MWERKS__)
|
||||
/* It's desirable to have type safety for Objective-C(++) code as it does
|
||||
|
@@ -141,22 +141,8 @@ public:
|
||||
virtual void SetDocumentTemplate(wxDocTemplate *temp) { m_documentTemplate = temp; }
|
||||
|
||||
// Get title, or filename if no title, else [unnamed]
|
||||
//
|
||||
// NB: this method will be deprecated in wxWidgets 3.0, you still need to
|
||||
// override it if you need to modify the existing behaviour in this
|
||||
// version but use GetUserReadableName() below if you just need to call
|
||||
// it
|
||||
virtual bool GetPrintableName(wxString& buf) const;
|
||||
|
||||
#if wxABI_VERSION >= 20805
|
||||
wxString GetUserReadableName() const
|
||||
{
|
||||
wxString s;
|
||||
GetPrintableName(s);
|
||||
return s;
|
||||
}
|
||||
#endif // wxABI 2.8.5+
|
||||
|
||||
// Returns a window that can be used as a parent for document-related
|
||||
// dialogs. Override if necessary.
|
||||
virtual wxWindow *GetDocumentWindow() const;
|
||||
|
@@ -35,14 +35,6 @@ public:
|
||||
// name "memory:" + filename
|
||||
static void AddFile(const wxString& filename, const wxString& textdata);
|
||||
static void AddFile(const wxString& filename, const void *binarydata, size_t size);
|
||||
#if wxABI_VERSION >= 20805
|
||||
static void AddFileWithMimeType(const wxString& filename,
|
||||
const wxString& textdata,
|
||||
const wxString& mimetype);
|
||||
static void AddFileWithMimeType(const wxString& filename,
|
||||
const void *binarydata, size_t size,
|
||||
const wxString& mimetype);
|
||||
#endif // wxABI_VERSION >= 20805
|
||||
|
||||
// Remove file from memory FS and free occupied memory
|
||||
static void RemoveFile(const wxString& filename);
|
||||
@@ -81,24 +73,6 @@ public:
|
||||
{
|
||||
wxMemoryFSHandlerBase::AddFile(filename, binarydata, size);
|
||||
}
|
||||
#if wxABI_VERSION >= 20805
|
||||
static void AddFileWithMimeType(const wxString& filename,
|
||||
const wxString& textdata,
|
||||
const wxString& mimetype)
|
||||
{
|
||||
wxMemoryFSHandlerBase::AddFileWithMimeType(filename,
|
||||
textdata,
|
||||
mimetype);
|
||||
}
|
||||
static void AddFileWithMimeType(const wxString& filename,
|
||||
const void *binarydata, size_t size,
|
||||
const wxString& mimetype)
|
||||
{
|
||||
wxMemoryFSHandlerBase::AddFileWithMimeType(filename,
|
||||
binarydata, size,
|
||||
mimetype);
|
||||
}
|
||||
#endif // wxABI_VERSION >= 20805
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
static void AddFile(const wxString& filename,
|
||||
|
@@ -58,12 +58,6 @@ public:
|
||||
virtual wxSizer *GetPageAreaSizer() const;
|
||||
virtual void SetBorder(int border);
|
||||
|
||||
/// set/get bitmap
|
||||
#if wxABI_VERSION >= 20805
|
||||
const wxBitmap& GetBitmap() const { return m_bitmap; }
|
||||
void SetBitmap(const wxBitmap& bitmap);
|
||||
#endif
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
|
@@ -36,8 +36,7 @@
|
||||
\
|
||||
virtual bool Destroy() \
|
||||
{ \
|
||||
if (m_dialog) \
|
||||
m_dialog->Destroy(); \
|
||||
m_dialog->Destroy(); \
|
||||
return wxButton::Destroy(); \
|
||||
} \
|
||||
\
|
||||
|
@@ -25,14 +25,15 @@ extern "C" {
|
||||
// classes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_GL wxGLCanvas;
|
||||
class WXDLLEXPORT wxGLContext;
|
||||
class WXDLLEXPORT wxGLCanvas;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxGLContext
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
class WXDLLIMPEXP_GL wxGLContext: public wxObject
|
||||
class WXDLLEXPORT wxGLContext: public wxObject
|
||||
{
|
||||
public:
|
||||
wxGLContext(wxWindow* win, const wxGLContext* other=NULL /* for sharing display lists */);
|
||||
@@ -54,7 +55,7 @@ private:
|
||||
// wxGLCanvas
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_GL wxGLCanvas: public wxWindow
|
||||
class WXDLLEXPORT wxGLCanvas: public wxWindow
|
||||
{
|
||||
public:
|
||||
// This ctor is identical to the next, except for the fact that it
|
||||
|
@@ -33,7 +33,7 @@
|
||||
#include "wx/font.h"
|
||||
|
||||
// convert the text in given encoding to UTF-8 used by wxGTK
|
||||
WXDLLIMPEXP_CORE extern wxCharBuffer
|
||||
extern wxCharBuffer
|
||||
wxConvertToGTK(const wxString& s,
|
||||
wxFontEncoding enc = wxFONTENCODING_SYSTEM);
|
||||
|
||||
|
@@ -256,13 +256,6 @@ public:
|
||||
// return page setting data objects.
|
||||
// (You can set their parameters.)
|
||||
|
||||
#if wxABI_VERSION >= 20805
|
||||
wxWindow* GetParentWindow() const { return m_ParentWindow; }
|
||||
// get the parent window
|
||||
void SetParentWindow(wxWindow* window) { m_ParentWindow = window; }
|
||||
// set the parent window
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual wxHtmlPrintout *CreatePrintout();
|
||||
virtual bool DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *printout2);
|
||||
|
@@ -176,14 +176,9 @@ public:
|
||||
// Set log level. Log messages with level > logLevel will not be logged.
|
||||
static void SetLogLevel(wxLogLevel logLevel) { ms_logLevel = logLevel; }
|
||||
|
||||
#if wxABI_VERSION >= 20805 /* 2.8.5+ only */
|
||||
// should GetActiveTarget() try to create a new log object if the
|
||||
// current is NULL?
|
||||
static void DontCreateOnDemand();
|
||||
#endif
|
||||
|
||||
// Make GetActiveTarget() create a new log object again.
|
||||
static void DoCreateOnDemand();
|
||||
|
||||
// log the count of repeating messages instead of logging the messages
|
||||
// multiple times
|
||||
@@ -420,11 +415,6 @@ public:
|
||||
// override base class version to flush the old logger as well
|
||||
virtual void Flush();
|
||||
|
||||
// call to avoid destroying the old log target
|
||||
#if wxABI_VERSION >= 20805 /* 2.8.5+ only */
|
||||
void DetachOldLog() { m_logOld = NULL; }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
// pass the chain to the old logger if needed
|
||||
virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t);
|
||||
|
@@ -310,7 +310,6 @@ protected:
|
||||
|
||||
virtual bool MacIsChildOfClientArea( const wxWindow* child ) const ;
|
||||
|
||||
bool MacHasScrollBarCorner() const;
|
||||
void MacCreateScrollBars( long style ) ;
|
||||
void MacRepositionScrollBars() ;
|
||||
void MacUpdateControlFont() ;
|
||||
|
@@ -17,20 +17,7 @@
|
||||
#ifndef _WX_MAC_COREFOUNDATION_CFREF_H__
|
||||
#define _WX_MAC_COREFOUNDATION_CFREF_H__
|
||||
|
||||
// #include <CoreFoundation/CFBase.h>
|
||||
/* Don't include CFBase.h such that this header can be included from public
|
||||
* headers with minimal namespace pollution.
|
||||
* Note that Darwin CF uses extern for CF_EXPORT. If we need this on Win32
|
||||
* or non-Darwin Mac OS we'll need to define the appropriate __declspec.
|
||||
*/
|
||||
extern "C" {
|
||||
typedef const void *CFTypeRef;
|
||||
extern /* CF_EXPORT */
|
||||
CFTypeRef CFRetain(CFTypeRef cf);
|
||||
extern /* CF_EXPORT */
|
||||
void CFRelease(CFTypeRef cf);
|
||||
} // extern "C"
|
||||
|
||||
#include <CoreFoundation/CFBase.h>
|
||||
|
||||
/*! @function wxCFRelease
|
||||
@abstract A CFRelease variant that checks for NULL before releasing.
|
||||
@@ -58,92 +45,6 @@ inline Type* wxCFRetain(Type *r)
|
||||
return r;
|
||||
}
|
||||
|
||||
template <class refType>
|
||||
class wxCFRef;
|
||||
|
||||
/*! @class wxCFWeakRef
|
||||
@templatefield refType The CF reference type (e.g. CFStringRef, CFRunLoopRef, etc.)
|
||||
It should already be a pointer. This is different from
|
||||
shared_ptr where the template parameter is the pointee type.
|
||||
@discussion Wraps a raw pointer without any retain or release.
|
||||
Provides a way to get what amounts to a raw pointer from a wxCFRef without
|
||||
using a raw pointer. Unlike a raw pointer, constructing a wxCFRef from this
|
||||
class will cause it to be retained because it is assumed that a wxCFWeakRef
|
||||
does not own its pointer.
|
||||
*/
|
||||
template <class refType>
|
||||
class wxCFWeakRef
|
||||
{
|
||||
template <class refTypeA, class otherRefType>
|
||||
friend wxCFWeakRef<refTypeA> static_cfref_cast(const wxCFRef<otherRefType> &otherRef);
|
||||
public:
|
||||
/*! @method wxCFWeakRef
|
||||
@abstract Creates a NULL reference
|
||||
*/
|
||||
wxCFWeakRef()
|
||||
: m_ptr(NULL)
|
||||
{}
|
||||
|
||||
// Default copy constructor is fine.
|
||||
// Default destructor is fine but we'll set NULL to avoid bugs
|
||||
~wxCFWeakRef()
|
||||
{ m_ptr = NULL; }
|
||||
|
||||
// Do not implement a raw-pointer constructor.
|
||||
|
||||
/*! @method wxCFWeakRef
|
||||
@abstract Copies another ref holder where its type can be converted to ours
|
||||
@templatefield otherRefType Any type held by another wxCFWeakRef.
|
||||
@param otherRef The other weak ref holder to copy.
|
||||
@discussion This is merely a copy or implicit cast.
|
||||
*/
|
||||
template <class otherRefType>
|
||||
wxCFWeakRef(const wxCFWeakRef<otherRefType>& otherRef)
|
||||
: m_ptr(otherRef.get()) // Implicit conversion from otherRefType to refType should occur
|
||||
{}
|
||||
|
||||
/*! @method wxCFWeakRef
|
||||
@abstract Copies a strong ref holder where its type can be converted to ours
|
||||
@templatefield otherRefType Any type held by a wxCFRef.
|
||||
@param otherRef The strong ref holder to copy.
|
||||
@discussion This ref is merely a pointer copy, the strong ref still holds the pointer.
|
||||
*/
|
||||
template <class otherRefType>
|
||||
wxCFWeakRef(const wxCFRef<otherRefType>& otherRef)
|
||||
: m_ptr(otherRef.get()) // Implicit conversion from otherRefType to refType should occur
|
||||
{}
|
||||
|
||||
/*! @method get
|
||||
@abstract Explicit conversion to the underlying pointer type
|
||||
@discussion Allows the caller to explicitly get the underlying pointer.
|
||||
*/
|
||||
refType get() const
|
||||
{ return m_ptr; }
|
||||
|
||||
/*! @method operator refType
|
||||
@abstract Implicit conversion to the underlying pointer type
|
||||
@discussion Allows the ref to be used in CF function calls.
|
||||
*/
|
||||
operator refType() const
|
||||
{ return m_ptr; }
|
||||
|
||||
protected:
|
||||
/*! @method wxCFWeakRef
|
||||
@abstract Constructs a weak reference to the raw pointer
|
||||
@templatefield otherType Any type.
|
||||
@param p The raw pointer to assume ownership of. May be NULL.
|
||||
@discussion This method is private so that the friend static_cfref_cast can use it
|
||||
*/
|
||||
template <class otherType>
|
||||
explicit wxCFWeakRef(otherType *p)
|
||||
: m_ptr(p) // Implicit conversion from otherType* to refType should occur.
|
||||
{}
|
||||
|
||||
/*! @var m_ptr The raw pointer.
|
||||
*/
|
||||
refType m_ptr;
|
||||
};
|
||||
|
||||
/*! @class wxCFRef
|
||||
@templatefield refType The CF reference type (e.g. CFStringRef, CFRunLoopRef, etc.)
|
||||
It should already be a pointer. This is different from
|
||||
@@ -200,19 +101,6 @@ public:
|
||||
: m_ptr(wxCFRetain(otherRef.get())) // Implicit conversion from otherRefType to refType should occur
|
||||
{}
|
||||
|
||||
/*! @method wxCFRef
|
||||
@abstract Copies a weak ref holder where its type can be converted to ours
|
||||
@templatefield otherRefType Any type held by a wxCFWeakRef.
|
||||
@param otherRef The weak ref holder to copy.
|
||||
@discussion Ownership will be taken by this newly created ref. That is,
|
||||
the object will be explicitly retained by this new ref.
|
||||
Ownership is most likely shared with some other ref as well.
|
||||
*/
|
||||
template <class otherRefType>
|
||||
wxCFRef(const wxCFWeakRef<otherRefType>& otherRef)
|
||||
: m_ptr(wxCFRetain(otherRef.get())) // Implicit conversion from otherRefType to refType should occur
|
||||
{}
|
||||
|
||||
/*! @method ~wxCFRef
|
||||
@abstract Releases (potentially shared) ownership of the ref.
|
||||
@discussion A ref holder instance is always assumed to have ownership so ownership is always
|
||||
@@ -324,26 +212,21 @@ inline wxCFRef<Type*> wxCFRefFromGet(Type *p)
|
||||
}
|
||||
|
||||
/*! @function static_cfref_cast
|
||||
@abstract Works like static_cast but with a wxCFRef as the argument.
|
||||
@abstract Works like static_cast but from one wxCFRef to another
|
||||
@param refType Template parameter. The destination raw pointer type
|
||||
@param otherRef Normal parameter. The source wxCFRef<> object.
|
||||
@discussion This is intended to be a clever way to make static_cast work while allowing
|
||||
the return value to be converted to either a strong ref or a raw pointer
|
||||
while ensuring that the retain count is updated appropriately.
|
||||
|
||||
This is modeled after shared_ptr's static_pointer_cast. Just as wxCFRef is
|
||||
@discussion This is modeled after shared_ptr's static_pointer_cast. Just as wxCFRef is
|
||||
parameterized on a pointer to an opaque type so is this class. Note that
|
||||
this differs from shared_ptr which is parameterized on the pointee type.
|
||||
|
||||
FIXME: Anybody got a better name?
|
||||
*/
|
||||
template <class refType, class otherRefType>
|
||||
inline wxCFWeakRef<refType> static_cfref_cast(const wxCFRef<otherRefType> &otherRef);
|
||||
inline wxCFRef<refType> static_cfref_cast(const wxCFRef<otherRefType> &otherRef);
|
||||
|
||||
template <class refType, class otherRefType>
|
||||
inline wxCFWeakRef<refType> static_cfref_cast(const wxCFRef<otherRefType> &otherRef)
|
||||
inline wxCFRef<refType> static_cfref_cast(const wxCFRef<otherRefType> &otherRef)
|
||||
{
|
||||
return wxCFWeakRef<refType>(static_cast<refType>(otherRef.get()));
|
||||
return wxCFRef<refType>(static_cast<refType>(wxCFRetain(otherRef.get())));
|
||||
}
|
||||
|
||||
/*! @function CFRelease
|
||||
|
@@ -234,8 +234,9 @@ public:
|
||||
virtual bool Enable(bool enable = true);
|
||||
|
||||
// more readable flag testing methods
|
||||
bool IsPassword() const { return HasFlag(wxTE_PASSWORD); }
|
||||
bool WrapLines() const { return m_wrapLines; }
|
||||
bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; }
|
||||
bool WrapLines() const
|
||||
{ return !IsSingleLine() && !(GetWindowStyle() & wxHSCROLL); }
|
||||
|
||||
// only for wxStdTextCtrlInputHandler
|
||||
void RefreshSelection();
|
||||
@@ -499,8 +500,7 @@ private:
|
||||
// flags
|
||||
bool m_isModified:1,
|
||||
m_isEditable:1,
|
||||
m_hasCaret:1,
|
||||
m_wrapLines:1; // can't be changed after creation
|
||||
m_hasCaret:1;
|
||||
|
||||
// the rectangle (in client coordinates) to draw text inside
|
||||
wxRect m_rectText;
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#define wxMAJOR_VERSION 2
|
||||
#define wxMINOR_VERSION 8
|
||||
#define wxRELEASE_NUMBER 4
|
||||
#define wxSUBRELEASE_NUMBER 2
|
||||
#define wxSUBRELEASE_NUMBER 1
|
||||
#define wxVERSION_STRING _T("wxWidgets 2.8.4")
|
||||
|
||||
/* nothing to update below this line when updating the version */
|
||||
|
@@ -1308,8 +1308,9 @@ WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size );
|
||||
// (including even MSC) inline them just like we do right in their
|
||||
// headers.
|
||||
//
|
||||
#include <string.h>
|
||||
#if wxUSE_UNICODE
|
||||
#include <string.h> //for mem funcs
|
||||
|
||||
//implement our own wmem variants
|
||||
inline wxChar* wxTmemchr(const wxChar* s, wxChar c, size_t l)
|
||||
{
|
||||
@@ -1349,29 +1350,13 @@ WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size );
|
||||
|
||||
return szRet;
|
||||
}
|
||||
|
||||
#else /* !wxUSE_UNICODE */
|
||||
#if wxABI_VERSION >= 20805
|
||||
// for compatibility with earlier versions, these functions take
|
||||
// "void *" but in the next wx version they will take "char *" so
|
||||
// don't use them with void pointers (use the standard memxxx()
|
||||
// with them)
|
||||
inline char* wxTmemchr(const void* s, int c, size_t len)
|
||||
{ return (char*)memchr(s, c, len); }
|
||||
inline int wxTmemcmp(const void* sz1, const void* sz2, size_t len)
|
||||
{ return memcmp(sz1, sz2, len); }
|
||||
inline char* wxTmemcpy(void* szOut, const void* szIn, size_t len)
|
||||
{ return (char*)memcpy(szOut, szIn, len); }
|
||||
inline char* wxTmemmove(void* szOut, const void* szIn, size_t len)
|
||||
{ return (char*)memmove(szOut, szIn, len); }
|
||||
inline char* wxTmemset(void* szOut, int c, size_t len)
|
||||
{ return (char*)memset(szOut, c, len); }
|
||||
#else
|
||||
# define wxTmemchr memchr
|
||||
# define wxTmemcmp memcmp
|
||||
# define wxTmemcpy memcpy
|
||||
# define wxTmemmove memmove
|
||||
# define wxTmemset memset
|
||||
#endif
|
||||
# define wxTmemchr memchr
|
||||
# define wxTmemcmp memcmp
|
||||
# define wxTmemcpy memcpy
|
||||
# define wxTmemmove memmove
|
||||
# define wxTmemset memset
|
||||
#endif /* wxUSE_UNICODE/!wxUSE_UNICODE */
|
||||
|
||||
#endif /*__cplusplus*/
|
||||
|
@@ -40,8 +40,6 @@
|
||||
4086D109063BBC5C00D4CD53 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; };
|
||||
4086D10B063BBC5C00D4CD53 /* System.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA60173504D423C000000080 /* System.framework */; };
|
||||
409F03A10977B97B00D1030F /* libwx_mac_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 409F039A0977B96200D1030F /* libwx_mac_static.a */; };
|
||||
40C8A9AB0C53458D006D5BE9 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 40C8A9AA0C53458D006D5BE9 /* QuickTime.framework */; };
|
||||
40C8A9AC0C53458D006D5BE9 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 40C8A9AA0C53458D006D5BE9 /* QuickTime.framework */; };
|
||||
40F017470A306CAD00AC9076 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 40F017460A306CAD00AC9076 /* AppKit.framework */; };
|
||||
40F017480A306CAD00AC9076 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 40F017460A306CAD00AC9076 /* AppKit.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
@@ -99,7 +97,6 @@
|
||||
20286C33FDCF999611CA2CEA /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
|
||||
4086D0EF063BBC5B00D4CD53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
409F03930977B96200D1030F /* wxWindows.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = wxWindows.xcodeproj; path = ../../src/wxWindows.xcodeproj; sourceTree = SOURCE_ROOT; };
|
||||
40C8A9AA0C53458D006D5BE9 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
|
||||
40F017460A306CAD00AC9076 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
CA60173504D423C000000080 /* System.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = System.framework; path = /System/Library/Frameworks/System.framework; sourceTree = "<absolute>"; };
|
||||
F591E05701FCC5DE01000133 /* minimal.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = minimal.cpp; sourceTree = SOURCE_ROOT; };
|
||||
@@ -119,7 +116,6 @@
|
||||
1842CAFD085664390032BCF7 /* OpenGL.framework in Frameworks */,
|
||||
1842CAFE085664390032BCF7 /* WebKit.framework in Frameworks */,
|
||||
40F017470A306CAD00AC9076 /* AppKit.framework in Frameworks */,
|
||||
40C8A9AB0C53458D006D5BE9 /* QuickTime.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -135,7 +131,6 @@
|
||||
1842CB01085664390032BCF7 /* OpenGL.framework in Frameworks */,
|
||||
1842CB02085664390032BCF7 /* WebKit.framework in Frameworks */,
|
||||
40F017480A306CAD00AC9076 /* AppKit.framework in Frameworks */,
|
||||
40C8A9AC0C53458D006D5BE9 /* QuickTime.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -183,7 +178,6 @@
|
||||
20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
40C8A9AA0C53458D006D5BE9 /* QuickTime.framework */,
|
||||
40F017460A306CAD00AC9076 /* AppKit.framework */,
|
||||
20286C33FDCF999611CA2CEA /* Carbon.framework */,
|
||||
CA60173504D423C000000080 /* System.framework */,
|
||||
|
@@ -47,12 +47,6 @@
|
||||
#error You need to enable XPM support to use XPM bitmaps with toolbar!
|
||||
#endif // USE_XPM_BITMAPS
|
||||
|
||||
// If this is 1, the sample will test an extra toolbar identical to the
|
||||
// main one, but not managed by the frame. This can test subtle differences
|
||||
// in the way toolbars are handled, especially on Mac where there is one
|
||||
// native, 'installed' toolbar.
|
||||
#define USE_UNMANAGED_TOOLBAR 0
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// resources
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -102,7 +96,6 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE|wxCLIP_CHILDREN|wxNO_FULL_REPAINT_ON_RESIZE);
|
||||
|
||||
void PopulateToolbar(wxToolBarBase* toolBar);
|
||||
void RecreateToolbar();
|
||||
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
@@ -161,9 +154,6 @@ private:
|
||||
|
||||
wxTextCtrl *m_textWindow;
|
||||
|
||||
wxPanel *m_panel;
|
||||
wxToolBar *m_extraToolBar;
|
||||
|
||||
wxToolBar *m_tbar;
|
||||
|
||||
// the path to the custom bitmap for the test toolbar tool
|
||||
@@ -341,11 +331,6 @@ void MyFrame::RecreateToolbar()
|
||||
toolBar = CreateToolBar(style, ID_TOOLBAR);
|
||||
#endif
|
||||
|
||||
PopulateToolbar(toolBar);
|
||||
}
|
||||
|
||||
void MyFrame::PopulateToolbar(wxToolBarBase* toolBar)
|
||||
{
|
||||
// Set up toolbar
|
||||
enum
|
||||
{
|
||||
@@ -595,23 +580,22 @@ MyFrame::MyFrame(wxFrame* parent,
|
||||
// Create the toolbar
|
||||
RecreateToolbar();
|
||||
|
||||
m_panel = new wxPanel(this, wxID_ANY);
|
||||
#if USE_UNMANAGED_TOOLBAR
|
||||
m_extraToolBar = new wxToolBar(m_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_TEXT|wxTB_FLAT|wxTB_TOP);
|
||||
PopulateToolbar(m_extraToolBar);
|
||||
#else
|
||||
m_extraToolBar = NULL;
|
||||
#endif
|
||||
|
||||
m_textWindow = new wxTextCtrl(m_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
|
||||
|
||||
wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
|
||||
m_panel->SetSizer(sizer);
|
||||
if (m_extraToolBar)
|
||||
sizer->Add(m_extraToolBar, 0, wxEXPAND, 0);
|
||||
sizer->Add(m_textWindow, 1, wxEXPAND, 0);
|
||||
m_textWindow = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
|
||||
}
|
||||
|
||||
#if USE_GENERIC_TBAR
|
||||
|
||||
wxToolBar* MyFrame::OnCreateToolBar(long style,
|
||||
wxWindowID id,
|
||||
const wxString& name)
|
||||
{
|
||||
return (wxToolBar *)new wxToolBarSimple(this, id,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
style, name);
|
||||
}
|
||||
|
||||
#endif // USE_GENERIC_TBAR
|
||||
|
||||
void MyFrame::LayoutChildren()
|
||||
{
|
||||
wxSize size = GetClientSize();
|
||||
@@ -628,7 +612,7 @@ void MyFrame::LayoutChildren()
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
m_panel->SetSize(offset, 0, size.x - offset, size.y);
|
||||
m_textWindow->SetSize(offset, 0, size.x - offset, size.y);
|
||||
}
|
||||
|
||||
void MyFrame::OnSize(wxSizeEvent& event)
|
||||
|
@@ -747,11 +747,6 @@
|
||||
*/
|
||||
#define wxUSE_WEBKIT 0
|
||||
|
||||
/*
|
||||
* Objective-C class name uniquifying
|
||||
*/
|
||||
#define wxUSE_OBJC_UNIQUIFYING 0
|
||||
|
||||
/*
|
||||
* The const keyword is being introduced more in wxWindows.
|
||||
* You can use this setting to maintain backward compatibility.
|
||||
|
@@ -47,10 +47,6 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG)
|
||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG)
|
||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION)
|
||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND)
|
||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP)
|
||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN)
|
||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP)
|
||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN)
|
||||
|
||||
|
||||
IMPLEMENT_CLASS(wxAuiNotebook, wxControl)
|
||||
@@ -234,12 +230,7 @@ wxAuiDefaultTabArt::~wxAuiDefaultTabArt()
|
||||
|
||||
wxAuiTabArt* wxAuiDefaultTabArt::Clone()
|
||||
{
|
||||
wxAuiDefaultTabArt* art = new wxAuiDefaultTabArt;
|
||||
art->SetNormalFont(m_normal_font);
|
||||
art->SetSelectedFont(m_selected_font);
|
||||
art->SetMeasuringFont(m_measuring_font);
|
||||
|
||||
return art;
|
||||
return static_cast<wxAuiTabArt*>(new wxAuiDefaultTabArt);
|
||||
}
|
||||
|
||||
void wxAuiDefaultTabArt::SetFlags(unsigned int flags)
|
||||
@@ -676,12 +667,12 @@ int wxAuiDefaultTabArt::ShowDropDown(wxWindow* wnd,
|
||||
{
|
||||
const wxAuiNotebookPage& page = pages.Item(i);
|
||||
wxString caption = page.caption;
|
||||
|
||||
|
||||
// if there is no caption, make it a space. This will prevent
|
||||
// an assert in the menu code.
|
||||
if (caption.IsEmpty())
|
||||
caption = wxT(" ");
|
||||
|
||||
|
||||
menuPopup.AppendCheckItem(1000+i, caption);
|
||||
}
|
||||
|
||||
@@ -1972,10 +1963,6 @@ BEGIN_EVENT_TABLE(wxAuiTabCtrl, wxControl)
|
||||
EVT_LEFT_DOWN(wxAuiTabCtrl::OnLeftDown)
|
||||
EVT_LEFT_DCLICK(wxAuiTabCtrl::OnLeftDown)
|
||||
EVT_LEFT_UP(wxAuiTabCtrl::OnLeftUp)
|
||||
EVT_MIDDLE_DOWN(wxAuiTabCtrl::OnMiddleDown)
|
||||
EVT_MIDDLE_UP(wxAuiTabCtrl::OnMiddleUp)
|
||||
EVT_RIGHT_DOWN(wxAuiTabCtrl::OnRightDown)
|
||||
EVT_RIGHT_UP(wxAuiTabCtrl::OnRightUp)
|
||||
EVT_MOTION(wxAuiTabCtrl::OnMotion)
|
||||
EVT_LEAVE_WINDOW(wxAuiTabCtrl::OnLeaveWindow)
|
||||
EVT_AUINOTEBOOK_BUTTON(wxID_ANY, wxAuiTabCtrl::OnButton)
|
||||
@@ -2067,14 +2054,11 @@ void wxAuiTabCtrl::OnLeftUp(wxMouseEvent& evt)
|
||||
|
||||
if (m_is_dragging)
|
||||
{
|
||||
m_is_dragging = false;
|
||||
|
||||
wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, m_windowId);
|
||||
evt.SetSelection(GetIdxFromWindow(m_click_tab));
|
||||
evt.SetOldSelection(evt.GetSelection());
|
||||
evt.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(evt);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2097,7 +2081,6 @@ void wxAuiTabCtrl::OnLeftUp(wxMouseEvent& evt)
|
||||
if (!(m_pressed_button->cur_state & wxAUI_BUTTON_STATE_DISABLED))
|
||||
{
|
||||
wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, m_windowId);
|
||||
evt.SetSelection(GetIdxFromWindow(m_click_tab));
|
||||
evt.SetInt(m_pressed_button->id);
|
||||
evt.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(evt);
|
||||
@@ -2111,54 +2094,6 @@ void wxAuiTabCtrl::OnLeftUp(wxMouseEvent& evt)
|
||||
m_click_tab = NULL;
|
||||
}
|
||||
|
||||
void wxAuiTabCtrl::OnMiddleUp(wxMouseEvent& evt)
|
||||
{
|
||||
wxWindow* wnd = NULL;
|
||||
if (!TabHitTest(evt.m_x, evt.m_y, &wnd))
|
||||
return;
|
||||
|
||||
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, m_windowId);
|
||||
e.SetEventObject(this);
|
||||
e.SetSelection(GetIdxFromWindow(wnd));
|
||||
GetEventHandler()->ProcessEvent(e);
|
||||
}
|
||||
|
||||
void wxAuiTabCtrl::OnMiddleDown(wxMouseEvent& evt)
|
||||
{
|
||||
wxWindow* wnd = NULL;
|
||||
if (!TabHitTest(evt.m_x, evt.m_y, &wnd))
|
||||
return;
|
||||
|
||||
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, m_windowId);
|
||||
e.SetEventObject(this);
|
||||
e.SetSelection(GetIdxFromWindow(wnd));
|
||||
GetEventHandler()->ProcessEvent(e);
|
||||
}
|
||||
|
||||
void wxAuiTabCtrl::OnRightUp(wxMouseEvent& evt)
|
||||
{
|
||||
wxWindow* wnd = NULL;
|
||||
if (!TabHitTest(evt.m_x, evt.m_y, &wnd))
|
||||
return;
|
||||
|
||||
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, m_windowId);
|
||||
e.SetEventObject(this);
|
||||
e.SetSelection(GetIdxFromWindow(wnd));
|
||||
GetEventHandler()->ProcessEvent(e);
|
||||
}
|
||||
|
||||
void wxAuiTabCtrl::OnRightDown(wxMouseEvent& evt)
|
||||
{
|
||||
wxWindow* wnd = NULL;
|
||||
if (!TabHitTest(evt.m_x, evt.m_y, &wnd))
|
||||
return;
|
||||
|
||||
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, m_windowId);
|
||||
e.SetEventObject(this);
|
||||
e.SetSelection(GetIdxFromWindow(wnd));
|
||||
GetEventHandler()->ProcessEvent(e);
|
||||
}
|
||||
|
||||
void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt)
|
||||
{
|
||||
wxPoint pos = evt.GetPosition();
|
||||
@@ -2396,18 +2331,6 @@ BEGIN_EVENT_TABLE(wxAuiNotebook, wxControl)
|
||||
EVT_COMMAND_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500,
|
||||
wxEVT_COMMAND_AUINOTEBOOK_BUTTON,
|
||||
wxAuiNotebook::OnTabButton)
|
||||
EVT_COMMAND_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500,
|
||||
wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN,
|
||||
wxAuiNotebook::OnTabMiddleDown)
|
||||
EVT_COMMAND_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500,
|
||||
wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP,
|
||||
wxAuiNotebook::OnTabMiddleUp)
|
||||
EVT_COMMAND_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500,
|
||||
wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN,
|
||||
wxAuiNotebook::OnTabRightDown)
|
||||
EVT_COMMAND_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500,
|
||||
wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP,
|
||||
wxAuiNotebook::OnTabRightUp)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxAuiNotebook::wxAuiNotebook()
|
||||
@@ -2717,15 +2640,8 @@ bool wxAuiNotebook::InsertPage(size_t page_idx,
|
||||
// and destroys the window as well
|
||||
bool wxAuiNotebook::DeletePage(size_t page_idx)
|
||||
{
|
||||
if (page_idx >= m_tabs.GetPageCount())
|
||||
return false;
|
||||
|
||||
wxWindow* wnd = m_tabs.GetWindowFromIdx(page_idx);
|
||||
|
||||
// hide the window in advance, as this will
|
||||
// prevent flicker
|
||||
ShowWnd(wnd, false);
|
||||
|
||||
if (!RemovePage(page_idx))
|
||||
return false;
|
||||
|
||||
@@ -2751,28 +2667,39 @@ bool wxAuiNotebook::DeletePage(size_t page_idx)
|
||||
// but does not destroy the window
|
||||
bool wxAuiNotebook::RemovePage(size_t page_idx)
|
||||
{
|
||||
// save active window pointer
|
||||
wxWindow* active_wnd = NULL;
|
||||
if (m_curpage >= 0)
|
||||
active_wnd = m_tabs.GetWindowFromIdx(m_curpage);
|
||||
|
||||
// save pointer of window being deleted
|
||||
wxWindow* wnd = m_tabs.GetWindowFromIdx(page_idx);
|
||||
wxWindow* new_active = NULL;
|
||||
|
||||
// make sure we found the page
|
||||
if (!wnd)
|
||||
return false;
|
||||
|
||||
// find out which onscreen tab ctrl owns this tab
|
||||
wxAuiTabCtrl* ctrl;
|
||||
int ctrl_idx;
|
||||
if (!FindTab(wnd, &ctrl, &ctrl_idx))
|
||||
return false;
|
||||
|
||||
bool is_curpage = (m_curpage == (int)page_idx);
|
||||
bool is_active_in_split = ctrl->GetPage(ctrl_idx).active;
|
||||
// find a new page and set it as active
|
||||
int new_idx = ctrl_idx+1;
|
||||
if (new_idx >= (int)ctrl->GetPageCount())
|
||||
new_idx = ctrl_idx-1;
|
||||
|
||||
if (new_idx >= 0 && new_idx < (int)ctrl->GetPageCount())
|
||||
{
|
||||
new_active = ctrl->GetWindowFromIdx(new_idx);
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the active page to the first page that
|
||||
// isn't the one being deleted
|
||||
size_t i, page_count = m_tabs.GetPageCount();
|
||||
for (i = 0; i < page_count; ++i)
|
||||
{
|
||||
wxWindow* w = m_tabs.GetWindowFromIdx(i);
|
||||
if (wnd != w)
|
||||
{
|
||||
new_active = m_tabs.GetWindowFromIdx(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// remove the tab from main catalog
|
||||
if (!m_tabs.RemovePage(wnd))
|
||||
@@ -2781,51 +2708,6 @@ bool wxAuiNotebook::RemovePage(size_t page_idx)
|
||||
// remove the tab from the onscreen tab ctrl
|
||||
ctrl->RemovePage(wnd);
|
||||
|
||||
if (is_active_in_split)
|
||||
{
|
||||
int ctrl_new_page_count = (int)ctrl->GetPageCount();
|
||||
|
||||
if (ctrl_idx >= ctrl_new_page_count)
|
||||
ctrl_idx = ctrl_new_page_count-1;
|
||||
|
||||
if (ctrl_idx >= 0 && ctrl_idx < (int)ctrl->GetPageCount())
|
||||
{
|
||||
// set new page as active in the tab split
|
||||
ctrl->SetActivePage(ctrl_idx);
|
||||
|
||||
// if the page deleted was the current page for the
|
||||
// entire tab control, then record the window
|
||||
// pointer of the new active page for activation
|
||||
if (is_curpage)
|
||||
{
|
||||
new_active = ctrl->GetWindowFromIdx(ctrl_idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// we are not deleting the active page, so keep it the same
|
||||
new_active = active_wnd;
|
||||
}
|
||||
|
||||
|
||||
if (!new_active)
|
||||
{
|
||||
// we haven't yet found a new page to active,
|
||||
// so select the next page from the main tab
|
||||
// catalogue
|
||||
|
||||
if (page_idx < m_tabs.GetPageCount())
|
||||
{
|
||||
new_active = m_tabs.GetPage(page_idx).window;
|
||||
}
|
||||
|
||||
if (!new_active && m_tabs.GetPageCount() > 0)
|
||||
{
|
||||
new_active = m_tabs.GetPage(0).window;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RemoveEmptyTabFrames();
|
||||
|
||||
@@ -3095,16 +2977,16 @@ bool wxAuiNotebook::FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx)
|
||||
void wxAuiNotebook::Split(size_t page, int direction)
|
||||
{
|
||||
wxSize cli_size = GetClientSize();
|
||||
|
||||
|
||||
// get the page's window pointer
|
||||
wxWindow* wnd = GetPage(page);
|
||||
if (!wnd)
|
||||
return;
|
||||
|
||||
|
||||
// notebooks with 1 or less pages can't be split
|
||||
if (GetPageCount() < 2)
|
||||
return;
|
||||
|
||||
|
||||
// find out which tab control the page currently belongs to
|
||||
wxAuiTabCtrl *src_tabs, *dest_tabs;
|
||||
int src_idx = -1;
|
||||
@@ -3113,7 +2995,7 @@ void wxAuiNotebook::Split(size_t page, int direction)
|
||||
return;
|
||||
if (!src_tabs || src_idx == -1)
|
||||
return;
|
||||
|
||||
|
||||
// choose a split size
|
||||
wxSize split_size;
|
||||
if (GetPageCount() > 2)
|
||||
@@ -3128,8 +3010,8 @@ void wxAuiNotebook::Split(size_t page, int direction)
|
||||
split_size.x /= 2;
|
||||
split_size.y /= 2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// create a new tab frame
|
||||
wxTabFrame* new_tabs = new wxTabFrame;
|
||||
new_tabs->m_rect = wxRect(wxPoint(0,0), split_size);
|
||||
@@ -3147,7 +3029,7 @@ void wxAuiNotebook::Split(size_t page, int direction)
|
||||
// about where the pane should be added
|
||||
wxAuiPaneInfo pane_info = wxAuiPaneInfo().Bottom().CaptionVisible(false);
|
||||
wxPoint mouse_pt;
|
||||
|
||||
|
||||
if (direction == wxLEFT)
|
||||
{
|
||||
pane_info.Left();
|
||||
@@ -3168,10 +3050,10 @@ void wxAuiNotebook::Split(size_t page, int direction)
|
||||
pane_info.Bottom();
|
||||
mouse_pt = wxPoint(cli_size.x/2, cli_size.y);
|
||||
}
|
||||
|
||||
|
||||
m_mgr.AddPane(new_tabs, pane_info, mouse_pt);
|
||||
m_mgr.Update();
|
||||
|
||||
|
||||
// remove the page from the source tabs
|
||||
wxAuiNotebookPage page_info = src_tabs->GetPage(src_idx);
|
||||
page_info.active = false;
|
||||
@@ -3198,10 +3080,10 @@ void wxAuiNotebook::Split(size_t page, int direction)
|
||||
|
||||
// force the set selection function reset the selection
|
||||
m_curpage = -1;
|
||||
|
||||
|
||||
// set the active page to the one we just split off
|
||||
SetSelection(m_tabs.GetIdxFromWindow(page_info.window));
|
||||
|
||||
|
||||
UpdateHintWindowSize();
|
||||
}
|
||||
|
||||
@@ -3426,17 +3308,6 @@ void wxAuiNotebook::OnTabEndDrag(wxCommandEvent& command_evt)
|
||||
int src_idx = evt.GetSelection();
|
||||
wxWindow* src_page = src_tabs->GetWindowFromIdx(src_idx);
|
||||
|
||||
// Check that it's not an impossible parent relationship
|
||||
wxWindow* p = nb;
|
||||
while (p && !p->IsTopLevel())
|
||||
{
|
||||
if (p == src_page)
|
||||
{
|
||||
return;
|
||||
}
|
||||
p = p->GetParent();
|
||||
}
|
||||
|
||||
// get main index of the page
|
||||
int main_idx = m_tabs.GetIdxFromWindow(src_page);
|
||||
|
||||
@@ -3639,8 +3510,7 @@ void wxAuiNotebook::RemoveEmptyTabFrames()
|
||||
// window closing, refreshs are pending
|
||||
if (!wxPendingDelete.Member(tab_frame->m_tabs))
|
||||
wxPendingDelete.Append(tab_frame->m_tabs);
|
||||
|
||||
tab_frame->m_tabs = NULL;
|
||||
//tab_frame->m_tabs->Destroy();
|
||||
|
||||
delete tab_frame;
|
||||
}
|
||||
@@ -3673,27 +3543,6 @@ void wxAuiNotebook::RemoveEmptyTabFrames()
|
||||
|
||||
void wxAuiNotebook::OnChildFocus(wxChildFocusEvent& evt)
|
||||
{
|
||||
// if we're dragging a tab, don't change the current selection.
|
||||
// This code prevents a bug that used to happen when the hint window
|
||||
// was hidden. In the bug, the focus would return to the notebook
|
||||
// child, which would then enter this handler and call
|
||||
// SetSelection, which is not desired turn tab dragging.
|
||||
|
||||
wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
|
||||
size_t i, pane_count = all_panes.GetCount();
|
||||
for (i = 0; i < pane_count; ++i)
|
||||
{
|
||||
wxAuiPaneInfo& pane = all_panes.Item(i);
|
||||
if (pane.name == wxT("dummy"))
|
||||
continue;
|
||||
wxTabFrame* tabframe = (wxTabFrame*)pane.window;
|
||||
if (tabframe->m_tabs->IsDragging())
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// change the tab selection to the child
|
||||
// which was focused
|
||||
int idx = m_tabs.GetIdxFromWindow(evt.GetWindow());
|
||||
if (idx != -1 && idx != m_curpage)
|
||||
{
|
||||
@@ -3711,19 +3560,13 @@ void wxAuiNotebook::OnTabButton(wxCommandEvent& command_evt)
|
||||
|
||||
if (button_id == wxAUI_BUTTON_CLOSE)
|
||||
{
|
||||
int selection = evt.GetSelection();
|
||||
|
||||
if (selection == -1)
|
||||
{
|
||||
// if the close button is to the right, use the active
|
||||
// page selection to determine which page to close
|
||||
selection = GetSelection();
|
||||
}
|
||||
int selection = tabs->GetActivePage();
|
||||
|
||||
if (selection != -1)
|
||||
{
|
||||
wxWindow* close_wnd = tabs->GetWindowFromIdx(selection);
|
||||
|
||||
|
||||
// ask owner if it's ok to close the tab
|
||||
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, m_windowId);
|
||||
e.SetSelection(m_tabs.GetIdxFromWindow(close_wnd));
|
||||
@@ -3747,122 +3590,7 @@ void wxAuiNotebook::OnTabButton(wxCommandEvent& command_evt)
|
||||
}
|
||||
}
|
||||
|
||||
void wxAuiNotebook::OnTabMiddleDown(wxCommandEvent& evt)
|
||||
{
|
||||
// patch event through to owner
|
||||
wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject();
|
||||
wxWindow* wnd = tabs->GetWindowFromIdx(evt.GetSelection());
|
||||
|
||||
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, m_windowId);
|
||||
e.SetSelection(m_tabs.GetIdxFromWindow(wnd));
|
||||
e.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(e);
|
||||
}
|
||||
|
||||
void wxAuiNotebook::OnTabMiddleUp(wxCommandEvent& evt)
|
||||
{
|
||||
// if the wxAUI_NB_MIDDLE_CLICK_CLOSE is specified, middle
|
||||
// click should act like a tab close action. However, first
|
||||
// give the owner an opportunity to handle the middle up event
|
||||
// for custom action
|
||||
|
||||
wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject();
|
||||
wxWindow* wnd = tabs->GetWindowFromIdx(evt.GetSelection());
|
||||
|
||||
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, m_windowId);
|
||||
e.SetSelection(m_tabs.GetIdxFromWindow(wnd));
|
||||
e.SetEventObject(this);
|
||||
if (GetEventHandler()->ProcessEvent(e))
|
||||
return;
|
||||
if (!e.IsAllowed())
|
||||
return;
|
||||
|
||||
// check if we are supposed to close on middle-up
|
||||
if ((m_flags & wxAUI_NB_MIDDLE_CLICK_CLOSE) == 0)
|
||||
return;
|
||||
|
||||
// simulate the user pressing the close button on the tab
|
||||
evt.SetInt(wxAUI_BUTTON_CLOSE);
|
||||
OnTabButton(evt);
|
||||
}
|
||||
|
||||
void wxAuiNotebook::OnTabRightDown(wxCommandEvent& evt)
|
||||
{
|
||||
// patch event through to owner
|
||||
wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject();
|
||||
wxWindow* wnd = tabs->GetWindowFromIdx(evt.GetSelection());
|
||||
|
||||
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, m_windowId);
|
||||
e.SetSelection(m_tabs.GetIdxFromWindow(wnd));
|
||||
e.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(e);
|
||||
}
|
||||
|
||||
void wxAuiNotebook::OnTabRightUp(wxCommandEvent& evt)
|
||||
{
|
||||
// patch event through to owner
|
||||
wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject();
|
||||
wxWindow* wnd = tabs->GetWindowFromIdx(evt.GetSelection());
|
||||
|
||||
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, m_windowId);
|
||||
e.SetSelection(m_tabs.GetIdxFromWindow(wnd));
|
||||
e.SetEventObject(this);
|
||||
GetEventHandler()->ProcessEvent(e);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Sets the normal font
|
||||
void wxAuiNotebook::SetNormalFont(const wxFont& font)
|
||||
{
|
||||
m_normal_font = font;
|
||||
GetArtProvider()->SetNormalFont(font);
|
||||
}
|
||||
|
||||
// Sets the selected tab font
|
||||
void wxAuiNotebook::SetSelectedFont(const wxFont& font)
|
||||
{
|
||||
m_selected_font = font;
|
||||
GetArtProvider()->SetSelectedFont(font);
|
||||
}
|
||||
|
||||
// Sets the measuring font
|
||||
void wxAuiNotebook::SetMeasuringFont(const wxFont& font)
|
||||
{
|
||||
GetArtProvider()->SetMeasuringFont(font);
|
||||
}
|
||||
|
||||
// Sets the tab font
|
||||
bool wxAuiNotebook::SetFont(const wxFont& font)
|
||||
{
|
||||
wxControl::SetFont(font);
|
||||
|
||||
wxFont normalFont(font);
|
||||
wxFont selectedFont(normalFont);
|
||||
selectedFont.SetWeight(wxBOLD);
|
||||
|
||||
SetNormalFont(normalFont);
|
||||
SetSelectedFont(selectedFont);
|
||||
SetMeasuringFont(selectedFont);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Gets the tab control height
|
||||
int wxAuiNotebook::GetTabCtrlHeight() const
|
||||
{
|
||||
return m_tab_ctrl_height;
|
||||
}
|
||||
|
||||
// Gets the height of the notebook for a given page height
|
||||
int wxAuiNotebook::GetHeightForPageHeight(int pageHeight)
|
||||
{
|
||||
UpdateTabCtrlHeight();
|
||||
|
||||
int tabCtrlHeight = GetTabCtrlHeight();
|
||||
int decorHeight = 2;
|
||||
return tabCtrlHeight + pageHeight + decorHeight;
|
||||
}
|
||||
|
||||
|
||||
#endif // wxUSE_AUI
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include "wx/aui/framemanager.h"
|
||||
#include "wx/aui/dockart.h"
|
||||
#include "wx/aui/floatpane.h"
|
||||
#include "wx/aui/tabmdi.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/panel.h"
|
||||
@@ -776,17 +775,6 @@ void wxAuiManager::SetManagedWindow(wxWindow* wnd)
|
||||
wxAuiPaneInfo().Name(wxT("mdiclient")).
|
||||
CenterPane().PaneBorder(false));
|
||||
}
|
||||
else if (m_frame->IsKindOf(CLASSINFO(wxAuiMDIParentFrame)))
|
||||
{
|
||||
wxAuiMDIParentFrame* mdi_frame = (wxAuiMDIParentFrame*)m_frame;
|
||||
wxAuiMDIClientWindow* client_window = mdi_frame->GetClientWindow();
|
||||
wxASSERT_MSG(client_window, wxT("Client window is NULL!"));
|
||||
|
||||
AddPane(client_window,
|
||||
wxAuiPaneInfo().Name(wxT("mdiclient")).
|
||||
CenterPane().PaneBorder(false));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
UpdateHintWindowConfig();
|
||||
@@ -3083,7 +3071,6 @@ void wxAuiManager::ShowHint(const wxRect& rect)
|
||||
m_hint_fadeamt = 0;
|
||||
|
||||
m_hint_wnd->SetSize(rect);
|
||||
m_hint_wnd->SetTransparent(m_hint_fadeamt);
|
||||
|
||||
if (!m_hint_wnd->IsShown())
|
||||
m_hint_wnd->Show();
|
||||
@@ -3093,6 +3080,7 @@ void wxAuiManager::ShowHint(const wxRect& rect)
|
||||
if (m_action == actionDragFloatingPane && m_action_window)
|
||||
m_action_window->SetFocus();
|
||||
|
||||
m_hint_wnd->SetTransparent(m_hint_fadeamt);
|
||||
m_hint_wnd->Raise();
|
||||
|
||||
|
||||
@@ -3231,7 +3219,6 @@ wxRect wxAuiManager::CalculateHintRect(wxWindow* pane_window,
|
||||
wxAuiDockUIPartArray uiparts;
|
||||
wxAuiPaneInfo hint = GetPane(pane_window);
|
||||
hint.name = wxT("__HINT__");
|
||||
hint.PaneBorder(true);
|
||||
hint.Show();
|
||||
|
||||
if (!hint.IsOk())
|
||||
|
@@ -22,7 +22,6 @@
|
||||
#include "wx/log.h"
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
#include "wx/cocoa/objc/objc_uniquifying.h"
|
||||
#include "wx/cocoa/NSButton.h"
|
||||
#import <AppKit/NSButton.h>
|
||||
|
||||
@@ -40,7 +39,6 @@ WX_IMPLEMENT_OBJC_INTERFACE_HASHMAP(NSButton)
|
||||
|
||||
- (void)wxNSButtonAction: (id)sender;
|
||||
@end // wxNSButtonTarget
|
||||
WX_DECLARE_GET_OBJC_CLASS(wxNSButtonTarget,NSObject)
|
||||
|
||||
@implementation wxNSButtonTarget : NSObject
|
||||
- (void)wxNSButtonAction: (id)sender
|
||||
@@ -51,12 +49,11 @@ WX_DECLARE_GET_OBJC_CLASS(wxNSButtonTarget,NSObject)
|
||||
}
|
||||
|
||||
@end // implementation wxNSButtonTarget
|
||||
WX_IMPLEMENT_GET_OBJC_CLASS(wxNSButtonTarget,NSObject)
|
||||
|
||||
// ============================================================================
|
||||
// class wxCocoaNSButton
|
||||
// ============================================================================
|
||||
const wxObjcAutoRefFromAlloc<struct objc_object*> wxCocoaNSButton::sm_cocoaTarget = [[WX_GET_OBJC_CLASS(wxNSButtonTarget) alloc] init];
|
||||
const wxObjcAutoRefFromAlloc<struct objc_object*> wxCocoaNSButton::sm_cocoaTarget = [[wxNSButtonTarget alloc] init];
|
||||
|
||||
void wxCocoaNSButton::AssociateNSButton(WX_NSButton cocoaNSButton)
|
||||
{
|
||||
|
@@ -22,7 +22,6 @@
|
||||
#include "wx/log.h"
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
#include "wx/cocoa/objc/objc_uniquifying.h"
|
||||
#include "wx/cocoa/NSControl.h"
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
@@ -36,7 +35,6 @@
|
||||
|
||||
- (void)wxNSControlAction: (id)sender;
|
||||
@end //interface wxNSControlTarget
|
||||
WX_DECLARE_GET_OBJC_CLASS(wxNSControlTarget,NSObject)
|
||||
|
||||
@implementation wxNSControlTarget : NSObject
|
||||
|
||||
@@ -49,12 +47,11 @@ WX_DECLARE_GET_OBJC_CLASS(wxNSControlTarget,NSObject)
|
||||
}
|
||||
|
||||
@end //implementation wxNSControlTarget
|
||||
WX_IMPLEMENT_GET_OBJC_CLASS(wxNSControlTarget,NSObject)
|
||||
|
||||
// ============================================================================
|
||||
// wxNSControl
|
||||
// ============================================================================
|
||||
WX_IMPLEMENT_OBJC_INTERFACE(NSControl)
|
||||
|
||||
struct objc_object *wxCocoaNSControl::sm_cocoaTarget = [[WX_GET_OBJC_CLASS(wxNSControlTarget) alloc] init];
|
||||
struct objc_object *wxCocoaNSControl::sm_cocoaTarget = [[wxNSControlTarget alloc] init];
|
||||
|
||||
|
@@ -16,15 +16,24 @@
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
#include "wx/cocoa/NSMenu.h"
|
||||
#include "wx/cocoa/ObjcPose.h"
|
||||
|
||||
#import <Foundation/NSNotification.h>
|
||||
#include "wx/cocoa/objc/NSMenu.h"
|
||||
#import <AppKit/NSMenu.h>
|
||||
|
||||
// ============================================================================
|
||||
// @class WXNSMenu
|
||||
// @class wxPoserNSMenu
|
||||
// ============================================================================
|
||||
@interface wxPoserNSMenu : NSMenu
|
||||
{
|
||||
}
|
||||
|
||||
@implementation WXNSMenu : NSMenu
|
||||
- (void)dealloc;
|
||||
|
||||
@end // wxPoserNSMenu
|
||||
|
||||
WX_IMPLEMENT_POSER(wxPoserNSMenu);
|
||||
@implementation wxPoserNSMenu : NSMenu
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
@@ -34,7 +43,7 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end // WXNSMenu
|
||||
@end // wxPoserNSMenu
|
||||
|
||||
// ============================================================================
|
||||
// @class wxNSMenuNotificationObserver
|
||||
|
@@ -22,6 +22,8 @@
|
||||
#include "wx/log.h"
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
#include "wx/cocoa/ObjcPose.h"
|
||||
|
||||
#include "wx/cocoa/NSTableDataSource.h"
|
||||
#include "wx/cocoa/NSTableView.h"
|
||||
#import <AppKit/NSTableView.h>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/02/15
|
||||
// RCS-ID: $Id$
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWidgets licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -22,12 +22,12 @@
|
||||
#include "wx/window.h"
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
#include "wx/cocoa/objc/objc_uniquifying.h"
|
||||
#include "wx/cocoa/ObjcPose.h"
|
||||
#include "wx/cocoa/NSView.h"
|
||||
|
||||
#import <AppKit/NSView.h>
|
||||
#import <Foundation/NSNotification.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#include "wx/cocoa/objc/NSView.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// globals
|
||||
@@ -54,10 +54,30 @@ void wxCocoaNSView::DisassociateNSView(WX_NSView cocoaNSView)
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// @class WXNSView
|
||||
// @class wxPoserNSView
|
||||
// ============================================================================
|
||||
@interface wxPoserNSView : NSView
|
||||
{
|
||||
}
|
||||
|
||||
@implementation WXNSView : NSView
|
||||
- (void)drawRect: (NSRect)rect;
|
||||
- (void)mouseDown:(NSEvent *)theEvent;
|
||||
- (void)mouseDragged:(NSEvent *)theEvent;
|
||||
- (void)mouseUp:(NSEvent *)theEvent;
|
||||
- (void)mouseMoved:(NSEvent *)theEvent;
|
||||
- (void)mouseEntered:(NSEvent *)theEvent;
|
||||
- (void)mouseExited:(NSEvent *)theEvent;
|
||||
- (void)rightMouseDown:(NSEvent *)theEvent;
|
||||
- (void)rightMouseDragged:(NSEvent *)theEvent;
|
||||
- (void)rightMouseUp:(NSEvent *)theEvent;
|
||||
- (void)otherMouseDown:(NSEvent *)theEvent;
|
||||
- (void)otherMouseDragged:(NSEvent *)theEvent;
|
||||
- (void)otherMouseUp:(NSEvent *)theEvent;
|
||||
- (void)resetCursorRects;
|
||||
@end // wxPoserNSView
|
||||
|
||||
WX_IMPLEMENT_POSER(wxPoserNSView);
|
||||
@implementation wxPoserNSView : NSView
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
|
||||
{
|
||||
@@ -166,39 +186,20 @@ void wxCocoaNSView::DisassociateNSView(WX_NSView cocoaNSView)
|
||||
[super resetCursorRects];
|
||||
}
|
||||
|
||||
- (void)viewDidMoveToWindow
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_viewDidMoveToWindow() )
|
||||
#endif
|
||||
[super viewDidMoveToWindow];
|
||||
}
|
||||
|
||||
- (void)viewWillMoveToWindow:(NSWindow *)newWindow
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_viewWillMoveToWindow(newWindow) )
|
||||
#endif
|
||||
[super viewWillMoveToWindow:newWindow];
|
||||
}
|
||||
|
||||
@end // implementation WXNSView
|
||||
WX_IMPLEMENT_GET_OBJC_CLASS(WXNSView,NSView)
|
||||
|
||||
// ============================================================================
|
||||
// @class wxNSViewNotificationObserver
|
||||
// ============================================================================
|
||||
@end // implementation wxPoserNSView
|
||||
|
||||
@interface wxNSViewNotificationObserver : NSObject
|
||||
{
|
||||
}
|
||||
|
||||
// FIXME: Initializing like this is a really bad idea. If for some reason
|
||||
// we ever require posing as an NSObject we won't be able to since an instance
|
||||
// will have already been created here. Of course, catching messages for
|
||||
// NSObject seems like a LOT of overkill, so I doubt we ever will anyway!
|
||||
void *wxCocoaNSView::sm_cocoaObserver = [[wxNSViewNotificationObserver alloc] init];
|
||||
|
||||
- (void)notificationFrameChanged: (NSNotification *)notification;
|
||||
- (void)synthesizeMouseMovedForView: (NSView *)theView;
|
||||
@end // interface wxNSViewNotificationObserver
|
||||
WX_DECLARE_GET_OBJC_CLASS(wxNSViewNotificationObserver,NSObject)
|
||||
|
||||
@implementation wxNSViewNotificationObserver : NSObject
|
||||
|
||||
@@ -209,17 +210,5 @@ WX_DECLARE_GET_OBJC_CLASS(wxNSViewNotificationObserver,NSObject)
|
||||
win->Cocoa_FrameChanged();
|
||||
}
|
||||
|
||||
- (void)synthesizeMouseMovedForView: (NSView *)theView
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(theView);
|
||||
wxCHECK_RET(win,wxT("synthesizeMouseMovedForView received but no wxWindow exists"));
|
||||
win->Cocoa_synthesizeMouseMoved();
|
||||
#endif
|
||||
}
|
||||
|
||||
@end // implementation wxNSViewNotificationObserver
|
||||
WX_IMPLEMENT_GET_OBJC_CLASS(wxNSViewNotificationObserver,NSObject)
|
||||
|
||||
void *wxCocoaNSView::sm_cocoaObserver = [[WX_GET_OBJC_CLASS(wxNSViewNotificationObserver) alloc] init];
|
||||
|
||||
|
@@ -23,11 +23,12 @@
|
||||
#include "wx/menuitem.h"
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
#include "wx/cocoa/ObjcPose.h"
|
||||
#include "wx/cocoa/NSWindow.h"
|
||||
|
||||
#import <AppKit/NSWindow.h>
|
||||
#import <Foundation/NSNotification.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#include "wx/cocoa/objc/NSWindow.h"
|
||||
|
||||
// ============================================================================
|
||||
// @class wxNSWindowDelegate
|
||||
@@ -186,9 +187,18 @@ wxMenuBar* wxCocoaNSWindow::GetAppMenuBar(wxCocoaNSWindow *win)
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// @class WXNSWindow
|
||||
// @class wxPoserNSWindow
|
||||
// ============================================================================
|
||||
@implementation WXNSWindow : NSWindow
|
||||
@interface wxPoserNSWindow : NSWindow
|
||||
{
|
||||
}
|
||||
|
||||
- (BOOL)canBecomeKeyWindow;
|
||||
- (BOOL)canBecomeMainWindow;
|
||||
@end // wxPoserNSwindow
|
||||
|
||||
WX_IMPLEMENT_POSER(wxPoserNSWindow);
|
||||
@implementation wxPoserNSWindow : NSWindow
|
||||
|
||||
- (BOOL)canBecomeKeyWindow
|
||||
{
|
||||
@@ -208,29 +218,4 @@ wxMenuBar* wxCocoaNSWindow::GetAppMenuBar(wxCocoaNSWindow *win)
|
||||
return canBecome;
|
||||
}
|
||||
|
||||
@end // implementation WXNSWindow
|
||||
|
||||
// ============================================================================
|
||||
// @class WXNSPanel
|
||||
// ============================================================================
|
||||
@implementation WXNSPanel : NSPanel
|
||||
|
||||
- (BOOL)canBecomeKeyWindow
|
||||
{
|
||||
bool canBecome = false;
|
||||
wxCocoaNSWindow *tlw = wxCocoaNSWindow::GetFromCocoa(self);
|
||||
if(!tlw || !tlw->Cocoa_canBecomeKeyWindow(canBecome))
|
||||
canBecome = [super canBecomeKeyWindow];
|
||||
return canBecome;
|
||||
}
|
||||
|
||||
- (BOOL)canBecomeMainWindow
|
||||
{
|
||||
bool canBecome = false;
|
||||
wxCocoaNSWindow *tlw = wxCocoaNSWindow::GetFromCocoa(self);
|
||||
if(!tlw || !tlw->Cocoa_canBecomeMainWindow(canBecome))
|
||||
canBecome = [super canBecomeMainWindow];
|
||||
return canBecome;
|
||||
}
|
||||
|
||||
@end // implementation WXNSPanel
|
||||
@end // implementation wxPoserNSWindow
|
||||
|
256
src/cocoa/app.mm
256
src/cocoa/app.mm
@@ -6,7 +6,6 @@
|
||||
// Created: 2002/11/27
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) David Elliott
|
||||
// Software 2000 Ltd.
|
||||
// Licence: wxWidgets licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -21,7 +20,6 @@
|
||||
#include "wx/module.h"
|
||||
#endif
|
||||
|
||||
#include "wx/cocoa/ObjcRef.h"
|
||||
#include "wx/cocoa/ObjcPose.h"
|
||||
#include "wx/cocoa/autorelease.h"
|
||||
#include "wx/cocoa/mbarman.h"
|
||||
@@ -39,21 +37,95 @@
|
||||
#import <Foundation/NSNotification.h>
|
||||
#import <AppKit/NSCell.h>
|
||||
|
||||
bool wxApp::sm_isEmbedded = false; // Normally we're not a plugin
|
||||
|
||||
// wxNSApplicationObserver singleton.
|
||||
static wxObjcAutoRefFromAlloc<wxNSApplicationObserver*> sg_cocoaAppObserver = [[WX_GET_OBJC_CLASS(wxNSApplicationObserver) alloc] init];
|
||||
|
||||
// The following two are supposed to be wxApp members but because of 2.8 ABI compatibility
|
||||
// we must make them static. No problem since wxApp is a singleton anyway.
|
||||
static wxCFRef<CFRunLoopObserverRef> m_cfRunLoopIdleObserver;
|
||||
static wxCFRef<CFStringRef> m_cfObservedRunLoopMode;
|
||||
|
||||
// ========================================================================
|
||||
// wxPoseAsInitializer
|
||||
// ========================================================================
|
||||
wxPoseAsInitializer *wxPoseAsInitializer::sm_first = NULL;
|
||||
|
||||
static bool sg_needIdle = true;
|
||||
|
||||
// ========================================================================
|
||||
// wxPoserNSApplication
|
||||
// ========================================================================
|
||||
@interface wxPoserNSApplication : NSApplication
|
||||
{
|
||||
}
|
||||
|
||||
- (NSEvent *)nextEventMatchingMask:(unsigned int)mask untilDate:(NSDate *)expiration inMode:(NSString *)mode dequeue:(BOOL)flag;
|
||||
- (void)sendEvent: (NSEvent*)anEvent;
|
||||
@end // wxPoserNSApplication
|
||||
|
||||
WX_IMPLEMENT_POSER(wxPoserNSApplication);
|
||||
|
||||
@implementation wxPoserNSApplication : NSApplication
|
||||
|
||||
/* NOTE: The old method of idle event handling added the handler using the
|
||||
[NSRunLoop -performSelector:target:argument:order:modes] which caused
|
||||
the invocation to occur at the begining of [NSApplication
|
||||
-nextEventMatchingMask:untilDate:expiration:inMode:dequeue:]. However,
|
||||
the code would be scheduled for invocation with every iteration of
|
||||
the event loop. This new method simply overrides the method. The
|
||||
same caveats apply. In particular, by the time the event loop has
|
||||
called this method, it usually expects to receive an event. If you
|
||||
plan on stopping the event loop, it is wise to send an event through
|
||||
the queue to ensure this method will return.
|
||||
See wxEventLoop::Exit() for more information.
|
||||
|
||||
This overridden method calls the superclass method with an untilDate
|
||||
parameter that indicates nil should be returned if there are no pending
|
||||
events. That is, nextEventMatchingMask: should not wait for an event.
|
||||
If nil is returned then idle event processing occurs until the user
|
||||
does not request anymore idle events or until a real event comes through.
|
||||
|
||||
RN: Even though Apple documentation states that nil can be passed in place
|
||||
of [NSDate distantPast] in the untilDate parameter, this causes Jaguar (10.2)
|
||||
to get stuck in some kind of loop deep within nextEventMatchingMask:, thus we
|
||||
need to explicitly pass [NSDate distantPast] instead.
|
||||
*/
|
||||
|
||||
- (NSEvent *)nextEventMatchingMask:(unsigned int)mask untilDate:(NSDate *)expiration inMode:(NSString *)mode dequeue:(BOOL)flag
|
||||
{
|
||||
// Get the same events except don't block
|
||||
NSEvent *event = [super nextEventMatchingMask:mask untilDate:[NSDate distantPast] inMode:mode dequeue:flag];
|
||||
// If we got one, simply return it
|
||||
if(event)
|
||||
return event;
|
||||
// No events, try doing some idle stuff
|
||||
if(sg_needIdle
|
||||
#ifdef __WXDEBUG__
|
||||
&& !wxTheApp->IsInAssert()
|
||||
#endif
|
||||
&& ([NSDefaultRunLoopMode isEqualToString:mode] || [NSModalPanelRunLoopMode isEqualToString:mode]))
|
||||
{
|
||||
sg_needIdle = false;
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("Processing idle events"));
|
||||
while(wxTheApp->ProcessIdle())
|
||||
{
|
||||
// Get the same events except don't block
|
||||
NSEvent *event = [super nextEventMatchingMask:mask untilDate:[NSDate distantPast] inMode:mode dequeue:flag];
|
||||
// If we got one, simply return it
|
||||
if(event)
|
||||
return event;
|
||||
// we didn't get one, do some idle work
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("Looping idle events"));
|
||||
}
|
||||
// No more idle work requested, block
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("Finished idle processing"));
|
||||
}
|
||||
else
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("Avoiding idle processing sg_needIdle=%d"),sg_needIdle);
|
||||
return [super nextEventMatchingMask:mask untilDate:expiration inMode:mode dequeue:flag];
|
||||
}
|
||||
|
||||
- (void)sendEvent: (NSEvent*)anEvent
|
||||
{
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("SendEvent"));
|
||||
sg_needIdle = true;
|
||||
[super sendEvent: anEvent];
|
||||
}
|
||||
|
||||
@end // wxPoserNSApplication
|
||||
|
||||
// ========================================================================
|
||||
// wxNSApplicationDelegate
|
||||
// ========================================================================
|
||||
@@ -67,14 +139,6 @@ wxPoseAsInitializer *wxPoseAsInitializer::sm_first = NULL;
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end // implementation wxNSApplicationDelegate : NSObject
|
||||
WX_IMPLEMENT_GET_OBJC_CLASS(wxNSApplicationDelegate,NSObject)
|
||||
|
||||
// ========================================================================
|
||||
// wxNSApplicationObserver
|
||||
// ========================================================================
|
||||
@implementation wxNSApplicationObserver : NSObject
|
||||
|
||||
- (void)applicationWillBecomeActive:(NSNotification *)notification
|
||||
{
|
||||
wxTheApp->CocoaDelegate_applicationWillBecomeActive();
|
||||
@@ -95,18 +159,12 @@ WX_IMPLEMENT_GET_OBJC_CLASS(wxNSApplicationDelegate,NSObject)
|
||||
wxTheApp->CocoaDelegate_applicationDidResignActive();
|
||||
}
|
||||
|
||||
- (void)applicationWillUpdate:(NSNotification *)notification;
|
||||
{
|
||||
wxTheApp->CocoaDelegate_applicationWillUpdate();
|
||||
}
|
||||
|
||||
- (void)controlTintChanged:(NSNotification *)notification
|
||||
{
|
||||
wxLogDebug(wxT("TODO: send EVT_SYS_COLOUR_CHANGED as appropriate"));
|
||||
}
|
||||
|
||||
@end // implementation wxNSApplicationObserver : NSObject
|
||||
WX_IMPLEMENT_GET_OBJC_CLASS(wxNSApplicationObserver,NSObject)
|
||||
@end // implementation wxNSApplicationDelegate : NSObject
|
||||
|
||||
// ========================================================================
|
||||
// wxApp
|
||||
@@ -158,25 +216,13 @@ void wxApp::CleanUp()
|
||||
wxDC::CocoaShutdownTextSystem();
|
||||
wxMenuBarManager::DestroyInstance();
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:sg_cocoaAppObserver];
|
||||
if(!sm_isEmbedded)
|
||||
{
|
||||
[m_cocoaApp setDelegate:nil];
|
||||
[m_cocoaAppDelegate release];
|
||||
m_cocoaAppDelegate = NULL;
|
||||
}
|
||||
[m_cocoaApp setDelegate:nil];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:m_cocoaAppDelegate
|
||||
name:NSControlTintDidChangeNotification object:nil];
|
||||
[m_cocoaAppDelegate release];
|
||||
m_cocoaAppDelegate = NULL;
|
||||
|
||||
wxAppBase::CleanUp();
|
||||
|
||||
// Program built against < 2.8.5 hack: Destroy the idle observer here in
|
||||
// case the formerly inline virtual destructor was inlined by an old app.
|
||||
if(m_cfRunLoopIdleObserver != NULL)
|
||||
{
|
||||
// Invalidate the observer which also removes it from the run loop.
|
||||
CFRunLoopObserverInvalidate(m_cfRunLoopIdleObserver);
|
||||
// Release the ref as we don't need it anymore.
|
||||
m_cfRunLoopIdleObserver.reset();
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -221,58 +267,18 @@ bool wxApp::OnInitGui()
|
||||
|
||||
// Create the app using the sharedApplication method
|
||||
m_cocoaApp = [NSApplication sharedApplication];
|
||||
|
||||
if(!sm_isEmbedded)
|
||||
{
|
||||
// Enable response to application delegate messages
|
||||
m_cocoaAppDelegate = [[WX_GET_OBJC_CLASS(wxNSApplicationDelegate) alloc] init];
|
||||
[m_cocoaApp setDelegate:m_cocoaAppDelegate];
|
||||
}
|
||||
|
||||
// Enable response to "delegate" messages on the notification observer
|
||||
[[NSNotificationCenter defaultCenter] addObserver:sg_cocoaAppObserver
|
||||
selector:@selector(applicationWillBecomeActive:)
|
||||
name:NSApplicationWillBecomeActiveNotification object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:sg_cocoaAppObserver
|
||||
selector:@selector(applicationDidBecomeActive:)
|
||||
name:NSApplicationDidBecomeActiveNotification object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:sg_cocoaAppObserver
|
||||
selector:@selector(applicationWillResignActive:)
|
||||
name:NSApplicationWillResignActiveNotification object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:sg_cocoaAppObserver
|
||||
selector:@selector(applicationDidResignActive:)
|
||||
name:NSApplicationDidResignActiveNotification object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:sg_cocoaAppObserver
|
||||
selector:@selector(applicationWillUpdate:)
|
||||
name:NSApplicationWillUpdateNotification object:nil];
|
||||
|
||||
// Enable response to system notifications
|
||||
[[NSNotificationCenter defaultCenter] addObserver:sg_cocoaAppObserver
|
||||
m_cocoaAppDelegate = [[wxNSApplicationDelegate alloc] init];
|
||||
[m_cocoaApp setDelegate:m_cocoaAppDelegate];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:m_cocoaAppDelegate
|
||||
selector:@selector(controlTintChanged:)
|
||||
name:NSControlTintDidChangeNotification object:nil];
|
||||
|
||||
if(!sm_isEmbedded)
|
||||
wxMenuBarManager::CreateInstance();
|
||||
wxMenuBarManager::CreateInstance();
|
||||
|
||||
wxDC::CocoaInitializeTextSystem();
|
||||
return true;
|
||||
}
|
||||
|
||||
wxApp::~wxApp()
|
||||
{
|
||||
if(m_cfRunLoopIdleObserver != NULL)
|
||||
{
|
||||
// Invalidate the observer which also removes it from the run loop.
|
||||
CFRunLoopObserverInvalidate(m_cfRunLoopIdleObserver);
|
||||
// Release the ref as we don't need it anymore.
|
||||
m_cfRunLoopIdleObserver.reset();
|
||||
}
|
||||
}
|
||||
|
||||
bool wxApp::CallOnInit()
|
||||
{
|
||||
// wxAutoNSAutoreleasePool pool;
|
||||
@@ -350,80 +356,6 @@ void wxApp::WakeUpIdle()
|
||||
subtype:0 data1:0 data2:0] atStart:NO];
|
||||
}
|
||||
|
||||
extern "C" static void ObserveMainRunLoopBeforeWaiting(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info);
|
||||
extern "C" static void ObserveMainRunLoopBeforeWaiting(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info)
|
||||
{
|
||||
static_cast<wxApp*>(info)->CF_ObserveMainRunLoopBeforeWaiting(observer, activity);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int sg_cApplicationWillUpdate = 0;
|
||||
#endif
|
||||
|
||||
void wxApp::CocoaDelegate_applicationWillUpdate()
|
||||
{
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("applicationWillUpdate"));
|
||||
|
||||
// CFRunLoopRef cfRunLoop = [[NSRunLoop currentRunLoop] getCFRunLoop];
|
||||
CFRunLoopRef cfRunLoop = CFRunLoopGetCurrent();
|
||||
wxCFRef<CFStringRef> cfRunLoopMode(CFRunLoopCopyCurrentMode(cfRunLoop));
|
||||
|
||||
if(m_cfRunLoopIdleObserver != NULL && m_cfObservedRunLoopMode != cfRunLoopMode)
|
||||
{
|
||||
CFRunLoopObserverInvalidate(m_cfRunLoopIdleObserver);
|
||||
m_cfRunLoopIdleObserver.reset();
|
||||
}
|
||||
#if 0
|
||||
++sg_cApplicationWillUpdate;
|
||||
#endif
|
||||
if(m_cfRunLoopIdleObserver == NULL)
|
||||
{
|
||||
// Enable idle event handling
|
||||
CFRunLoopObserverContext observerContext =
|
||||
{ 0
|
||||
, this
|
||||
, NULL
|
||||
, NULL
|
||||
, NULL
|
||||
};
|
||||
m_cfRunLoopIdleObserver.reset(CFRunLoopObserverCreate(kCFAllocatorDefault, kCFRunLoopBeforeWaiting, /*repeats*/FALSE, /*priority*/0, ObserveMainRunLoopBeforeWaiting, &observerContext));
|
||||
m_cfObservedRunLoopMode = cfRunLoopMode;
|
||||
CFRunLoopAddObserver(cfRunLoop, m_cfRunLoopIdleObserver, m_cfObservedRunLoopMode);
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool FakeNeedMoreIdle()
|
||||
{
|
||||
#if 0
|
||||
// Return true on every 10th call.
|
||||
static int idleCount = 0;
|
||||
return ++idleCount % 10;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxApp::CF_ObserveMainRunLoopBeforeWaiting(CFRunLoopObserverRef observer, int activity)
|
||||
{
|
||||
// Ensure that the app knows we've been invalidated
|
||||
m_cfRunLoopIdleObserver.reset();
|
||||
#if 0
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("Idle BEGIN (%d)"), sg_cApplicationWillUpdate);
|
||||
sg_cApplicationWillUpdate = 0;
|
||||
#else
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("Idle BEGIN"));
|
||||
#endif
|
||||
if( ProcessIdle() || FakeNeedMoreIdle() )
|
||||
{
|
||||
wxLogTrace(wxTRACE_COCOA, wxT("Idle REQUEST MORE"));
|
||||
[NSApp setWindowsNeedUpdate:YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogTrace(wxTRACE_COCOA, wxT("Idle END"));
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
void wxApp::OnAssert(const wxChar *file, int line, const wxChar* cond, const wxChar *msg)
|
||||
{
|
||||
|
@@ -364,9 +364,6 @@ bool wxBitmap::SaveFile(const wxString& filename, wxBitmapType type, const wxPal
|
||||
|
||||
bool wxBitmap::CopyFromIcon(const wxIcon& icon)
|
||||
{
|
||||
// Pool here due to lack of one during wx init phase
|
||||
wxAutoNSAutoreleasePool pool;
|
||||
|
||||
UnRef();
|
||||
if(!icon.GetNSImage());
|
||||
[icon.GetNSImage() lockFocus];
|
||||
@@ -526,13 +523,6 @@ wxMask::wxMask(const wxBitmap& bitmap)
|
||||
Create(bitmap);
|
||||
}
|
||||
|
||||
// Copy constructor
|
||||
wxMask::wxMask(const wxMask& src)
|
||||
: wxObject(src)
|
||||
, m_cocoaNSBitmapImageRep([src.m_cocoaNSBitmapImageRep retain])
|
||||
{
|
||||
}
|
||||
|
||||
wxMask::~wxMask()
|
||||
{
|
||||
[m_cocoaNSBitmapImageRep release];
|
||||
@@ -542,7 +532,6 @@ wxMask::~wxMask()
|
||||
bool wxMask::Create(const wxBitmap& bitmap)
|
||||
{
|
||||
// TODO
|
||||
wxLogDebug(wxT("Cannot yet create a mask from a mono bitmap"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -551,7 +540,6 @@ bool wxMask::Create(const wxBitmap& bitmap)
|
||||
bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex)
|
||||
{
|
||||
// TODO
|
||||
wxLogDebug(wxT("Cannot yet create a mask from a palette bitmap"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -658,14 +646,6 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
|
||||
wxCHECK_MSG(wxMask_CreateFromBitmapData(pixelData, colour, dstData),
|
||||
false, wxT("Unable to access raw data"));
|
||||
}
|
||||
else if([srcBitmapRep bitsPerPixel]==8 && [srcBitmapRep bitsPerSample]==8 && [srcBitmapRep samplesPerPixel]==1 && [srcBitmapRep hasAlpha]==NO)
|
||||
// 8-bpp Grayscale, no alpha
|
||||
{ // Force all RGB to access the same grayscale component
|
||||
typedef wxPixelFormat<unsigned char,8,0,0,0> PixelFormat;
|
||||
wxPixelData<wxBitmap,PixelFormat> pixelData(const_cast<wxBitmap&>(bitmap));
|
||||
wxCHECK_MSG(wxMask_CreateFromBitmapData(pixelData, colour, dstData),
|
||||
false, wxT("Unable to access raw data"));
|
||||
}
|
||||
else
|
||||
{ wxCHECK_MSG(false,false,wxT("Unimplemented pixel format")); }
|
||||
|
||||
|
@@ -48,7 +48,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid,
|
||||
[m_cocoaNSView release];
|
||||
|
||||
[GetNSButton() setBezelStyle:NSRoundedBezelStyle];
|
||||
CocoaSetLabelForObject(label, GetNSButton());
|
||||
[GetNSButton() setTitle:wxNSStringWithWxString(GetLabelText(label))];
|
||||
[GetNSControl() sizeToFit];
|
||||
|
||||
if(m_parent)
|
||||
@@ -78,7 +78,7 @@ wxString wxButton::GetLabel() const
|
||||
|
||||
void wxButton::SetLabel(const wxString& label)
|
||||
{
|
||||
CocoaSetLabelForObject(label, GetNSButton());
|
||||
[GetNSButton() setTitle:wxNSStringWithWxString(GetLabelText(label))];
|
||||
}
|
||||
|
||||
wxSize wxButton::DoGetBestSize() const
|
||||
|
@@ -47,7 +47,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid,
|
||||
[m_cocoaNSView release];
|
||||
[GetNSButton() setButtonType: NSSwitchButton];
|
||||
[GetNSButton() setAllowsMixedState: Is3State()];
|
||||
CocoaSetLabelForObject(label, GetNSButton());
|
||||
[GetNSButton() setTitle:wxNSStringWithWxString(GetLabelText(label))];
|
||||
[GetNSControl() sizeToFit];
|
||||
|
||||
if(m_parent)
|
||||
@@ -140,14 +140,6 @@ void wxCheckBox::Cocoa_wxNSButtonAction(void)
|
||||
void wxCheckBox::SetLabel(const wxString& s)
|
||||
{
|
||||
wxAutoNSAutoreleasePool pool;
|
||||
CocoaSetLabelForObject(s, GetNSButton());
|
||||
[GetNSButton() setTitle:wxNSStringWithWxString(s)];
|
||||
}
|
||||
|
||||
wxString wxCheckBox::GetLabel() const
|
||||
{
|
||||
wxAutoNSAutoreleasePool pool;
|
||||
return wxStringWithNSString([GetNSButton() title]);
|
||||
|
||||
}
|
||||
|
||||
#endif // wxUSE_CHECKBOX
|
||||
#endif
|
||||
|
@@ -86,6 +86,8 @@
|
||||
#include "wx/app.h"
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
#include "wx/cocoa/ObjcPose.h"
|
||||
|
||||
#import <AppKit/NSComboBox.h>
|
||||
#import <Foundation/NSNotification.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
@@ -17,11 +17,7 @@
|
||||
#include "wx/log.h"
|
||||
#endif
|
||||
|
||||
#include "wx/cocoa/string.h"
|
||||
#include "wx/cocoa/autorelease.h"
|
||||
#include "wx/cocoa/string.h"
|
||||
#include "wx/cocoa/trackingrectmanager.h"
|
||||
#include "wx/cocoa/objc/objc_uniquifying.h"
|
||||
|
||||
#import <AppKit/NSControl.h>
|
||||
#import <AppKit/NSCell.h>
|
||||
@@ -33,168 +29,17 @@
|
||||
{
|
||||
}
|
||||
|
||||
- (id)initWithFrame: (NSRect)frameRect;
|
||||
- (void)drawRect: (NSRect)rect;
|
||||
- (void)mouseDown:(NSEvent *)theEvent;
|
||||
- (void)mouseDragged:(NSEvent *)theEvent;
|
||||
- (void)mouseUp:(NSEvent *)theEvent;
|
||||
- (void)mouseMoved:(NSEvent *)theEvent;
|
||||
- (void)mouseEntered:(NSEvent *)theEvent;
|
||||
- (void)mouseExited:(NSEvent *)theEvent;
|
||||
- (void)rightMouseDown:(NSEvent *)theEvent;
|
||||
- (void)rightMouseDragged:(NSEvent *)theEvent;
|
||||
- (void)rightMouseUp:(NSEvent *)theEvent;
|
||||
- (void)otherMouseDown:(NSEvent *)theEvent;
|
||||
- (void)otherMouseDragged:(NSEvent *)theEvent;
|
||||
- (void)otherMouseUp:(NSEvent *)theEvent;
|
||||
- (void)resetCursorRects;
|
||||
- (void)viewDidMoveToWindow;
|
||||
- (void)viewWillMoveToWindow:(NSWindow *)newWindow;
|
||||
@end // wxNonControlNSControl
|
||||
WX_DECLARE_GET_OBJC_CLASS(wxNonControlNSControl,NSControl)
|
||||
|
||||
@implementation wxNonControlNSControl : NSControl
|
||||
|
||||
- (id)initWithFrame: (NSRect)frameRect
|
||||
{
|
||||
if( (self = [super initWithFrame:frameRect]) == nil)
|
||||
return nil;
|
||||
// NSControl by default has no cell as it is semi-abstract.
|
||||
// Provide a normal NSCell for the sole purpose of making
|
||||
// setStringValue/stringValue work for labels in 2.8.
|
||||
NSCell *newCell = [[NSCell alloc] initTextCell:@""];
|
||||
[self setCell:newCell];
|
||||
[newCell release];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
|
||||
{
|
||||
bool acceptsFirstMouse = false;
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if(!win || !win->Cocoa_acceptsFirstMouse(acceptsFirstMouse, theEvent))
|
||||
acceptsFirstMouse = [super acceptsFirstMouse:theEvent];
|
||||
return acceptsFirstMouse;
|
||||
}
|
||||
|
||||
- (void)drawRect: (NSRect)rect
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_drawRect(rect) )
|
||||
[super drawRect:rect];
|
||||
}
|
||||
|
||||
- (void)mouseDown:(NSEvent *)theEvent
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_mouseDown(theEvent) )
|
||||
[super mouseDown:theEvent];
|
||||
}
|
||||
|
||||
- (void)mouseDragged:(NSEvent *)theEvent
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_mouseDragged(theEvent) )
|
||||
[super mouseDragged:theEvent];
|
||||
}
|
||||
|
||||
- (void)mouseUp:(NSEvent *)theEvent
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_mouseUp(theEvent) )
|
||||
[super mouseUp:theEvent];
|
||||
}
|
||||
|
||||
- (void)mouseMoved:(NSEvent *)theEvent
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_mouseMoved(theEvent) )
|
||||
[super mouseMoved:theEvent];
|
||||
}
|
||||
|
||||
- (void)mouseEntered:(NSEvent *)theEvent
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_mouseEntered(theEvent) )
|
||||
[super mouseEntered:theEvent];
|
||||
}
|
||||
|
||||
- (void)mouseExited:(NSEvent *)theEvent
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_mouseExited(theEvent) )
|
||||
[super mouseExited:theEvent];
|
||||
}
|
||||
|
||||
- (void)rightMouseDown:(NSEvent *)theEvent
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_rightMouseDown(theEvent) )
|
||||
[super rightMouseDown:theEvent];
|
||||
}
|
||||
|
||||
- (void)rightMouseDragged:(NSEvent *)theEvent
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_rightMouseDragged(theEvent) )
|
||||
[super rightMouseDragged:theEvent];
|
||||
}
|
||||
|
||||
- (void)rightMouseUp:(NSEvent *)theEvent
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_rightMouseUp(theEvent) )
|
||||
[super rightMouseUp:theEvent];
|
||||
}
|
||||
|
||||
- (void)otherMouseDown:(NSEvent *)theEvent
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_otherMouseDown(theEvent) )
|
||||
[super otherMouseDown:theEvent];
|
||||
}
|
||||
|
||||
- (void)otherMouseDragged:(NSEvent *)theEvent
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_otherMouseDragged(theEvent) )
|
||||
[super otherMouseDragged:theEvent];
|
||||
}
|
||||
|
||||
- (void)otherMouseUp:(NSEvent *)theEvent
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_otherMouseUp(theEvent) )
|
||||
[super otherMouseUp:theEvent];
|
||||
}
|
||||
|
||||
- (void)resetCursorRects
|
||||
{
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_resetCursorRects() )
|
||||
[super resetCursorRects];
|
||||
}
|
||||
|
||||
- (void)viewDidMoveToWindow
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_viewDidMoveToWindow() )
|
||||
#endif
|
||||
[super viewDidMoveToWindow];
|
||||
}
|
||||
|
||||
- (void)viewWillMoveToWindow:(NSWindow *)newWindow
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_viewWillMoveToWindow(newWindow) )
|
||||
#endif
|
||||
[super viewWillMoveToWindow:newWindow];
|
||||
}
|
||||
|
||||
@end // wxNonControlNSControl
|
||||
WX_IMPLEMENT_GET_OBJC_CLASS(wxNonControlNSControl,NSControl)
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow)
|
||||
BEGIN_EVENT_TABLE(wxControl, wxControlBase)
|
||||
@@ -210,7 +55,7 @@ bool wxControl::Create(wxWindow *parent, wxWindowID winid,
|
||||
return false;
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("Created control with id=%d"),GetId());
|
||||
m_cocoaNSView = NULL;
|
||||
SetNSControl([[WX_GET_OBJC_CLASS(wxNonControlNSControl) alloc] initWithFrame: MakeDefaultNSRect(size)]);
|
||||
SetNSControl([[wxNonControlNSControl alloc] initWithFrame: MakeDefaultNSRect(size)]);
|
||||
// NOTE: YES we want to release this (to match the alloc).
|
||||
// DoAddChild(this) will retain us again since addSubView doesn't.
|
||||
[m_cocoaNSView release];
|
||||
@@ -221,11 +66,6 @@ bool wxControl::Create(wxWindow *parent, wxWindowID winid,
|
||||
m_parent->CocoaAddChild(this);
|
||||
SetInitialFrameRect(pos,size);
|
||||
|
||||
#if 0 // ABI incompatibility
|
||||
// Controls should have a viewable-area tracking rect by default
|
||||
m_visibleTrackingRectManager = new wxCocoaTrackingRectManager(this);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -240,8 +80,11 @@ wxSize wxControl::DoGetBestSize() const
|
||||
wxASSERT(GetNSControl());
|
||||
/* We can ask single-celled controls for their cell and get its size */
|
||||
NSCell *cell = nil;
|
||||
if([GetNSControl() respondsToSelector:@selector(cell)])
|
||||
cell = [GetNSControl() cell];
|
||||
NS_DURING
|
||||
cell = [GetNSControl() cell];
|
||||
NS_HANDLER
|
||||
// TODO: if anything other than method not implemented, re-raise
|
||||
NS_ENDHANDLER
|
||||
if(cell)
|
||||
{
|
||||
NSSize cellSize = [cell cellSize];
|
||||
@@ -251,10 +94,16 @@ wxSize wxControl::DoGetBestSize() const
|
||||
}
|
||||
|
||||
/* multi-celled control? size to fit, get the size, then set it back */
|
||||
if([GetNSControl() respondsToSelector:@selector(sizeToFit)])
|
||||
NSRect storedRect = [m_cocoaNSView frame];
|
||||
bool didFit = false;
|
||||
NS_DURING
|
||||
[GetNSControl() sizeToFit];
|
||||
didFit = true;
|
||||
NS_HANDLER
|
||||
// TODO: if anything other than method not implemented, re-raise
|
||||
NS_ENDHANDLER
|
||||
if(didFit)
|
||||
{
|
||||
NSRect storedRect = [m_cocoaNSView frame];
|
||||
[GetNSControl() sizeToFit];
|
||||
NSRect cocoaRect = [m_cocoaNSView frame];
|
||||
wxSize size((int)ceil(cocoaRect.size.width),(int)ceil(cocoaRect.size.height));
|
||||
[m_cocoaNSView setFrame: storedRect];
|
||||
@@ -275,30 +124,3 @@ void wxControl::CocoaSetEnabled(bool enable)
|
||||
{
|
||||
[GetNSControl() setEnabled: enable];
|
||||
}
|
||||
|
||||
/*static*/ void wxControl::CocoaSetLabelForObject(const wxString& label, struct objc_object *aView)
|
||||
{
|
||||
[aView setTitle:wxNSStringWithWxString(GetLabelText(label))];
|
||||
}
|
||||
|
||||
wxString wxControl::GetLabel() const
|
||||
{
|
||||
if([GetNSControl() isKindOfClass:[WX_GET_OBJC_CLASS(wxNonControlNSControl) class]])
|
||||
{
|
||||
return wxStringWithNSString([GetNSControl() stringValue]);
|
||||
}
|
||||
else
|
||||
return wxControlBase::GetLabel();
|
||||
}
|
||||
|
||||
void wxControl::SetLabel(const wxString& label)
|
||||
{
|
||||
wxControlBase::SetLabel(label);
|
||||
// wx 2.8 hack: we need somewhere to stuff the label for
|
||||
// platform-independent subclasses of wxControl.
|
||||
if([GetNSControl() isKindOfClass:[WX_GET_OBJC_CLASS(wxNonControlNSControl) class]])
|
||||
{
|
||||
[GetNSControl() setStringValue:wxNSStringWithWxString(label)];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2,12 +2,10 @@
|
||||
// Name: src/cocoa/cursor.mm
|
||||
// Purpose: wxCursor class for wxCocoa
|
||||
// Author: Ryan Norton
|
||||
// David Elliott
|
||||
// Modified by:
|
||||
// Created: 2004-10-05
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Ryan Norton
|
||||
// 2007, Software 2000 Ltd.
|
||||
// Licence: wxWidgets licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -17,13 +15,11 @@
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/icon.h"
|
||||
#include "wx/log.h"
|
||||
#endif //WX_PRECOMP
|
||||
|
||||
#import <AppKit/NSCursor.h>
|
||||
#import <AppKit/NSImage.h>
|
||||
#include "wx/cocoa/string.h"
|
||||
#include "wx/cocoa/autorelease.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap)
|
||||
|
||||
@@ -34,11 +30,6 @@ typedef struct tagClassicCursor
|
||||
wxInt16 hotspot[2];
|
||||
}ClassicCursor;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// This is a direct copy from src/mac/carbon/cursor.cpp and should be
|
||||
// changed to use common code if we plan on keeping it this way.
|
||||
// Note that this is basically an array of classic 'CURS' resources.
|
||||
|
||||
const short kwxCursorBullseye = 0 ;
|
||||
const short kwxCursorBlank = 1 ;
|
||||
const short kwxCursorPencil = 2 ;
|
||||
@@ -181,15 +172,7 @@ ClassicCursor gMacCursors[kwxCursorLast+1] =
|
||||
|
||||
} ;
|
||||
|
||||
// End of data copied from src/mac/carbon/cursor.cpp
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* NSCursorCreateWithPrivateId
|
||||
* Returns a newly allocated (i.e. retainCount == 1) NSCursor based on the
|
||||
* classic Mac OS cursor data in this source file. This allows us to
|
||||
* implement the "stock" wxWidgets cursors which aren't present in Cocoa.
|
||||
*/
|
||||
static inline NSCursor* NSCursorCreateWithPrivateId(short sIndex)
|
||||
NSCursor* wxGetStockCursor( short sIndex )
|
||||
{
|
||||
ClassicCursor* pCursor = &gMacCursors[sIndex];
|
||||
|
||||
@@ -197,50 +180,42 @@ static inline NSCursor* NSCursorCreateWithPrivateId(short sIndex)
|
||||
//identical mask that is 1 for on and 0 for off
|
||||
NSImage *theImage = [[NSImage alloc] initWithSize:NSMakeSize(16.0,16.0)];
|
||||
|
||||
NSBitmapImageRep *theRep = [[NSBitmapImageRep alloc]
|
||||
initWithBitmapDataPlanes: NULL // Tell Cocoa to allocate the planes for us.
|
||||
pixelsWide: 16 // All classic cursors are 16x16
|
||||
pixelsHigh: 16
|
||||
bitsPerSample: 1 // All classic cursors are bitmaps with bitmasks
|
||||
samplesPerPixel: 2 // Sample 0:image 1:mask
|
||||
hasAlpha: YES // Identify last sample as a mask
|
||||
isPlanar: YES // Use a separate array for each sample
|
||||
colorSpaceName: NSCalibratedWhiteColorSpace // 0.0=black 1.0=white
|
||||
bytesPerRow: 2 // Rows in each plane are on 2-byte boundaries (no pad)
|
||||
bitsPerPixel: 1]; // same as bitsPerSample since data is planar
|
||||
// XXX: Should we use NSDeviceWhiteColorSpace? Does it matter?
|
||||
|
||||
// Ensure that Cocoa allocated 2 and only 2 of the 5 possible planes
|
||||
unsigned char *planes[5];
|
||||
[theRep getBitmapDataPlanes:planes];
|
||||
wxASSERT(planes[0] != NULL);
|
||||
wxASSERT(planes[1] != NULL);
|
||||
wxASSERT(planes[2] == NULL);
|
||||
wxASSERT(planes[3] == NULL);
|
||||
wxASSERT(planes[4] == NULL);
|
||||
//NSCursor takes an NSImage takes a number of Representations - here
|
||||
//we need only one for the raw data
|
||||
NSBitmapImageRep *theRep =
|
||||
[[NSBitmapImageRep alloc]
|
||||
initWithBitmapDataPlanes: nil // Allocate the buffer for us :)
|
||||
pixelsWide: 16
|
||||
pixelsHigh: 16
|
||||
bitsPerSample: 1
|
||||
samplesPerPixel: 2
|
||||
hasAlpha: YES // Well, more like a mask...
|
||||
isPlanar: NO
|
||||
colorSpaceName: NSCalibratedWhiteColorSpace // Normal B/W - 0 black 1 white
|
||||
bytesPerRow: 0 // I don't care - figure it out for me :)
|
||||
bitsPerPixel: 2]; // bitsPerSample * samplesPerPixel
|
||||
|
||||
// NOTE1: The Cursor's bits field is white=0 black=1.. thus the bitwise-not
|
||||
// Why not use NSCalibratedBlackColorSpace? Because that reverses the
|
||||
// sense of the alpha (mask) plane.
|
||||
// NOTE2: The mask data is 0=off 1=on
|
||||
// NOTE3: Cocoa asks for "premultiplied" color planes. Since we have a
|
||||
// 1-bit color plane and a 1-bit alpha plane we can just do a bitwise-and
|
||||
// on the two. The original cursor bitmaps have 0 (white actually) for
|
||||
// any masked-off pixels. Therefore every masked-off pixel would be wrong
|
||||
// since we bit-flip all of the picture bits. In practice, Cocoa doesn't
|
||||
// seem to care, but we are following the documentation.
|
||||
//unsigned int is better to put data in then a void*
|
||||
//note that working with bitfields would be a lot better here -
|
||||
//but since it breaks some compilers...
|
||||
wxUint32 *data = (wxUint32 *)[theRep bitmapData];
|
||||
|
||||
// Fill in the color (black/white) plane
|
||||
for(int i=0; i<16; ++i)
|
||||
//traverse through the bitmap data
|
||||
for (int i = 0; i < 16; ++i)
|
||||
{
|
||||
planes[0][2*i ] = (~pCursor->bits[i] & pCursor->mask[i]) >> 8 & 0xff;
|
||||
planes[0][2*i+1] = (~pCursor->bits[i] & pCursor->mask[i]) & 0xff;
|
||||
}
|
||||
// Fill in the alpha (i.e. mask) plane
|
||||
for(int i=0; i<16; ++i)
|
||||
{
|
||||
planes[1][2*i ] = pCursor->mask[i] >> 8 & 0xff;
|
||||
planes[1][2*i+1] = pCursor->mask[i] & 0xff;
|
||||
//bit alpha bit alpha ... :D
|
||||
|
||||
//Notice the = instead of |= -
|
||||
//this is to avoid doing a memset earlier
|
||||
data[i] = 0;
|
||||
|
||||
//do the rest of those bits and alphas :)
|
||||
for (int shift = 0; shift < 32; ++shift)
|
||||
{
|
||||
const int bit = 1 << (shift >> 1);
|
||||
data[i] |= ( !!( (pCursor->mask[i] & bit) ) ) << shift;
|
||||
data[i] |= ( !( (pCursor->bits[i] & bit) ) ) << ++shift;
|
||||
}
|
||||
}
|
||||
|
||||
//add the representation (data) to the image
|
||||
@@ -259,13 +234,6 @@ static inline NSCursor* NSCursorCreateWithPrivateId(short sIndex)
|
||||
return theCursor;
|
||||
}
|
||||
|
||||
// TODO: Remove in trunk.. needed for 2.8
|
||||
NSCursor* wxGetStockCursor( short sIndex )
|
||||
{
|
||||
wxLogDebug(wxT("Please do not call wxGetStockCursor."));
|
||||
return NSCursorCreateWithPrivateId(sIndex);
|
||||
}
|
||||
|
||||
wxCursorRefData::wxCursorRefData() :
|
||||
m_width(32), m_height(32), m_hCursor(nil)
|
||||
{
|
||||
@@ -315,129 +283,133 @@ wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int ho
|
||||
[theImage release];
|
||||
}
|
||||
|
||||
// Returns a system cursor given the NSCursor class method selector or
|
||||
// nil if NSCursor does not respond to the message.
|
||||
// For example, OS X before 10.3 won't respond to pointingHandCursor.
|
||||
static inline NSCursor* GetSystemCursorWithSelector(SEL cursorSelector)
|
||||
// Cursors by stock number
|
||||
wxCursor::wxCursor(int cursor_type)
|
||||
{
|
||||
if([NSCursor respondsToSelector: cursorSelector])
|
||||
return [NSCursor performSelector: cursorSelector];
|
||||
else
|
||||
return nil;
|
||||
}
|
||||
m_refData = new wxCursorRefData;
|
||||
|
||||
// Please maintain order as if this were an array keyed on wxStockCursor
|
||||
static inline SEL GetCursorSelectorForStockCursor(int stock_cursor_id)
|
||||
{
|
||||
switch(stock_cursor_id)
|
||||
{
|
||||
case wxCURSOR_ARROW: return @selector(arrowCursor);
|
||||
case wxCURSOR_RIGHT_ARROW: break;
|
||||
case wxCURSOR_BULLSEYE: break;
|
||||
case wxCURSOR_CHAR: break;
|
||||
case wxCURSOR_CROSS: return @selector(crosshairCursor);
|
||||
case wxCURSOR_HAND: return @selector(pointingHandCursor);
|
||||
case wxCURSOR_IBEAM: return @selector(IBeamCursor);
|
||||
case wxCURSOR_LEFT_BUTTON: break;
|
||||
case wxCURSOR_MAGNIFIER: break;
|
||||
case wxCURSOR_MIDDLE_BUTTON: break;
|
||||
case wxCURSOR_NO_ENTRY: break;
|
||||
case wxCURSOR_PAINT_BRUSH: break;
|
||||
case wxCURSOR_PENCIL: break;
|
||||
case wxCURSOR_POINT_LEFT: break;
|
||||
case wxCURSOR_POINT_RIGHT: break;
|
||||
case wxCURSOR_QUESTION_ARROW: break;
|
||||
case wxCURSOR_RIGHT_BUTTON: break;
|
||||
case wxCURSOR_SIZENESW: break;
|
||||
case wxCURSOR_SIZENS: return @selector(resizeUpDownCursor);
|
||||
case wxCURSOR_SIZENWSE: break;
|
||||
case wxCURSOR_SIZEWE: return @selector(resizeLeftRightCursor);
|
||||
case wxCURSOR_SIZING: break;
|
||||
case wxCURSOR_SPRAYCAN: break;
|
||||
case wxCURSOR_WAIT: break;
|
||||
case wxCURSOR_WATCH: break;
|
||||
case wxCURSOR_BLANK: break;
|
||||
case wxCURSOR_ARROWWAIT: break;
|
||||
default: break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Please maintain order as if this were an array keyed on wxStockCursor
|
||||
static inline int GetPrivateCursorIdForStockCursor(int stock_cursor_id)
|
||||
{
|
||||
switch(stock_cursor_id)
|
||||
{
|
||||
case wxCURSOR_ARROW: break; // NSCursor
|
||||
case wxCURSOR_RIGHT_ARROW: return kwxCursorRightArrow;
|
||||
case wxCURSOR_BULLSEYE: return kwxCursorBullseye;
|
||||
case wxCURSOR_CHAR: break;
|
||||
case wxCURSOR_CROSS: break; // NSCursor
|
||||
case wxCURSOR_HAND: break; // NSCursor (OS X >= 10.3)
|
||||
case wxCURSOR_IBEAM: break; // NSCursor
|
||||
case wxCURSOR_LEFT_BUTTON: break;
|
||||
case wxCURSOR_MAGNIFIER: return kwxCursorMagnifier;
|
||||
case wxCURSOR_MIDDLE_BUTTON: break;
|
||||
case wxCURSOR_NO_ENTRY: return kwxCursorNoEntry;
|
||||
case wxCURSOR_PAINT_BRUSH: return kwxCursorPaintBrush;
|
||||
case wxCURSOR_PENCIL: return kwxCursorPencil;
|
||||
case wxCURSOR_POINT_LEFT: return kwxCursorPointLeft;
|
||||
case wxCURSOR_POINT_RIGHT: return kwxCursorPointRight;
|
||||
case wxCURSOR_QUESTION_ARROW: return kwxCursorQuestionArrow;
|
||||
case wxCURSOR_RIGHT_BUTTON: break;
|
||||
case wxCURSOR_SIZENESW: return kwxCursorSizeNESW;
|
||||
case wxCURSOR_SIZENS: return kwxCursorSizeNS; // also NSCursor
|
||||
case wxCURSOR_SIZENWSE: return kwxCursorSizeNWSE;
|
||||
case wxCURSOR_SIZEWE: break; // NSCursor
|
||||
case wxCURSOR_SIZING: return kwxCursorSize;
|
||||
case wxCURSOR_SPRAYCAN: return kwxCursorRoller;
|
||||
case wxCURSOR_WAIT: break;
|
||||
case wxCURSOR_WATCH: break;
|
||||
case wxCURSOR_BLANK: return kwxCursorBlank;
|
||||
case wxCURSOR_ARROWWAIT: break;
|
||||
default: break;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Cursors by stock number (enum wxStockCursor)
|
||||
wxCursor::wxCursor(int stock_cursor_id)
|
||||
{
|
||||
m_refData = new wxCursorRefData;
|
||||
|
||||
M_CURSORDATA->m_hCursor = nil;
|
||||
|
||||
wxCHECK_RET( stock_cursor_id > wxCURSOR_NONE && stock_cursor_id < wxCURSOR_MAX,
|
||||
wxT("invalid cursor id in wxCursor() ctor") );
|
||||
|
||||
// Stage 1: Try a system cursor
|
||||
SEL cursorSelector;
|
||||
if( (cursorSelector = GetCursorSelectorForStockCursor(stock_cursor_id)) != NULL)
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = [GetSystemCursorWithSelector(cursorSelector) retain];
|
||||
}
|
||||
|
||||
// TODO: Provide a pointing hand for OS X < 10.3 if desired
|
||||
|
||||
// Stage 2: Try one of the 'CURS'-style cursors
|
||||
if(M_CURSORDATA->m_hCursor == nil)
|
||||
{
|
||||
int privateId;
|
||||
if( (privateId = GetPrivateCursorIdForStockCursor(stock_cursor_id)) >= 0)
|
||||
{ // wxGetStockCursor is not a get method but an alloc method.
|
||||
M_CURSORDATA->m_hCursor = NSCursorCreateWithPrivateId(privateId);
|
||||
switch (cursor_type)
|
||||
{
|
||||
case wxCURSOR_IBEAM:
|
||||
M_CURSORDATA->m_hCursor = [[NSCursor IBeamCursor] retain];
|
||||
break;
|
||||
case wxCURSOR_ARROW:
|
||||
M_CURSORDATA->m_hCursor = [[NSCursor arrowCursor] retain];
|
||||
break;
|
||||
/* TODO:
|
||||
case wxCURSOR_COPY_ARROW:
|
||||
M_CURSORDATA->m_themeCursor = kThemeCopyArrowCursor ;
|
||||
break;
|
||||
case wxCURSOR_WAIT:
|
||||
M_CURSORDATA->m_themeCursor = kThemeWatchCursor ;
|
||||
break;
|
||||
case wxCURSOR_CROSS:
|
||||
M_CURSORDATA->m_themeCursor = kThemeCrossCursor;
|
||||
break;
|
||||
case wxCURSOR_SIZENWSE:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorSizeNWSE);
|
||||
}
|
||||
break;
|
||||
*/
|
||||
case wxCURSOR_SIZENESW:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorSizeNESW);
|
||||
}
|
||||
break;
|
||||
/* TODO:
|
||||
case wxCURSOR_SIZEWE:
|
||||
{
|
||||
M_CURSORDATA->m_themeCursor = kThemeResizeLeftRightCursor;
|
||||
}
|
||||
break;
|
||||
*/
|
||||
case wxCURSOR_SIZENS:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorSizeNS);
|
||||
}
|
||||
break;
|
||||
case wxCURSOR_SIZING:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorSize);
|
||||
}
|
||||
break;
|
||||
/* TODO:
|
||||
case wxCURSOR_HAND:
|
||||
{
|
||||
M_CURSORDATA->m_themeCursor = kThemePointingHandCursor;
|
||||
}
|
||||
break;
|
||||
*/
|
||||
case wxCURSOR_BULLSEYE:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorBullseye);
|
||||
}
|
||||
break;
|
||||
case wxCURSOR_PENCIL:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorPencil);
|
||||
}
|
||||
break;
|
||||
case wxCURSOR_MAGNIFIER:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorMagnifier);
|
||||
}
|
||||
break;
|
||||
case wxCURSOR_NO_ENTRY:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorNoEntry);
|
||||
}
|
||||
break;
|
||||
/* TODO:
|
||||
case wxCURSOR_WATCH:
|
||||
{
|
||||
M_CURSORDATA->m_themeCursor = kThemeWatchCursor;
|
||||
break;
|
||||
}
|
||||
*/
|
||||
case wxCURSOR_PAINT_BRUSH:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorPaintBrush);
|
||||
break;
|
||||
}
|
||||
case wxCURSOR_POINT_LEFT:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorPointLeft);
|
||||
break;
|
||||
}
|
||||
case wxCURSOR_POINT_RIGHT:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorPointRight);
|
||||
break;
|
||||
}
|
||||
case wxCURSOR_QUESTION_ARROW:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorQuestionArrow);
|
||||
break;
|
||||
}
|
||||
case wxCURSOR_BLANK:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorBlank);
|
||||
break;
|
||||
}
|
||||
case wxCURSOR_RIGHT_ARROW:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorRightArrow);
|
||||
break;
|
||||
}
|
||||
case wxCURSOR_SPRAYCAN:
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorRoller);
|
||||
break;
|
||||
}
|
||||
case wxCURSOR_CHAR:
|
||||
case wxCURSOR_LEFT_BUTTON:
|
||||
case wxCURSOR_RIGHT_BUTTON:
|
||||
case wxCURSOR_MIDDLE_BUTTON:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Stage 3: Give up, complain, and use a normal arrow
|
||||
if(M_CURSORDATA->m_hCursor == nil)
|
||||
{
|
||||
wxLogDebug(wxT("Could not find suitable cursor for wxStockCursor = %d. Using normal pointer."), stock_cursor_id);
|
||||
M_CURSORDATA->m_hCursor = [[NSCursor arrowCursor] retain];
|
||||
}
|
||||
|
||||
// This should never happen as the arrowCursor should always exist.
|
||||
wxASSERT(M_CURSORDATA->m_hCursor != nil);
|
||||
}
|
||||
|
||||
wxCursor::~wxCursor()
|
||||
|
@@ -43,7 +43,7 @@ wxCocoaDCStack wxDC::sm_cocoaDCStack;
|
||||
inline void CocoaSetPenForNSBezierPath(wxPen &pen, NSBezierPath *bezpath)
|
||||
{
|
||||
[pen.GetNSColor() set];
|
||||
const CGFloat *pattern;
|
||||
const float *pattern;
|
||||
[bezpath setLineDash:pattern count:pen.GetCocoaLineDash(&pattern) phase:0.0];
|
||||
[bezpath setLineWidth:pen.GetWidth()];
|
||||
switch(pen.GetJoin())
|
||||
@@ -315,25 +315,11 @@ void wxDC::DoDrawText(const wxString& text, wxCoord x, wxCoord y)
|
||||
NSPoint layoutLocation = [sm_cocoaNSLayoutManager locationForGlyphAtIndex:0];
|
||||
layoutLocation.x = 0.0;
|
||||
layoutLocation.y *= -1.0;
|
||||
|
||||
// Save the location as is for underlining
|
||||
NSPoint underlineLocation = layoutLocation;
|
||||
|
||||
// Offset the location by the baseline for drawing the glyphs.
|
||||
layoutLocation.y += [[sm_cocoaNSLayoutManager typesetter] baselineOffsetInLayoutManager:sm_cocoaNSLayoutManager glyphIndex:0];
|
||||
|
||||
if(m_backgroundMode==wxSOLID)
|
||||
[sm_cocoaNSLayoutManager drawBackgroundForGlyphRange:glyphRange atPoint:NSZeroPoint];
|
||||
[sm_cocoaNSLayoutManager drawGlyphsForGlyphRange:glyphRange atPoint:layoutLocation];
|
||||
|
||||
int underlineStyle = GetFont().GetUnderlined() ? NSUnderlineStyleSingle : NSUnderlineStyleNone;
|
||||
NSRange lineGlyphRange;
|
||||
NSRect lineRect = [sm_cocoaNSLayoutManager lineFragmentRectForGlyphAtIndex:0 effectiveRange:&lineGlyphRange];
|
||||
|
||||
[sm_cocoaNSLayoutManager underlineGlyphRange:glyphRange underlineType:underlineStyle
|
||||
lineFragmentRect:lineRect lineFragmentGlyphRange:lineGlyphRange
|
||||
containerOrigin:underlineLocation];
|
||||
|
||||
[context restoreGraphicsState];
|
||||
}
|
||||
|
||||
@@ -441,11 +427,6 @@ void wxDC::DoDrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc,
|
||||
{
|
||||
}
|
||||
|
||||
void wxDC::SetFont(const wxFont& font)
|
||||
{
|
||||
m_font = font;
|
||||
}
|
||||
|
||||
void wxDC::SetPen(const wxPen& pen)
|
||||
{
|
||||
m_pen = pen;
|
||||
|
@@ -78,12 +78,6 @@ void wxMemoryDC::DoSelect( const wxBitmap& bitmap )
|
||||
{
|
||||
CocoaTakeFocus();
|
||||
wxASSERT(m_cocoaNSImage);
|
||||
// Replace the bitmap's native data with a newly created one based on the
|
||||
// NSImage that has been (potentially) drawn upon. Note that this may and
|
||||
// probably will in many cases change the bitmap's format.
|
||||
// There is nothing we can do about this using pure Cocoa code. Even using
|
||||
// CGBitmapContext is not an option because it only supports a limited
|
||||
// number of bitmap formats. Specifically, 24-bpp is not supported.
|
||||
m_selectedBitmap.SetNSBitmapImageRep(
|
||||
[[NSBitmapImageRep alloc]
|
||||
initWithFocusedViewRect:NSMakeRect(0.0,0.0,
|
||||
@@ -102,16 +96,6 @@ void wxMemoryDC::DoSelect( const wxBitmap& bitmap )
|
||||
m_selectedBitmap.GetHeight())];
|
||||
|
||||
// Now copy the data
|
||||
// Pass false to GetNSImage so the mask is not applied as an alpha channel.
|
||||
// Cocoa uses premultiplied alpha so applying the mask would cause all
|
||||
// color information masked out to be turned black which is undesirable.
|
||||
// FIXME: Currently, the mask will not be updated if any drawing occurs.
|
||||
// My only suggestion is for wxCocoa users to eschew the mask in favor
|
||||
// of an alpha channel or to recreate the mask after drawing.
|
||||
// The only way to fix this is to draw twice, once as normal and again
|
||||
// onto the mask to update it. That would require overriding every
|
||||
// single drawing primitive (e.g. DoDrawLine, DoDrawRectangle, etc.)
|
||||
// and would be a major undertaking.
|
||||
NSImage *nsimage = [m_selectedBitmap.GetNSImage(false) retain];
|
||||
[m_cocoaNSImage lockFocus];
|
||||
[nsimage drawAtPoint: NSMakePoint(0,0)
|
||||
@@ -158,48 +142,14 @@ bool wxMemoryDC::CocoaDoBlitOnFocusedDC(wxCoord xdest, wxCoord ydest,
|
||||
[transform concat];
|
||||
[flipTransform concat];
|
||||
|
||||
NSImage *sourceImage;
|
||||
if(useMask)
|
||||
{
|
||||
sourceImage = [m_cocoaNSImage copy];
|
||||
// Apply the mask to the copied image
|
||||
NSBitmapImageRep *maskRep = m_selectedBitmap.GetMask()->GetNSBitmapImageRep();
|
||||
NSImage *maskImage = [[NSImage alloc] initWithSize:[maskRep size]];
|
||||
[maskImage addRepresentation:maskRep];
|
||||
[sourceImage lockFocus];
|
||||
[maskImage compositeToPoint:NSZeroPoint operation:NSCompositeDestinationIn];
|
||||
[sourceImage unlockFocus];
|
||||
[maskImage release];
|
||||
}
|
||||
else
|
||||
{ // retain the m_cocoaNSImage so it has the same ownership as the copy done in the other case.
|
||||
sourceImage = [m_cocoaNSImage retain];
|
||||
}
|
||||
NSCompositingOperation drawingOp;
|
||||
switch(logicalFunc)
|
||||
{
|
||||
case wxCOPY:
|
||||
// Even if not using the mask, the image might have an alpha channel
|
||||
// so always use NSCompositeSourceOver. If the image is fully opaque
|
||||
// it works out the same as NSCompositeCopy.
|
||||
drawingOp = NSCompositeSourceOver;
|
||||
break;
|
||||
// FIXME: implement more raster ops
|
||||
default:
|
||||
wxLogDebug(wxT("wxCocoa does not support blitting with raster operation %d."), logicalFunc);
|
||||
// Just use the default operation.
|
||||
drawingOp = NSCompositeCopy;
|
||||
}
|
||||
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("[m_cocoaNSImage isFlipped]=%d"), [m_cocoaNSImage isFlipped]);
|
||||
[sourceImage drawAtPoint: NSMakePoint(0,0)
|
||||
[m_cocoaNSImage drawAtPoint: NSMakePoint(0,0)
|
||||
fromRect: NSMakeRect(xsrc,
|
||||
m_selectedBitmap.GetHeight()-height-ysrc,
|
||||
width, height)
|
||||
operation: drawingOp
|
||||
operation: NSCompositeCopy // FIXME: raster ops
|
||||
fraction: 1.0];
|
||||
|
||||
[sourceImage release]; // It was either retained, copied, or allocated.
|
||||
[context restoreGraphicsState];
|
||||
return false;
|
||||
}
|
||||
|
@@ -60,10 +60,7 @@ int wxFont::GetPointSize() const
|
||||
|
||||
bool wxFont::GetUnderlined() const
|
||||
{
|
||||
if(M_FONTDATA)
|
||||
return M_FONTDATA->m_underlined;
|
||||
else
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
int wxFont::GetStyle() const
|
||||
|
@@ -170,7 +170,7 @@ void wxFrame::CocoaReplaceView(WX_NSView oldView, WX_NSView newView)
|
||||
void wxFrame::UpdateFrameNSView()
|
||||
{
|
||||
if(!m_frameNSView)
|
||||
{ // NOTE: We only need a plain NSView here since we don't associate it with ourselves.
|
||||
{
|
||||
m_frameNSView = [[NSView alloc] initWithFrame:[[m_cocoaNSWindow contentView] frame]];
|
||||
[m_cocoaNSWindow setContentView: m_frameNSView];
|
||||
[m_frameNSView addSubview:m_cocoaNSView];
|
||||
|
@@ -27,12 +27,6 @@
|
||||
#import <AppKit/NSApplication.h>
|
||||
#import <AppKit/NSWindow.h>
|
||||
|
||||
// Declare setAppleMenu: in an NSApplication category since Tiger and later
|
||||
// releases support it but don't declare it as it's considered deprecated.
|
||||
@interface NSApplication(wxDeprecatedMethodsWeWantToUse)
|
||||
- (void)setAppleMenu:(NSMenu *)menu;
|
||||
@end
|
||||
|
||||
// ============================================================================
|
||||
// wxMenuBarManagerObserver
|
||||
// ============================================================================
|
||||
|
@@ -232,10 +232,10 @@ void wxMDIParentFrame::WindowDidBecomeMain(NSNotification *notification)
|
||||
}
|
||||
if(!hashmap.empty())
|
||||
{
|
||||
NSInteger windowCount = 0;
|
||||
int windowCount = 0;
|
||||
NSCountWindows(&windowCount);
|
||||
wxASSERT(windowCount>0);
|
||||
NSInteger *windowList = new NSInteger[windowCount];
|
||||
int *windowList = new int[windowCount];
|
||||
NSWindowList(windowCount, windowList);
|
||||
wxIntMDIChildFrameHashMap::iterator iter = hashmap.end();
|
||||
for(int i=0; i<windowCount && iter == hashmap.end(); i++)
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#include "wx/cocoa/string.h"
|
||||
|
||||
#import <Foundation/NSString.h>
|
||||
#include "wx/cocoa/objc/NSMenu.h"
|
||||
#import <AppKit/NSMenu.h>
|
||||
|
||||
#if wxUSE_MENUS
|
||||
|
||||
@@ -46,7 +46,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMenu,wxEvtHandler)
|
||||
bool wxMenu::Create(const wxString& title, long style)
|
||||
{
|
||||
wxAutoNSAutoreleasePool pool;
|
||||
m_cocoaNSMenu = [[WXNSMenu alloc] initWithTitle: wxNSStringWithWxString(title)];
|
||||
m_cocoaNSMenu = [[NSMenu alloc] initWithTitle: wxNSStringWithWxString(title)];
|
||||
AssociateNSMenu(m_cocoaNSMenu);
|
||||
return true;
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include "wx/log.h"
|
||||
#endif
|
||||
|
||||
#include "wx/cocoa/ObjcPose.h"
|
||||
#include "wx/cocoa/autorelease.h"
|
||||
#include "wx/cocoa/string.h"
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user