Compare commits
136 Commits
wxPy_2_3_2
...
wxPy_2_3_2
Author | SHA1 | Date | |
---|---|---|---|
|
6b943ffcaa | ||
|
74b1c2658a | ||
|
ecc08ead91 | ||
|
34a1d7328f | ||
|
c8bc33d5b5 | ||
|
5bf2abe348 | ||
|
361128cbf7 | ||
|
edd971741e | ||
|
217cb2fab8 | ||
|
12bba77343 | ||
|
9b9cab370f | ||
|
134677bde9 | ||
|
c8e8ae85c8 | ||
|
bcbf288197 | ||
|
c50536396d | ||
|
2e9f62dafb | ||
|
55fb2c6cc2 | ||
|
f427e0d634 | ||
|
8191741f68 | ||
|
75ad8febf6 | ||
|
23d8bb2c66 | ||
|
b231914f6a | ||
|
cc1e14d625 | ||
|
d08e6e59ed | ||
|
37d0bdff98 | ||
|
b09bda689c | ||
|
82c9f85ce5 | ||
|
c2fd78b10f | ||
|
24a23c3573 | ||
|
038072e2f1 | ||
|
e6adf05834 | ||
|
db0aec831d | ||
|
fb1a41cd75 | ||
|
9e9140114e | ||
|
d50d561a05 | ||
|
a8945eeff6 | ||
|
a8bf5281df | ||
|
79c3b7b216 | ||
|
5b60dec5c1 | ||
|
21f4383ae7 | ||
|
f819b4a3ab | ||
|
c981cbe951 | ||
|
38189fd599 | ||
|
5145e34f09 | ||
|
67e49a98bb | ||
|
a9152a05f8 | ||
|
23645bfa01 | ||
|
d6eaea2845 | ||
|
98ffddb1db | ||
|
4693b20c75 | ||
|
eb71219dd0 | ||
|
e1b435afad | ||
|
e355628241 | ||
|
b72a54d1a5 | ||
|
f63e248ec1 | ||
|
b2a9ee3025 | ||
|
dd4f7467b2 | ||
|
6ee2116be1 | ||
|
b9f2926155 | ||
|
0cecad314c | ||
|
297e4185cc | ||
|
11e82c1ba3 | ||
|
e752575a1f | ||
|
c5257cab15 | ||
|
0f1bf77d3d | ||
|
a200c35efa | ||
|
45eb404791 | ||
|
19008b7bb8 | ||
|
d9d4df0e42 | ||
|
b85a6d855b | ||
|
0e0de6b8aa | ||
|
563c260640 | ||
|
1d8dd65e62 | ||
|
55e80573e2 | ||
|
d28516c7c4 | ||
|
8db6ac55e6 | ||
|
8a46f0a21d | ||
|
993cfa8757 | ||
|
85d4fc42e9 | ||
|
ae332f7c0a | ||
|
401d3cc731 | ||
|
ce32af5d96 | ||
|
cefd71d783 | ||
|
059a841c96 | ||
|
80823340ab | ||
|
bd2aeb7ab6 | ||
|
6dbaf73491 | ||
|
0cefee80e7 | ||
|
97c70a028e | ||
|
faac85bf09 | ||
|
19a97bd6f9 | ||
|
72fa862b04 | ||
|
7d9f12f3b9 | ||
|
280df08533 | ||
|
244531bc96 | ||
|
210e3a3a50 | ||
|
ce68e8d061 | ||
|
a3fbed81b2 | ||
|
b1cfebd9f4 | ||
|
3f288b12cc | ||
|
ec8ecff48c | ||
|
87445c2f5c | ||
|
1f603d3d9e | ||
|
a4a6984d5e | ||
|
9968ba85be | ||
|
d11ec3df93 | ||
|
3ad252c96a | ||
|
610c6dedc1 | ||
|
89ce51d52e | ||
|
f36e7ad877 | ||
|
af2c734bc4 | ||
|
b57b228b84 | ||
|
faed65f610 | ||
|
0ad0dc5760 | ||
|
8252c9ca38 | ||
|
52b5ab7edc | ||
|
84553c516c | ||
|
a0bb22c231 | ||
|
e72aa7f5ac | ||
|
88dcf47c56 | ||
|
7335c5a588 | ||
|
70c1945c6a | ||
|
505710ca37 | ||
|
cdf14688f5 | ||
|
431f4c161d | ||
|
651d7a1ff8 | ||
|
a23c00470e | ||
|
977bf6ff42 | ||
|
58782f84f8 | ||
|
59078e629d | ||
|
567f21d2cd | ||
|
8d07927991 | ||
|
97f1fb1987 | ||
|
fea018f801 | ||
|
8de28db94f | ||
|
33381c829b |
243
configure.in
243
configure.in
@@ -2182,96 +2182,103 @@ dnl the name of the static library
|
||||
WX_LIBRARY_NAME_STATIC="lib${WX_LIBRARY}.a"
|
||||
WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY}_gl.a"
|
||||
|
||||
dnl the name of the shared library
|
||||
case "${host}" in
|
||||
*-*-mingw32* )
|
||||
WX_LIBRARY_NAME_SHARED="wx${WX_MAJOR_VERSION_NUMBER}${WX_MINOR_VERSION_NUMBER}_${WX_RELEASE_NUMBER}.dll"
|
||||
;;
|
||||
* )
|
||||
WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
|
||||
WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl the name of the links to the shared library
|
||||
WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}"
|
||||
WX_LIBRARY_LINK2="lib${WX_LIBRARY}-${WX_RELEASE}.so"
|
||||
WX_LIBRARY_LINK3="lib${WX_LIBRARY}.so"
|
||||
WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}"
|
||||
WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so"
|
||||
WX_LIBRARY_LINK3_GL="lib${WX_LIBRARY}_gl.so"
|
||||
|
||||
dnl shared library settings
|
||||
SHARED_LD=
|
||||
PIC_FLAG=
|
||||
WX_ALL=
|
||||
WX_ALL_INSTALLED=
|
||||
BURNT_LIBRARY_NAME=
|
||||
WX_TARGET_LIBRARY_SONAME=
|
||||
|
||||
dnl --- the marker for quick search, leave it here: SHARED_LIB_SETUP ---
|
||||
|
||||
if test "$wxUSE_SHARED" = "yes"; then
|
||||
dnl the name of the shared library
|
||||
case "${host}" in
|
||||
*-*-mingw32* )
|
||||
WX_LIBRARY_NAME_SHARED="wx${WX_MAJOR_VERSION_NUMBER}${WX_MINOR_VERSION_NUMBER}_${WX_RELEASE_NUMBER}.dll"
|
||||
;;
|
||||
|
||||
*-hp-hpux* )
|
||||
SO_SUFFIX="sl"
|
||||
;;
|
||||
|
||||
*-*-darwin* )
|
||||
SO_SUFFIX="dylib"
|
||||
;;
|
||||
|
||||
* )
|
||||
SO_SUFFIX="so"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl set the name of the shared lib if not done above
|
||||
if test "x$SO_SUFFIX" != "x"; then
|
||||
WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
|
||||
WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
|
||||
fi
|
||||
|
||||
dnl the name of the links to the shared library
|
||||
WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.${SO_SUFFIX}.${WX_CURRENT}"
|
||||
WX_LIBRARY_LINK2="lib${WX_LIBRARY}-${WX_RELEASE}.${SO_SUFFIX}"
|
||||
WX_LIBRARY_LINK3="lib${WX_LIBRARY}.${SO_SUFFIX}"
|
||||
WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${SO_SUFFIX}.${WX_CURRENT}"
|
||||
WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${SO_SUFFIX}"
|
||||
WX_LIBRARY_LINK3_GL="lib${WX_LIBRARY}_gl.${SO_SUFFIX}"
|
||||
|
||||
dnl install targets
|
||||
if test "$wxUSE_OPENGL" = "yes"; then
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
|
||||
WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
|
||||
else
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
||||
WX_ALL="CREATE_LINKS"
|
||||
fi
|
||||
|
||||
dnl the extra compiler flags needed for compilation of shared library
|
||||
if test "$GCC" = "yes"; then
|
||||
dnl the switch for gcc is the same under all platforms
|
||||
PIC_FLAG="-fPIC"
|
||||
fi
|
||||
|
||||
dnl the command to use for creating the shared library
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
|
||||
case "${host}" in
|
||||
*-hp-hpux* )
|
||||
if test "$GCC" = yes ; then
|
||||
SHARED_LD="${CXX} -shared -fPIC -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
else
|
||||
dnl default settings are good for gcc but not for the native HP-UX
|
||||
if test "$GCC" != "yes"; then
|
||||
dnl no idea why it wants it, but it does
|
||||
LDFLAGS="-L/usr/lib"
|
||||
|
||||
SHARED_LD="${CXX} -b -o"
|
||||
PIC_FLAG="+Z"
|
||||
fi
|
||||
WX_LIBRARY_NAME_SHARED="libwx_${TOOLKIT_NAME}.sl"
|
||||
WX_LIBRARY_NAME_SHARED_GL="libwx_${TOOLKIT_NAME}_gl.sl"
|
||||
if test "$wxUSE_OPENGL" = "yes"; then
|
||||
WX_ALL_INSTALLED="preinstall_gl"
|
||||
WX_ALL="${WX_LIBRARY_NAME_SHARED} ${WX_LIBRARY_NAME_SHARED_GL}"
|
||||
else
|
||||
WX_ALL="${WX_LIBRARY_NAME_SHARED}"
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
dnl in fact, these settings are for any platform using gcc
|
||||
*-*-linux* )
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
if test "$GCC" != "yes"; then
|
||||
AC_CACHE_CHECK([for Intel compiler], wx_cv_prog_icc,
|
||||
[
|
||||
AC_TRY_COMPILE([],
|
||||
[
|
||||
#ifndef __INTEL_COMPILER
|
||||
#error Not icc
|
||||
#endif
|
||||
],
|
||||
wx_cv_prog_icc=yes,
|
||||
wx_cv_prog_icc=no
|
||||
)
|
||||
])
|
||||
|
||||
if test "$wx_cv_prog_icc" = "yes"; then
|
||||
PIC_FLAG="-KPIC"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$wxUSE_BURNT_NAME" = "yes" ; then
|
||||
BURNT_LIBRARY_NAME="-Wl,-soname,${WX_LIBRARY_LINK1}"
|
||||
BURNT_LIBRARY_NAME_GL="-Wl,-soname,${WX_LIBRARY_LINK1_GL}"
|
||||
dnl substitute this in makelib.env for the contrib libs
|
||||
WX_TARGET_LIBRARY_SONAME="-Wl,-soname,\$(TARGETLIB_LINK1)"
|
||||
fi
|
||||
if test "$wxUSE_OPENGL" = "yes"; then
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
|
||||
WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
|
||||
else
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
||||
WX_ALL="CREATE_LINKS"
|
||||
fi
|
||||
;;
|
||||
*-*-irix5* | *-*-irix6* )
|
||||
if test "$GCC" = yes ; then
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
else
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
fi
|
||||
if test "$wxUSE_OPENGL" = "yes"; then
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
|
||||
WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
|
||||
else
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
||||
WX_ALL="CREATE_LINKS"
|
||||
fi
|
||||
;;
|
||||
|
||||
*-*-solaris2* )
|
||||
if test "$GCC" = yes ; then
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
|
||||
dnl newer versions of gcc need -isystem to compile X headers on
|
||||
dnl Solaris (which use old style C syntax)
|
||||
CPPFLAGS="$CPPFLAGS -isystem /usr/openwin/include"
|
||||
@@ -2279,80 +2286,24 @@ if test "$wxUSE_SHARED" = "yes"; then
|
||||
SHARED_LD="${CXX} -G -o"
|
||||
PIC_FLAG="-KPIC"
|
||||
fi
|
||||
if test "$wxUSE_OPENGL" = "yes"; then
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
|
||||
WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
|
||||
else
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
||||
WX_ALL="CREATE_LINKS"
|
||||
fi
|
||||
;;
|
||||
*-*-sunos4* )
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
||||
WX_ALL="CREATE_LINKS"
|
||||
;;
|
||||
*-*-freebsd* | *-*-openbsd* | *-*-netbsd* )
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
if test "$wxUSE_OPENGL" = "yes"; then
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
|
||||
WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
|
||||
else
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
||||
WX_ALL="CREATE_LINKS"
|
||||
fi
|
||||
;;
|
||||
|
||||
*-*-darwin* )
|
||||
TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -D__DARWIN__ -D__POWERPC__"
|
||||
CPPFLAGS="${CPPFLAGS} -fno-common"
|
||||
SHARED_LD="${CXX} -dynamiclib -o"
|
||||
PIC_FLAG="-dynamic -fPIC"
|
||||
if test "$wxUSE_OPENGL" = "yes"; then
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
|
||||
WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
|
||||
else
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
||||
WX_ALL="CREATE_LINKS"
|
||||
fi
|
||||
|
||||
dnl add the resources target for wxMac
|
||||
if test "$wxUSE_MAC" = 1 ; then
|
||||
WX_ALL="${WX_ALL} ./lib/lib${WX_LIBRARY}-${WX_RELEASE}.r"
|
||||
fi
|
||||
dnl the name of the shared library
|
||||
WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.dylib.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
|
||||
WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.dylib.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
|
||||
dnl the name of the links to the shared library
|
||||
WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.dylib.${WX_CURRENT}"
|
||||
WX_LIBRARY_LINK2="lib${WX_LIBRARY}-${WX_RELEASE}.dylib"
|
||||
WX_LIBRARY_LINK3="lib${WX_LIBRARY}.dylib"
|
||||
WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.dylib.${WX_CURRENT}"
|
||||
WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.dylib"
|
||||
WX_LIBRARY_LINK3_GL="lib${WX_LIBRARY}_gl.dylib"
|
||||
;;
|
||||
*-*-osf* )
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
||||
WX_ALL="CREATE_LINKS"
|
||||
;;
|
||||
*-*-dgux5* )
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
||||
WX_ALL="CREATE_LINKS"
|
||||
;;
|
||||
*-*-sysv5* )
|
||||
SHARED_LD="${CXX} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
||||
WX_ALL="CREATE_LINKS"
|
||||
;;
|
||||
|
||||
*-*-aix* )
|
||||
SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o"
|
||||
WX_ALL=${WX_LIBRARY_NAME_SHARED}
|
||||
;;
|
||||
|
||||
*-*-cygwin* )
|
||||
dnl only static for now
|
||||
WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
|
||||
@@ -2364,6 +2315,7 @@ if test "$wxUSE_SHARED" = "yes"; then
|
||||
WX_ALL="${WX_LIBRARY_NAME_STATIC}"
|
||||
fi
|
||||
;;
|
||||
|
||||
*-*-mingw32* )
|
||||
WX_LIBRARY_NAME_STATIC="lib/libwx${WX_MAJOR_VERSION_NUMBER}${WX_MINOR_VERSION_NUMBER}_${WX_RELEASE_NUMBER}.a"
|
||||
SHARED_LD="${CC} -shared -Wl,--out-implib,${WX_LIBRARY_NAME_STATIC} -o"
|
||||
@@ -2378,19 +2330,28 @@ if test "$wxUSE_SHARED" = "yes"; then
|
||||
WX_ALL="${WX_LIBRARY_NAME_SHARED}"
|
||||
fi
|
||||
;;
|
||||
|
||||
*-pc-os2_emx )
|
||||
dnl only static for now
|
||||
WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
|
||||
WX_ALL="${WX_LIBRARY_NAME_STATIC}"
|
||||
;;
|
||||
|
||||
*-*-beos* )
|
||||
dnl can't use gcc under BeOS for shared library creation because it
|
||||
dnl complains about missing 'main'
|
||||
SHARED_LD="${LD} -shared -o"
|
||||
PIC_FLAG="-fPIC"
|
||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
||||
WX_ALL="CREATE_LINKS"
|
||||
;;
|
||||
|
||||
*-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
|
||||
*-*-sunos4* | \
|
||||
*-*-irix5* | *-*-irix6* | \
|
||||
*-*-osf* | \
|
||||
*-*-dgux5* | \
|
||||
*-*-sysv5* )
|
||||
dnl defaults are ok
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_ERROR(unknown system type ${host}.)
|
||||
esac
|
||||
@@ -2400,6 +2361,7 @@ if test "$wxUSE_SHARED" = "yes"; then
|
||||
WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}"
|
||||
WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_SHARED_GL}"
|
||||
fi
|
||||
|
||||
dnl do not alter the LIBRARY_TYPE strings "so" and "a", they are magic
|
||||
WX_TARGET_LIBRARY_TYPE="so"
|
||||
else
|
||||
@@ -2453,6 +2415,27 @@ fi
|
||||
|
||||
if test "$USE_WIN32" = 1; then
|
||||
AC_CHECK_HEADERS(w32api.h)
|
||||
|
||||
dnl check if can use _WIN_IE macro
|
||||
AC_CACHE_CHECK([if w32api has good enough MSIE support], wx_cv_w32api_win_ie,
|
||||
[
|
||||
AC_TRY_COMPILE([#include <w32api.h>],
|
||||
[
|
||||
#define wxCHECK_W32API_VERSION( major, minor ) \
|
||||
( defined( __W32API_MAJOR_VERSION ) && defined( __W32API_MINOR_VERSION ) \
|
||||
&& ( ( __W32API_MAJOR_VERSION > (major) ) \
|
||||
|| ( __W32API_MAJOR_VERSION == (major) && __W32API_MINOR_VERSION >= (minor))))
|
||||
|
||||
#if !wxCHECK_W32API_VERSION(1,1)
|
||||
#error You need w32api 1.1 or newer
|
||||
#endif
|
||||
], [
|
||||
wx_cv_w32api_win_ie=yes
|
||||
CPPFLAGS="$CPPFLAGS -D_WIN_IE=0x400"
|
||||
], [
|
||||
wx_cv_w32api_win_ie=no
|
||||
])
|
||||
])
|
||||
fi
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
57
contrib/include/wx/applet/plugin.h
Normal file
57
contrib/include/wx/applet/plugin.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* wxWindows HTML Applet Package
|
||||
*
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* The contents of this file are subject to the wxWindows License
|
||||
* Version 3.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.wxwindows.org/licence3.txt
|
||||
*
|
||||
* Software distributed under the License is distributed on an
|
||||
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Header file for the wxQlet class
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __WX_PLUGIN_H
|
||||
#define __WX_PLUGIN_H
|
||||
|
||||
// Forward declaration
|
||||
class wxHtmlAppletWindow;
|
||||
|
||||
/*--------------------------- Class Definitions ---------------------------*/
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Defines the abstract base class for wxQlet objects.
|
||||
****************************************************************************/
|
||||
class wxPlugIn : public wxObject {
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxPlugIn);
|
||||
|
||||
wxHtmlAppletWindow *m_parent;
|
||||
public:
|
||||
// Constructor (called during dynamic creation)
|
||||
wxPlugIn() { m_parent = NULL; };
|
||||
|
||||
// Psuedo virtual constructor
|
||||
virtual bool Create(wxHtmlAppletWindow *parent);
|
||||
|
||||
// Virtual destructor
|
||||
virtual ~wxPlugIn();
|
||||
};
|
||||
#endif // __WX_PLUGIN_H
|
||||
|
@@ -38,9 +38,11 @@
|
||||
|
||||
// Forward declare
|
||||
class wxApplet;
|
||||
class wxQlet;
|
||||
class wxLoadPageEvent;
|
||||
class wxPageLoadedEvent;
|
||||
class wxIncludePrep;
|
||||
class wxToolBarBase;
|
||||
|
||||
// Declare a linked list of wxApplet pointers
|
||||
WX_DECLARE_LIST(wxApplet, wxAppletList);
|
||||
@@ -119,6 +121,9 @@ public:
|
||||
const wxHtmlTag ¶ms,
|
||||
const wxSize& size);
|
||||
|
||||
// Create an instance of an Qlet based on it's class name
|
||||
bool CreatePlugIn(const wxString& classId );
|
||||
|
||||
// Find an instance of an applet based on it's class name
|
||||
wxApplet *FindApplet(const wxString& className);
|
||||
|
||||
@@ -186,6 +191,24 @@ public:
|
||||
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Defines the class for wxHtmlAppletCell
|
||||
***************************************************************************/
|
||||
class wxHtmlAppletCell : public wxHtmlCell
|
||||
{
|
||||
public:
|
||||
wxHtmlAppletCell(wxWindow *wnd, int w = 0);
|
||||
~wxHtmlAppletCell() { m_Wnd->Destroy(); }
|
||||
virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2);
|
||||
virtual void DrawInvisible(wxDC& dc, int x, int y);
|
||||
virtual void Layout(int w);
|
||||
|
||||
protected:
|
||||
wxWindow* m_Wnd;
|
||||
// width float is used in adjustWidth (it is in percents)
|
||||
};
|
||||
|
||||
|
||||
#endif // __WX_APPLET_WINDOW_H
|
||||
|
||||
|
@@ -1052,6 +1052,8 @@ public:
|
||||
cbUpdatesManagerBase( wxFrameLayout* pPanel )
|
||||
: mpLayout( pPanel ) {}
|
||||
|
||||
virtual ~cbUpdatesManagerBase() {}
|
||||
|
||||
void SetLayout( wxFrameLayout* pLayout ) { mpLayout = pLayout; }
|
||||
|
||||
// notificiactions received from frame-layout (in the order, in which
|
||||
|
@@ -116,17 +116,17 @@ public:
|
||||
// overridables
|
||||
|
||||
virtual void AddTool( int toolIndex,
|
||||
wxWindow* pToolWindow,
|
||||
const wxSize& size = wxDefaultSize );
|
||||
wxWindow* pToolWindow,
|
||||
const wxSize& size = wxDefaultSize );
|
||||
|
||||
virtual void AddTool( int toolIndex,
|
||||
const wxString& imageFileName,
|
||||
int imageFileType = wxBITMAP_TYPE_BMP,
|
||||
const wxString& labelText = "", bool alignTextRight = FALSE,
|
||||
bool isFlat = TRUE );
|
||||
virtual void AddTool( int toolIndex, wxBitmap labelBmp,
|
||||
const wxString& labelText = "", bool alignTextRight = FALSE,
|
||||
bool isFlat = TRUE );
|
||||
virtual void AddTool( int toolIndex,
|
||||
const wxString& imageFileName,
|
||||
wxBitmapType imageFileType = wxBITMAP_TYPE_BMP,
|
||||
const wxString& labelText = "", bool alignTextRight = FALSE,
|
||||
bool isFlat = TRUE );
|
||||
virtual void AddTool( int toolIndex, wxBitmap labelBmp,
|
||||
const wxString& labelText = "", bool alignTextRight = FALSE,
|
||||
bool isFlat = TRUE );
|
||||
|
||||
// method from wxToolBarBase (for compatibility), only
|
||||
// first two arguments are valid
|
||||
|
@@ -50,7 +50,7 @@ protected:
|
||||
|
||||
wxString mLabelText;
|
||||
wxString mImageFileName;
|
||||
int mImageFileType;
|
||||
wxBitmapType mImageFileType;
|
||||
|
||||
wxBitmap mDepressedBmp; // source image for rendering
|
||||
// labels for particular state
|
||||
@@ -114,17 +114,17 @@ public:
|
||||
// use this constructor if buttons have to be persistant
|
||||
|
||||
wxNewBitmapButton( const wxString& bitmapFileName,
|
||||
const int bitmapFileType = wxBITMAP_TYPE_BMP,
|
||||
const wxString& labelText = "",
|
||||
int alignText = NB_ALIGN_TEXT_BOTTOM,
|
||||
bool isFlat = TRUE,
|
||||
// this is the default type of fired events
|
||||
int firedEventType = wxEVT_COMMAND_MENU_SELECTED,
|
||||
int marginX = 2,
|
||||
int marginY = 2,
|
||||
int textToLabelGap = 2,
|
||||
bool isSticky = FALSE
|
||||
);
|
||||
const wxBitmapType bitmapFileType = wxBITMAP_TYPE_BMP,
|
||||
const wxString& labelText = "",
|
||||
int alignText = NB_ALIGN_TEXT_BOTTOM,
|
||||
bool isFlat = TRUE,
|
||||
// this is the default type of fired events
|
||||
int firedEventType = wxEVT_COMMAND_MENU_SELECTED,
|
||||
int marginX = 2,
|
||||
int marginY = 2,
|
||||
int textToLabelGap = 2,
|
||||
bool isSticky = FALSE
|
||||
);
|
||||
|
||||
~wxNewBitmapButton();
|
||||
|
||||
|
@@ -33,7 +33,8 @@ public:
|
||||
|
||||
// Send a message.
|
||||
// Specify profile, or leave it to wxWindows to find the current user name
|
||||
static bool Send(wxMailMessage& message, const wxString& profileName = wxEmptyString );
|
||||
static bool Send(wxMailMessage& message, const wxString& profileName = wxEmptyString,
|
||||
const wxString& sendMail = wxT("/usr/lib/sendmail -t"));
|
||||
|
||||
protected:
|
||||
};
|
||||
|
@@ -27,12 +27,14 @@ public:
|
||||
|
||||
// A common usage
|
||||
wxMailMessage(const wxString& subject, const wxString& to,
|
||||
const wxString& body, const wxString& attachment = wxEmptyString,
|
||||
const wxString& body, const wxString& from = wxEmptyString,
|
||||
const wxString& attachment = wxEmptyString,
|
||||
const wxString& attachmentTitle = wxEmptyString)
|
||||
{
|
||||
m_to.Add(to);
|
||||
m_subject = subject;
|
||||
m_body = body;
|
||||
m_from = from;
|
||||
if (!attachment.IsEmpty())
|
||||
{
|
||||
m_attachments.Add(attachment);
|
||||
@@ -52,9 +54,11 @@ public:
|
||||
|
||||
void SetSubject(const wxString& subject) { m_subject = subject; }
|
||||
void SetBody(const wxString& body) { m_body = body; }
|
||||
void SetFrom(const wxString& from) { m_from = from; }
|
||||
|
||||
public:
|
||||
wxArrayString m_to; //The To: Recipients
|
||||
wxString m_from; //The From: email address (optional)
|
||||
wxArrayString m_cc; //The CC: Recipients
|
||||
wxArrayString m_bcc; //The BCC Recipients
|
||||
wxString m_subject; //The Subject of the message
|
||||
|
@@ -734,7 +734,11 @@ public:
|
||||
|
||||
// Retrieve the text of the line containing the caret.
|
||||
// Returns the index of the caret on the line.
|
||||
wxString GetCurLine(int* OUTPUT=NULL);
|
||||
#ifdef SWIG
|
||||
wxString GetCurLine(int* OUTPUT);
|
||||
#else
|
||||
wxString GetCurLine(int* linePos=NULL);
|
||||
#endif
|
||||
|
||||
// Retrieve the position of the last correctly styled character.
|
||||
int GetEndStyled();
|
||||
@@ -1417,10 +1421,10 @@ public:
|
||||
int GetModEventMask();
|
||||
|
||||
// Change internal focus flag
|
||||
void SetFocus(bool focus);
|
||||
void SetSTCFocus(bool focus);
|
||||
|
||||
// Get internal focus flag
|
||||
bool GetFocus();
|
||||
bool GetSTCFocus();
|
||||
|
||||
// Change error status - 0 = OK
|
||||
void SetStatus(int statusCode);
|
||||
@@ -1589,6 +1593,7 @@ private:
|
||||
ScintillaWX* m_swx;
|
||||
wxStopWatch m_stopWatch;
|
||||
|
||||
bool m_lastKeyDownConsumed;
|
||||
|
||||
friend class ScintillaWX;
|
||||
friend class Platform;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,6 @@ public:
|
||||
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnStyleNeeded(wxStyledTextEvent& event);
|
||||
|
||||
private:
|
||||
wxStyledTextCtrl* ed;
|
||||
@@ -70,7 +69,6 @@ enum
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU (ID_Quit, MyFrame::OnQuit)
|
||||
EVT_MENU (ID_About, MyFrame::OnAbout)
|
||||
EVT_STC_STYLENEEDED (ID_ED, MyFrame::OnStyleNeeded)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
IMPLEMENT_APP(MyApp)
|
||||
@@ -128,7 +126,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
ed = new wxStyledTextCtrl(this, ID_ED);
|
||||
|
||||
// Default font
|
||||
wxFont font(8, wxMODERN, wxNORMAL, wxNORMAL);
|
||||
wxFont font(10, wxMODERN, wxNORMAL, wxNORMAL);
|
||||
ed->StyleSetFont(wxSTC_STYLE_DEFAULT, font);
|
||||
ed->StyleClearAll();
|
||||
|
||||
@@ -148,9 +146,9 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
ed->StyleSetBold(10, TRUE);
|
||||
|
||||
#ifdef __WXMSW__
|
||||
ed->StyleSetSpec(2, "fore:#007f00,bold,face:Arial,size:7");
|
||||
ed->StyleSetSpec(2, "fore:#007f00,bold,face:Arial,size:9");
|
||||
#else
|
||||
ed->StyleSetSpec(2, "fore:#007f00,bold,face:Helvetica,size:7");
|
||||
ed->StyleSetSpec(2, "fore:#007f00,bold,face:Helvetica,size:9");
|
||||
#endif
|
||||
|
||||
// give it some text to play with
|
||||
@@ -181,14 +179,6 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
|
||||
// event handlers
|
||||
|
||||
void MyFrame::OnStyleNeeded(wxStyledTextEvent& event) {
|
||||
int currEndStyled = ed->GetEndStyled();
|
||||
ed->Colourise(currEndStyled, event.GetPosition());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// TRUE is to force the frame to close
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# $Id$
|
||||
|
||||
CONTRIB_SUBDIRS=ogl mmedia stc xrc applet plot canvas animate fl
|
||||
CONTRIB_SUBDIRS=ogl mmedia stc xrc plot canvas animate fl #applet
|
||||
|
||||
all:
|
||||
@for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE)); done
|
||||
|
@@ -16,8 +16,10 @@ HEADER_SUBDIR=plot
|
||||
HEADERS=animate.h
|
||||
|
||||
OBJECTS=animate.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -16,8 +16,10 @@ HEADER_SUBDIR=applet
|
||||
HEADERS=applet.h appletwindow.h
|
||||
|
||||
OBJECTS=applet.o appletwindow.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -37,10 +37,16 @@
|
||||
#include "wx/spawnbrowser.h"
|
||||
#include "wx/html/forcelnk.h"
|
||||
|
||||
// crt
|
||||
#ifdef __WXMSW__
|
||||
#include <process.h> // spawnl()
|
||||
#endif
|
||||
|
||||
// Include private headers
|
||||
#include "wx/applet/applet.h"
|
||||
#include "wx/applet/window.h"
|
||||
#include "wx/applet/loadpage.h"
|
||||
#include "wx/applet/plugin.h"
|
||||
|
||||
// Preprocessor Stuff
|
||||
#include "wx/applet/prepinclude.h"
|
||||
@@ -101,6 +107,9 @@ wxHtmlAppletWindow::wxHtmlAppletWindow(
|
||||
// Set up docroot
|
||||
m_DocRoot = docroot;
|
||||
|
||||
// Set the key_type for applets
|
||||
m_AppletList = wxAppletList(wxKEY_STRING);
|
||||
|
||||
// Add HTML preprocessors
|
||||
// deleting preprocessors is done by the code within the window
|
||||
|
||||
@@ -157,10 +166,51 @@ wxApplet *wxHtmlAppletWindow::CreateApplet(
|
||||
delete applet;
|
||||
return NULL;
|
||||
}
|
||||
m_AppletList.Append(iName,applet);
|
||||
else {
|
||||
// do some fixups on the size if its screwed up
|
||||
wxSize nsize = applet->GetBestSize();
|
||||
if (nsize.x < size.x) nsize.x = size.x;
|
||||
if (nsize.y < size.y) nsize.y = size.y;
|
||||
applet->SetSize(nsize);
|
||||
}
|
||||
|
||||
m_AppletList.Append(iName,(wxObject*)applet);
|
||||
return applet;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
PARAMETERS:
|
||||
classId - Name of the Plugin class to create an object for
|
||||
|
||||
RETURNS:
|
||||
Pointer to the wxplugIn created, or NULL if unable to create the PlugIn.
|
||||
|
||||
REMARKS:
|
||||
This function is used to create new wxPlugIn objects dynamically based on the
|
||||
class name as a string. This allows instances of wxPlugIn classes to be
|
||||
created dynamically based on string values embedded in the custom tags of an
|
||||
HTML page.
|
||||
****************************************************************************/
|
||||
bool wxHtmlAppletWindow::CreatePlugIn(
|
||||
const wxString& classId )
|
||||
{
|
||||
// Dynamically create the class instance at runtime
|
||||
wxClassInfo *info = wxClassInfo::FindClass(classId.c_str());
|
||||
if (!info)
|
||||
return false;
|
||||
wxObject *obj = info->CreateObject();
|
||||
if (!obj)
|
||||
return false;
|
||||
wxPlugIn *plugIn = wxDynamicCast(obj,wxPlugIn);
|
||||
if (!plugIn)
|
||||
return false;
|
||||
if (!plugIn->Create(this)) {
|
||||
delete plugIn;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
PARAMETERS:
|
||||
appletName - Name of the applet class to find
|
||||
@@ -213,28 +263,41 @@ True if page loaded successfully, false if not
|
||||
REMARKS:
|
||||
Remove an applet from the manager. Called during applet destruction
|
||||
****************************************************************************/
|
||||
#include "scitech"
|
||||
bool wxHtmlAppletWindow::LoadPage(
|
||||
const wxString& link)
|
||||
{
|
||||
wxString href(link);
|
||||
wxString href(link);
|
||||
|
||||
// Check for abs path. If it is not then tack on the path
|
||||
// supplied at creation.
|
||||
if (!wxIsAbsolutePath(href))
|
||||
href = m_DocRoot + href;
|
||||
// TODO: technically we allow no relative paths
|
||||
|
||||
// Check to see if it is a real url, if not it is a file
|
||||
if (link.Mid(0, 5).CmpNoCase("http:") != 0) {
|
||||
|
||||
// Check for abs path. If it is not then tack on the path
|
||||
// supplied at creation.
|
||||
// TODO: Abs paths are only used in testing (remove this)
|
||||
if (link.GetChar(1) != ':')
|
||||
href = m_DocRoot + href;
|
||||
}
|
||||
|
||||
// TODO: This needs to be made platform inde if possible.
|
||||
if (link.GetChar(0) == '?'){
|
||||
wxString cmd = link.BeforeFirst('=');
|
||||
wxString cmdValue = link.AfterFirst('=');
|
||||
|
||||
// Launches the default Internet browser for the system.
|
||||
if(!(cmd.CmpNoCase("?EXTERNAL"))){
|
||||
return wxSpawnBrowser(this, cmdValue.c_str());
|
||||
}
|
||||
|
||||
// Launches an external program on the system.
|
||||
if (!(cmd.CmpNoCase("?EXECUTE"))){
|
||||
wxProcess *child = new AppletProcess(this);
|
||||
wxExecute(cmdValue, false, child);
|
||||
return true;
|
||||
int code = spawnl( P_NOWAIT, cmdValue , NULL );
|
||||
return (!code);
|
||||
}
|
||||
|
||||
// Looks for a href in a variable stored as a cookie. The href can be
|
||||
// changed on the fly.
|
||||
if (!(cmd.CmpNoCase("?VIRTUAL"))){
|
||||
VirtualData& temp = *((VirtualData*)FindCookie(cmdValue));
|
||||
if (&temp) {
|
||||
@@ -247,6 +310,19 @@ bool wxHtmlAppletWindow::LoadPage(
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// This launches a qlet - It is like an applet but is more generic in that it
|
||||
// can be of any wxWin type so it then has the freedom to do more stuff.
|
||||
if (!(cmd.CmpNoCase("?WXAPPLET"))){
|
||||
if (!cmdValue.IsNull()){
|
||||
if (!CreatePlugIn(cmdValue)){
|
||||
#ifdef CHECKED
|
||||
wxLogError(_T("Launch Applet ERROR: '%s' does not exist."), cmdValue.c_str());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Inform all the applets that the new page is being loaded
|
||||
@@ -528,8 +604,28 @@ TAG_HANDLER_PROC(tag)
|
||||
wnd = m_WParser->GetWindow();
|
||||
|
||||
if ((appletWindow = wxDynamicCast(wnd,wxHtmlAppletWindow)) != NULL){
|
||||
tag.ScanParam("WIDTH", "%i", &width);
|
||||
tag.ScanParam("HEIGHT", "%i", &height);
|
||||
wxSize size = wxDefaultSize;
|
||||
int al;
|
||||
if (tag.HasParam("WIDTH")) {
|
||||
tag.GetParamAsInt("WIDTH", &width);
|
||||
size.SetWidth(width);
|
||||
}
|
||||
|
||||
if (tag.HasParam("HEIGHT")) {
|
||||
tag.GetParamAsInt("HEIGHT", &height);
|
||||
size.SetHeight(height);
|
||||
}
|
||||
|
||||
al = wxHTML_ALIGN_BOTTOM;
|
||||
if (tag.HasParam(wxT("ALIGN"))) {
|
||||
wxString alstr = tag.GetParam(wxT("ALIGN"));
|
||||
alstr.MakeUpper(); // for the case alignment was in ".."
|
||||
if (alstr == wxT("TEXTTOP") || alstr == wxT("TOP"))
|
||||
al = wxHTML_ALIGN_TOP;
|
||||
else if ((alstr == wxT("CENTER")) || (alstr == wxT("ABSCENTER")))
|
||||
al = wxHTML_ALIGN_CENTER;
|
||||
}
|
||||
|
||||
if (tag.HasParam("CLASSID")){
|
||||
classId = tag.GetParam("CLASSID");
|
||||
if ( classId.IsNull() || classId.Len() == 0 ){
|
||||
@@ -545,9 +641,9 @@ TAG_HANDLER_PROC(tag)
|
||||
name = classId;
|
||||
|
||||
// We got all the params and can now create the applet
|
||||
if ((applet = appletWindow->CreateApplet(classId, name, tag , wxSize(width, height))) != NULL){
|
||||
if ((applet = appletWindow->CreateApplet(classId, name, tag , size)) != NULL){
|
||||
applet->Show(true);
|
||||
m_WParser->OpenContainer()->InsertCell(new wxHtmlWidgetCell(applet,0));
|
||||
m_WParser->OpenContainer()->InsertCell(new wxHtmlAppletCell(applet,al));
|
||||
}
|
||||
else
|
||||
wxMessageBox("wxApplet error: Could not create:" + classId + "," + name);
|
||||
@@ -570,6 +666,81 @@ TAGS_MODULE_BEGIN(wxApplet)
|
||||
TAGS_MODULE_ADD(wxApplet)
|
||||
TAGS_MODULE_END(wxApplet)
|
||||
|
||||
/*********************************************************************************
|
||||
wxHtmlAppletCell
|
||||
*********************************************************************************/
|
||||
wxHtmlAppletCell::wxHtmlAppletCell(wxWindow *wnd, int align) : wxHtmlCell()
|
||||
{
|
||||
int sx, sy;
|
||||
m_Wnd = wnd;
|
||||
m_Wnd->GetSize(&sx, &sy);
|
||||
m_Width = sx, m_Height = sy;
|
||||
|
||||
switch (align) {
|
||||
case wxHTML_ALIGN_TOP :
|
||||
m_Descent = m_Height;
|
||||
break;
|
||||
case wxHTML_ALIGN_CENTER :
|
||||
m_Descent = m_Height / 2;
|
||||
break;
|
||||
case wxHTML_ALIGN_BOTTOM :
|
||||
default :
|
||||
m_Descent = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
SetCanLiveOnPagebreak(FALSE);
|
||||
}
|
||||
|
||||
|
||||
void wxHtmlAppletCell::Draw(wxDC& WXUNUSED(dc), int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(view_y1), int WXUNUSED(view_y2))
|
||||
{
|
||||
int absx = 0, absy = 0, stx, sty;
|
||||
wxHtmlCell *c = this;
|
||||
|
||||
while (c)
|
||||
{
|
||||
absx += c->GetPosX();
|
||||
absy += c->GetPosY();
|
||||
c = c->GetParent();
|
||||
}
|
||||
|
||||
((wxScrolledWindow*)(m_Wnd->GetParent()))->GetViewStart(&stx, &sty);
|
||||
m_Wnd->Move(absx - wxHTML_SCROLL_STEP * stx, absy - wxHTML_SCROLL_STEP * sty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlAppletCell::DrawInvisible(wxDC& WXUNUSED(dc), int WXUNUSED(x), int WXUNUSED(y))
|
||||
{
|
||||
int absx = 0, absy = 0, stx, sty;
|
||||
wxHtmlCell *c = this;
|
||||
|
||||
while (c)
|
||||
{
|
||||
absx += c->GetPosX();
|
||||
absy += c->GetPosY();
|
||||
c = c->GetParent();
|
||||
}
|
||||
|
||||
((wxScrolledWindow*)(m_Wnd->GetParent()))->GetViewStart(&stx, &sty);
|
||||
m_Wnd->Move(absx - wxHTML_SCROLL_STEP * stx, absy - wxHTML_SCROLL_STEP * sty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlAppletCell::Layout(int w)
|
||||
{
|
||||
int sx, sy;
|
||||
m_Wnd->GetSize(&sx, &sy);
|
||||
m_Width = sx, m_Height = sy;
|
||||
|
||||
wxHtmlCell::Layout(w);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// This is our little forcelink hack.
|
||||
FORCE_LINK(loadpage)
|
||||
|
||||
|
60
contrib/src/applet/plugin.cpp
Normal file
60
contrib/src/applet/plugin.cpp
Normal file
@@ -0,0 +1,60 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* wxWindows HTML Applet Package
|
||||
*
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* The contents of this file are subject to the wxWindows License
|
||||
* Version 3.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.wxwindows.org/licence3.txt
|
||||
*
|
||||
* Software distributed under the License is distributed on an
|
||||
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Main wxPlugIn class implementation
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
// For compilers that support precompilation
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
// Include private headers
|
||||
#include "wx/applet/plugin.h"
|
||||
#include "wx/applet/window.h"
|
||||
|
||||
/*------------------------- Implementation --------------------------------*/
|
||||
|
||||
// Implement the abstract class functions
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxPlugIn, wxObject);
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Psuedo virtual constructor for the wxPlugIn class.
|
||||
****************************************************************************/
|
||||
bool wxPlugIn::Create(
|
||||
wxHtmlAppletWindow *parent)
|
||||
{
|
||||
m_parent = parent;
|
||||
return true;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Destructor for the wxPlugIn class.
|
||||
****************************************************************************/
|
||||
wxPlugIn::~wxPlugIn()
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -86,14 +86,19 @@ wxString wxIfElsePrep::Process(
|
||||
{
|
||||
int b;
|
||||
char ft[] = "<!--#if ";
|
||||
|
||||
char ftnot[] = "<!--#if NOT ";
|
||||
char ftnot2[] = "<!--#if !";
|
||||
|
||||
|
||||
// make a copy so we can replace text as we go without affecting the original
|
||||
wxString output = text;
|
||||
while ((b = ReverseFind(output.Lower(), ft)) != -1) {
|
||||
// Loop until every #echo directive is found
|
||||
// Loop until every #if directive is found
|
||||
// We search from the end of the string so that #if statements will properly recurse
|
||||
// and we avoid the hassle of matching statements with the correct <!--#endif-->
|
||||
int end, c, n;
|
||||
bool notval = false;
|
||||
int off = 0;
|
||||
int end, c, n;
|
||||
wxString usecode, code;
|
||||
wxString cname;
|
||||
wxString tag;
|
||||
@@ -101,6 +106,15 @@ wxString wxIfElsePrep::Process(
|
||||
|
||||
code = wxString("");
|
||||
|
||||
if (output.Mid(b, strlen(ftnot) ).CmpNoCase(ftnot) == 0 ) {
|
||||
notval = true;
|
||||
off = 4;
|
||||
}
|
||||
else if (output.Mid(b, strlen(ftnot2) ).CmpNoCase(ftnot2) == 0 ) {
|
||||
notval = true;
|
||||
off = 1;
|
||||
}
|
||||
|
||||
// grab the tag and get the name of the variable
|
||||
end = (output.Mid(b)).Find("-->");
|
||||
if (end == -1) {
|
||||
@@ -118,10 +132,10 @@ wxString wxIfElsePrep::Process(
|
||||
n = c;
|
||||
|
||||
// find the classname
|
||||
c = (tag.Mid(8, n-8)).Find(" ");
|
||||
if (c == -1) n -= 8;
|
||||
c = (tag.Mid(8+off, n-(8+off))).Find(" ");
|
||||
if (c == -1) n -= (8+off);
|
||||
else n = c;
|
||||
cname = tag.Mid(8, n);
|
||||
cname = tag.Mid(8+off, n);
|
||||
|
||||
cname.Trim(false);
|
||||
c = cname.Find("\"");
|
||||
@@ -131,6 +145,7 @@ wxString wxIfElsePrep::Process(
|
||||
|
||||
// Grab the value from the variable class identified by cname
|
||||
value = wxIfElseVariable::FindValue(cname);
|
||||
if (notval) value = !value;
|
||||
|
||||
// Find the end of the tag (<!--#endif-->) and copy it all into the variable code
|
||||
end = ((output.Mid(b)).Lower()).Find("<!--#endif-->");
|
||||
|
@@ -92,11 +92,11 @@ wxString wxIncludePrep::Process(
|
||||
// remove the #include tag
|
||||
output.Remove(i, n+21+3);
|
||||
|
||||
wxFSFile * file = fs->OpenFile(fname);
|
||||
wxFSFile * file = fs->OpenFile(DOC_ROOT + fname);
|
||||
|
||||
if (!file) {
|
||||
#ifdef CHECKED
|
||||
wxMessageBox(wxString("wxHTML #include error: File not Found ") + fname + wxString("."),"Error",wxICON_ERROR);
|
||||
wxMessageBox(wxString("wxHTML #include error: File not Found ") + DOC_ROOT + fname + wxString("."),"Error",wxICON_ERROR);
|
||||
#endif
|
||||
delete file;
|
||||
continue;
|
||||
|
@@ -16,8 +16,10 @@ HEADER_SUBDIR=canvas
|
||||
HEADERS=canvas.h bbox.h liner.h polygon.h
|
||||
|
||||
OBJECTS=canvas.o bbox.o liner.o polygon.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -1,29 +1,62 @@
|
||||
#
|
||||
# File: Makefile
|
||||
# Author: Hans Van Leemputten
|
||||
# Created: 2001
|
||||
# Updated:
|
||||
# Copyright: (c) wxWorkshop team, 2001
|
||||
#
|
||||
# Makefile for wxWindows FrameLayout library (Linux/wxGTK).
|
||||
# $Id$
|
||||
|
||||
top_srcdir = @top_srcdir@/..
|
||||
top_builddir = ../../..
|
||||
libsrc_dir = contrib/src/fl
|
||||
|
||||
TARGET_LIBNAME = libfl
|
||||
OBJ_EXT = o
|
||||
|
||||
# Version Info.
|
||||
LIBVERSION_CURRENT=1
|
||||
LIBVERSION_REVISION=0
|
||||
LIBVERSION_AGE=0
|
||||
|
||||
include ./files.lst
|
||||
HEADER_PATH=$(top_srcdir)/contrib/include/wx
|
||||
HEADER_SUBDIR=fl
|
||||
|
||||
OBJECTS = $(FL_OBJECTS)
|
||||
HEADERS = \
|
||||
bardragpl.h \
|
||||
cbcustom.h \
|
||||
dynbarhnd.h \
|
||||
dyntbarhnd.h \
|
||||
garbagec.h \
|
||||
hintanimpl.h \
|
||||
panedrawpl.h \
|
||||
rowlayoutpl.h \
|
||||
updatesmgr.h \
|
||||
antiflickpl.h \
|
||||
barhintspl.h \
|
||||
controlbar.h \
|
||||
dyntbar.h \
|
||||
frmview.h \
|
||||
gcupdatesmgr.h \
|
||||
newbmpbtn.h \
|
||||
rowdragpl.h \
|
||||
toolwnd.h
|
||||
|
||||
OBJECTS = \
|
||||
antiflickpl.o \
|
||||
gcupdatesmgr.o \
|
||||
rowlayoutpl.o \
|
||||
bardragpl.o \
|
||||
dyntbar.o \
|
||||
hintanimpl.o \
|
||||
toolwnd.o \
|
||||
barhintspl.o \
|
||||
dyntbarhnd.o \
|
||||
newbmpbtn.o \
|
||||
updatesmgr.o \
|
||||
cbcustom.o \
|
||||
frmview.o \
|
||||
panedrawpl.o \
|
||||
controlbar.o \
|
||||
garbagec.o \
|
||||
rowdragpl.o
|
||||
|
||||
DEPFILES= $(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS = -I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
||||
|
@@ -125,10 +125,10 @@ void wxDynamicToolBar::AddTool( int toolIndex,
|
||||
}
|
||||
|
||||
void wxDynamicToolBar::AddTool( int toolIndex,
|
||||
const wxString& imageFileName,
|
||||
int imageFileType,
|
||||
const wxString& labelText, bool alignTextRight,
|
||||
bool isFlat )
|
||||
const wxString& imageFileName,
|
||||
wxBitmapType imageFileType,
|
||||
const wxString& labelText, bool alignTextRight,
|
||||
bool isFlat )
|
||||
{
|
||||
wxNewBitmapButton* pBtn =
|
||||
|
||||
|
@@ -228,7 +228,7 @@ wxNewBitmapButton::wxNewBitmapButton( const wxBitmap& labelBitmap,
|
||||
mIsSticky( isSticky ),
|
||||
mIsFlat( isFlat ),
|
||||
mLabelText( labelText ),
|
||||
mImageFileType( -1 ),
|
||||
mImageFileType( wxBITMAP_TYPE_INVALID ),
|
||||
mDepressedBmp( labelBitmap ),
|
||||
|
||||
mpDepressedImg( NULL ),
|
||||
@@ -257,15 +257,15 @@ wxNewBitmapButton::wxNewBitmapButton( const wxBitmap& labelBitmap,
|
||||
}
|
||||
|
||||
wxNewBitmapButton::wxNewBitmapButton( const wxString& bitmapFileName,
|
||||
const int bitmapFileType,
|
||||
const wxString& labelText,
|
||||
int alignText,
|
||||
bool isFlat,
|
||||
int firedEventType,
|
||||
int marginX,
|
||||
int marginY,
|
||||
int textToLabelGap,
|
||||
bool isSticky)
|
||||
const wxBitmapType bitmapFileType,
|
||||
const wxString& labelText,
|
||||
int alignText,
|
||||
bool isFlat,
|
||||
int firedEventType,
|
||||
int marginX,
|
||||
int marginY,
|
||||
int textToLabelGap,
|
||||
bool isSticky)
|
||||
|
||||
: mTextToLabelGap ( 2 ),
|
||||
mMarginX( 2 ),
|
||||
|
@@ -16,8 +16,10 @@ HEADER_SUBDIR=gizmos
|
||||
HEADERS=multicell.h splittree.h editlbox.h dynamicsash.h
|
||||
|
||||
OBJECTS=multicell.o splittree.o editlbox.o dynamicsash.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -18,12 +18,14 @@ HEADERS=cdbase.h cdunix.h cdwin.h sndaiff.h sndbase.h sndcodec.h \
|
||||
sndpcm.h sndulaw.h sndwav.h sndwin.h vidbase.h vidwin.h \
|
||||
vidxanm.h
|
||||
|
||||
OBJECTS=cdbase.o cdwin.o g711.o g721.o g723_24.o \
|
||||
OBJECTS=cdbase.o cdunix.o cdwin.o g711.o g721.o g723_24.o \
|
||||
g723_40.o g72x.o sndaiff.o sndbase.o sndcodec.o \
|
||||
sndcpcm.o sndfile.o sndg72x.o sndpcm.o sndulaw.o \
|
||||
sndwav.o sndwin.o vidbase.o vidwin.o vidxanm.o sndoss.o sndesd.o
|
||||
sndcpcm.o sndesd.o sndfile.o sndg72x.o sndmsad.o sndoss.o \
|
||||
sndpcm.o sndulaw.o sndwav.o sndwin.o vidbase.o vidwin.o vidxanm.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -16,8 +16,10 @@ HEADER_SUBDIR=plot
|
||||
HEADERS=msg.h email.h web.h
|
||||
|
||||
OBJECTS=email.o web.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -84,15 +84,23 @@ LIB32=link.exe -lib
|
||||
# Name "NetVC - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\smapi.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\email.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\web.cpp
|
||||
SOURCE=..\..\include\wx\net\email.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\net\msg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\readme.txt
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\smapi.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -100,7 +108,11 @@ SOURCE=..\..\include\wx\net\smapi.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\readme.txt
|
||||
SOURCE=.\web.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\net\web.h
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
|
@@ -31,11 +31,19 @@
|
||||
#include "wx/net/smapi.h"
|
||||
#endif
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include "wx/filefn.h"
|
||||
#include "wx/timer.h"
|
||||
#include "wx/wfstream.h"
|
||||
#include "stdlib.h"
|
||||
#include "unistd.h"
|
||||
#endif
|
||||
|
||||
// Send a message.
|
||||
// Specify profile, or leave it to wxWindows to find the current user name
|
||||
|
||||
#ifdef __WXMSW__
|
||||
bool wxEmail::Send(wxMailMessage& message, const wxString& profileName)
|
||||
bool wxEmail::Send(wxMailMessage& message, const wxString& profileName, const wxString& WXUNUSED(sendMail))
|
||||
{
|
||||
wxASSERT (message.m_to.GetCount() > 0) ;
|
||||
|
||||
@@ -52,6 +60,64 @@ bool wxEmail::Send(wxMailMessage& message, const wxString& profileName)
|
||||
|
||||
return session.Send(message);
|
||||
}
|
||||
#elif defined(__UNIX__)
|
||||
bool wxEmail::Send(wxMailMessage& message, const wxString& profileName, const wxString& sendMail)
|
||||
{
|
||||
wxASSERT (message.m_to.GetCount() > 0) ;
|
||||
|
||||
// The 'from' field is optionally supplied by the app; it's not needed
|
||||
// by MAPI, and on Unix, will be guessed if not supplied.
|
||||
wxString from = message.m_from;
|
||||
if (from.IsEmpty())
|
||||
{
|
||||
from = wxGetEmailAddress();
|
||||
}
|
||||
|
||||
wxASSERT (!from.IsEmpty());
|
||||
|
||||
wxString msg;
|
||||
msg << wxT("To: ");
|
||||
|
||||
size_t i;
|
||||
for (i = 0; i < message.m_to.GetCount(); i++)
|
||||
{
|
||||
msg << message.m_to[i];
|
||||
if (i < message.m_to.GetCount())
|
||||
msg << wxT(", ");
|
||||
}
|
||||
|
||||
msg << wxT("\nFrom: ") << from << wxT("\nSubject: ") << message.m_subject;
|
||||
msg << wxT("\n\n") << message.m_body;
|
||||
|
||||
wxString filename;
|
||||
filename.Printf(wxT("/tmp/msg-%ld-%ld-%ld.txt"), (long) getpid(), wxGetLocalTime(),
|
||||
(long) rand());
|
||||
|
||||
{
|
||||
wxFileOutputStream stream(filename);
|
||||
if (stream.Ok())
|
||||
{
|
||||
stream.Write(msg, msg.Length());
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE ;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO search for a suitable sendmail if sendMail is empty
|
||||
wxString sendmail(sendMail);
|
||||
|
||||
wxString cmd;
|
||||
cmd << sendmail << wxT(" < ") << filename;
|
||||
|
||||
// TODO: check return code
|
||||
wxSystem(cmd.c_str());
|
||||
|
||||
wxRemoveFile(filename);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#else
|
||||
#error Send not yet implemented for this platform.
|
||||
#endif
|
||||
|
@@ -286,6 +286,17 @@ bool wxMapiSession::Send(wxMailMessage& message)
|
||||
|
||||
//Allocate the recipients array
|
||||
mapiMessage.lpRecips = new MapiRecipDesc[mapiMessage.nRecipCount];
|
||||
|
||||
// If we have a 'From' field, use it
|
||||
if (!message.m_from.IsEmpty())
|
||||
{
|
||||
mapiMessage.lpOriginator = new MapiRecipDesc;
|
||||
ZeroMemory(mapiMessage.lpOriginator, sizeof(MapiRecipDesc));
|
||||
|
||||
mapiMessage.lpOriginator->ulRecipClass = MAPI_ORIG;
|
||||
// TODO Do we have to call Resolve?
|
||||
mapiMessage.lpOriginator->lpszName = (LPSTR) message.m_from.c_str();
|
||||
}
|
||||
|
||||
//Setup the "To" recipients
|
||||
int nRecipIndex = 0;
|
||||
@@ -413,8 +424,9 @@ bool wxMapiSession::Send(wxMailMessage& message)
|
||||
if (nAttachmentSize)
|
||||
delete [] mapiMessage.lpFiles;
|
||||
|
||||
//Free up the Recipients memory
|
||||
//Free up the Recipients and Originator memory
|
||||
delete [] mapiMessage.lpRecips;
|
||||
delete mapiMessage.lpOriginator;
|
||||
|
||||
return bSuccess;
|
||||
}
|
||||
|
@@ -19,8 +19,10 @@ HEADERS=basic.h basicp.h bmpshape.h canvas.h composit.h constrnt.h \
|
||||
|
||||
OBJECTS=basic.o bmpshape.o composit.o divided.o lines.o misc.o \
|
||||
basic2.o canvas.o constrnt.o drawn.o mfutils.o ogldiag.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -338,6 +338,11 @@ wxShape::~wxShape()
|
||||
if (m_canvas)
|
||||
m_canvas->RemoveShape(this);
|
||||
|
||||
if (m_clientData) {
|
||||
delete m_clientData;
|
||||
m_clientData = NULL;
|
||||
}
|
||||
|
||||
GetEventHandler()->OnDelete();
|
||||
}
|
||||
|
||||
|
@@ -16,8 +16,10 @@ HEADER_SUBDIR=plot
|
||||
HEADERS=plot.h
|
||||
|
||||
OBJECTS=plot.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -23,34 +23,44 @@ HEADER_SUBDIR=stc
|
||||
HEADERS=stc.h
|
||||
|
||||
OBJECTS=PlatWX.o ScintillaWX.o stc.o \
|
||||
DocumentAccessor.o \
|
||||
LexCPP.o \
|
||||
LexHTML.o \
|
||||
LexLua.o \
|
||||
LexOthers.o \
|
||||
LexPerl.o \
|
||||
LexPython.o \
|
||||
LexSQL.o \
|
||||
LexVB.o \
|
||||
UniConversion.o \
|
||||
WindowAccessor.o \
|
||||
AutoComplete.o \
|
||||
CallTip.o \
|
||||
CellBuffer.o \
|
||||
ContractionState.o \
|
||||
Document.o \
|
||||
DocumentAccessor.o \
|
||||
Editor.o \
|
||||
Indicator.o \
|
||||
KeyMap.o \
|
||||
KeyWords.o \
|
||||
LexAVE.o \
|
||||
LexAda.o \
|
||||
LexCPP.o \
|
||||
LexConf.o \
|
||||
LexEiffel.o \
|
||||
LexHTML.o \
|
||||
LexLisp.o \
|
||||
LexLua.o \
|
||||
LexOthers.o \
|
||||
LexPascal.o \
|
||||
LexPerl.o \
|
||||
LexPython.o \
|
||||
LexRuby.o \
|
||||
LexSQL.o \
|
||||
LexVB.o \
|
||||
LineMarker.o \
|
||||
PropSet.o \
|
||||
RESearch.o \
|
||||
ScintillaBase.o \
|
||||
Style.o \
|
||||
UniConversion.o \
|
||||
ViewStyle.o \
|
||||
PosRegExp.o \
|
||||
WindowAccessor.o \
|
||||
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/contrib/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -174,6 +174,8 @@ void Surface::InitPixMap(int width, int height, Surface *surface_) {
|
||||
Release();
|
||||
hdc = new wxMemoryDC(surface_->hdc);
|
||||
hdcOwned = true;
|
||||
if (width < 1) width = 1;
|
||||
if (height < 1) height = 1;
|
||||
bitmap = new wxBitmap(width, height);
|
||||
((wxMemoryDC*)hdc)->SelectObject(*bitmap);
|
||||
}
|
||||
@@ -198,7 +200,7 @@ int Surface::LogPixelsY() {
|
||||
|
||||
|
||||
int Surface::DeviceHeightFont(int points) {
|
||||
return points * LogPixelsY() / 72;
|
||||
return points;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -428,30 +428,47 @@ void ScintillaWX::DoAddChar(char ch) {
|
||||
}
|
||||
|
||||
int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool* consumed) {
|
||||
#ifdef __WXGTK__
|
||||
// Ctrl chars (A-Z) end up with the wrong keycode on wxGTK...
|
||||
if (ctrl && key >= 1 && key <= 26)
|
||||
key += 'A' - 1;
|
||||
#endif
|
||||
|
||||
switch (key) {
|
||||
case WXK_DOWN: key = SCK_DOWN; break;
|
||||
case WXK_UP: key = SCK_UP; break;
|
||||
case WXK_LEFT: key = SCK_LEFT; break;
|
||||
case WXK_RIGHT: key = SCK_RIGHT; break;
|
||||
case WXK_HOME: key = SCK_HOME; break;
|
||||
case WXK_END: key = SCK_END; break;
|
||||
case WXK_PRIOR: key = SCK_PRIOR; break;
|
||||
case WXK_NEXT: key = SCK_NEXT; break;
|
||||
case WXK_DELETE: key = SCK_DELETE; break;
|
||||
case WXK_INSERT: key = SCK_INSERT; break;
|
||||
case WXK_ESCAPE: key = SCK_ESCAPE; break;
|
||||
case WXK_BACK: key = SCK_BACK; break;
|
||||
case WXK_TAB: key = SCK_TAB; break;
|
||||
case WXK_RETURN: key = SCK_RETURN; break;
|
||||
case WXK_ADD: key = SCK_ADD; break;
|
||||
case WXK_SUBTRACT: key = SCK_SUBTRACT; break;
|
||||
case WXK_DIVIDE: key = SCK_DIVIDE; break;
|
||||
case WXK_CONTROL: key = 0; break;
|
||||
case WXK_ALT: key = 0; break;
|
||||
case WXK_SHIFT: key = 0; break;
|
||||
case WXK_DOWN: key = SCK_DOWN; break;
|
||||
case WXK_UP: key = SCK_UP; break;
|
||||
case WXK_LEFT: key = SCK_LEFT; break;
|
||||
case WXK_RIGHT: key = SCK_RIGHT; break;
|
||||
case WXK_HOME: key = SCK_HOME; break;
|
||||
case WXK_END: key = SCK_END; break;
|
||||
case WXK_PRIOR: key = SCK_PRIOR; break;
|
||||
case WXK_NEXT: key = SCK_NEXT; break;
|
||||
case WXK_DELETE: key = SCK_DELETE; break;
|
||||
case WXK_INSERT: key = SCK_INSERT; break;
|
||||
case WXK_ESCAPE: key = SCK_ESCAPE; break;
|
||||
case WXK_BACK: key = SCK_BACK; break;
|
||||
case WXK_TAB: key = SCK_TAB; break;
|
||||
case WXK_RETURN: key = SCK_RETURN; break;
|
||||
case WXK_ADD:
|
||||
case WXK_NUMPAD_ADD:
|
||||
key = SCK_ADD; break;
|
||||
case WXK_SUBTRACT:
|
||||
case WXK_NUMPAD_SUBTRACT:
|
||||
key = SCK_SUBTRACT; break;
|
||||
case WXK_DIVIDE:
|
||||
case WXK_NUMPAD_DIVIDE:
|
||||
key = SCK_DIVIDE; break;
|
||||
case WXK_CONTROL: key = 0; break;
|
||||
case WXK_ALT: key = 0; break;
|
||||
case WXK_SHIFT: key = 0; break;
|
||||
case WXK_MENU: key = 0; break;
|
||||
}
|
||||
|
||||
return KeyDown(key, shift, ctrl, alt, consumed);
|
||||
int rv = KeyDown(key, shift, ctrl, alt, consumed);
|
||||
if (key)
|
||||
return rv;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -108,15 +108,19 @@ methodOverrideMap = {
|
||||
0),
|
||||
|
||||
'GetCurLine' : (0,
|
||||
'wxString %s(int* OUTPUT=NULL);',
|
||||
'#ifdef SWIG\n wxString %s(int* OUTPUT);\n#else\n wxString GetCurLine(int* linePos=NULL);\n#endif',
|
||||
|
||||
'''wxString %s(int* linePos) {
|
||||
wxString text;
|
||||
int len = LineLength(GetCurrentLine());
|
||||
if (!len) return "";
|
||||
char* buf = text.GetWriteBuf(len);
|
||||
if (!len) {
|
||||
if (linePos) *linePos = 0;
|
||||
return "";
|
||||
}
|
||||
// Need an extra byte because SCI_GETCURLINE writes a null to the string
|
||||
char* buf = text.GetWriteBuf(len+1);
|
||||
|
||||
int pos = SendMsg(%s, len, (long)buf);
|
||||
int pos = SendMsg(%s, len+1, (long)buf);
|
||||
text.UngetWriteBuf(len);
|
||||
if (linePos) *linePos = pos;
|
||||
|
||||
@@ -346,11 +350,11 @@ methodOverrideMap = {
|
||||
|
||||
'''wxString %s() {
|
||||
wxString text;
|
||||
int len = GetTextLength()+1;
|
||||
char* buff = text.GetWriteBuf(len);
|
||||
int len = GetTextLength();
|
||||
char* buff = text.GetWriteBuf(len+1); // leave room for the null...
|
||||
|
||||
SendMsg(%s, len, (long)buff);
|
||||
text.UngetWriteBuf(len-1);
|
||||
SendMsg(%s, len+1, (long)buff);
|
||||
text.UngetWriteBuf(len);
|
||||
return text;''',
|
||||
|
||||
('Retrieve all the text in the document.', )),
|
||||
@@ -474,6 +478,9 @@ methodOverrideMap = {
|
||||
0),
|
||||
|
||||
'GrabFocus' : (None, 0, 0, 0),
|
||||
'SetFocus' : ('SetSTCFocus', 0, 0, 0),
|
||||
'GetFocus' : ('GetSTCFocus', 0, 0, 0),
|
||||
|
||||
|
||||
'' : ('', 0, 0, 0),
|
||||
|
||||
|
@@ -14,49 +14,48 @@
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
SCINTILLA=.\scintilla
|
||||
|
||||
S=$(SCINTILLA)\src
|
||||
|
||||
STCEXTRACPPFLAGS=-D__WX__ -DSCI_LEXER -I$(SCINTILLA)/include -I$(S)
|
||||
|
||||
LIBTARGET=$(WXDIR)\lib\stc.lib
|
||||
LIBTARGET=$(WXDIR)\contrib\lib\stc.lib
|
||||
|
||||
OBJECTS = \
|
||||
AutoComplete.obj \
|
||||
CallTip.obj \
|
||||
CellBuffer.obj \
|
||||
ContractionState.obj \
|
||||
Document.obj \
|
||||
DocumentAccessor.obj \
|
||||
Editor.obj \
|
||||
Indicator.obj \
|
||||
KeyMap.obj \
|
||||
KeyWords.obj \
|
||||
LexCPP.obj \
|
||||
LexHTML.obj \
|
||||
LexLua.obj \
|
||||
LexOthers.obj \
|
||||
LexPerl.obj \
|
||||
LexPython.obj \
|
||||
LexSQL.obj \
|
||||
LexVB.obj \
|
||||
LineMarker.obj \
|
||||
PropSet.obj \
|
||||
PosRegExp.obj \
|
||||
ScintillaBase.obj \
|
||||
Style.obj \
|
||||
UniConversion.obj \
|
||||
ViewStyle.obj \
|
||||
WindowAccessor.obj \
|
||||
\
|
||||
PlatWX.obj \
|
||||
ScintillaWX.obj \
|
||||
stc.obj \
|
||||
AutoComplete.obj \
|
||||
CallTip.obj \
|
||||
CellBuffer.obj \
|
||||
ContractionState.obj \
|
||||
Document.obj \
|
||||
DocumentAccessor.obj \
|
||||
Editor.obj \
|
||||
Indicator.obj \
|
||||
KeyMap.obj \
|
||||
KeyWords.obj \
|
||||
LexCPP.obj \
|
||||
LexHTML.obj \
|
||||
LexLua.obj \
|
||||
LexOthers.obj \
|
||||
LexPerl.obj \
|
||||
LexPython.obj \
|
||||
LexSQL.obj \
|
||||
LexVB.obj \
|
||||
LineMarker.obj \
|
||||
PosRegExp.obj \
|
||||
PropSet.obj \
|
||||
ScintillaBase.obj \
|
||||
Style.obj \
|
||||
UniConversion.obj \
|
||||
ViewStyle.obj \
|
||||
WindowAccessor.obj \
|
||||
\
|
||||
PlatWX.obj \
|
||||
ScintillaWX.obj \
|
||||
stc.obj \
|
||||
|
||||
|
||||
!include $(WXDIR)\src\makelib.b32
|
||||
|
||||
all: stc.cfg $(LIBTARGET)
|
||||
|
||||
CFG = stc.cfg
|
||||
CPPFLAGS=$(DLL_FLAGS) $(EXTRACPPFLAGS) @$(CFG)
|
||||
|
||||
|
@@ -25,23 +25,31 @@ OBJECTS = \
|
||||
$(D)\Indicator.obj \
|
||||
$(D)\KeyMap.obj \
|
||||
$(D)\KeyWords.obj \
|
||||
$(D)\LexCPP.obj \
|
||||
$(D)\LexHTML.obj \
|
||||
$(D)\LexLua.obj \
|
||||
$(D)\LexOthers.obj \
|
||||
$(D)\LexPerl.obj \
|
||||
$(D)\LexPython.obj \
|
||||
$(D)\LexSQL.obj \
|
||||
$(D)\LexVB.obj \
|
||||
$(D)\LineMarker.obj \
|
||||
$(D)\PosRegExp.obj \
|
||||
$(D)\PropSet.obj \
|
||||
$(D)\RESearch.obj \
|
||||
$(D)\ScintillaBase.obj \
|
||||
$(D)\Style.obj \
|
||||
$(D)\UniConversion.obj \
|
||||
$(D)\ViewStyle.obj \
|
||||
$(D)\WindowAccessor.obj \
|
||||
\
|
||||
$(D)\LexAda.obj \
|
||||
$(D)\LexAVE.obj \
|
||||
$(D)\LexConf.obj \
|
||||
$(D)\LexCPP.obj \
|
||||
$(D)\LexEiffel.obj \
|
||||
$(D)\LexHTML.obj \
|
||||
$(D)\LexLisp.obj \
|
||||
$(D)\LexLua.obj \
|
||||
$(D)\LexOthers.obj \
|
||||
$(D)\LexPascal.obj \
|
||||
$(D)\LexPerl.obj \
|
||||
$(D)\LexPython.obj \
|
||||
$(D)\LexRuby.obj \
|
||||
$(D)\LexSQL.obj \
|
||||
$(D)\LexVB.obj \
|
||||
\
|
||||
$(D)\PlatWX.obj \
|
||||
$(D)\ScintillaWX.obj \
|
||||
$(D)\stc.obj \
|
||||
|
@@ -137,6 +137,7 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
|
||||
{
|
||||
m_swx = new ScintillaWX(this);
|
||||
m_stopWatch.Start();
|
||||
m_lastKeyDownConsumed = FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -338,10 +339,14 @@ void wxStyledTextCtrl::SetAnchor(int posAnchor) {
|
||||
wxString wxStyledTextCtrl::GetCurLine(int* linePos) {
|
||||
wxString text;
|
||||
int len = LineLength(GetCurrentLine());
|
||||
if (!len) return "";
|
||||
char* buf = text.GetWriteBuf(len);
|
||||
if (!len) {
|
||||
if (linePos) *linePos = 0;
|
||||
return "";
|
||||
}
|
||||
// Need an extra byte because SCI_GETCURLINE writes a null to the string
|
||||
char* buf = text.GetWriteBuf(len+1);
|
||||
|
||||
int pos = SendMsg(2027, len, (long)buf);
|
||||
int pos = SendMsg(2027, len+1, (long)buf);
|
||||
text.UngetWriteBuf(len);
|
||||
if (linePos) *linePos = pos;
|
||||
|
||||
@@ -1141,11 +1146,11 @@ void wxStyledTextCtrl::SetText(const wxString& text) {
|
||||
// Retrieve all the text in the document.
|
||||
wxString wxStyledTextCtrl::GetText() {
|
||||
wxString text;
|
||||
int len = GetTextLength()+1;
|
||||
char* buff = text.GetWriteBuf(len);
|
||||
int len = GetTextLength();
|
||||
char* buff = text.GetWriteBuf(len+1); // leave room for the null...
|
||||
|
||||
SendMsg(2182, len, (long)buff);
|
||||
text.UngetWriteBuf(len-1);
|
||||
SendMsg(2182, len+1, (long)buff);
|
||||
text.UngetWriteBuf(len);
|
||||
return text;
|
||||
}
|
||||
|
||||
@@ -1526,12 +1531,12 @@ int wxStyledTextCtrl::GetModEventMask() {
|
||||
}
|
||||
|
||||
// Change internal focus flag
|
||||
void wxStyledTextCtrl::SetFocus(bool focus) {
|
||||
void wxStyledTextCtrl::SetSTCFocus(bool focus) {
|
||||
SendMsg(2380, focus, 0);
|
||||
}
|
||||
|
||||
// Get internal focus flag
|
||||
bool wxStyledTextCtrl::GetFocus() {
|
||||
bool wxStyledTextCtrl::GetSTCFocus() {
|
||||
return SendMsg(2381, 0, 0) != 0;
|
||||
}
|
||||
|
||||
@@ -1829,42 +1834,39 @@ void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) {
|
||||
|
||||
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
||||
long key = evt.KeyCode();
|
||||
if ((key > WXK_ESCAPE) &&
|
||||
(key != WXK_DELETE) && (key < 255) &&
|
||||
!evt.ControlDown() && !evt.AltDown()) {
|
||||
|
||||
if (key <= 0xff && !iscntrl(key) && !m_lastKeyDownConsumed) {
|
||||
m_swx->DoAddChar(key);
|
||||
}
|
||||
else {
|
||||
evt.Skip();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) {
|
||||
long key = evt.KeyCode();
|
||||
//key = toupper(key); //**** ????
|
||||
bool consumed = FALSE;
|
||||
int processed = m_swx->DoKeyDown(key,
|
||||
evt.ShiftDown(),
|
||||
evt.ControlDown(),
|
||||
evt.AltDown(),
|
||||
&consumed);
|
||||
if (!processed && !consumed)
|
||||
&m_lastKeyDownConsumed);
|
||||
if (!processed && !m_lastKeyDownConsumed)
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) {
|
||||
m_swx->DoLoseFocus();
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) {
|
||||
m_swx->DoGainFocus();
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& evt) {
|
||||
m_swx->DoSysColourChange();
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent& evt) {
|
||||
// do nothing to help avoid flashing
|
||||
}
|
||||
|
@@ -137,6 +137,7 @@ wxStyledTextCtrl::wxStyledTextCtrl(wxWindow *parent,
|
||||
{
|
||||
m_swx = new ScintillaWX(this);
|
||||
m_stopWatch.Start();
|
||||
m_lastKeyDownConsumed = FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -379,42 +380,39 @@ void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) {
|
||||
|
||||
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
||||
long key = evt.KeyCode();
|
||||
if ((key > WXK_ESCAPE) &&
|
||||
(key != WXK_DELETE) && (key < 255) &&
|
||||
!evt.ControlDown() && !evt.AltDown()) {
|
||||
|
||||
if (key <= 0xff && !iscntrl(key) && !m_lastKeyDownConsumed) {
|
||||
m_swx->DoAddChar(key);
|
||||
}
|
||||
else {
|
||||
evt.Skip();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) {
|
||||
long key = evt.KeyCode();
|
||||
//key = toupper(key); //**** ????
|
||||
bool consumed = FALSE;
|
||||
int processed = m_swx->DoKeyDown(key,
|
||||
evt.ShiftDown(),
|
||||
evt.ControlDown(),
|
||||
evt.AltDown(),
|
||||
&consumed);
|
||||
if (!processed && !consumed)
|
||||
&m_lastKeyDownConsumed);
|
||||
if (!processed && !m_lastKeyDownConsumed)
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) {
|
||||
m_swx->DoLoseFocus();
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) {
|
||||
m_swx->DoGainFocus();
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& evt) {
|
||||
m_swx->DoSysColourChange();
|
||||
}
|
||||
|
||||
|
||||
void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent& evt) {
|
||||
// do nothing to help avoid flashing
|
||||
}
|
||||
|
@@ -180,6 +180,7 @@ private:
|
||||
ScintillaWX* m_swx;
|
||||
wxStopWatch m_stopWatch;
|
||||
|
||||
bool m_lastKeyDownConsumed;
|
||||
|
||||
friend class ScintillaWX;
|
||||
friend class Platform;
|
||||
|
@@ -34,8 +34,10 @@ OBJECTS=$(EXPAT_OBJECTS) \
|
||||
xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \
|
||||
xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o \
|
||||
xh_frame.o
|
||||
DEPFILES=$(OBJECTS:.o=.d)
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include $(EXPAT_DEFS)
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
@@ -7,7 +7,7 @@
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "xh_unkwn.h"
|
||||
#endif
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "wx/window.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/sizer.h"
|
||||
#include "wx/panel.h"
|
||||
|
||||
|
||||
class wxUnknownControlContainer : public wxPanel
|
||||
@@ -35,14 +36,14 @@ public:
|
||||
const wxSize& size = wxDefaultSize)
|
||||
: wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL | wxNO_BORDER,
|
||||
controlName + wxT("_container")),
|
||||
m_controlName(controlName), m_controlAdded(FALSE)
|
||||
m_controlName(controlName), m_controlAdded(FALSE)
|
||||
{
|
||||
m_bg = GetBackgroundColour();
|
||||
SetBackgroundColour(wxColour(255, 0, 255));
|
||||
}
|
||||
|
||||
virtual void AddChild(wxWindowBase *child);
|
||||
|
||||
|
||||
protected:
|
||||
wxString m_controlName;
|
||||
bool m_controlAdded;
|
||||
@@ -54,12 +55,12 @@ void wxUnknownControlContainer::AddChild(wxWindowBase *child)
|
||||
wxASSERT_MSG( !m_controlAdded, wxT("Couldn't add two unknown controls to the same container!") )
|
||||
|
||||
wxPanel::AddChild(child);
|
||||
|
||||
|
||||
SetBackgroundColour(m_bg);
|
||||
child->SetName(m_controlName);
|
||||
child->SetId(wxXmlResource::GetXMLID(m_controlName));
|
||||
m_controlAdded = TRUE;
|
||||
|
||||
|
||||
wxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer->Add((wxWindow*)child, 1, wxEXPAND);
|
||||
SetSizer(sizer);
|
||||
@@ -69,14 +70,14 @@ void wxUnknownControlContainer::AddChild(wxWindowBase *child)
|
||||
|
||||
|
||||
|
||||
wxUnknownWidgetXmlHandler::wxUnknownWidgetXmlHandler()
|
||||
: wxXmlResourceHandler()
|
||||
wxUnknownWidgetXmlHandler::wxUnknownWidgetXmlHandler()
|
||||
: wxXmlResourceHandler()
|
||||
{
|
||||
}
|
||||
|
||||
wxObject *wxUnknownWidgetXmlHandler::DoCreateResource()
|
||||
{
|
||||
wxPanel *panel =
|
||||
{
|
||||
wxPanel *panel =
|
||||
new wxUnknownControlContainer(m_parentAsWindow,
|
||||
GetName(), -1,
|
||||
GetPosition(), GetSize());
|
||||
|
@@ -1,4 +1,4 @@
|
||||
makemac?Data
|
||||
BombsM*Data
|
||||
*Classic?Debug*
|
||||
*Classic?Release*
|
||||
*Carbon?Debug*
|
||||
|
Binary file not shown.
5
demos/dbbrowse/.cvsignore
Normal file
5
demos/dbbrowse/.cvsignore
Normal file
@@ -0,0 +1,5 @@
|
||||
DbbrowseM*Data
|
||||
*Classic?Debug*
|
||||
*Classic?Release*
|
||||
*Carbon?Debug*
|
||||
*Carbon?Release*
|
BIN
demos/dbbrowse/DbbrowseM5.mcp
Normal file
BIN
demos/dbbrowse/DbbrowseM5.mcp
Normal file
Binary file not shown.
@@ -1,15 +0,0 @@
|
||||
|
||||
# Top dir of wxWindows
|
||||
top_builddir = /gtm/bart/wxGTK
|
||||
|
||||
PROGRAM=dbbrowser_gtk
|
||||
|
||||
|
||||
OBJECTS= dbbrowse.o doc.o pgmctrl.o tabpgwin.o\
|
||||
browsedb.o dbtree.o dbgrid.o dlguser.o
|
||||
|
||||
|
||||
|
||||
|
||||
include $(top_builddir)/src/makeprog.env
|
||||
|
@@ -1,4 +1,4 @@
|
||||
makemac?Data
|
||||
FortyM*Data
|
||||
*Classic?Debug*
|
||||
*Classic?Release*
|
||||
*Carbon?Debug*
|
||||
|
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
makemac?Data
|
||||
FractalM*Data
|
||||
*Classic?Debug*
|
||||
*Classic?Release*
|
||||
*Carbon?Debug*
|
||||
|
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
makemac?Data
|
||||
LifeM*Data
|
||||
*Classic?Debug*
|
||||
*Classic?Release*
|
||||
*Carbon?Debug*
|
||||
|
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
makemac?Data
|
||||
PoemM*Data
|
||||
*Classic?Debug*
|
||||
*Classic?Release*
|
||||
*Carbon?Debug*
|
||||
|
BIN
demos/poem/PoemM5.mcp
Normal file
BIN
demos/poem/PoemM5.mcp
Normal file
Binary file not shown.
@@ -91,6 +91,32 @@ contrib/samples/gizmos/editlbox/*.rc
|
||||
contrib/samples/gizmos/editlbox/EditlboxVC.dsp
|
||||
contrib/samples/gizmos/editlbox/EditlboxVC.dsw
|
||||
|
||||
contrib/samples/gizmos/dynsash/*.cpp
|
||||
contrib/samples/gizmos/dynsash/*.h
|
||||
contrib/samples/gizmos/dynsash/*.def
|
||||
contrib/samples/gizmos/dynsash/makefile*
|
||||
contrib/samples/gizmos/dynsash/*.xbm
|
||||
contrib/samples/gizmos/dynsash/*.xpm
|
||||
contrib/samples/gizmos/dynsash/*.txt
|
||||
contrib/samples/gizmos/dynsash/*.ico
|
||||
contrib/samples/gizmos/dynsash/*.bmp
|
||||
contrib/samples/gizmos/dynsash/*.rc
|
||||
contrib/samples/gizmos/dynsash/DynsashVC.dsp
|
||||
contrib/samples/gizmos/dynsash/SynsashVC.dsw
|
||||
|
||||
contrib/samples/gizmos/dynsash_switch/*.cpp
|
||||
contrib/samples/gizmos/dynsash_switch/*.h
|
||||
contrib/samples/gizmos/dynsash_switch/*.def
|
||||
contrib/samples/gizmos/dynsash_switch/makefile*
|
||||
contrib/samples/gizmos/dynsash_switch/*.xbm
|
||||
contrib/samples/gizmos/dynsash_switch/*.xpm
|
||||
contrib/samples/gizmos/dynsash_switch/*.txt
|
||||
contrib/samples/gizmos/dynsash_switch/*.ico
|
||||
contrib/samples/gizmos/dynsash_switch/*.bmp
|
||||
contrib/samples/gizmos/dynsash_switch/*.rc
|
||||
contrib/samples/gizmos/dynsash_switch/DynsashSwitchVC.dsp
|
||||
contrib/samples/gizmos/dynsash_switch/DynsashSwitchVC.dsw
|
||||
|
||||
contrib/samples/animate/*.cpp
|
||||
contrib/samples/animate/*.h
|
||||
contrib/samples/animate/*.def
|
||||
|
@@ -31,7 +31,7 @@
|
||||
; DO NOT DELETE THEM or you may be unable to reload the script
|
||||
|
||||
;[ScriptSetup]
|
||||
;VerNum=2.3.1
|
||||
;VerNum=2.3.2
|
||||
;InnoVer=1.3
|
||||
;AddVerTo=AppVerName
|
||||
;SetupFilename=setup.exe
|
||||
|
@@ -4,13 +4,13 @@
|
||||
|
||||
[Setup]
|
||||
MinVersion=4.0,4.0
|
||||
AppName=wxWindows 2.3.1
|
||||
AppName=wxWindows 2.3.2
|
||||
AppId=wxWindows
|
||||
CreateUninstallRegKey=1
|
||||
UsePreviousAppDir=1
|
||||
UsePreviousGroup=1
|
||||
AppVersion=2.3.1
|
||||
AppVerName=wxWindows 2.3.1
|
||||
AppVersion=2.3.2
|
||||
AppVerName=wxWindows 2.3.2
|
||||
AppCopyright=Copyright <20> The wxWindows Team
|
||||
BackColor=$FF0000
|
||||
BackColor2=$000000
|
||||
@@ -19,7 +19,7 @@
|
||||
WindowStartMaximized=1
|
||||
WindowVisible=1
|
||||
WindowResizable=1
|
||||
UninstallDisplayName=wxWindows 2.3.1
|
||||
UninstallDisplayName=wxWindows 2.3.2
|
||||
UninstallLogMode=Append
|
||||
DirExistsWarning=auto
|
||||
UninstallFilesDir={app}
|
||||
@@ -28,10 +28,10 @@
|
||||
CreateAppDir=1
|
||||
DisableProgramGroupPage=0
|
||||
AlwaysCreateUninstallIcon=1
|
||||
UninstallIconName=Uninstall wxWindows 2.3.1
|
||||
UninstallIconName=Uninstall wxWindows 2.3.2
|
||||
Uninstallable=1
|
||||
DefaultDirName=c:\wx230
|
||||
DefaultGroupName=wxWindows 2.3.1
|
||||
DefaultDirName=c:\wx232
|
||||
DefaultGroupName=wxWindows 2.3.2
|
||||
LicenseFile=C:\wx2dev\wxWindows\docs\licence.txt
|
||||
InfoBeforeFile=C:\wx2dev\wxWindows\docs\readme.txt
|
||||
InfoAfterFile=C:\wx2dev\wxWindows\docs\msw\install.txt
|
||||
|
@@ -107,6 +107,8 @@ contrib/samples/gizmos/Makefile.in
|
||||
contrib/samples/gizmos/multicell/Makefile.in
|
||||
contrib/samples/gizmos/splittree/Makefile.in
|
||||
contrib/samples/gizmos/editlbox/Makefile.in
|
||||
contrib/samples/gizmos/dynsash/Makefile.in
|
||||
contrib/samples/gizmos/dynsash_switch/Makefile.in
|
||||
contrib/samples/ogl/Makefile.in
|
||||
contrib/samples/ogl/ogledit/Makefile.in
|
||||
contrib/samples/ogl/studio/Makefile.in
|
||||
|
@@ -142,6 +142,7 @@ filesys.cpp Common Base
|
||||
fontcmn.cpp Common
|
||||
fontmap.cpp Common Base
|
||||
framecmn.cpp Common
|
||||
toplvcmn.cpp Common
|
||||
fs_inet.cpp Common Base
|
||||
fs_zip.cpp Common Base
|
||||
fs_mem.cpp Common Base
|
||||
@@ -327,6 +328,7 @@ tglbtn.cpp MSW
|
||||
thread.cpp MSW Win32Only,Base
|
||||
timer.cpp MSW
|
||||
tooltip.cpp MSW Win32Only
|
||||
toplevel.cpp MSW LowLevel
|
||||
treectrl.cpp MSW Win32Only
|
||||
utils.cpp MSW Base
|
||||
utilsexc.cpp MSW Base
|
||||
@@ -351,8 +353,11 @@ checkbox.cpp Univ
|
||||
checklst.cpp Univ
|
||||
colschem.cpp Univ
|
||||
control.cpp Univ
|
||||
dialog.cpp Univ
|
||||
framuniv.cpp Univ
|
||||
topluniv.cpp Univ
|
||||
gauge.cpp Univ
|
||||
inpcons.cpp Univ
|
||||
inphand.cpp Univ
|
||||
listbox.cpp Univ
|
||||
menu.cpp Univ
|
||||
@@ -397,12 +402,13 @@ dc.cpp GTK LowLevel
|
||||
dcclient.cpp GTK LowLevel
|
||||
dcmemory.cpp GTK LowLevel
|
||||
dcscreen.cpp GTK LowLevel
|
||||
dialog.cpp GTK LowLevel
|
||||
dialog.cpp GTK
|
||||
dnd.cpp GTK LowLevel
|
||||
evtloop.cpp GTK LowLevel
|
||||
font.cpp GTK LowLevel
|
||||
fontdlg.cpp GTK
|
||||
frame.cpp GTK LowLevel
|
||||
frame.cpp GTK
|
||||
toplevel.cpp GTK LowLevel
|
||||
gauge.cpp GTK
|
||||
gdiobj.cpp GTK LowLevel
|
||||
icon.cpp GTK LowLevel
|
||||
@@ -667,6 +673,7 @@ fontenum.h WXH
|
||||
fontmap.h WXH Base
|
||||
fontutil.h WXH
|
||||
frame.h WXH
|
||||
toplevel.h WXH
|
||||
fs_inet.h WXH Base
|
||||
fs_zip.h WXH Base
|
||||
fs_mem.h WXH Base
|
||||
@@ -844,6 +851,7 @@ filedlg.h GTKH
|
||||
font.h GTKH
|
||||
fontdlg.h GTKH
|
||||
frame.h GTKH
|
||||
toplevel.h GTKH
|
||||
gauge.h GTKH
|
||||
gdiobj.h GTKH
|
||||
glcanvas.h GTKH
|
||||
@@ -1204,7 +1212,9 @@ colschem.h UnivH
|
||||
combobox.h UnivH
|
||||
control.h UnivH
|
||||
frame.h UnivH
|
||||
toplevel.h UnivH
|
||||
gauge.h UnivH
|
||||
inpcons.h UnivH
|
||||
inphand.h UnivH
|
||||
listbox.h UnivH
|
||||
menu.h UnivH
|
||||
@@ -1248,8 +1258,7 @@ cursor.cpp MGL LowLevel
|
||||
dcclient.cpp MGL LowLevel
|
||||
dcmemory.cpp MGL LowLevel
|
||||
dcscreen.cpp MGL LowLevel
|
||||
dialog.cpp MGL LowLevel
|
||||
frame.cpp MGL LowLevel
|
||||
toplevel.cpp MGL LowLevel
|
||||
icon.cpp MGL LowLevel
|
||||
settings.cpp MGL LowLevel
|
||||
timer.cpp MGL LowLevel
|
||||
|
@@ -94,6 +94,9 @@ PERIPH_CLEAN_TARGET=
|
||||
# Set to 0 if not using GLCanvas (only affects DLL build)
|
||||
USE_GLCANVAS=1
|
||||
|
||||
# Set to 0 if you are using MSVC 5
|
||||
USE_MSVC_5=0
|
||||
|
||||
# These are absolute paths, so that the compiler
|
||||
# generates correct __FILE__ symbols for debugging.
|
||||
# Otherwise you don't be able to double-click on a memory
|
||||
@@ -255,16 +258,26 @@ GL_LIBS=opengl32.lib glu32.lib
|
||||
# GL_LIBS_DELAY=/delayload:opengl32.dll
|
||||
!endif
|
||||
|
||||
!if "$(USE_MSVC_5)" == "1"
|
||||
# we are too big
|
||||
INCREMENTAL=/INCREMENTAL:NO
|
||||
DELAY_LOAD=
|
||||
!else
|
||||
INCREMENTAL=
|
||||
DELAY_LOAD=delayimp.lib \
|
||||
/delayload:ws2_32.dll /delayload:advapi32.dll /delayload:user32.dll \
|
||||
/delayload:gdi32.dll \
|
||||
/delayload:comdlg32.dll /delayload:shell32.dll /delayload:comctl32.dll \
|
||||
/delayload:ole32.dll \
|
||||
/delayload:oleaut32.dll /delayload:rpcrt4.dll $(GL_LIBS_DELAY)
|
||||
!endif
|
||||
|
||||
# Update the dynamic link library
|
||||
$(WXDIR)\lib\$(WXLIBNAME).dll: $(DUMMYOBJ) $(OBJECTS)
|
||||
$(link) @<<
|
||||
$(LINKFLAGS)
|
||||
$(LINKFLAGS) $(INCREMENTAL)
|
||||
-out:$(WXDIR)\lib\$(WXLIBNAME).dll
|
||||
$(DUMMYOBJ) $(OBJECTS) $(guilibsdll) shell32.lib comctl32.lib ctl3d32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib odbc32.lib advapi32.lib winmm.lib $(GL_LIBS) $(WXDIR)\lib\png$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib $(WXDIR)\lib\jpeg$(LIBEXT).lib $(WXDIR)\lib\tiff$(LIBEXT).lib
|
||||
delayimp.lib
|
||||
/delayload:ws2_32.dll /delayload:advapi32.dll /delayload:user32.dll /delayload:gdi32.dll
|
||||
/delayload:comdlg32.dll /delayload:shell32.dll /delayload:comctl32.dll /delayload:ole32.dll
|
||||
/delayload:oleaut32.dll /delayload:rpcrt4.dll $(GL_LIBS_DELAY)
|
||||
$(DUMMYOBJ) $(OBJECTS) $(guilibsdll) shell32.lib comctl32.lib ctl3d32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib odbc32.lib advapi32.lib winmm.lib $(GL_LIBS) $(WXDIR)\lib\png$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib $(WXDIR)\lib\jpeg$(LIBEXT).lib $(WXDIR)\lib\tiff$(LIBEXT).lib $(DELAY_LOAD)
|
||||
<<
|
||||
|
||||
!endif
|
||||
|
@@ -24,7 +24,7 @@ The terms {\it DLL} and {\it shared library/object} will both be used in the
|
||||
documentation to refer to the same thing: a {\tt .dll} file under Windows or
|
||||
{\tt .so} or {\tt .sl} one under Unix.
|
||||
|
||||
Example of using this class to dynamically load {\tt strlen()} function:
|
||||
Example of using this class to dynamically load the {\tt strlen()} function:
|
||||
|
||||
\begin{verbatim}
|
||||
#if defined(__WXMSW__)
|
||||
@@ -189,3 +189,4 @@ Unloads the library from memory.
|
||||
|
||||
Returns pointer to symbol {\it name} in the library or NULL if the library
|
||||
contains no such symbol.
|
||||
|
||||
|
@@ -485,3 +485,4 @@ Writes the contents of the string to the file, returns TRUE on success.
|
||||
|
||||
The second argument is only meaningful in Unicode build of wxWindows when
|
||||
{\it conv} is used to convert {\it s} to multibyte representation.
|
||||
|
||||
|
@@ -27,8 +27,6 @@ Idle events can be caught by the wxApp class, or by top-level window classes.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
%% GD: OnXXX functions are not documented
|
||||
%%\helpref{wxApp::OnIdle}{wxapponidle},
|
||||
\helpref{Event handling overview}{eventhandlingoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
@@ -52,8 +50,6 @@ new event is posted to the application by the windowing system.
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxIdleEvent::MoreRequested}{wxidleeventmorerequested}
|
||||
%% GD: OnXXX functions are not documented
|
||||
%%\helpref{wxApp::OnIdle}{wxapponidle}
|
||||
|
||||
\membersection{wxIdleEvent::MoreRequested}\label{wxidleeventmorerequested}
|
||||
|
||||
@@ -64,6 +60,4 @@ Returns TRUE if the OnIdle function processing this event requested more process
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxIdleEvent::RequestMore}{wxidleeventrequestmore}
|
||||
%% GD: OnXXX functions are not documented
|
||||
%%\helpref{wxApp::OnIdle}{wxapponidle}
|
||||
|
||||
|
@@ -31,7 +31,7 @@
|
||||
}}
|
||||
\winhelpignore{\author{Julian Smart, Robert Roebling, Vadim Zeitlin,
|
||||
Robin Dunn, et al}
|
||||
\date{June 11th 2001}
|
||||
\date{September 6th 2001}
|
||||
}
|
||||
\makeindex
|
||||
\begin{document}
|
||||
|
@@ -98,7 +98,7 @@ their obvious meaning). With proportional resize, a child may also be centered
|
||||
in the main orientation using wxALIGN\_CENTER\_VERTICAL (same as
|
||||
wxALIGN\_CENTRE\_VERTICAL) and wxALIGN\_CENTER\_HORIZONTAL (same as
|
||||
wxALIGN\_CENTRE\_HORIZONTAL) flags. Finally, you can also specify
|
||||
wxAGJUST\_MIN flag to make the minimal size of the control dynamically adjust
|
||||
wxADJUST\_MINSIZE flag to make the minimal size of the control dynamically adjust
|
||||
to the value returned by its \helpref{GetBestSize()}{wxwindowgetbestsize}
|
||||
method - this allows, for example, for correct relayouting of a static text
|
||||
control even if its text is changed during run-time.}
|
||||
|
@@ -48,12 +48,32 @@ functions that take a wxTreeEvent argument.
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxTreeEvent::GetCode}
|
||||
|
||||
\constfunc{int}{GetCode}{}
|
||||
|
||||
Returns the key code if the event was is a key event. Use
|
||||
\helpref{GetKeyEvent}{wxtreeeventgetkeyevent} to get the values of the
|
||||
modifier keys for this event (i.e. Shift or Ctrl).
|
||||
|
||||
\membersection{wxTreeEvent::GetItem}
|
||||
|
||||
\constfunc{wxTreeItemId}{GetItem}{}
|
||||
|
||||
Returns he item (valid for all events).
|
||||
|
||||
\membersection{wxTreeEvent::GetKeyEvent}\label{wxtreeeventgetkeyevent}
|
||||
|
||||
\constfunc{const wxKeyEvent\&}{GetKeyEvent}{}
|
||||
|
||||
Returns the key event for {\tt EVT\_TREE\_KEY\_DOWN} events.
|
||||
|
||||
\membersection{wxTreeEvent::GetLabel}
|
||||
|
||||
\constfunc{const wxString\&}{GetLabel}{}
|
||||
|
||||
Returns the label if the event was a begin or end edit label event.
|
||||
|
||||
\membersection{wxTreeEvent::GetOldItem}
|
||||
|
||||
\constfunc{wxTreeItemId}{GetOldItem}{}
|
||||
@@ -66,15 +86,3 @@ Returns the old item index (valid for EVT\_TREE\_ITEM\_CHANGING and CHANGED even
|
||||
|
||||
Returns the position of the mouse pointer if the event is a drag event.
|
||||
|
||||
\membersection{wxTreeEvent::GetCode}
|
||||
|
||||
\constfunc{int}{GetCode}{}
|
||||
|
||||
The key code if the event was is a key event.
|
||||
|
||||
\membersection{wxTreeEvent::GetLabel}
|
||||
|
||||
\constfunc{const wxString\&}{GetLabel}{}
|
||||
|
||||
Returns the label if the event was a begin or end edit label event.
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
[OPTIONS]
|
||||
BMROOT=x:\docs/latex/wx ; Assume that bitmaps are where the source is
|
||||
BMROOT=c:\wx2dev\wxWind~1\docs/latex/wx ; Assume that bitmaps are where the source is
|
||||
TITLE=wxWindows Manual
|
||||
CONTENTS=Contents
|
||||
COMPRESS=HIGH
|
||||
|
File diff suppressed because it is too large
Load Diff
2637
docs/mac/SetTypeFromExtension.sea.hqx
Executable file
2637
docs/mac/SetTypeFromExtension.sea.hqx
Executable file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -46,7 +46,7 @@ tipdlg.cpp line 201 #include "wx/generic/tip.xpm"
|
||||
|
||||
then your cvs has changed the type of the .xpm files to something other than text, in order to fix this
|
||||
either change the type by using a resource editor or drag the files from /include/wx/generic/..xpm on
|
||||
the MakeMetrowerksText application that is included in this folder
|
||||
the SetTypeFromExtension application that is included in this folder
|
||||
|
||||
Missing PLStringFuncsLib
|
||||
------------------------
|
||||
|
@@ -1,22 +1,5 @@
|
||||
in the carbon targets the following items are still missing
|
||||
|
||||
- printing support
|
||||
- navigation services support
|
||||
|
||||
Bugs/Defects (GD)
|
||||
-----------------
|
||||
* Correct listbox creation which is causing the following error message
|
||||
under Mac OS X:
|
||||
|
||||
./Controls/Source/ControlAllocation.cp:755: failed assertion `theErr == noErr'
|
||||
Abort
|
||||
|
||||
This is due to the constant kwxMacListWithVerticalScrollbar at line 40 of
|
||||
src/mac/listbox.cpp because the custom control definition has not been loaded
|
||||
and is not present in memory, see:
|
||||
|
||||
http://developer.apple.com/technotes/tn/tn2003.html#CustomCode
|
||||
|
||||
* Implement toggle buttons missing under Mac OS & Mac OS X
|
||||
|
||||
* Correct smart processing errors that provoke the following error:
|
||||
|
@@ -9,7 +9,7 @@ TN0008 How to learn wxWindows programming
|
||||
TN0009 Creating and converting icons
|
||||
TN0010 Compiling wxWindows applications in the VC++ IDE
|
||||
TN0011 All about version numbers
|
||||
|
||||
TN0012 wxWindows platform, toolkit and library names
|
||||
|
||||
|
||||
Version: $Id$
|
||||
|
125
docs/tech/tn0012.txt
Normal file
125
docs/tech/tn0012.txt
Normal file
@@ -0,0 +1,125 @@
|
||||
wxWindows naming conventions
|
||||
============================
|
||||
|
||||
Being a cross platform development library, it is naturally desirable
|
||||
(at least to me ;) for wxWindows to be exploited in a fully cross
|
||||
platform development environment -- a single invocation of make should
|
||||
be sufficient to build target executables for a variety of host platforms
|
||||
when desired.
|
||||
|
||||
Since this is now in fact possible for at least the most commonly used
|
||||
platforms, wxWindows has been structured to allow multiple, simultaneous
|
||||
installations of the library. Common files are shared, platform and port
|
||||
specific files and libraries are arranged so as to be unambiguous when
|
||||
installed together.
|
||||
|
||||
To manage this sanely we need a sufficiently descriptive and logical
|
||||
labelling convention for file and install path names -- this document (at
|
||||
least at it's time of writing) describes the system we have adopted.
|
||||
|
||||
It is not fine grained enough to include every possible build configuration
|
||||
for wxWindows, but is encompassing enough to maintain a relatively complete
|
||||
set of cross platform build tools on a single machine and to provide an
|
||||
obvious slot for new ports to slip into.
|
||||
|
||||
|
||||
For UNIX libraries, the canonical library name shall be of the form:
|
||||
|
||||
libwx_$(toolkit)$(widgetset)$(debug)-$(version)-$(host).$(lib_extension)
|
||||
|
||||
For MSW (native hosted only) libraries the library name should be of
|
||||
the form:
|
||||
|
||||
wx$(toolkit)$(widgetset)$(version)$(unicode)$(debug).$(lib_extension)
|
||||
|
||||
|
||||
Where:
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
$toolkit must currently be one of the following:
|
||||
|
||||
msw
|
||||
gtk
|
||||
base
|
||||
mac
|
||||
os2
|
||||
pm
|
||||
mgl
|
||||
motif
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
$widgetset may be one of:
|
||||
|
||||
univ
|
||||
|
||||
or empty if the widget set is the same as the toolkit.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
$version is a string encoding the full version (major, minor, release)
|
||||
for MSW, or just the major and minor number for UNIX.
|
||||
|
||||
eg. for wxWindows 2.3.2, $version = 232 for MSW or 2.3 for UNIX.
|
||||
|
||||
The rationale for this is that under UNIX-like systems it is desirable
|
||||
that differently 'minor numbered' releases can be installed together,
|
||||
meaning your old 2.2 apps can continue to work even if you migrate
|
||||
development to the next stable or unstable release (eg. 2.3, 2.4),
|
||||
but binary compatibility is maintained between point releases (those
|
||||
with the same major.minor number)
|
||||
|
||||
A known break in binary compatibility should be addressed by updating
|
||||
the library soname (see the notes in configure.in for details on this)
|
||||
|
||||
I do not know why MSW should not also omit the release number from
|
||||
$version. (maybe that will change by the time this document is ratified)
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
$unicode and $debug are either empty or set to 'u' and 'd'
|
||||
respectively when enabled.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
$host is empty for a 'native' library, (that is one where the host
|
||||
system is the same as the build system) or set to the value returned
|
||||
by the autoconf ${host_alias} variable in configure for libraries
|
||||
that are cross compiled.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
$lib_extension is system specific and most usually set to .a for
|
||||
a static library, .dll for a MSW shared library, or .so.$so_version
|
||||
for a shared UNIX library.
|
||||
|
||||
====================================================================
|
||||
|
||||
|
||||
The installed location of the library specific setup.h is also
|
||||
determined by the values of these items. On UNIX systems they
|
||||
will be found in:
|
||||
|
||||
$(prefix)/lib/wx/include/$(toolkit)$(widgetset)$(debug)-$(version)-$(host)/wx/
|
||||
|
||||
which will be in the include search path returned by the relevant
|
||||
wx-config for that library. (or presumably set in the relevant
|
||||
make/project files for platforms that do not use wx-config)
|
||||
|
||||
====================================================================
|
||||
|
||||
|
||||
The port specific wx-config file for each library shall be named:
|
||||
|
||||
wx-$(toolkit)$(widgetset)$(debug)-$(version)-$(host)-config
|
||||
|
||||
${prefix}/bin/wx-config shall exist as a link to (or copy of) one of
|
||||
these port specific files (on platforms which support it) and as such
|
||||
it defines the default build configuration for wxApps on the system.
|
||||
It may be modified by the system user at any time.
|
||||
|
||||
|
||||
|
||||
---==O==---
|
||||
|
@@ -273,6 +273,13 @@ public:
|
||||
protected:
|
||||
// returns the pointer to the object which supports this format or NULL
|
||||
wxDataObjectSimple *GetObject(const wxDataFormat& format) const;
|
||||
#if defined(__WXMSW__)
|
||||
virtual const void* GetSizeFromBuffer( const void* buffer, size_t* size,
|
||||
const wxDataFormat& format );
|
||||
virtual void* SetSizeInBuffer( void* buffer, size_t size,
|
||||
const wxDataFormat& format );
|
||||
virtual size_t GetBufferOffset( const wxDataFormat& format );
|
||||
#endif
|
||||
|
||||
private:
|
||||
// the list of all (simple) data objects whose formats we support
|
||||
@@ -301,7 +308,8 @@ public:
|
||||
// ctor: you can specify the text here or in SetText(), or override
|
||||
// GetText()
|
||||
wxTextDataObject(const wxString& text = wxEmptyString)
|
||||
: wxDataObjectSimple(wxDF_TEXT), m_text(text)
|
||||
: wxDataObjectSimple(wxUSE_UNICODE?wxDF_UNICODETEXT:wxDF_TEXT),
|
||||
m_text(text)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -17,14 +17,23 @@
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/panel.h"
|
||||
#include "wx/containr.h"
|
||||
#include "wx/toplevel.h"
|
||||
|
||||
// FIXME - temporary hack in absence of wxTLW !!
|
||||
#ifndef wxTopLevelWindowNative
|
||||
#include "wx/panel.h"
|
||||
class WXDLLEXPORT wxDialogBase : public wxPanel
|
||||
#else
|
||||
class WXDLLEXPORT wxDialogBase : public wxTopLevelWindow
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
#ifdef __DARWIN__
|
||||
~wxDialogBase() { }
|
||||
#endif
|
||||
wxDialogBase() { Init(); }
|
||||
virtual ~wxDialogBase() { }
|
||||
|
||||
void Init();
|
||||
|
||||
// the modal dialogs have a return code - usually the id of the last
|
||||
// pressed button
|
||||
void SetReturnCode(int returnCode) { m_returnCode = returnCode; }
|
||||
@@ -35,7 +44,7 @@ public:
|
||||
// lines into a vertical wxBoxSizer
|
||||
wxSizer *CreateTextSizer( const wxString &message );
|
||||
#endif // wxUSE_STATTEXT && wxUSE_TEXTCTRL
|
||||
|
||||
|
||||
#if wxUSE_BUTTON
|
||||
// places buttons into a horizontal wxBoxSizer
|
||||
wxSizer *CreateButtonSizer( long flags );
|
||||
@@ -44,23 +53,31 @@ public:
|
||||
protected:
|
||||
// the return code from modal dialog
|
||||
int m_returnCode;
|
||||
|
||||
// FIXME - temporary hack in absence of wxTLW !!
|
||||
#ifdef wxTopLevelWindowNative
|
||||
DECLARE_EVENT_TABLE()
|
||||
WX_DECLARE_CONTROL_CONTAINER();
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/dialog.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dialog.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/dialog.h"
|
||||
#elif defined(__WXMGL__)
|
||||
#include "wx/mgl/dialog.h"
|
||||
// FIXME_MGL -- belongs to wxUniv
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/dialog.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/dialog.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/dialog.h"
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#include "wx/univ/dialog.h"
|
||||
#else
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/dialog.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/dialog.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/dialog.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/dialog.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/dialog.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
#include "wx/stubs/dialog.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -43,42 +43,39 @@ class wxFileSystem;
|
||||
|
||||
class WXDLLEXPORT wxFSFile : public wxObject
|
||||
{
|
||||
private:
|
||||
wxInputStream *m_Stream;
|
||||
wxString m_Location;
|
||||
wxString m_MimeType;
|
||||
wxString m_Anchor;
|
||||
wxDateTime m_Modif;
|
||||
public:
|
||||
wxFSFile(wxInputStream *stream, const wxString& loc,
|
||||
const wxString& mimetype, const wxString& anchor,
|
||||
wxDateTime modif)
|
||||
{
|
||||
m_Stream = stream;
|
||||
m_Location = loc;
|
||||
m_MimeType = mimetype; m_MimeType.MakeLower();
|
||||
m_Anchor = anchor;
|
||||
m_Modif = modif;
|
||||
}
|
||||
virtual ~wxFSFile() { if (m_Stream) delete m_Stream; }
|
||||
|
||||
public:
|
||||
wxFSFile(wxInputStream *stream, const wxString& loc,
|
||||
const wxString& mimetype, const wxString& anchor,
|
||||
wxDateTime modif)
|
||||
{
|
||||
m_Stream = stream;
|
||||
m_Location = loc;
|
||||
m_MimeType = mimetype; m_MimeType.MakeLower();
|
||||
m_Anchor = anchor;
|
||||
m_Modif = modif;
|
||||
}
|
||||
virtual ~wxFSFile()
|
||||
{
|
||||
if (m_Stream) delete m_Stream;
|
||||
}
|
||||
// returns stream. This doesn't _create_ stream, it only returns
|
||||
// pointer to it!!
|
||||
wxInputStream *GetStream() const {return m_Stream;}
|
||||
|
||||
wxInputStream *GetStream() const {return m_Stream;}
|
||||
// returns stream. This doesn't _create_ stream, it only returns
|
||||
// pointer to it!!
|
||||
// returns file's mime type
|
||||
const wxString& GetMimeType() const {return m_MimeType;}
|
||||
|
||||
const wxString& GetMimeType() const {return m_MimeType;}
|
||||
// returns file's mime type
|
||||
// returns the original location (aka filename) of the file
|
||||
const wxString& GetLocation() const {return m_Location;}
|
||||
|
||||
const wxString& GetLocation() const {return m_Location;}
|
||||
// returns the original location (aka filename) of the file
|
||||
const wxString& GetAnchor() const {return m_Anchor;}
|
||||
|
||||
const wxString& GetAnchor() const {return m_Anchor;}
|
||||
|
||||
wxDateTime GetModificationTime() const {return m_Modif;}
|
||||
wxDateTime GetModificationTime() const {return m_Modif;}
|
||||
|
||||
private:
|
||||
wxInputStream *m_Stream;
|
||||
wxString m_Location;
|
||||
wxString m_MimeType;
|
||||
wxString m_Anchor;
|
||||
wxDateTime m_Modif;
|
||||
};
|
||||
|
||||
|
||||
@@ -94,47 +91,47 @@ class WXDLLEXPORT wxFSFile : public wxObject
|
||||
|
||||
class WXDLLEXPORT wxFileSystemHandler : public wxObject
|
||||
{
|
||||
public:
|
||||
wxFileSystemHandler() : wxObject() {}
|
||||
|
||||
// returns TRUE if this handler is able to open given location
|
||||
virtual bool CanOpen(const wxString& location) = 0;
|
||||
|
||||
// opens given file and returns pointer to input stream.
|
||||
// Returns NULL if opening failed.
|
||||
// The location is always absolute path.
|
||||
virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location) = 0;
|
||||
|
||||
// Finds first/next file that matches spec wildcard. flags can be wxDIR for restricting
|
||||
// the query to directories or wxFILE for files only or 0 for either.
|
||||
// Returns filename or empty string if no more matching file exists
|
||||
virtual wxString FindFirst(const wxString& spec, int flags = 0);
|
||||
virtual wxString FindNext();
|
||||
|
||||
protected:
|
||||
// returns protocol ("file", "http", "tar" etc.) The last (most right)
|
||||
// protocol is used:
|
||||
// {it returns "tar" for "file:subdir/archive.tar.gz#tar:/README.txt"}
|
||||
wxString GetProtocol(const wxString& location) const;
|
||||
|
||||
// returns left part of address:
|
||||
// {it returns "file:subdir/archive.tar.gz" for "file:subdir/archive.tar.gz#tar:/README.txt"}
|
||||
wxString GetLeftLocation(const wxString& location) const;
|
||||
|
||||
// returns anchor part of address:
|
||||
// {it returns "anchor" for "file:subdir/archive.tar.gz#tar:/README.txt#anchor"}
|
||||
// NOTE: anchor is NOT a part of GetLeftLocation()'s return value
|
||||
wxString GetAnchor(const wxString& location) const;
|
||||
|
||||
// returns right part of address:
|
||||
// {it returns "/README.txt" for "file:subdir/archive.tar.gz#tar:/README.txt"}
|
||||
wxString GetRightLocation(const wxString& location) const;
|
||||
|
||||
// Returns MIME type of the file - w/o need to open it
|
||||
// (default behaviour is that it returns type based on extension)
|
||||
wxString GetMimeTypeFromExt(const wxString& location);
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxFileSystemHandler)
|
||||
|
||||
public:
|
||||
wxFileSystemHandler() : wxObject() {}
|
||||
|
||||
virtual bool CanOpen(const wxString& location) = 0;
|
||||
// returns TRUE if this handler is able to open given location
|
||||
|
||||
virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location) = 0;
|
||||
// opens given file and returns pointer to input stream.
|
||||
// Returns NULL if opening failed.
|
||||
// The location is always absolute path.
|
||||
|
||||
virtual wxString FindFirst(const wxString& spec, int flags = 0);
|
||||
virtual wxString FindNext();
|
||||
// Finds first/next file that matches spec wildcard. flags can be wxDIR for restricting
|
||||
// the query to directories or wxFILE for files only or 0 for either.
|
||||
// Returns filename or empty string if no more matching file exists
|
||||
|
||||
protected:
|
||||
wxString GetProtocol(const wxString& location) const;
|
||||
// returns protocol ("file", "http", "tar" etc.) The last (most right)
|
||||
// protocol is used:
|
||||
// {it returns "tar" for "file:subdir/archive.tar.gz#tar:/README.txt"}
|
||||
|
||||
wxString GetLeftLocation(const wxString& location) const;
|
||||
// returns left part of address:
|
||||
// {it returns "file:subdir/archive.tar.gz" for "file:subdir/archive.tar.gz#tar:/README.txt"}
|
||||
|
||||
wxString GetAnchor(const wxString& location) const;
|
||||
// returns anchor part of address:
|
||||
// {it returns "anchor" for "file:subdir/archive.tar.gz#tar:/README.txt#anchor"}
|
||||
// NOTE: anchor is NOT a part of GetLeftLocation()'s return value
|
||||
|
||||
wxString GetRightLocation(const wxString& location) const;
|
||||
// returns right part of address:
|
||||
// {it returns "/README.txt" for "file:subdir/archive.tar.gz#tar:/README.txt"}
|
||||
|
||||
wxString GetMimeTypeFromExt(const wxString& location);
|
||||
// Returns MIME type of the file - w/o need to open it
|
||||
// (default behaviour is that it returns type based on extension)
|
||||
};
|
||||
|
||||
|
||||
@@ -148,54 +145,53 @@ class WXDLLEXPORT wxFileSystemHandler : public wxObject
|
||||
|
||||
class WXDLLEXPORT wxFileSystem : public wxObject
|
||||
{
|
||||
public:
|
||||
wxFileSystem() : wxObject() {m_Path = m_LastName = wxEmptyString; m_Handlers.DeleteContents(TRUE); m_FindFileHandler = NULL;}
|
||||
|
||||
// sets the current location. Every call to OpenFile is
|
||||
// relative to this location.
|
||||
// NOTE !!
|
||||
// unless is_dir = TRUE 'location' is *not* the directory but
|
||||
// file contained in this directory
|
||||
// (so ChangePathTo("dir/subdir/xh.htm") sets m_Path to "dir/subdir/")
|
||||
void ChangePathTo(const wxString& location, bool is_dir = FALSE);
|
||||
|
||||
wxString GetPath() const {return m_Path;}
|
||||
|
||||
// opens given file and returns pointer to input stream.
|
||||
// Returns NULL if opening failed.
|
||||
// It first tries to open the file in relative scope
|
||||
// (based on ChangePathTo()'s value) and then as an absolute
|
||||
// path.
|
||||
wxFSFile* OpenFile(const wxString& location);
|
||||
|
||||
// Finds first/next file that matches spec wildcard. flags can be wxDIR for restricting
|
||||
// the query to directories or wxFILE for files only or 0 for either.
|
||||
// Returns filename or empty string if no more matching file exists
|
||||
wxString FindFirst(const wxString& spec, int flags = 0);
|
||||
wxString FindNext();
|
||||
|
||||
// Adds FS handler.
|
||||
// In fact, this class is only front-end to the FS hanlers :-)
|
||||
static void AddHandler(wxFileSystemHandler *handler);
|
||||
|
||||
// remove all items from the m_Handlers list
|
||||
static void CleanUpHandlers();
|
||||
|
||||
protected:
|
||||
wxString m_Path;
|
||||
// the path (location) we are currently in
|
||||
// this is path, not file!
|
||||
// (so if you opened test/demo.htm, it is
|
||||
// "test/", not "test/demo.htm")
|
||||
wxString m_LastName;
|
||||
// name of last opened file (full path)
|
||||
static wxList m_Handlers;
|
||||
// list of FS handlers
|
||||
wxFileSystemHandler *m_FindFileHandler;
|
||||
// handler that succeed in FindFirst query
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxFileSystem)
|
||||
|
||||
public:
|
||||
wxFileSystem() : wxObject() {m_Path = m_LastName = wxEmptyString; m_Handlers.DeleteContents(TRUE); m_FindFileHandler = NULL;}
|
||||
|
||||
void ChangePathTo(const wxString& location, bool is_dir = FALSE);
|
||||
// sets the current location. Every call to OpenFile is
|
||||
// relative to this location.
|
||||
// NOTE !!
|
||||
// unless is_dir = TRUE 'location' is *not* the directory but
|
||||
// file contained in this directory
|
||||
// (so ChangePathTo("dir/subdir/xh.htm") sets m_Path to "dir/subdir/")
|
||||
|
||||
wxString GetPath() const {return m_Path;}
|
||||
|
||||
wxFSFile* OpenFile(const wxString& location);
|
||||
// opens given file and returns pointer to input stream.
|
||||
// Returns NULL if opening failed.
|
||||
// It first tries to open the file in relative scope
|
||||
// (based on ChangePathTo()'s value) and then as an absolute
|
||||
// path.
|
||||
|
||||
wxString FindFirst(const wxString& spec, int flags = 0);
|
||||
wxString FindNext();
|
||||
// Finds first/next file that matches spec wildcard. flags can be wxDIR for restricting
|
||||
// the query to directories or wxFILE for files only or 0 for either.
|
||||
// Returns filename or empty string if no more matching file exists
|
||||
|
||||
|
||||
static void AddHandler(wxFileSystemHandler *handler);
|
||||
// Adds FS handler.
|
||||
// In fact, this class is only front-end to the FS hanlers :-)
|
||||
|
||||
static void CleanUpHandlers();
|
||||
// remove all items from the m_Handlers list
|
||||
|
||||
private:
|
||||
wxString m_Path;
|
||||
// the path (location) we are currently in
|
||||
// this is path, not file!
|
||||
// (so if you opened test/demo.htm, it is
|
||||
// "test/", not "test/demo.htm")
|
||||
wxString m_LastName;
|
||||
// name of last opened file (full path)
|
||||
static wxList m_Handlers;
|
||||
// list of FS handlers
|
||||
wxFileSystemHandler *m_FindFileHandler;
|
||||
// handler that succeed in FindFirst query
|
||||
};
|
||||
|
||||
|
||||
@@ -222,6 +218,27 @@ special characters :
|
||||
|
||||
*/
|
||||
|
||||
|
||||
class wxLocalFSHandler : public wxFileSystemHandler
|
||||
{
|
||||
public:
|
||||
virtual bool CanOpen(const wxString& location);
|
||||
virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
|
||||
virtual wxString FindFirst(const wxString& spec, int flags = 0);
|
||||
virtual wxString FindNext();
|
||||
|
||||
// wxLocalFSHandler will prefix all filenames with 'root' before accessing
|
||||
// files on disk. This effectively makes 'root' the top-level directory
|
||||
// and prevents access to files outside this directory.
|
||||
// (This is similar to Unix command 'chroot'.)
|
||||
static void Chroot(const wxString& root) { ms_root = root; }
|
||||
|
||||
protected:
|
||||
static wxString ms_root;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
// wxUSE_FILESYSTEM
|
||||
|
||||
|
@@ -20,8 +20,7 @@
|
||||
#pragma interface "framebase.h"
|
||||
#endif
|
||||
|
||||
#include "wx/window.h" // the base class
|
||||
#include "wx/icon.h" // for m_icon
|
||||
#include "wx/toplevel.h" // the base class
|
||||
|
||||
// the default names for various classs
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxFrameNameStr;
|
||||
@@ -33,14 +32,6 @@ class WXDLLEXPORT wxMenuBar;
|
||||
class WXDLLEXPORT wxStatusBar;
|
||||
class WXDLLEXPORT wxToolBar;
|
||||
|
||||
// Styles for ShowFullScreen
|
||||
#define wxFULLSCREEN_NOMENUBAR 0x01
|
||||
#define wxFULLSCREEN_NOTOOLBAR 0x02
|
||||
#define wxFULLSCREEN_NOSTATUSBAR 0x04
|
||||
#define wxFULLSCREEN_NOBORDER 0x08
|
||||
#define wxFULLSCREEN_NOCAPTION 0x10
|
||||
#define wxFULLSCREEN_ALL (wxFULLSCREEN_NOMENUBAR | wxFULLSCREEN_NOTOOLBAR | wxFULLSCREEN_NOSTATUSBAR | wxFULLSCREEN_NOBORDER | wxFULLSCREEN_NOCAPTION)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFrame is a top-level window with optional menubar, statusbar and toolbar
|
||||
//
|
||||
@@ -53,7 +44,12 @@ class WXDLLEXPORT wxToolBar;
|
||||
// CreateXXXBar() is called.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxFrameBase : public wxWindow
|
||||
// FIXME - temporary hack in absence of wxTLW !!
|
||||
#ifndef wxTopLevelWindowNative
|
||||
class WXDLLEXPORT wxFrameBase : public wxTopLevelWindowBase
|
||||
#else
|
||||
class WXDLLEXPORT wxFrameBase : public wxTopLevelWindow
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
// construction
|
||||
@@ -73,30 +69,6 @@ public:
|
||||
// frame state
|
||||
// -----------
|
||||
|
||||
// maximize = TRUE => maximize, otherwise - restore
|
||||
virtual void Maximize(bool maximize = TRUE) = 0;
|
||||
|
||||
// undo Maximize() or Iconize()
|
||||
virtual void Restore() = 0;
|
||||
|
||||
// iconize = TRUE => iconize, otherwise - restore
|
||||
virtual void Iconize(bool iconize = TRUE) = 0;
|
||||
|
||||
// return TRUE if the frame is maximized
|
||||
virtual bool IsMaximized() const = 0;
|
||||
|
||||
// return TRUE if the frame is iconized
|
||||
virtual bool IsIconized() const = 0;
|
||||
|
||||
// get the frame icon
|
||||
const wxIcon& GetIcon() const { return m_icon; }
|
||||
|
||||
// set the frame icon
|
||||
virtual void SetIcon(const wxIcon& icon) { m_icon = icon; }
|
||||
|
||||
// make the window modal (all other windows unresponsive)
|
||||
virtual void MakeModal(bool modal = TRUE);
|
||||
|
||||
// get the origin of the client area (which may be different from (0, 0)
|
||||
// if the frame has a toolbar) in client coordinates
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
@@ -157,27 +129,12 @@ public:
|
||||
virtual void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
// old functions, use the new ones instead!
|
||||
#if WXWIN_COMPATIBILITY_2
|
||||
bool Iconized() const { return IsIconized(); }
|
||||
#endif // WXWIN_COMPATIBILITY_2
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
// override some base class virtuals
|
||||
virtual bool Destroy();
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
|
||||
// event handlers
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void OnMenuHighlight(wxMenuEvent& event);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
// this should go away, but for now it's called from docview.cpp,
|
||||
// so should be there for all platforms
|
||||
void OnActivate(wxActivateEvent &WXUNUSED(event)) { }
|
||||
|
||||
#if wxUSE_MENUS
|
||||
// send wxUpdateUIEvents for all menu items (called from OnIdle())
|
||||
@@ -231,17 +188,6 @@ protected:
|
||||
wxToolBar *m_frameToolBar;
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
// the frame client to screen translation should take account of the
|
||||
// toolbar which may shift the origin of the client area
|
||||
virtual void DoClientToScreen(int *x, int *y) const;
|
||||
virtual void DoScreenToClient(int *x, int *y) const;
|
||||
|
||||
// send the iconize event, return TRUE if processed
|
||||
bool SendIconizeEvent(bool iconized = TRUE);
|
||||
|
||||
// the frame icon
|
||||
wxIcon m_icon;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
@@ -1,11 +1,11 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: geometry.h
|
||||
// Name: wx/geometry.h
|
||||
// Purpose: Common Geometry Classes
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 08/05/99
|
||||
// RCS-ID:
|
||||
// Copyright: (c)
|
||||
// Copyright: (c) 1999 Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
#define wxMulDivInt32( a , b , c ) ((wxInt32)((a)*(((wxDouble)b)/((wxDouble)c))))
|
||||
#endif
|
||||
|
||||
class wxDataInputStream ;
|
||||
class wxDataOutputStream ;
|
||||
class wxDataInputStream;
|
||||
class wxDataOutputStream;
|
||||
|
||||
// clipping from Cohen-Sutherland
|
||||
|
||||
@@ -51,93 +51,93 @@ enum wxOutCode
|
||||
wxOutRight = 0x02 ,
|
||||
wxOutTop = 0x08 ,
|
||||
wxOutBottom = 0x04
|
||||
} ;
|
||||
};
|
||||
|
||||
// wxPoint2Ds represent a point or a vector in a 2d coordinate system
|
||||
|
||||
class WXDLLEXPORT wxPoint2DDouble
|
||||
{
|
||||
public :
|
||||
inline wxPoint2DDouble();
|
||||
inline wxPoint2DDouble( wxDouble x , wxDouble y ) ;
|
||||
inline wxPoint2DDouble( const wxPoint2DDouble &pt ) ;
|
||||
inline wxPoint2DDouble();
|
||||
inline wxPoint2DDouble( wxDouble x , wxDouble y );
|
||||
inline wxPoint2DDouble( const wxPoint2DDouble &pt );
|
||||
|
||||
// two different conversions to integers, floor and rounding
|
||||
inline void GetFloor( wxInt32 *x , wxInt32 *y ) ;
|
||||
inline void GetRounded( wxInt32 *x , wxInt32 *y ) ;
|
||||
// two different conversions to integers, floor and rounding
|
||||
inline void GetFloor( wxInt32 *x , wxInt32 *y );
|
||||
inline void GetRounded( wxInt32 *x , wxInt32 *y );
|
||||
|
||||
inline wxDouble GetVectorLength() ;
|
||||
inline wxDouble GetVectorAngle() ;
|
||||
void SetVectorLength( wxDouble length ) ;
|
||||
void SetVectorAngle( wxDouble degrees ) ;
|
||||
void SetPolarCoordinates( wxDouble angle , wxDouble length ) ;
|
||||
// set the vector length to 1.0, preserving the angle
|
||||
void Normalize() ;
|
||||
inline wxDouble GetVectorLength();
|
||||
inline wxDouble GetVectorAngle();
|
||||
void SetVectorLength( wxDouble length );
|
||||
void SetVectorAngle( wxDouble degrees );
|
||||
void SetPolarCoordinates( wxDouble angle , wxDouble length );
|
||||
// set the vector length to 1.0, preserving the angle
|
||||
void Normalize();
|
||||
|
||||
inline wxDouble GetDistance( const wxPoint2DDouble &pt ) ;
|
||||
inline wxDouble GetDistanceSquare( const wxPoint2DDouble &pt ) ;
|
||||
inline wxDouble GetDotProduct( const wxPoint2DDouble &vec ) ;
|
||||
inline wxDouble GetCrossProduct( const wxPoint2DDouble &vec ) ;
|
||||
inline wxDouble GetDistance( const wxPoint2DDouble &pt );
|
||||
inline wxDouble GetDistanceSquare( const wxPoint2DDouble &pt );
|
||||
inline wxDouble GetDotProduct( const wxPoint2DDouble &vec );
|
||||
inline wxDouble GetCrossProduct( const wxPoint2DDouble &vec );
|
||||
|
||||
// the reflection of this point
|
||||
inline wxPoint2DDouble operator-() ;
|
||||
// the reflection of this point
|
||||
inline wxPoint2DDouble operator-();
|
||||
|
||||
inline wxPoint2DDouble& operator=(const wxPoint2DDouble& pt) ;
|
||||
inline wxPoint2DDouble& operator+=(const wxPoint2DDouble& pt) ;
|
||||
inline wxPoint2DDouble& operator-=(const wxPoint2DDouble& pt) ;
|
||||
inline wxPoint2DDouble& operator*=(const wxPoint2DDouble& pt) ;
|
||||
inline wxPoint2DDouble& operator*=(wxDouble n) ;
|
||||
inline wxPoint2DDouble& operator*=(wxInt32 n) ;
|
||||
inline wxPoint2DDouble& operator/=(const wxPoint2DDouble& pt) ;
|
||||
inline wxPoint2DDouble& operator/=(wxDouble n) ;
|
||||
inline wxPoint2DDouble& operator/=(wxInt32 n) ;
|
||||
inline wxPoint2DDouble& operator=(const wxPoint2DDouble& pt);
|
||||
inline wxPoint2DDouble& operator+=(const wxPoint2DDouble& pt);
|
||||
inline wxPoint2DDouble& operator-=(const wxPoint2DDouble& pt);
|
||||
inline wxPoint2DDouble& operator*=(const wxPoint2DDouble& pt);
|
||||
inline wxPoint2DDouble& operator*=(wxDouble n);
|
||||
inline wxPoint2DDouble& operator*=(wxInt32 n);
|
||||
inline wxPoint2DDouble& operator/=(const wxPoint2DDouble& pt);
|
||||
inline wxPoint2DDouble& operator/=(wxDouble n);
|
||||
inline wxPoint2DDouble& operator/=(wxInt32 n);
|
||||
|
||||
inline bool operator==(const wxPoint2DDouble& pt) const ;
|
||||
inline bool operator!=(const wxPoint2DDouble& pt) const ;
|
||||
inline bool operator==(const wxPoint2DDouble& pt) const;
|
||||
inline bool operator!=(const wxPoint2DDouble& pt) const;
|
||||
|
||||
wxDouble m_x ;
|
||||
wxDouble m_y ;
|
||||
} ;
|
||||
wxDouble m_x;
|
||||
wxDouble m_y;
|
||||
};
|
||||
|
||||
wxPoint2DDouble operator+(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2) ;
|
||||
wxPoint2DDouble operator-(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2) ;
|
||||
wxPoint2DDouble operator*(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2) ;
|
||||
wxPoint2DDouble operator*(wxDouble n , const wxPoint2DDouble& pt) ;
|
||||
wxPoint2DDouble operator*(wxInt32 n , const wxPoint2DDouble& pt) ;
|
||||
wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxDouble n) ;
|
||||
wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxInt32 n) ;
|
||||
wxPoint2DDouble operator/(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2) ;
|
||||
wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxDouble n) ;
|
||||
wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxInt32 n) ;
|
||||
wxPoint2DDouble operator+(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2);
|
||||
wxPoint2DDouble operator-(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2);
|
||||
wxPoint2DDouble operator*(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2);
|
||||
wxPoint2DDouble operator*(wxDouble n , const wxPoint2DDouble& pt);
|
||||
wxPoint2DDouble operator*(wxInt32 n , const wxPoint2DDouble& pt);
|
||||
wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxDouble n);
|
||||
wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxInt32 n);
|
||||
wxPoint2DDouble operator/(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2);
|
||||
wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxDouble n);
|
||||
wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxInt32 n);
|
||||
|
||||
inline wxPoint2DDouble::wxPoint2DDouble()
|
||||
{
|
||||
m_x = 0.0 ;
|
||||
m_y = 0.0 ;
|
||||
m_x = 0.0;
|
||||
m_y = 0.0;
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble::wxPoint2DDouble( wxDouble x , wxDouble y )
|
||||
{
|
||||
m_x = x ;
|
||||
m_y = y ;
|
||||
m_x = x;
|
||||
m_y = y;
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble::wxPoint2DDouble( const wxPoint2DDouble &pt )
|
||||
{
|
||||
m_x = pt.m_x ;
|
||||
m_y = pt.m_y ;
|
||||
m_x = pt.m_x;
|
||||
m_y = pt.m_y;
|
||||
}
|
||||
|
||||
inline void wxPoint2DDouble::GetFloor( wxInt32 *x , wxInt32 *y )
|
||||
{
|
||||
*x = (wxInt32) floor( m_x ) ;
|
||||
*y = (wxInt32) floor( m_y ) ;
|
||||
*x = (wxInt32) floor( m_x );
|
||||
*y = (wxInt32) floor( m_y );
|
||||
}
|
||||
|
||||
inline void wxPoint2DDouble::GetRounded( wxInt32 *x , wxInt32 *y )
|
||||
{
|
||||
*x = (wxInt32) floor( m_x + 0.5 ) ;
|
||||
*y = (wxInt32) floor( m_y + 0.5) ;
|
||||
*x = (wxInt32) floor( m_x + 0.5 );
|
||||
*y = (wxInt32) floor( m_y + 0.5);
|
||||
}
|
||||
|
||||
inline wxDouble wxPoint2DDouble::GetDistance( const wxPoint2DDouble &pt )
|
||||
@@ -147,17 +147,17 @@ inline wxDouble wxPoint2DDouble::GetDistance( const wxPoint2DDouble &pt )
|
||||
|
||||
inline wxDouble wxPoint2DDouble::GetDistanceSquare( const wxPoint2DDouble &pt )
|
||||
{
|
||||
return ( (pt.m_x-m_x)*(pt.m_x-m_x) + (pt.m_y-m_y)*(pt.m_y-m_y) ) ;
|
||||
return ( (pt.m_x-m_x)*(pt.m_x-m_x) + (pt.m_y-m_y)*(pt.m_y-m_y) );
|
||||
}
|
||||
|
||||
inline wxDouble wxPoint2DDouble::GetDotProduct( const wxPoint2DDouble &vec )
|
||||
{
|
||||
return ( m_x * vec.m_x + m_y * vec.m_y ) ;
|
||||
return ( m_x * vec.m_x + m_y * vec.m_y );
|
||||
}
|
||||
|
||||
inline wxDouble wxPoint2DDouble::GetCrossProduct( const wxPoint2DDouble &vec )
|
||||
{
|
||||
return ( m_x * vec.m_y - vec.m_x * m_y ) ;
|
||||
return ( m_x * vec.m_y - vec.m_x * m_y );
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble wxPoint2DDouble::operator-()
|
||||
@@ -167,37 +167,37 @@ inline wxPoint2DDouble wxPoint2DDouble::operator-()
|
||||
|
||||
inline wxPoint2DDouble& wxPoint2DDouble::operator=(const wxPoint2DDouble& pt)
|
||||
{
|
||||
m_x = pt.m_x ;
|
||||
m_x = pt.m_x;
|
||||
m_y = pt.m_y;
|
||||
return *this ;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble& wxPoint2DDouble::operator+=(const wxPoint2DDouble& pt)
|
||||
{
|
||||
m_x = m_x + pt.m_x ;
|
||||
m_x = m_x + pt.m_x;
|
||||
m_y = m_y + pt.m_y;
|
||||
return *this ;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble& wxPoint2DDouble::operator-=(const wxPoint2DDouble& pt)
|
||||
{
|
||||
m_x = m_x - pt.m_x ;
|
||||
m_x = m_x - pt.m_x;
|
||||
m_y = m_y - pt.m_y;
|
||||
return *this ;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble& wxPoint2DDouble::operator*=(const wxPoint2DDouble& pt)
|
||||
{
|
||||
m_x = m_x * pt.m_x ;
|
||||
m_x = m_x * pt.m_x;
|
||||
m_y = m_y * pt.m_y;
|
||||
return *this ;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble& wxPoint2DDouble::operator/=(const wxPoint2DDouble& pt)
|
||||
{
|
||||
m_x = m_x / pt.m_x ;
|
||||
m_x = m_x / pt.m_x;
|
||||
m_y = m_y / pt.m_y;
|
||||
return *this ;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline bool wxPoint2DDouble::operator==(const wxPoint2DDouble& pt) const
|
||||
@@ -212,53 +212,53 @@ inline bool wxPoint2DDouble::operator!=(const wxPoint2DDouble& pt) const
|
||||
|
||||
inline wxPoint2DDouble operator+(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2)
|
||||
{
|
||||
return wxPoint2DDouble( pt1.m_x + pt2.m_x , pt1.m_y + pt2.m_y ) ;
|
||||
return wxPoint2DDouble( pt1.m_x + pt2.m_x , pt1.m_y + pt2.m_y );
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble operator-(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2)
|
||||
{
|
||||
return wxPoint2DDouble( pt1.m_x - pt2.m_x , pt1.m_y - pt2.m_y ) ;
|
||||
return wxPoint2DDouble( pt1.m_x - pt2.m_x , pt1.m_y - pt2.m_y );
|
||||
}
|
||||
|
||||
|
||||
inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2)
|
||||
{
|
||||
return wxPoint2DDouble( pt1.m_x * pt2.m_x , pt1.m_y * pt2.m_y ) ;
|
||||
return wxPoint2DDouble( pt1.m_x * pt2.m_x , pt1.m_y * pt2.m_y );
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble operator*(wxDouble n , const wxPoint2DDouble& pt)
|
||||
{
|
||||
return wxPoint2DDouble( pt.m_x * n , pt.m_y * n ) ;
|
||||
return wxPoint2DDouble( pt.m_x * n , pt.m_y * n );
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble operator*(wxInt32 n , const wxPoint2DDouble& pt)
|
||||
{
|
||||
return wxPoint2DDouble( pt.m_x * n , pt.m_y * n ) ;
|
||||
return wxPoint2DDouble( pt.m_x * n , pt.m_y * n );
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxDouble n)
|
||||
{
|
||||
return wxPoint2DDouble( pt.m_x * n , pt.m_y * n ) ;
|
||||
return wxPoint2DDouble( pt.m_x * n , pt.m_y * n );
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxInt32 n)
|
||||
{
|
||||
return wxPoint2DDouble( pt.m_x * n , pt.m_y * n ) ;
|
||||
return wxPoint2DDouble( pt.m_x * n , pt.m_y * n );
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2)
|
||||
{
|
||||
return wxPoint2DDouble( pt1.m_x / pt2.m_x , pt1.m_y / pt2.m_y ) ;
|
||||
return wxPoint2DDouble( pt1.m_x / pt2.m_x , pt1.m_y / pt2.m_y );
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxDouble n)
|
||||
{
|
||||
return wxPoint2DDouble( pt.m_x / n , pt.m_y / n ) ;
|
||||
return wxPoint2DDouble( pt.m_x / n , pt.m_y / n );
|
||||
}
|
||||
|
||||
inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxInt32 n)
|
||||
{
|
||||
return wxPoint2DDouble( pt.m_x / n , pt.m_y / n ) ;
|
||||
return wxPoint2DDouble( pt.m_x / n , pt.m_y / n );
|
||||
}
|
||||
|
||||
// wxRect2Ds are a axis-aligned rectangles, each side of the rect is parallel to the x- or m_y- axis. The rectangle is either defined by the
|
||||
@@ -269,9 +269,9 @@ class WXDLLEXPORT wxRect2DDouble
|
||||
{
|
||||
public:
|
||||
wxRect2DDouble()
|
||||
{ m_x = m_y = m_width = m_height = 0 ; }
|
||||
{ m_x = m_y = m_width = m_height = 0; }
|
||||
wxRect2DDouble(wxDouble x, wxDouble y, wxDouble w, wxDouble h)
|
||||
{ m_x = x ; m_y = y ; m_width = w ; m_height = h ; }
|
||||
{ m_x = x; m_y = y; m_width = w; m_height = h; }
|
||||
/*
|
||||
wxRect2DDouble(const wxPoint2DDouble& topLeft, const wxPoint2DDouble& bottomRight);
|
||||
wxRect2DDouble(const wxPoint2DDouble& pos, const wxSize& size);
|
||||
@@ -288,94 +288,94 @@ public:
|
||||
// position whenever sensible, the Move.. functions keep the size of the rect and move the other corners apropriately
|
||||
|
||||
inline wxDouble GetLeft() const { return m_x; }
|
||||
inline void SetLeft( wxDouble n ) { m_width += m_x - n ; m_x = n ; }
|
||||
inline void MoveLeftTo( wxDouble n ) { m_x = n ; }
|
||||
inline void SetLeft( wxDouble n ) { m_width += m_x - n; m_x = n; }
|
||||
inline void MoveLeftTo( wxDouble n ) { m_x = n; }
|
||||
inline wxDouble GetTop() const { return m_y; }
|
||||
inline void SetTop( wxDouble n ) { m_height += m_y - n ; m_y = n ; }
|
||||
inline void MoveTopTo( wxDouble n ) { m_y = n ; }
|
||||
inline void SetTop( wxDouble n ) { m_height += m_y - n; m_y = n; }
|
||||
inline void MoveTopTo( wxDouble n ) { m_y = n; }
|
||||
inline wxDouble GetBottom() const { return m_y + m_height; }
|
||||
inline void SetBottom( wxDouble n ) { m_height += n - (m_y+m_height) ;}
|
||||
inline void MoveBottomTo( wxDouble n ) { m_y = n - m_height ; }
|
||||
inline void SetBottom( wxDouble n ) { m_height += n - (m_y+m_height);}
|
||||
inline void MoveBottomTo( wxDouble n ) { m_y = n - m_height; }
|
||||
inline wxDouble GetRight() const { return m_x + m_width; }
|
||||
inline void SetRight( wxDouble n ) { m_width += n - (m_x+m_width) ; }
|
||||
inline void MoveRightTo( wxDouble n ) { m_x = n - m_width ; }
|
||||
inline void SetRight( wxDouble n ) { m_width += n - (m_x+m_width) ; }
|
||||
inline void MoveRightTo( wxDouble n ) { m_x = n - m_width; }
|
||||
|
||||
inline wxPoint2DDouble GetLeftTop() const
|
||||
{ return wxPoint2DDouble( m_x , m_y ) ; }
|
||||
{ return wxPoint2DDouble( m_x , m_y ); }
|
||||
inline void SetLeftTop( const wxPoint2DDouble &pt )
|
||||
{ m_width += m_x - pt.m_x ; m_height += m_y - pt.m_y ; m_x = pt.m_x ; m_y = pt.m_y ; }
|
||||
{ m_width += m_x - pt.m_x; m_height += m_y - pt.m_y; m_x = pt.m_x; m_y = pt.m_y; }
|
||||
inline void MoveLeftTopTo( const wxPoint2DDouble &pt )
|
||||
{ m_x = pt.m_x ; m_y = pt.m_y ; }
|
||||
{ m_x = pt.m_x; m_y = pt.m_y; }
|
||||
inline wxPoint2DDouble GetLeftBottom() const
|
||||
{ return wxPoint2DDouble( m_x , m_y + m_height ) ; }
|
||||
{ return wxPoint2DDouble( m_x , m_y + m_height ); }
|
||||
inline void SetLeftBottom( const wxPoint2DDouble &pt )
|
||||
{ m_width += m_x - pt.m_x ; m_height += pt.m_y - (m_y+m_height) ; m_x = pt.m_x ; }
|
||||
{ m_width += m_x - pt.m_x; m_height += pt.m_y - (m_y+m_height) ; m_x = pt.m_x; }
|
||||
inline void MoveLeftBottomTo( const wxPoint2DDouble &pt )
|
||||
{ m_x = pt.m_x ; m_y = pt.m_y - m_height; }
|
||||
{ m_x = pt.m_x; m_y = pt.m_y - m_height; }
|
||||
inline wxPoint2DDouble GetRightTop() const
|
||||
{ return wxPoint2DDouble( m_x+m_width , m_y ) ; }
|
||||
{ return wxPoint2DDouble( m_x+m_width , m_y ); }
|
||||
inline void SetRightTop( const wxPoint2DDouble &pt )
|
||||
{ m_width += pt.m_x - ( m_x + m_width ) ; m_height += m_y - pt.m_y ; m_y = pt.m_y ; }
|
||||
{ m_width += pt.m_x - ( m_x + m_width ); m_height += m_y - pt.m_y; m_y = pt.m_y; }
|
||||
inline void MoveRightTopTo( const wxPoint2DDouble &pt )
|
||||
{ m_x = pt.m_x - m_width ; m_y = pt.m_y ; }
|
||||
{ m_x = pt.m_x - m_width; m_y = pt.m_y; }
|
||||
inline wxPoint2DDouble GetRightBottom() const
|
||||
{ return wxPoint2DDouble( m_x+m_width , m_y + m_height ) ; }
|
||||
{ return wxPoint2DDouble( m_x+m_width , m_y + m_height ); }
|
||||
inline void SetRightBottom( const wxPoint2DDouble &pt )
|
||||
{ m_width += pt.m_x - ( m_x + m_width ) ; m_height += pt.m_y - (m_y+m_height) ;}
|
||||
{ m_width += pt.m_x - ( m_x + m_width ); m_height += pt.m_y - (m_y+m_height);}
|
||||
inline void MoveRightBottomTo( const wxPoint2DDouble &pt )
|
||||
{ m_x = pt.m_x - m_width ; m_y = pt.m_y - m_height; }
|
||||
{ m_x = pt.m_x - m_width; m_y = pt.m_y - m_height; }
|
||||
inline wxPoint2DDouble GetCentre() const
|
||||
{ return wxPoint2DDouble( m_x+m_width/2 , m_y+m_height/2 ) ; }
|
||||
{ return wxPoint2DDouble( m_x+m_width/2 , m_y+m_height/2 ); }
|
||||
inline void SetCentre( const wxPoint2DDouble &pt )
|
||||
{ MoveCentreTo( pt ) ; } // since this is impossible without moving...
|
||||
{ MoveCentreTo( pt ); } // since this is impossible without moving...
|
||||
inline void MoveCentreTo( const wxPoint2DDouble &pt )
|
||||
{ m_x += pt.m_x - (m_x+m_width/2) , m_y += pt.m_y -(m_y+m_height/2) ; }
|
||||
{ m_x += pt.m_x - (m_x+m_width/2) , m_y += pt.m_y -(m_y+m_height/2); }
|
||||
inline wxOutCode GetOutcode( const wxPoint2DDouble &pt ) const
|
||||
{ return (wxOutCode) (( ( pt.m_x < m_x ) ? wxOutLeft : 0 ) +
|
||||
( ( pt.m_x >= m_x + m_width ) ? wxOutRight : 0 ) +
|
||||
( ( pt.m_y < m_y ) ? wxOutTop : 0 ) +
|
||||
( ( pt.m_y >= m_y + m_height ) ? wxOutBottom : 0 )) ; }
|
||||
( ( pt.m_y >= m_y + m_height ) ? wxOutBottom : 0 )); }
|
||||
inline bool Contains( const wxPoint2DDouble &pt ) const
|
||||
{ return GetOutcode( pt ) == wxInside ; }
|
||||
{ return GetOutcode( pt ) == wxInside; }
|
||||
inline bool Contains( const wxRect2DDouble &rect ) const
|
||||
{ return ( ( ( m_x <= rect.m_x ) && ( rect.m_x + rect.m_width <= m_x + m_width ) ) &&
|
||||
( ( m_y <= rect.m_y ) && ( rect.m_y + rect.m_height <= m_y + m_height ) ) ) ; }
|
||||
( ( m_y <= rect.m_y ) && ( rect.m_y + rect.m_height <= m_y + m_height ) ) ); }
|
||||
inline bool IsEmpty() const
|
||||
{ return ( m_width <= 0 || m_height <= 0 ) ; }
|
||||
{ return ( m_width <= 0 || m_height <= 0 ); }
|
||||
inline bool HaveEqualSize( const wxRect2DDouble &rect ) const
|
||||
{ return ( rect.m_width == m_width && rect.m_height == m_height ) ; }
|
||||
{ return ( rect.m_width == m_width && rect.m_height == m_height ); }
|
||||
|
||||
inline void Inset( wxDouble x , wxDouble y )
|
||||
{ m_x += x ; m_y += y ; m_width -= 2 * x ; m_height -= 2 * y ; }
|
||||
{ m_x += x; m_y += y; m_width -= 2 * x; m_height -= 2 * y; }
|
||||
inline void Inset( wxDouble left , wxDouble top ,wxDouble right , wxDouble bottom )
|
||||
{ m_x += left ; m_y += top ; m_width -= left + right ; m_height -= top + bottom ;}
|
||||
{ m_x += left; m_y += top; m_width -= left + right; m_height -= top + bottom;}
|
||||
inline void Offset( const wxPoint2DDouble &pt )
|
||||
{ m_x += pt.m_x ; m_y += pt.m_y ; }
|
||||
{ m_x += pt.m_x; m_y += pt.m_y; }
|
||||
|
||||
void ConstrainTo( const wxRect2DDouble &rect );
|
||||
|
||||
inline wxPoint2DDouble Interpolate( wxInt32 widthfactor , wxInt32 heightfactor )
|
||||
{ return wxPoint2DDouble( m_x + m_width * widthfactor , m_y + m_height * heightfactor ) ; }
|
||||
{ return wxPoint2DDouble( m_x + m_width * widthfactor , m_y + m_height * heightfactor ); }
|
||||
|
||||
static void Intersect( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest ) ;
|
||||
static void Intersect( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest );
|
||||
inline void Intersect( const wxRect2DDouble &otherRect )
|
||||
{ Intersect( *this , otherRect , this ) ; }
|
||||
{ Intersect( *this , otherRect , this ); }
|
||||
inline wxRect2DDouble CreateIntersection( const wxRect2DDouble &otherRect ) const
|
||||
{ wxRect2DDouble result ; Intersect( *this , otherRect , &result) ; return result ; }
|
||||
bool Intersects( const wxRect2DDouble &rect ) const ;
|
||||
{ wxRect2DDouble result; Intersect( *this , otherRect , &result); return result; }
|
||||
bool Intersects( const wxRect2DDouble &rect ) const;
|
||||
|
||||
static void Union( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest ) ;
|
||||
static void Union( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest );
|
||||
void Union( const wxRect2DDouble &otherRect )
|
||||
{ Union( *this , otherRect , this ) ; }
|
||||
void Union( const wxPoint2DDouble &pt ) ;
|
||||
{ Union( *this , otherRect , this ); }
|
||||
void Union( const wxPoint2DDouble &pt );
|
||||
inline wxRect2DDouble CreateUnion( const wxRect2DDouble &otherRect ) const
|
||||
{ wxRect2DDouble result ; Union( *this , otherRect , &result) ; return result ; }
|
||||
{ wxRect2DDouble result; Union( *this , otherRect , &result); return result; }
|
||||
|
||||
inline void Scale( wxDouble f )
|
||||
{ m_x *= f ; m_y *= f ; m_width *= f ; m_height *= f ;}
|
||||
{ m_x *= f; m_y *= f; m_width *= f; m_height *= f;}
|
||||
inline void Scale( wxInt32 num , wxInt32 denum )
|
||||
{ m_x *= ((wxDouble)num)/((wxDouble)denum) ; m_y *= ((wxDouble)num)/((wxDouble)denum) ;
|
||||
m_width *= ((wxDouble)num)/((wxDouble)denum) ; m_height *= ((wxDouble)num)/((wxDouble)denum) ;}
|
||||
{ m_x *= ((wxDouble)num)/((wxDouble)denum); m_y *= ((wxDouble)num)/((wxDouble)denum);
|
||||
m_width *= ((wxDouble)num)/((wxDouble)denum); m_height *= ((wxDouble)num)/((wxDouble)denum);}
|
||||
|
||||
/*
|
||||
wxRect2DDouble& operator = (const wxRect2DDouble& rect);
|
||||
@@ -384,7 +384,7 @@ public:
|
||||
*/
|
||||
|
||||
wxDouble m_x;
|
||||
wxDouble m_y ;
|
||||
wxDouble m_y;
|
||||
wxDouble m_width;
|
||||
wxDouble m_height;
|
||||
};
|
||||
@@ -392,113 +392,115 @@ public:
|
||||
class WXDLLEXPORT wxPoint2DInt
|
||||
{
|
||||
public :
|
||||
inline wxPoint2DInt();
|
||||
inline wxPoint2DInt( wxInt32 x , wxInt32 y ) ;
|
||||
inline wxPoint2DInt( const wxPoint2DInt &pt ) ;
|
||||
inline wxPoint2DInt( const wxPoint &pt ) ;
|
||||
inline wxPoint2DInt();
|
||||
inline wxPoint2DInt( wxInt32 x , wxInt32 y );
|
||||
inline wxPoint2DInt( const wxPoint2DInt &pt );
|
||||
inline wxPoint2DInt( const wxPoint &pt );
|
||||
|
||||
// two different conversions to integers, floor and rounding
|
||||
inline void GetFloor( wxInt32 *x , wxInt32 *y ) ;
|
||||
inline void GetRounded( wxInt32 *x , wxInt32 *y ) ;
|
||||
// noops for this class, just return the coords
|
||||
inline void GetFloor( wxInt32 *x , wxInt32 *y );
|
||||
inline void GetRounded( wxInt32 *x , wxInt32 *y );
|
||||
|
||||
inline wxDouble GetVectorLength() ;
|
||||
wxDouble GetVectorAngle() ;
|
||||
inline void SetVectorLength( wxDouble length ) ;
|
||||
void SetVectorAngle( wxDouble degrees ) ;
|
||||
void SetPolarCoordinates( wxInt32 angle , wxInt32 length ) ;
|
||||
// set the vector length to 1.0, preserving the angle
|
||||
inline void Normalize() ;
|
||||
inline wxDouble GetVectorLength();
|
||||
wxDouble GetVectorAngle();
|
||||
inline void SetVectorLength( wxDouble length );
|
||||
void SetVectorAngle( wxDouble degrees );
|
||||
void SetPolarCoordinates( wxInt32 angle , wxInt32 length );
|
||||
// set the vector length to 1.0, preserving the angle
|
||||
inline void Normalize();
|
||||
|
||||
inline wxDouble GetDistance( const wxPoint2DInt &pt ) const ;
|
||||
inline wxDouble GetDistanceSquare( const wxPoint2DInt &pt ) const;
|
||||
inline wxInt32 GetDotProduct( const wxPoint2DInt &vec ) const;
|
||||
inline wxInt32 GetCrossProduct( const wxPoint2DInt &vec ) const;
|
||||
inline wxDouble GetDistance( const wxPoint2DInt &pt ) const;
|
||||
inline wxDouble GetDistanceSquare( const wxPoint2DInt &pt ) const;
|
||||
inline wxInt32 GetDotProduct( const wxPoint2DInt &vec ) const;
|
||||
inline wxInt32 GetCrossProduct( const wxPoint2DInt &vec ) const;
|
||||
|
||||
// the reflection of this point
|
||||
inline wxPoint2DInt operator-() ;
|
||||
// the reflection of this point
|
||||
inline wxPoint2DInt operator-();
|
||||
|
||||
inline wxPoint2DInt& operator=(const wxPoint2DInt& pt) ;
|
||||
inline wxPoint2DInt& operator+=(const wxPoint2DInt& pt) ;
|
||||
inline wxPoint2DInt& operator-=(const wxPoint2DInt& pt) ;
|
||||
inline wxPoint2DInt& operator*=(const wxPoint2DInt& pt) ;
|
||||
inline wxPoint2DInt& operator*=(wxDouble n) ;
|
||||
inline wxPoint2DInt& operator*=(wxInt32 n) ;
|
||||
inline wxPoint2DInt& operator/=(const wxPoint2DInt& pt) ;
|
||||
inline wxPoint2DInt& operator/=(wxDouble n) ;
|
||||
inline wxPoint2DInt& operator/=(wxInt32 n) ;
|
||||
inline operator wxPoint() const ;
|
||||
inline bool operator==(const wxPoint2DInt& pt) const ;
|
||||
inline bool operator!=(const wxPoint2DInt& pt) const ;
|
||||
inline wxPoint2DInt& operator=(const wxPoint2DInt& pt);
|
||||
inline wxPoint2DInt& operator+=(const wxPoint2DInt& pt);
|
||||
inline wxPoint2DInt& operator-=(const wxPoint2DInt& pt);
|
||||
inline wxPoint2DInt& operator*=(const wxPoint2DInt& pt);
|
||||
inline wxPoint2DInt& operator*=(wxDouble n);
|
||||
inline wxPoint2DInt& operator*=(wxInt32 n);
|
||||
inline wxPoint2DInt& operator/=(const wxPoint2DInt& pt);
|
||||
inline wxPoint2DInt& operator/=(wxDouble n);
|
||||
inline wxPoint2DInt& operator/=(wxInt32 n);
|
||||
inline operator wxPoint() const;
|
||||
inline bool operator==(const wxPoint2DInt& pt) const;
|
||||
inline bool operator!=(const wxPoint2DInt& pt) const;
|
||||
|
||||
void WriteTo( wxDataOutputStream &stream ) const ;
|
||||
void ReadFrom( wxDataInputStream &stream ) ;
|
||||
void WriteTo( wxDataOutputStream &stream ) const;
|
||||
void ReadFrom( wxDataInputStream &stream );
|
||||
|
||||
wxInt32 m_x ;
|
||||
wxInt32 m_y ;
|
||||
} ;
|
||||
wxInt32 m_x;
|
||||
wxInt32 m_y;
|
||||
};
|
||||
|
||||
wxPoint2DInt operator+(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) ;
|
||||
wxPoint2DInt operator-(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) ;
|
||||
wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) ;
|
||||
wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt) ;
|
||||
wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt) ;
|
||||
wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n) ;
|
||||
wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n) ;
|
||||
wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) ;
|
||||
wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n) ;
|
||||
wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n) ;
|
||||
wxPoint2DInt operator+(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
|
||||
wxPoint2DInt operator-(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
|
||||
wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
|
||||
wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt);
|
||||
wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt);
|
||||
wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n);
|
||||
wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n);
|
||||
wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
|
||||
wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n);
|
||||
wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n);
|
||||
|
||||
inline wxPoint2DInt::wxPoint2DInt()
|
||||
{
|
||||
m_x = 0 ;
|
||||
m_y = 0 ;
|
||||
m_x = 0;
|
||||
m_y = 0;
|
||||
}
|
||||
|
||||
inline wxPoint2DInt::wxPoint2DInt( wxInt32 x , wxInt32 y )
|
||||
{
|
||||
m_x = x ;
|
||||
m_y = y ;
|
||||
m_x = x;
|
||||
m_y = y;
|
||||
}
|
||||
|
||||
inline wxPoint2DInt::wxPoint2DInt( const wxPoint2DInt &pt )
|
||||
{
|
||||
m_x = pt.m_x ;
|
||||
m_y = pt.m_y ;
|
||||
m_x = pt.m_x;
|
||||
m_y = pt.m_y;
|
||||
}
|
||||
|
||||
inline wxPoint2DInt::wxPoint2DInt( const wxPoint &pt )
|
||||
{
|
||||
m_x = pt.x ;
|
||||
m_y = pt.y ;
|
||||
m_x = pt.x;
|
||||
m_y = pt.y;
|
||||
}
|
||||
|
||||
inline void wxPoint2DInt::GetFloor( wxInt32 *x , wxInt32 *y )
|
||||
{
|
||||
*x = (wxInt32) floor( m_x ) ;
|
||||
*y = (wxInt32) floor( m_y ) ;
|
||||
if ( x )
|
||||
*x = m_x;
|
||||
if ( y )
|
||||
*y = m_y;
|
||||
}
|
||||
|
||||
inline void wxPoint2DInt::GetRounded( wxInt32 *x , wxInt32 *y )
|
||||
{
|
||||
*x = (wxInt32) floor( m_x + 0.5 ) ;
|
||||
*y = (wxInt32) floor( m_y + 0.5) ;
|
||||
GetFloor(x, y);
|
||||
}
|
||||
|
||||
inline wxDouble wxPoint2DInt::GetVectorLength()
|
||||
{
|
||||
return sqrt( (m_x)*(m_x) + (m_y)*(m_y) ) ;
|
||||
// cast needed MIPSpro compiler under SGI
|
||||
return sqrt( (double)(m_x)*(m_x) + (m_y)*(m_y) );
|
||||
}
|
||||
|
||||
inline void wxPoint2DInt::SetVectorLength( wxDouble length )
|
||||
{
|
||||
wxDouble before = GetVectorLength() ;
|
||||
m_x = (wxInt32)(m_x * length / before) ;
|
||||
m_y = (wxInt32)(m_y * length / before) ;
|
||||
wxDouble before = GetVectorLength();
|
||||
m_x = (wxInt32)(m_x * length / before);
|
||||
m_y = (wxInt32)(m_y * length / before);
|
||||
}
|
||||
|
||||
inline void wxPoint2DInt::Normalize()
|
||||
{
|
||||
SetVectorLength( 1 ) ;
|
||||
SetVectorLength( 1 );
|
||||
}
|
||||
|
||||
inline wxDouble wxPoint2DInt::GetDistance( const wxPoint2DInt &pt ) const
|
||||
@@ -508,17 +510,17 @@ inline wxDouble wxPoint2DInt::GetDistance( const wxPoint2DInt &pt ) const
|
||||
|
||||
inline wxDouble wxPoint2DInt::GetDistanceSquare( const wxPoint2DInt &pt ) const
|
||||
{
|
||||
return ( (pt.m_x-m_x)*(pt.m_x-m_x) + (pt.m_y-m_y)*(pt.m_y-m_y) ) ;
|
||||
return ( (pt.m_x-m_x)*(pt.m_x-m_x) + (pt.m_y-m_y)*(pt.m_y-m_y) );
|
||||
}
|
||||
|
||||
inline wxInt32 wxPoint2DInt::GetDotProduct( const wxPoint2DInt &vec ) const
|
||||
{
|
||||
return ( m_x * vec.m_x + m_y * vec.m_y ) ;
|
||||
return ( m_x * vec.m_x + m_y * vec.m_y );
|
||||
}
|
||||
|
||||
inline wxInt32 wxPoint2DInt::GetCrossProduct( const wxPoint2DInt &vec ) const
|
||||
{
|
||||
return ( m_x * vec.m_y - vec.m_x * m_y ) ;
|
||||
return ( m_x * vec.m_y - vec.m_x * m_y );
|
||||
}
|
||||
|
||||
inline wxPoint2DInt::operator wxPoint() const
|
||||
@@ -533,37 +535,37 @@ inline wxPoint2DInt wxPoint2DInt::operator-()
|
||||
|
||||
inline wxPoint2DInt& wxPoint2DInt::operator=(const wxPoint2DInt& pt)
|
||||
{
|
||||
m_x = pt.m_x ;
|
||||
m_x = pt.m_x;
|
||||
m_y = pt.m_y;
|
||||
return *this ;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline wxPoint2DInt& wxPoint2DInt::operator+=(const wxPoint2DInt& pt)
|
||||
{
|
||||
m_x = m_x + pt.m_x ;
|
||||
m_x = m_x + pt.m_x;
|
||||
m_y = m_y + pt.m_y;
|
||||
return *this ;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline wxPoint2DInt& wxPoint2DInt::operator-=(const wxPoint2DInt& pt)
|
||||
{
|
||||
m_x = m_x - pt.m_x ;
|
||||
m_x = m_x - pt.m_x;
|
||||
m_y = m_y - pt.m_y;
|
||||
return *this ;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline wxPoint2DInt& wxPoint2DInt::operator*=(const wxPoint2DInt& pt)
|
||||
{
|
||||
m_x = m_x + pt.m_x ;
|
||||
m_x = m_x + pt.m_x;
|
||||
m_y = m_y + pt.m_y;
|
||||
return *this ;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline wxPoint2DInt& wxPoint2DInt::operator/=(const wxPoint2DInt& pt)
|
||||
{
|
||||
m_x = m_x - pt.m_x ;
|
||||
m_x = m_x - pt.m_x;
|
||||
m_y = m_y - pt.m_y;
|
||||
return *this ;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline bool wxPoint2DInt::operator==(const wxPoint2DInt& pt) const
|
||||
@@ -578,53 +580,53 @@ inline bool wxPoint2DInt::operator!=(const wxPoint2DInt& pt) const
|
||||
|
||||
inline wxPoint2DInt operator+(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2)
|
||||
{
|
||||
return wxPoint2DInt( pt1.m_x + pt2.m_x , pt1.m_y + pt2.m_y ) ;
|
||||
return wxPoint2DInt( pt1.m_x + pt2.m_x , pt1.m_y + pt2.m_y );
|
||||
}
|
||||
|
||||
inline wxPoint2DInt operator-(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2)
|
||||
{
|
||||
return wxPoint2DInt( pt1.m_x - pt2.m_x , pt1.m_y - pt2.m_y ) ;
|
||||
return wxPoint2DInt( pt1.m_x - pt2.m_x , pt1.m_y - pt2.m_y );
|
||||
}
|
||||
|
||||
|
||||
inline wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2)
|
||||
{
|
||||
return wxPoint2DInt( pt1.m_x * pt2.m_x , pt1.m_y * pt2.m_y ) ;
|
||||
return wxPoint2DInt( pt1.m_x * pt2.m_x , pt1.m_y * pt2.m_y );
|
||||
}
|
||||
|
||||
inline wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt)
|
||||
{
|
||||
return wxPoint2DInt( pt.m_x * n , pt.m_y * n ) ;
|
||||
return wxPoint2DInt( pt.m_x * n , pt.m_y * n );
|
||||
}
|
||||
|
||||
inline wxPoint2DInt operator*(wxDouble n , const wxPoint2DInt& pt)
|
||||
{
|
||||
return wxPoint2DInt( (int) (pt.m_x * n) , (int) (pt.m_y * n) ) ;
|
||||
return wxPoint2DInt( (int) (pt.m_x * n) , (int) (pt.m_y * n) );
|
||||
}
|
||||
|
||||
inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n)
|
||||
{
|
||||
return wxPoint2DInt( pt.m_x * n , pt.m_y * n ) ;
|
||||
return wxPoint2DInt( pt.m_x * n , pt.m_y * n );
|
||||
}
|
||||
|
||||
inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxDouble n)
|
||||
{
|
||||
return wxPoint2DInt( (int) (pt.m_x * n) , (int) (pt.m_y * n) ) ;
|
||||
return wxPoint2DInt( (int) (pt.m_x * n) , (int) (pt.m_y * n) );
|
||||
}
|
||||
|
||||
inline wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2)
|
||||
{
|
||||
return wxPoint2DInt( pt1.m_x / pt2.m_x , pt1.m_y / pt2.m_y ) ;
|
||||
return wxPoint2DInt( pt1.m_x / pt2.m_x , pt1.m_y / pt2.m_y );
|
||||
}
|
||||
|
||||
inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n)
|
||||
{
|
||||
return wxPoint2DInt( pt.m_x / n , pt.m_y / n ) ;
|
||||
return wxPoint2DInt( pt.m_x / n , pt.m_y / n );
|
||||
}
|
||||
|
||||
inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxDouble n)
|
||||
{
|
||||
return wxPoint2DInt( (int) (pt.m_x / n) , (int) (pt.m_y / n) ) ;
|
||||
return wxPoint2DInt( (int) (pt.m_x / n) , (int) (pt.m_y / n) );
|
||||
}
|
||||
|
||||
// wxRect2Ds are a axis-aligned rectangles, each side of the rect is parallel to the x- or m_y- axis. The rectangle is either defined by the
|
||||
@@ -634,8 +636,8 @@ inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxDouble n)
|
||||
class WXDLLEXPORT wxRect2DInt
|
||||
{
|
||||
public:
|
||||
wxRect2DInt() { m_x = m_y = m_width = m_height = 0 ; }
|
||||
wxRect2DInt(wxInt32 x, wxInt32 y, wxInt32 w, wxInt32 h) { m_x = x ; m_y = y ; m_width = w ; m_height = h ; }
|
||||
wxRect2DInt() { m_x = m_y = m_width = m_height = 0; }
|
||||
wxRect2DInt(wxInt32 x, wxInt32 y, wxInt32 w, wxInt32 h) { m_x = x; m_y = y; m_width = w; m_height = h; }
|
||||
wxRect2DInt(const wxPoint2DInt& topLeft, const wxPoint2DInt& bottomRight);
|
||||
inline wxRect2DInt(const wxPoint2DInt& pos, const wxSize& size);
|
||||
inline wxRect2DInt(const wxRect2DInt& rect);
|
||||
@@ -649,130 +651,130 @@ public:
|
||||
// position whenever sensible, the Move.. functions keep the size of the rect and move the other corners apropriately
|
||||
|
||||
inline wxInt32 GetLeft() const { return m_x; }
|
||||
inline void SetLeft( wxInt32 n ) { m_width += m_x - n ; m_x = n ; }
|
||||
inline void MoveLeftTo( wxInt32 n ) { m_x = n ; }
|
||||
inline void SetLeft( wxInt32 n ) { m_width += m_x - n; m_x = n; }
|
||||
inline void MoveLeftTo( wxInt32 n ) { m_x = n; }
|
||||
inline wxInt32 GetTop() const { return m_y; }
|
||||
inline void SetTop( wxInt32 n ) { m_height += m_y - n ; m_y = n ; }
|
||||
inline void MoveTopTo( wxInt32 n ) { m_y = n ; }
|
||||
inline void SetTop( wxInt32 n ) { m_height += m_y - n; m_y = n; }
|
||||
inline void MoveTopTo( wxInt32 n ) { m_y = n; }
|
||||
inline wxInt32 GetBottom() const { return m_y + m_height; }
|
||||
inline void SetBottom( wxInt32 n ) { m_height += n - (m_y+m_height) ;}
|
||||
inline void MoveBottomTo( wxInt32 n ) { m_y = n - m_height ; }
|
||||
inline void SetBottom( wxInt32 n ) { m_height += n - (m_y+m_height);}
|
||||
inline void MoveBottomTo( wxInt32 n ) { m_y = n - m_height; }
|
||||
inline wxInt32 GetRight() const { return m_x + m_width; }
|
||||
inline void SetRight( wxInt32 n ) { m_width += n - (m_x+m_width) ; }
|
||||
inline void MoveRightTo( wxInt32 n ) { m_x = n - m_width ; }
|
||||
inline void SetRight( wxInt32 n ) { m_width += n - (m_x+m_width) ; }
|
||||
inline void MoveRightTo( wxInt32 n ) { m_x = n - m_width; }
|
||||
|
||||
inline wxPoint2DInt GetLeftTop() const { return wxPoint2DInt( m_x , m_y ) ; }
|
||||
inline void SetLeftTop( const wxPoint2DInt &pt ) { m_width += m_x - pt.m_x ; m_height += m_y - pt.m_y ; m_x = pt.m_x ; m_y = pt.m_y ; }
|
||||
inline void MoveLeftTopTo( const wxPoint2DInt &pt ) { m_x = pt.m_x ; m_y = pt.m_y ; }
|
||||
inline wxPoint2DInt GetLeftBottom() const { return wxPoint2DInt( m_x , m_y + m_height ) ; }
|
||||
inline void SetLeftBottom( const wxPoint2DInt &pt ) { m_width += m_x - pt.m_x ; m_height += pt.m_y - (m_y+m_height) ; m_x = pt.m_x ; }
|
||||
inline void MoveLeftBottomTo( const wxPoint2DInt &pt ) { m_x = pt.m_x ; m_y = pt.m_y - m_height; }
|
||||
inline wxPoint2DInt GetRightTop() const { return wxPoint2DInt( m_x+m_width , m_y ) ; }
|
||||
inline void SetRightTop( const wxPoint2DInt &pt ) { m_width += pt.m_x - ( m_x + m_width ) ; m_height += m_y - pt.m_y ; m_y = pt.m_y ; }
|
||||
inline void MoveRightTopTo( const wxPoint2DInt &pt ) { m_x = pt.m_x - m_width ; m_y = pt.m_y ; }
|
||||
inline wxPoint2DInt GetRightBottom() const { return wxPoint2DInt( m_x+m_width , m_y + m_height ) ; }
|
||||
inline void SetRightBottom( const wxPoint2DInt &pt ) { m_width += pt.m_x - ( m_x + m_width ) ; m_height += pt.m_y - (m_y+m_height) ;}
|
||||
inline void MoveRightBottomTo( const wxPoint2DInt &pt ) { m_x = pt.m_x - m_width ; m_y = pt.m_y - m_height; }
|
||||
inline wxPoint2DInt GetCentre() const { return wxPoint2DInt( m_x+m_width/2 , m_y+m_height/2 ) ; }
|
||||
inline void SetCentre( const wxPoint2DInt &pt ) { MoveCentreTo( pt ) ; } // since this is impossible without moving...
|
||||
inline void MoveCentreTo( const wxPoint2DInt &pt ) { m_x += pt.m_x - (m_x+m_width/2) , m_y += pt.m_y -(m_y+m_height/2) ; }
|
||||
inline wxPoint2DInt GetLeftTop() const { return wxPoint2DInt( m_x , m_y ); }
|
||||
inline void SetLeftTop( const wxPoint2DInt &pt ) { m_width += m_x - pt.m_x; m_height += m_y - pt.m_y; m_x = pt.m_x; m_y = pt.m_y; }
|
||||
inline void MoveLeftTopTo( const wxPoint2DInt &pt ) { m_x = pt.m_x; m_y = pt.m_y; }
|
||||
inline wxPoint2DInt GetLeftBottom() const { return wxPoint2DInt( m_x , m_y + m_height ); }
|
||||
inline void SetLeftBottom( const wxPoint2DInt &pt ) { m_width += m_x - pt.m_x; m_height += pt.m_y - (m_y+m_height) ; m_x = pt.m_x; }
|
||||
inline void MoveLeftBottomTo( const wxPoint2DInt &pt ) { m_x = pt.m_x; m_y = pt.m_y - m_height; }
|
||||
inline wxPoint2DInt GetRightTop() const { return wxPoint2DInt( m_x+m_width , m_y ); }
|
||||
inline void SetRightTop( const wxPoint2DInt &pt ) { m_width += pt.m_x - ( m_x + m_width ); m_height += m_y - pt.m_y; m_y = pt.m_y; }
|
||||
inline void MoveRightTopTo( const wxPoint2DInt &pt ) { m_x = pt.m_x - m_width; m_y = pt.m_y; }
|
||||
inline wxPoint2DInt GetRightBottom() const { return wxPoint2DInt( m_x+m_width , m_y + m_height ); }
|
||||
inline void SetRightBottom( const wxPoint2DInt &pt ) { m_width += pt.m_x - ( m_x + m_width ); m_height += pt.m_y - (m_y+m_height);}
|
||||
inline void MoveRightBottomTo( const wxPoint2DInt &pt ) { m_x = pt.m_x - m_width; m_y = pt.m_y - m_height; }
|
||||
inline wxPoint2DInt GetCentre() const { return wxPoint2DInt( m_x+m_width/2 , m_y+m_height/2 ); }
|
||||
inline void SetCentre( const wxPoint2DInt &pt ) { MoveCentreTo( pt ); } // since this is impossible without moving...
|
||||
inline void MoveCentreTo( const wxPoint2DInt &pt ) { m_x += pt.m_x - (m_x+m_width/2) , m_y += pt.m_y -(m_y+m_height/2); }
|
||||
inline wxOutCode GetOutcode( const wxPoint2DInt &pt ) const
|
||||
{ return (wxOutCode) (( ( pt.m_x < m_x ) ? wxOutLeft : 0 ) +
|
||||
( ( pt.m_x >= m_x + m_width ) ? wxOutRight : 0 ) +
|
||||
( ( pt.m_y < m_y ) ? wxOutTop : 0 ) +
|
||||
( ( pt.m_y >= m_y + m_height ) ? wxOutBottom : 0 )) ; }
|
||||
( ( pt.m_y >= m_y + m_height ) ? wxOutBottom : 0 )); }
|
||||
inline bool Contains( const wxPoint2DInt &pt ) const
|
||||
{ return GetOutcode( pt ) == wxInside ; }
|
||||
{ return GetOutcode( pt ) == wxInside; }
|
||||
inline bool Contains( const wxRect2DInt &rect ) const
|
||||
{ return ( ( ( m_x <= rect.m_x ) && ( rect.m_x + rect.m_width <= m_x + m_width ) ) &&
|
||||
( ( m_y <= rect.m_y ) && ( rect.m_y + rect.m_height <= m_y + m_height ) ) ) ; }
|
||||
( ( m_y <= rect.m_y ) && ( rect.m_y + rect.m_height <= m_y + m_height ) ) ); }
|
||||
inline bool IsEmpty() const
|
||||
{ return ( m_width <= 0 || m_height <= 0 ) ; }
|
||||
{ return ( m_width <= 0 || m_height <= 0 ); }
|
||||
inline bool HaveEqualSize( const wxRect2DInt &rect ) const
|
||||
{ return ( rect.m_width == m_width && rect.m_height == m_height ) ; }
|
||||
{ return ( rect.m_width == m_width && rect.m_height == m_height ); }
|
||||
|
||||
inline void Inset( wxInt32 x , wxInt32 y ) { m_x += x ; m_y += y ; m_width -= 2 * x ; m_height -= 2 * y ; }
|
||||
inline void Inset( wxInt32 x , wxInt32 y ) { m_x += x; m_y += y; m_width -= 2 * x; m_height -= 2 * y; }
|
||||
inline void Inset( wxInt32 left , wxInt32 top ,wxInt32 right , wxInt32 bottom )
|
||||
{ m_x += left ; m_y += top ; m_width -= left + right ; m_height -= top + bottom ;}
|
||||
inline void Offset( const wxPoint2DInt &pt ) { m_x += pt.m_x ; m_y += pt.m_y ; }
|
||||
void ConstrainTo( const wxRect2DInt &rect ) ;
|
||||
inline wxPoint2DInt Interpolate( wxInt32 widthfactor , wxInt32 heightfactor ) { return wxPoint2DInt( m_x + m_width * widthfactor , m_y + m_height * heightfactor ) ; }
|
||||
{ m_x += left; m_y += top; m_width -= left + right; m_height -= top + bottom;}
|
||||
inline void Offset( const wxPoint2DInt &pt ) { m_x += pt.m_x; m_y += pt.m_y; }
|
||||
void ConstrainTo( const wxRect2DInt &rect );
|
||||
inline wxPoint2DInt Interpolate( wxInt32 widthfactor , wxInt32 heightfactor ) { return wxPoint2DInt( m_x + m_width * widthfactor , m_y + m_height * heightfactor ); }
|
||||
|
||||
static void Intersect( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest ) ;
|
||||
inline void Intersect( const wxRect2DInt &otherRect ) { Intersect( *this , otherRect , this ) ; }
|
||||
inline wxRect2DInt CreateIntersection( const wxRect2DInt &otherRect ) const { wxRect2DInt result ; Intersect( *this , otherRect , &result) ; return result ; }
|
||||
bool Intersects( const wxRect2DInt &rect ) const ;
|
||||
static void Intersect( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest );
|
||||
inline void Intersect( const wxRect2DInt &otherRect ) { Intersect( *this , otherRect , this ); }
|
||||
inline wxRect2DInt CreateIntersection( const wxRect2DInt &otherRect ) const { wxRect2DInt result; Intersect( *this , otherRect , &result); return result; }
|
||||
bool Intersects( const wxRect2DInt &rect ) const;
|
||||
|
||||
static void Union( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest ) ;
|
||||
void Union( const wxRect2DInt &otherRect ) { Union( *this , otherRect , this ) ; }
|
||||
void Union( const wxPoint2DInt &pt ) ;
|
||||
inline wxRect2DInt CreateUnion( const wxRect2DInt &otherRect ) const { wxRect2DInt result ; Union( *this , otherRect , &result) ; return result ; }
|
||||
static void Union( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest );
|
||||
void Union( const wxRect2DInt &otherRect ) { Union( *this , otherRect , this ); }
|
||||
void Union( const wxPoint2DInt &pt );
|
||||
inline wxRect2DInt CreateUnion( const wxRect2DInt &otherRect ) const { wxRect2DInt result; Union( *this , otherRect , &result); return result; }
|
||||
|
||||
inline void Scale( wxInt32 f ) { m_x *= f ; m_y *= f ; m_width *= f ; m_height *= f ;}
|
||||
inline void Scale( wxInt32 f ) { m_x *= f; m_y *= f; m_width *= f; m_height *= f;}
|
||||
inline void Scale( wxInt32 num , wxInt32 denum )
|
||||
{ m_x *= ((wxInt32)num)/((wxInt32)denum) ; m_y *= ((wxInt32)num)/((wxInt32)denum) ;
|
||||
m_width *= ((wxInt32)num)/((wxInt32)denum) ; m_height *= ((wxInt32)num)/((wxInt32)denum) ;}
|
||||
{ m_x *= ((wxInt32)num)/((wxInt32)denum); m_y *= ((wxInt32)num)/((wxInt32)denum);
|
||||
m_width *= ((wxInt32)num)/((wxInt32)denum); m_height *= ((wxInt32)num)/((wxInt32)denum);}
|
||||
|
||||
wxRect2DInt& operator = (const wxRect2DInt& rect);
|
||||
bool operator == (const wxRect2DInt& rect);
|
||||
bool operator != (const wxRect2DInt& rect);
|
||||
|
||||
void WriteTo( wxDataOutputStream &stream ) const ;
|
||||
void ReadFrom( wxDataInputStream &stream ) ;
|
||||
void WriteTo( wxDataOutputStream &stream ) const;
|
||||
void ReadFrom( wxDataInputStream &stream );
|
||||
|
||||
wxInt32 m_x ;
|
||||
wxInt32 m_y ;
|
||||
wxInt32 m_x;
|
||||
wxInt32 m_y;
|
||||
wxInt32 m_width;
|
||||
wxInt32 m_height;
|
||||
};
|
||||
|
||||
inline wxRect2DInt::wxRect2DInt( const wxRect2DInt &r )
|
||||
{
|
||||
m_x = r.m_x ;
|
||||
m_y = r.m_y ;
|
||||
m_width = r.m_width ;
|
||||
m_height = r.m_height ;
|
||||
m_x = r.m_x;
|
||||
m_y = r.m_y;
|
||||
m_width = r.m_width;
|
||||
m_height = r.m_height;
|
||||
}
|
||||
|
||||
inline wxRect2DInt::wxRect2DInt( const wxPoint2DInt &a , const wxPoint2DInt &b)
|
||||
{
|
||||
m_x = wxMin( a.m_x , b.m_x ) ;
|
||||
m_y = wxMin( a.m_y , b.m_y ) ;
|
||||
m_width = abs( a.m_x - b.m_x ) ;
|
||||
m_height = abs( a.m_y - b.m_y ) ;
|
||||
m_x = wxMin( a.m_x , b.m_x );
|
||||
m_y = wxMin( a.m_y , b.m_y );
|
||||
m_width = abs( a.m_x - b.m_x );
|
||||
m_height = abs( a.m_y - b.m_y );
|
||||
}
|
||||
|
||||
class wxTransform2D
|
||||
{
|
||||
public :
|
||||
virtual void Transform( wxPoint2DInt* pt )const = 0 ;
|
||||
virtual void Transform( wxRect2DInt* r ) const ;
|
||||
virtual wxPoint2DInt Transform( const wxPoint2DInt &pt ) const ;
|
||||
virtual wxRect2DInt Transform( const wxRect2DInt &r ) const ;
|
||||
virtual void Transform( wxPoint2DInt* pt )const = 0;
|
||||
virtual void Transform( wxRect2DInt* r ) const;
|
||||
virtual wxPoint2DInt Transform( const wxPoint2DInt &pt ) const;
|
||||
virtual wxRect2DInt Transform( const wxRect2DInt &r ) const ;
|
||||
|
||||
virtual void InverseTransform( wxPoint2DInt* pt ) const = 0;
|
||||
virtual void InverseTransform( wxRect2DInt* r ) const ;
|
||||
virtual wxPoint2DInt InverseTransform( const wxPoint2DInt &pt ) const ;
|
||||
virtual wxRect2DInt InverseTransform( const wxRect2DInt &r ) const ;
|
||||
} ;
|
||||
virtual void InverseTransform( wxRect2DInt* r ) const ;
|
||||
virtual wxPoint2DInt InverseTransform( const wxPoint2DInt &pt ) const ;
|
||||
virtual wxRect2DInt InverseTransform( const wxRect2DInt &r ) const ;
|
||||
};
|
||||
|
||||
inline void wxTransform2D::Transform( wxRect2DInt* r ) const
|
||||
{ wxPoint2DInt a = r->GetLeftTop() , b = r->GetRightBottom() ; Transform( &a ) ; Transform( &b ) ; *r = wxRect2DInt( a , b ) ; }
|
||||
{ wxPoint2DInt a = r->GetLeftTop() , b = r->GetRightBottom(); Transform( &a ); Transform( &b ); *r = wxRect2DInt( a , b ); }
|
||||
|
||||
inline wxPoint2DInt wxTransform2D::Transform( const wxPoint2DInt &pt ) const
|
||||
{ wxPoint2DInt res = pt ; Transform( &res ) ; return res ; }
|
||||
{ wxPoint2DInt res = pt; Transform( &res ); return res; }
|
||||
|
||||
inline wxRect2DInt wxTransform2D::Transform( const wxRect2DInt &r ) const
|
||||
{ wxRect2DInt res = r ; Transform( &res ) ; return res ; }
|
||||
{ wxRect2DInt res = r; Transform( &res ); return res; }
|
||||
|
||||
inline void wxTransform2D::InverseTransform( wxRect2DInt* r ) const
|
||||
{ wxPoint2DInt a = r->GetLeftTop() , b = r->GetRightBottom() ; InverseTransform( &a ) ; InverseTransform( &b ) ; *r = wxRect2DInt( a , b ) ; }
|
||||
{ wxPoint2DInt a = r->GetLeftTop() , b = r->GetRightBottom(); InverseTransform( &a ); InverseTransform( &b ); *r = wxRect2DInt( a , b ); }
|
||||
|
||||
inline wxPoint2DInt wxTransform2D::InverseTransform( const wxPoint2DInt &pt ) const
|
||||
{ wxPoint2DInt res = pt ; InverseTransform( &res ) ; return res ; }
|
||||
{ wxPoint2DInt res = pt; InverseTransform( &res ); return res; }
|
||||
|
||||
inline wxRect2DInt wxTransform2D::InverseTransform( const wxRect2DInt &r ) const
|
||||
{ wxRect2DInt res = r ; InverseTransform( &res ) ; return res ; }
|
||||
{ wxRect2DInt res = r; InverseTransform( &res ); return res; }
|
||||
|
||||
|
||||
#endif // wxUSE_GEOMETRY
|
||||
|
@@ -84,6 +84,9 @@ public:
|
||||
|
||||
wxImage ConvertToImage() const;
|
||||
|
||||
// copies the contents and mask of the given (colour) icon to the bitmap
|
||||
virtual bool CopyFromIcon(const wxIcon& icon);
|
||||
|
||||
wxMask *GetMask() const;
|
||||
void SetMask( wxMask *mask );
|
||||
|
||||
|
@@ -16,8 +16,6 @@
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/panel.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
@@ -51,63 +49,32 @@ public:
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString &name = wxDialogNameStr );
|
||||
~wxDialog();
|
||||
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const;
|
||||
~wxDialog() {}
|
||||
|
||||
void OnApply( wxCommandEvent &event );
|
||||
void OnCancel( wxCommandEvent &event );
|
||||
void OnOK( wxCommandEvent &event );
|
||||
void OnPaint( wxPaintEvent& event );
|
||||
void OnSize( wxSizeEvent &event );
|
||||
void OnCloseWindow( wxCloseEvent& event );
|
||||
/*
|
||||
void OnCharHook( wxKeyEvent& event );
|
||||
*/
|
||||
|
||||
bool Destroy();
|
||||
|
||||
virtual bool Show( bool show = TRUE );
|
||||
virtual int ShowModal();
|
||||
virtual void EndModal( int retCode );
|
||||
virtual bool IsModal() const;
|
||||
void SetModal( bool modal );
|
||||
|
||||
virtual void SetIcon( const wxIcon &icon );
|
||||
virtual void Iconize( bool WXUNUSED(iconize)) { }
|
||||
virtual bool IsIconized() const { return FALSE; }
|
||||
bool Iconized() const { return IsIconized(); }
|
||||
virtual void Maximize() { }
|
||||
virtual void Restore() { }
|
||||
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
// move the window to the specified location and resize it: this is called
|
||||
// from both DoSetSize() and DoSetClientSize()
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
bool m_modalShowing;
|
||||
wxString m_title;
|
||||
wxIcon m_icon;
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// common part of Destroy() and ~wxDialog
|
||||
void CleanUp();
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||
|
@@ -58,18 +58,6 @@ public:
|
||||
|
||||
virtual ~wxFrameGTK();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void Maximize(bool maximize = TRUE);
|
||||
virtual bool IsMaximized() const;
|
||||
virtual void Iconize(bool iconize = TRUE);
|
||||
virtual bool IsIconized() const;
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
virtual void MakeModal(bool modal = TRUE);
|
||||
virtual void Restore();
|
||||
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||
virtual bool IsFullScreen() const { return m_fsIsShowing; };
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual void PositionStatusBar();
|
||||
|
||||
@@ -85,48 +73,24 @@ public:
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
void SetToolBar(wxToolBar *toolbar);
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
virtual bool Show(bool show = TRUE);
|
||||
|
||||
virtual void SetTitle( const wxString &title );
|
||||
virtual wxString GetTitle() const { return m_title; }
|
||||
|
||||
wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); }
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
// move the window to the specified location and resize it: this is called
|
||||
// from both DoSetSize() and DoSetClientSize()
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
|
||||
// GTK callbacks
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
// do *not* call this to iconize the frame, this is a private function!
|
||||
void SetIconizeState(bool iconic);
|
||||
|
||||
wxString m_title;
|
||||
int m_miniEdge,
|
||||
m_miniTitle;
|
||||
GtkWidget *m_mainWidget;
|
||||
bool m_menuBarDetached;
|
||||
bool m_toolBarDetached;
|
||||
bool m_insertInClientArea; /* not from within OnCreateXXX */
|
||||
|
||||
bool m_fsIsShowing; /* full screen */
|
||||
long m_fsSaveStyle;
|
||||
long m_fsSaveFlag;
|
||||
wxRect m_fsSaveFrame;
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// override wxWindow methods to take into account tool/menu/statusbars
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
virtual void DoGetClientSize( int *width, int *height ) const;
|
||||
|
||||
@@ -134,9 +98,6 @@ protected:
|
||||
virtual void DetachMenuBar();
|
||||
virtual void AttachMenuBar(wxMenuBar *menubar);
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
// is the frame currently iconized?
|
||||
bool m_isIconized;
|
||||
};
|
||||
|
||||
#endif // __GTKFRAMEH__
|
||||
|
110
include/wx/gtk/toplevel.h
Normal file
110
include/wx/gtk/toplevel.h
Normal file
@@ -0,0 +1,110 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/toplevel.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKTOPLEVELH__
|
||||
#define __GTKTOPLEVELH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "toplevel.h"
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxTopLevelWindowGTK
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxTopLevelWindowGTK : public wxTopLevelWindowBase
|
||||
{
|
||||
public:
|
||||
// construction
|
||||
wxTopLevelWindowGTK() { Init(); }
|
||||
wxTopLevelWindowGTK(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual ~wxTopLevelWindowGTK();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void Maximize(bool maximize = TRUE);
|
||||
virtual bool IsMaximized() const;
|
||||
virtual void Iconize(bool iconize = TRUE);
|
||||
virtual bool IsIconized() const;
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
virtual void Restore();
|
||||
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||
virtual bool IsFullScreen() const { return m_fsIsShowing; };
|
||||
|
||||
virtual bool Show(bool show = TRUE);
|
||||
|
||||
virtual void SetTitle( const wxString &title );
|
||||
virtual wxString GetTitle() const { return m_title; }
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
// move the window to the specified location and resize it: this is called
|
||||
// from both DoSetSize() and DoSetClientSize()
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
|
||||
// GTK callbacks
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
// do *not* call this to iconize the frame, this is a private function!
|
||||
void SetIconizeState(bool iconic);
|
||||
|
||||
wxString m_title;
|
||||
int m_miniEdge,
|
||||
m_miniTitle;
|
||||
GtkWidget *m_mainWidget;
|
||||
bool m_insertInClientArea; /* not from within OnCreateXXX */
|
||||
|
||||
bool m_fsIsShowing; /* full screen */
|
||||
long m_fsSaveStyle;
|
||||
long m_fsSaveFlag;
|
||||
wxRect m_fsSaveFrame;
|
||||
|
||||
long m_gdkFunc, m_gdkDecor; // m_windowStyle translated to GDK's terms
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// override wxWindow methods to take into account tool/menu/statusbars
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
virtual void DoGetClientSize( int *width, int *height ) const;
|
||||
|
||||
// is the frame currently iconized?
|
||||
bool m_isIconized;
|
||||
};
|
||||
|
||||
#endif // __GTKTOPLEVELH__
|
@@ -84,6 +84,9 @@ public:
|
||||
|
||||
wxImage ConvertToImage() const;
|
||||
|
||||
// copies the contents and mask of the given (colour) icon to the bitmap
|
||||
virtual bool CopyFromIcon(const wxIcon& icon);
|
||||
|
||||
wxMask *GetMask() const;
|
||||
void SetMask( wxMask *mask );
|
||||
|
||||
|
@@ -16,8 +16,6 @@
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/panel.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
@@ -51,63 +49,32 @@ public:
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString &name = wxDialogNameStr );
|
||||
~wxDialog();
|
||||
|
||||
void SetTitle(const wxString& title);
|
||||
wxString GetTitle() const;
|
||||
~wxDialog() {}
|
||||
|
||||
void OnApply( wxCommandEvent &event );
|
||||
void OnCancel( wxCommandEvent &event );
|
||||
void OnOK( wxCommandEvent &event );
|
||||
void OnPaint( wxPaintEvent& event );
|
||||
void OnSize( wxSizeEvent &event );
|
||||
void OnCloseWindow( wxCloseEvent& event );
|
||||
/*
|
||||
void OnCharHook( wxKeyEvent& event );
|
||||
*/
|
||||
|
||||
bool Destroy();
|
||||
|
||||
virtual bool Show( bool show = TRUE );
|
||||
virtual int ShowModal();
|
||||
virtual void EndModal( int retCode );
|
||||
virtual bool IsModal() const;
|
||||
void SetModal( bool modal );
|
||||
|
||||
virtual void SetIcon( const wxIcon &icon );
|
||||
virtual void Iconize( bool WXUNUSED(iconize)) { }
|
||||
virtual bool IsIconized() const { return FALSE; }
|
||||
bool Iconized() const { return IsIconized(); }
|
||||
virtual void Maximize() { }
|
||||
virtual void Restore() { }
|
||||
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
// move the window to the specified location and resize it: this is called
|
||||
// from both DoSetSize() and DoSetClientSize()
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
bool m_modalShowing;
|
||||
wxString m_title;
|
||||
wxIcon m_icon;
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// common part of Destroy() and ~wxDialog
|
||||
void CleanUp();
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||
|
@@ -58,18 +58,6 @@ public:
|
||||
|
||||
virtual ~wxFrameGTK();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void Maximize(bool maximize = TRUE);
|
||||
virtual bool IsMaximized() const;
|
||||
virtual void Iconize(bool iconize = TRUE);
|
||||
virtual bool IsIconized() const;
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
virtual void MakeModal(bool modal = TRUE);
|
||||
virtual void Restore();
|
||||
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||
virtual bool IsFullScreen() const { return m_fsIsShowing; };
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual void PositionStatusBar();
|
||||
|
||||
@@ -85,48 +73,24 @@ public:
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
void SetToolBar(wxToolBar *toolbar);
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
virtual bool Show(bool show = TRUE);
|
||||
|
||||
virtual void SetTitle( const wxString &title );
|
||||
virtual wxString GetTitle() const { return m_title; }
|
||||
|
||||
wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); }
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
// move the window to the specified location and resize it: this is called
|
||||
// from both DoSetSize() and DoSetClientSize()
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
|
||||
// GTK callbacks
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
// do *not* call this to iconize the frame, this is a private function!
|
||||
void SetIconizeState(bool iconic);
|
||||
|
||||
wxString m_title;
|
||||
int m_miniEdge,
|
||||
m_miniTitle;
|
||||
GtkWidget *m_mainWidget;
|
||||
bool m_menuBarDetached;
|
||||
bool m_toolBarDetached;
|
||||
bool m_insertInClientArea; /* not from within OnCreateXXX */
|
||||
|
||||
bool m_fsIsShowing; /* full screen */
|
||||
long m_fsSaveStyle;
|
||||
long m_fsSaveFlag;
|
||||
wxRect m_fsSaveFrame;
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// override wxWindow methods to take into account tool/menu/statusbars
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
virtual void DoGetClientSize( int *width, int *height ) const;
|
||||
|
||||
@@ -134,9 +98,6 @@ protected:
|
||||
virtual void DetachMenuBar();
|
||||
virtual void AttachMenuBar(wxMenuBar *menubar);
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
// is the frame currently iconized?
|
||||
bool m_isIconized;
|
||||
};
|
||||
|
||||
#endif // __GTKFRAMEH__
|
||||
|
110
include/wx/gtk1/toplevel.h
Normal file
110
include/wx/gtk1/toplevel.h
Normal file
@@ -0,0 +1,110 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/toplevel.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __GTKTOPLEVELH__
|
||||
#define __GTKTOPLEVELH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "toplevel.h"
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxTopLevelWindowGTK
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxTopLevelWindowGTK : public wxTopLevelWindowBase
|
||||
{
|
||||
public:
|
||||
// construction
|
||||
wxTopLevelWindowGTK() { Init(); }
|
||||
wxTopLevelWindowGTK(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual ~wxTopLevelWindowGTK();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void Maximize(bool maximize = TRUE);
|
||||
virtual bool IsMaximized() const;
|
||||
virtual void Iconize(bool iconize = TRUE);
|
||||
virtual bool IsIconized() const;
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
virtual void Restore();
|
||||
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||
virtual bool IsFullScreen() const { return m_fsIsShowing; };
|
||||
|
||||
virtual bool Show(bool show = TRUE);
|
||||
|
||||
virtual void SetTitle( const wxString &title );
|
||||
virtual wxString GetTitle() const { return m_title; }
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
// move the window to the specified location and resize it: this is called
|
||||
// from both DoSetSize() and DoSetClientSize()
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
|
||||
// GTK callbacks
|
||||
virtual void GtkOnSize( int x, int y, int width, int height );
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
// do *not* call this to iconize the frame, this is a private function!
|
||||
void SetIconizeState(bool iconic);
|
||||
|
||||
wxString m_title;
|
||||
int m_miniEdge,
|
||||
m_miniTitle;
|
||||
GtkWidget *m_mainWidget;
|
||||
bool m_insertInClientArea; /* not from within OnCreateXXX */
|
||||
|
||||
bool m_fsIsShowing; /* full screen */
|
||||
long m_fsSaveStyle;
|
||||
long m_fsSaveFlag;
|
||||
wxRect m_fsSaveFrame;
|
||||
|
||||
long m_gdkFunc, m_gdkDecor; // m_windowStyle translated to GDK's terms
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// override wxWindow methods to take into account tool/menu/statusbars
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
virtual void DoGetClientSize( int *width, int *height ) const;
|
||||
|
||||
// is the frame currently iconized?
|
||||
bool m_isIconized;
|
||||
};
|
||||
|
||||
#endif // __GTKTOPLEVELH__
|
@@ -57,5 +57,17 @@ See mod_*.cpp and htmlwin.cpp for example :-)
|
||||
static int _link_dummy_var_##module_name = \
|
||||
_link_dummy_func_##module_name ();
|
||||
|
||||
#define FORCE_WXHTML_MODULES() \
|
||||
FORCE_LINK(m_layout) \
|
||||
FORCE_LINK(m_fonts) \
|
||||
FORCE_LINK(m_image) \
|
||||
FORCE_LINK(m_list) \
|
||||
FORCE_LINK(m_dflist) \
|
||||
FORCE_LINK(m_pre) \
|
||||
FORCE_LINK(m_hline) \
|
||||
FORCE_LINK(m_links) \
|
||||
FORCE_LINK(m_tables) \
|
||||
FORCE_LINK(m_meta)
|
||||
|
||||
|
||||
#endif // _WX_FORCELNK_H_
|
||||
|
@@ -51,7 +51,7 @@ public:
|
||||
int GetWidth() const {return m_Width;}
|
||||
int GetHeight() const {return m_Height;}
|
||||
int GetDescent() const {return m_Descent;}
|
||||
|
||||
|
||||
const wxString& GetId() const { return m_id; }
|
||||
void SetId(const wxString& id) { m_id = id; }
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
// is true - the cell can be split on two pages
|
||||
void SetCanLiveOnPagebreak(bool can) { m_CanLiveOnPagebreak = can; }
|
||||
|
||||
// Returns y-coordinates that contraint the cell, i.e. left is highest
|
||||
// Returns y-coordinates that contraint the cell, i.e. left is highest
|
||||
// and right lowest coordinate such that the cell lays between then.
|
||||
// Note: this method does not return meaningful values if you haven't
|
||||
// called Layout() before!
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
wxHtmlCell* GetFirstCell() const {return m_Cells;}
|
||||
|
||||
// see comment in wxHtmlCell about this method
|
||||
virtual bool IsTerminalCell() const { return false; }
|
||||
virtual bool IsTerminalCell() const { return FALSE; }
|
||||
|
||||
virtual wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y) const;
|
||||
|
||||
|
@@ -45,6 +45,9 @@
|
||||
// NB: we #define and not typedef wxLongLong_t because we want to be able to
|
||||
// use 'unsigned wxLongLong_t' as well and because we use "#ifdef
|
||||
// wxLongLong_t" below
|
||||
|
||||
// first check for generic cases which are long on 64bit machine and "long
|
||||
// long", then check for specific compilers
|
||||
#if defined(SIZEOF_LONG) && (SIZEOF_LONG == 8)
|
||||
#define wxLongLong_t long
|
||||
#define wxLongLongIsLong
|
||||
@@ -52,7 +55,9 @@
|
||||
#define wxLongLong_t __int64
|
||||
#elif defined(__BORLANDC__) && defined(__WIN32__) && (__BORLANDC__ >= 0x520)
|
||||
#define wxLongLong_t __int64
|
||||
#elif defined(__GNUG__) || defined(__sgi)
|
||||
#elif defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG >= 8
|
||||
#define wxLongLong_t long long
|
||||
#elif defined(__MINGW32__)
|
||||
#define wxLongLong_t long long
|
||||
#elif defined(__MWERKS__)
|
||||
#if __option(longlong)
|
||||
@@ -74,6 +79,7 @@
|
||||
"Please report your compiler version to " \
|
||||
"wx-dev@lists.wxwindows.org!"
|
||||
#endif
|
||||
|
||||
#define wxUSE_LONGLONG_WX 1
|
||||
#endif // compiler
|
||||
|
||||
|
@@ -183,10 +183,13 @@
|
||||
|
||||
// Recommended setting: 1 (always)
|
||||
#define wxUSE_LOGWINDOW 1
|
||||
#define wxUSE_LOG_DIALOG 0
|
||||
|
||||
// Recommended setting: 1 (always)
|
||||
#define wxUSE_LOGGUI 1
|
||||
|
||||
// Recommended setting: 1 (always)
|
||||
#define wxUSE_LOG_DIALOG 1
|
||||
|
||||
// Support for multithreaded applications: if 1, compile in thread classes
|
||||
// (thread.h) and make the library a bit more thread safe. Although thread
|
||||
// support is quite stable by now, you may still consider recompiling the
|
||||
@@ -416,6 +419,7 @@
|
||||
#define wxUSE_GAUGE 1 // wxGauge
|
||||
#define wxUSE_LISTBOX 1 // wxListBox
|
||||
#define wxUSE_LISTCTRL 1 // wxListCtrl
|
||||
#define wxUSE_PROPSHEET 1 // wxProperty
|
||||
#define wxUSE_RADIOBOX 1 // wxRadioBox
|
||||
#define wxUSE_RADIOBTN 1 // wxRadioButton
|
||||
#define wxUSE_SCROLLBAR 1 // wxScrollBar
|
||||
@@ -623,6 +627,12 @@
|
||||
// color chooser dialog
|
||||
#define wxUSE_COLOURDLG 1
|
||||
|
||||
// splash screen class
|
||||
#define wxUSE_SPLASH 1
|
||||
|
||||
// wizards
|
||||
#define wxUSE_WIZARDDLG 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Metafiles support
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -713,6 +723,8 @@
|
||||
// space)
|
||||
#define wxUSE_SNGLINST_CHECKER 1
|
||||
|
||||
#define wxUSE_DRAGIMAGE 1
|
||||
|
||||
#define wxUSE_IPC 0
|
||||
// 0 for no interprocess comms
|
||||
#define wxUSE_HELP 1
|
||||
|
84
include/wx/mgl/toplevel.h
Normal file
84
include/wx/mgl/toplevel.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/mgl/toplevel.h
|
||||
// Purpose: Top level window, abstraction of wxFrame and wxDialog
|
||||
// Author: Vaclav Slavik
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __WX_TOPLEVEL_H__
|
||||
#define __WX_TOPLEVEL_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "toplevel.h"
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxTopLevelWindowMGL
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxTopLevelWindowMGL : public wxTopLevelWindowBase
|
||||
{
|
||||
public:
|
||||
// construction
|
||||
wxTopLevelWindowMGL() { Init(); }
|
||||
wxTopLevelWindowMGL(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual ~wxTopLevelWindowMGL();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void Maximize(bool maximize = TRUE);
|
||||
virtual bool IsMaximized() const;
|
||||
virtual void Iconize(bool iconize = TRUE);
|
||||
virtual bool IsIconized() const;
|
||||
virtual void Restore();
|
||||
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||
virtual bool IsFullScreen() const { return m_fsIsShowing; }
|
||||
|
||||
virtual void SetTitle(const wxString &title) { m_title = title; }
|
||||
virtual wxString GetTitle() const { return m_title; }
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
wxString m_title;
|
||||
bool m_fsIsShowing; /* full screen */
|
||||
long m_fsSaveStyle;
|
||||
long m_fsSaveFlag;
|
||||
wxRect m_fsSaveFrame;
|
||||
|
||||
// is the frame currently iconized?
|
||||
bool m_isIconized;
|
||||
// and maximized?
|
||||
bool m_isMaximized;
|
||||
wxRect m_savedFrame;
|
||||
};
|
||||
|
||||
#endif // __WX_TOPLEVEL_H__
|
@@ -171,14 +171,14 @@ public:
|
||||
static void DoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour);
|
||||
static void DoChangeBackgroundColour(WXWidget widget, wxColour& backgroundColour, bool changeArmColour = FALSE);
|
||||
|
||||
protected:
|
||||
// event handlers (not virtual by design)
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
|
||||
// For implementation purposes - sometimes decorations make the client area
|
||||
// smaller
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
|
||||
protected:
|
||||
// event handlers (not virtual by design)
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
|
||||
// Makes an adjustment to the window position (for example, a frame that has
|
||||
// a toolbar that it manages itself).
|
||||
virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dialog.h
|
||||
// Name: wx/msw/dialog.h
|
||||
// Purpose: wxDialog class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -56,15 +56,7 @@ public:
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr);
|
||||
|
||||
~wxDialog();
|
||||
|
||||
// override some base class virtuals
|
||||
virtual bool Destroy();
|
||||
virtual bool Show(bool show);
|
||||
virtual void Iconize(bool iconize);
|
||||
virtual bool IsIconized() const;
|
||||
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
virtual ~wxDialog();
|
||||
|
||||
void SetModal(bool flag);
|
||||
virtual bool IsModal() const;
|
||||
@@ -78,16 +70,15 @@ public:
|
||||
// returns TRUE if we're in a modal loop
|
||||
bool IsModalShowing() const;
|
||||
|
||||
#if WXWIN_COMPATIBILITY
|
||||
bool Iconized() const { return IsIconized(); };
|
||||
#endif
|
||||
|
||||
// wxMSW only: remove the "Close" button from the dialog
|
||||
bool EnableCloseButton(bool enable = TRUE);
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
// override some base class virtuals
|
||||
virtual bool Show(bool show);
|
||||
|
||||
// event handlers
|
||||
bool OnClose();
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
@@ -110,10 +101,6 @@ public:
|
||||
#endif // wxUSE_CTL3D
|
||||
|
||||
protected:
|
||||
// override more base class virtuals
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
virtual void DoGetPosition(int *x, int *y) const;
|
||||
|
||||
// show modal dialog and enter modal loop
|
||||
void DoShowModal();
|
||||
|
||||
|
@@ -45,22 +45,13 @@ public:
|
||||
virtual ~wxFrameMSW();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void Raise();
|
||||
virtual void Maximize(bool maximize = TRUE);
|
||||
virtual bool IsMaximized() const;
|
||||
virtual void Iconize(bool iconize = TRUE);
|
||||
virtual bool IsIconized() const;
|
||||
virtual void Restore();
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||
virtual bool IsFullScreen() const { return m_fsIsShowing; };
|
||||
virtual void Raise();
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
// override some more virtuals
|
||||
virtual bool Show(bool show = TRUE);
|
||||
|
||||
// event handlers
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
@@ -124,14 +115,8 @@ protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// common part of Iconize(), Maximize() and Restore()
|
||||
void DoShowWindow(int nShowCmd);
|
||||
|
||||
// override base class virtuals
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
virtual void DoGetPosition(int *x, int *y) const;
|
||||
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
@@ -154,14 +139,8 @@ protected:
|
||||
|
||||
virtual bool IsMDIChild() const { return FALSE; }
|
||||
|
||||
// is the frame currently iconized?
|
||||
bool m_iconized;
|
||||
|
||||
// should the frame be maximized when it will be shown? set by Maximize()
|
||||
// when it is called while the frame is hidden
|
||||
bool m_maximizeOnShow;
|
||||
|
||||
WXHICON m_defaultIcon;
|
||||
// get default (wxWindows) icon for the frame
|
||||
virtual WXHICON GetDefaultIcon() const;
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
static bool m_useNativeStatusBar;
|
||||
|
@@ -30,8 +30,6 @@ class WXDLLEXPORT wxMDIChildFrame;
|
||||
|
||||
class WXDLLEXPORT wxMDIParentFrame : public wxFrame
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
||||
|
||||
public:
|
||||
wxMDIParentFrame();
|
||||
wxMDIParentFrame(wxWindow *parent,
|
||||
@@ -102,6 +100,8 @@ protected:
|
||||
virtual void InternalSetMenuBar();
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
virtual WXHICON GetDefaultIcon() const;
|
||||
|
||||
wxMDIClientWindow * m_clientWindow;
|
||||
wxMDIChildFrame * m_currentChild;
|
||||
wxMenu* m_windowMenu;
|
||||
@@ -113,6 +113,7 @@ private:
|
||||
friend class WXDLLEXPORT wxMDIChildFrame;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -178,6 +179,8 @@ protected:
|
||||
virtual void InternalSetMenuBar();
|
||||
virtual bool IsMDIChild() const { return TRUE; }
|
||||
|
||||
virtual WXHICON GetDefaultIcon() const;
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
|
@@ -48,7 +48,14 @@ public:
|
||||
#else // !Debug
|
||||
#define wxGetFormatName(format) _T("")
|
||||
#endif // Debug/!Debug
|
||||
|
||||
// they need to be accessed from wxIDataObject, so made them public,
|
||||
// or wxIDataObject friend
|
||||
public:
|
||||
virtual const void* GetSizeFromBuffer( const void* buffer, size_t* size,
|
||||
const wxDataFormat& format );
|
||||
virtual void* SetSizeInBuffer( void* buffer, size_t size,
|
||||
const wxDataFormat& format );
|
||||
virtual size_t GetBufferOffset( const wxDataFormat& format );
|
||||
private:
|
||||
IDataObject *m_pIDataObject; // pointer to the COM interface
|
||||
};
|
||||
|
@@ -38,7 +38,7 @@ protected:
|
||||
int m_cap ;
|
||||
wxBitmap m_stipple ;
|
||||
int m_nbDash ;
|
||||
wxMSWDash * m_dash ;
|
||||
wxDash * m_dash ;
|
||||
wxColour m_colour;
|
||||
WXHPEN m_hPen;
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user