Compare commits

..

3 Commits

Author SHA1 Message Date
Bryan Petty
ebcb3fbdf1 This commit was manufactured by cvs2svn to create tag
'CPPUNIT_1_10_2'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/CPPUNIT_1_10_2@40635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-16 19:15:28 +00:00
Michael Wetherell
2aa148634e Import cppunit.m4 from cppunit 1.10.2.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/CPPUNIT@40634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-16 19:15:28 +00:00
Bryan Petty
60292dc364 This commit was manufactured by cvs2svn to create branch 'CPPUNIT'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/CPPUNIT@35558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-18 13:24:14 +00:00
1168 changed files with 80 additions and 1467258 deletions

80
build/aclocal/cppunit.m4 Normal file
View File

@@ -0,0 +1,80 @@
dnl
dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl
AC_DEFUN(AM_PATH_CPPUNIT,
[
AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)],
cppunit_config_prefix="$withval", cppunit_config_prefix="")
AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)],
cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="")
if test x$cppunit_config_exec_prefix != x ; then
cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix"
if test x${CPPUNIT_CONFIG+set} != xset ; then
CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config
fi
fi
if test x$cppunit_config_prefix != x ; then
cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix"
if test x${CPPUNIT_CONFIG+set} != xset ; then
CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config
fi
fi
AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no)
cppunit_version_min=$1
AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min)
no_cppunit=""
if test "$CPPUNIT_CONFIG" = "no" ; then
no_cppunit=yes
else
CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags`
CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs`
cppunit_version=`$CPPUNIT_CONFIG --version`
cppunit_major_version=`echo $cppunit_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
cppunit_minor_version=`echo $cppunit_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
cppunit_micro_version=`echo $cppunit_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
cppunit_major_min=`echo $cppunit_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
cppunit_minor_min=`echo $cppunit_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
cppunit_micro_min=`echo $cppunit_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
cppunit_version_proper=`expr \
$cppunit_major_version \> $cppunit_major_min \| \
$cppunit_major_version \= $cppunit_major_min \& \
$cppunit_minor_version \> $cppunit_minor_min \| \
$cppunit_major_version \= $cppunit_major_min \& \
$cppunit_minor_version \= $cppunit_minor_min \& \
$cppunit_micro_version \>= $cppunit_micro_min `
if test "$cppunit_version_proper" = "1" ; then
AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version])
else
AC_MSG_RESULT(no)
no_cppunit=yes
fi
fi
if test "x$no_cppunit" = x ; then
ifelse([$2], , :, [$2])
else
CPPUNIT_CFLAGS=""
CPPUNIT_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(CPPUNIT_CFLAGS)
AC_SUBST(CPPUNIT_LIBS)
])

View File

@@ -1,24 +0,0 @@
.DS_Store
.emacs.desktop
.gdb_history
BUILD
MANIFEST
_build_dmg
_build_rpm
build
build-dbg
build-gtk
build-gtk2
build-gtk2-dbg.unicode
build-gtk2.unicode
build-pkg
build-pkg-debug
build-x11
build.local
build.unicode
build_options.py
dist
licence
s.bat
temp
update.log

View File

@@ -1,138 +0,0 @@
SWIG 1.3.x Patches
==================
This directory holds a set of patches for the CVS version of SWIG that
are required if you wish to use SWIG for wxPython development, or for
building your own extension modules that need to interface with
wxPython. These have been submitted to SWIG's SourceForge patch
tracker, so hopefully they will get incorporated into the main SWIG
source tree soon.
wxPython currently uses the 1.3.27 version of SWIG, which you can get
from https://sourceforge.net/projects/swig/, plus the patch(es) in
this directory. Download the SWIG sources, apply the patch(es) here
and then build as normal. I have also have made available a tarball
containing the patched SWIG sources, plus a win32 binary, located
here:
http://starship.python.net/crew/robind/wxPython/tools/
If you want to use the patched version of SWIG and still have the
stock version available for other projects, then you can configure the
patched version to use a different --prefix and then specify that
executable when running setup.py, like this:
python setup.py SWIG=/path/to/my/swig [other params]
------------------------------------------------------------------------
swig-1.3.27.patch
SWIG changed slightly how the runtime type_info data is structured
in order to optimize load time and runtime access. wxPython
uncovered a bug in the implementation, so this patch includes the
fix that was checked in to CVS for 1.3.28.
SWIG changed how the import statments are output to the proxy
file, but this also caused the order to change (they all moved to
the very top of the file) so this broke the module docstring, as
well as some behavior that Chandler development is depending upon,
so this patch changes back to how it was done in prior releases.
Bug fix for SWIG's definition of the %makedefault macro.
Add a SWIG_VERSION macro to the wrapper file so C/C++ code can
integrate with different versions of the generated runtime code.
------------------------------------------------------------------------
swig-1.3.24.patch (now obsolete)
A bug was introduced in SWIG 1.3.23 and remains in 1.3.24 that
causes compilation problems with wxPython (copies are being made
of objects that don't have a copy constructor.) This patch fixes
the code generator to use a reference to the object instead of
making a copy.
Part of my autodoc patch was disabled becuase a unit-test failed.
It turns out that the failure was due to a name clash in the unit
test itself, so I re-enabled that section of code in this patch.
Don't generate the autodocs string for a class if it has a
docstring attribute.
Some typos fixed, etc.
------------------------------------------------------------------------
This patch was added to SWIG's CVS on 10/2/2004 and a modified version
of it is in 1.3.23 and 1.3.24.
------------------------------------------------------------------------
swig.python-2.patch
Adds the following features to the Python Module in SWIG. See the
updated docs in the patch for more details.
%feature("autodoc")
%feature("docstring")
%feature("pythonprepend")
%feature("pythonappend")
%module(docstring="string")
%module(package="string")
https://sourceforge.net/tracker/index.php?func=detail&aid=1023309&group_id=1645&atid=301645
------------------------------------------------------------------------
This patch was applied to SWIG's CVS on 07/12/2004 and is in the
1.3.22 relese.
------------------------------------------------------------------------
swig.xmlout.patch Fixes a couple problems in the XML output
of SWIG: an extra "/>" was removed and
newlines in attribute values were changed
to the #10; entity reference so they will
be preserved by parsers.
Also, added options for dumping or
writing to a file the XML of the parse
tree *after* other language modules have
been run (previously you could only do
the XML output *instead of* a regular
language module.)
See SF Patch #864689
------------------------------------------------------------------------
These patches have already been checked in to SWIG's CVS and are in
the 1.3.20 release.
------------------------------------------------------------------------
swig.SplitLines.patch Adds a new SplitLines function to the DOH
library. See SF Patch #829317.
*Checked in 10/31/2003*
swig.xml.patch Adds an option that drastically reduces
the size of the XML output of SWIG, which
increases the performance of the
build_renamers script used in the wxPython
build. See SF Patch #829319.
*Checked in 10/31/2003*
swig.python.patch Lots of changes for SWIG's Python module,
especially in how the proxy code is
generated. See swig.python.patch.txt for
more details, also SF Patch #829325.
*Checked in 10/31/2003*
------------------------------------------------------------------------

View File

@@ -1,201 +0,0 @@
? .configure
? .emacs.desktop
? .test
? mytests
? switch_cvs.py
? Source/Modules/mystuff
Index: Doc/Manual/Python.html
===================================================================
RCS file: /cvsroot/swig/SWIG/Doc/Manual/Python.html,v
retrieving revision 1.20
diff -u -4 -r1.20 Python.html
--- Doc/Manual/Python.html 25 Oct 2004 20:42:08 -0000 1.20
+++ Doc/Manual/Python.html 15 Apr 2005 23:11:25 -0000
@@ -3869,10 +3869,10 @@
<H2><a name="Python_nn65"></a>26.10 Docstring Features</H2>
-Usign docstrings in Python code is becoming more and more important
-ans more tools are coming on the scene that take advantage of them,
+Using docstrings in Python code is becoming more and more important
+and more tools are coming on the scene that take advantage of them,
everything from full-blown documentaiton generators to class browsers
and popup call-tips in Python-aware IDEs. Given the way that SWIG
generates the proxy code by default, your users will normally get
something like <tt>"function_name(*args)"</tt> in the popup calltip of
Index: Lib/python/pyrun.swg
===================================================================
RCS file: /cvsroot/swig/SWIG/Lib/python/pyrun.swg,v
retrieving revision 1.53
diff -u -4 -r1.53 pyrun.swg
--- Lib/python/pyrun.swg 11 Dec 2004 23:38:44 -0000 1.53
+++ Lib/python/pyrun.swg 15 Apr 2005 23:11:25 -0000
@@ -455,9 +455,10 @@
} else {
PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
type, otype);
}
- Py_DECREF(str);
+ if (str)
+ Py_DECREF(str);
return;
}
}
PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
Index: Source/Modules/python.cxx
===================================================================
RCS file: /cvsroot/swig/SWIG/Source/Modules/python.cxx,v
retrieving revision 1.81
diff -u -4 -r1.81 python.cxx
--- Source/Modules/python.cxx 13 Dec 2004 22:12:47 -0000 1.81
+++ Source/Modules/python.cxx 15 Apr 2005 23:11:26 -0000
@@ -74,9 +74,9 @@
-modern - Use modern python features only, without compatibility code\n\
-apply - Use apply() in proxy classes\n\
-new_vwm - New value wrapper mode, use only when everything else fails \n\
-new_repr - Use more informative version of __repr__ in proxy classes\n\
- -old_repr - Use shorter ald old version of __repr__ in proxy classes\n\
+ -old_repr - Use shorter and old version of __repr__ in proxy classes\n\
-noexcept - No automatic exception handling\n\
-noh - Don't generate the output header file\n\
-noproxy - Don't generate proxy classes \n\n";
@@ -749,10 +749,15 @@
// Do the param type too?
if (showTypes) {
type = SwigType_base(type);
- lookup = Swig_symbol_clookup(type, 0);
- if (lookup) type = Getattr(lookup, "sym:name");
+ SwigType* qt = SwigType_typedef_resolve_all(type);
+ if (SwigType_isenum(qt))
+ type = NewString("int");
+ else {
+ lookup = Swig_symbol_clookup(type, 0);
+ if (lookup) type = Getattr(lookup, "sym:name");
+ }
Printf(doc, "%s ", type);
}
if (name) {
@@ -853,13 +858,19 @@
}
switch ( ad_type ) {
case AUTODOC_CLASS:
- if (CPlusPlus) {
- Printf(doc, "Proxy of C++ %s class", class_name);
- } else {
- Printf(doc, "Proxy of C %s struct", class_name);
- }
+ {
+ // Only do the autodoc if there isn't a docstring for the class
+ String* str = Getattr(n, "feature:docstring");
+ if (str == NULL || Len(str) == 0) {
+ if (CPlusPlus) {
+ Printf(doc, "Proxy of C++ %s class", class_name);
+ } else {
+ Printf(doc, "Proxy of C %s struct", class_name);
+ }
+ }
+ }
break;
case AUTODOC_CTOR:
if ( Strcmp(class_name, symname) == 0) {
String* paramList = make_autodocParmList(n, showTypes);
@@ -1027,10 +1038,12 @@
Printf(methods,"\t { (char *)\"%s\", (PyCFunction) %s, METH_VARARGS | METH_KEYWORDS, ", name, function);
if (n && Getattr(n,"feature:callback")) {
if (have_docstring(n)) {
+ String* ds = docstring(n, AUTODOC_FUNC, "", false);
+ Replaceall(ds, "\n", "\\n");
Printf(methods,"(char *)\"%s\\nswig_ptr: %s\"",
- docstring(n, AUTODOC_FUNC, "", false),
+ ds,
Getattr(n,"feature:callback:name"));
} else {
Printf(methods,"(char *)\"swig_ptr: %s\"",Getattr(n,"feature:callback:name"));
}
@@ -1950,11 +1963,13 @@
Printf(f_shadow, modern ? "(object)" : "(_object)");
}
}
Printf(f_shadow,":\n");
- if ( have_docstring(n) )
- Printv(f_shadow, tab4, docstring(n, AUTODOC_CLASS, tab4), "\n", NIL);
-
+ if ( have_docstring(n) ) {
+ String* str = docstring(n, AUTODOC_CLASS, tab4);
+ if (str != NULL && Len(str))
+ Printv(f_shadow, tab4, str, "\n", NIL);
+ }
if (!modern) {
Printv(f_shadow,tab4,"__swig_setmethods__ = {}\n",NIL);
if (Len(base_class)) {
Printf(f_shadow,"%sfor _s in [%s]: __swig_setmethods__.update(_s.__swig_setmethods__)\n",tab4,base_class);
@@ -2139,11 +2154,11 @@
Replaceall(pycode,"$action", pyaction);
Delete(pyaction);
Printv(f_shadow,pycode,"\n",NIL);
} else {
- Printv(f_shadow, tab4, "def ", symname, "(*args", (allow_kwargs ? ", **kwargs" : ""), "): ", NIL);
+ Printv(f_shadow, tab4, "def ", symname, "(*args", (allow_kwargs ? ", **kwargs" : ""), "):", NIL);
if (!have_addtofunc(n)) {
- Printv(f_shadow, "return ", funcCallHelper(Swig_name_member(class_name,symname), allow_kwargs), "\n", NIL);
+ Printv(f_shadow, " return ", funcCallHelper(Swig_name_member(class_name,symname), allow_kwargs), "\n", NIL);
} else {
Printv(f_shadow, "\n", NIL);
if ( have_docstring(n) )
Printv(f_shadow, tab8, docstring(n, AUTODOC_METHOD, tab8), "\n", NIL);
@@ -2175,12 +2190,9 @@
return SWIG_OK;
}
if (shadow) {
- //
- // static + autodoc/prepend/append + def args not working!!!, disable by now
- //
- if (0 && !classic && !Getattr(n,"feature:python:callback") && have_addtofunc(n)) {
+ if ( !classic && !Getattr(n,"feature:python:callback") && have_addtofunc(n)) {
int kw = (check_kwargs(n) && !Getattr(n,"sym:overloaded")) ? 1 : 0;
Printv(f_shadow, tab4, "def ", symname, "(*args", (kw ? ", **kwargs" : ""), "):\n", NIL);
if ( have_docstring(n) )
Printv(f_shadow, tab8, docstring(n, AUTODOC_STATICFUNC, tab8), "\n", NIL);
Index: Source/Swig/cwrap.c
===================================================================
RCS file: /cvsroot/swig/SWIG/Source/Swig/cwrap.c,v
retrieving revision 1.51
diff -u -4 -r1.51 cwrap.c
--- Source/Swig/cwrap.c 4 Dec 2004 08:33:02 -0000 1.51
+++ Source/Swig/cwrap.c 15 Apr 2005 23:11:26 -0000
@@ -172,17 +172,26 @@
tycode = SwigType_type(type);
if (tycode == T_REFERENCE) {
if (pvalue) {
SwigType *tvalue;
- String *defname, *defvalue, *rvalue;
+ String *defname, *defvalue, *rvalue, *qvalue;
rvalue = SwigType_typedef_resolve_all(pvalue);
+ qvalue = SwigType_typedef_qualified(rvalue);
defname = NewStringf("%s_defvalue", lname);
tvalue = Copy(type);
SwigType_del_reference(tvalue);
- defvalue = NewStringf("%s = %s", SwigType_lstr(tvalue,defname), rvalue);
+ tycode = SwigType_type(tvalue);
+ if (tycode != T_USER) {
+ /* plain primitive type, we copy the the def value */
+ defvalue = NewStringf("%s = %s", SwigType_lstr(tvalue,defname),qvalue);
+ } else {
+ /* user type, we copy the reference value */
+ defvalue = NewStringf("%s = %s",SwigType_str(type,defname),qvalue);
+ }
Wrapper_add_localv(w,defname, defvalue, NIL);
Delete(tvalue);
Delete(rvalue);
+ Delete(qvalue);
Delete(defname);
Delete(defvalue);
}
} else if (!pvalue && ((tycode == T_POINTER) || (tycode == T_STRING))) {

View File

@@ -1,290 +0,0 @@
Index: Doc/Manual/Python.html
===================================================================
RCS file: /cvsroot/swig/SWIG/Doc/Manual/Python.html,v
retrieving revision 1.31
diff -u -4 -r1.31 Python.html
--- Doc/Manual/Python.html 6 Oct 2005 21:49:58 -0000 1.31
+++ Doc/Manual/Python.html 29 Jan 2006 02:05:55 -0000
@@ -4461,10 +4461,10 @@
<H2><a name="Python_nn65"></a>26.10 Docstring Features</H2>
<p>
-Usign docstrings in Python code is becoming more and more important
-ans more tools are coming on the scene that take advantage of them,
+Using docstrings in Python code is becoming more and more important
+and more tools are coming on the scene that take advantage of them,
everything from full-blown documentaiton generators to class browsers
and popup call-tips in Python-aware IDEs. Given the way that SWIG
generates the proxy code by default, your users will normally get
something like <tt>"function_name(*args)"</tt> in the popup calltip of
Index: Lib/swig.swg
===================================================================
RCS file: /cvsroot/swig/SWIG/Lib/swig.swg,v
retrieving revision 1.49
diff -u -4 -r1.49 swig.swg
--- Lib/swig.swg 15 Oct 2005 00:15:30 -0000 1.49
+++ Lib/swig.swg 29 Jan 2006 02:05:55 -0000
@@ -51,9 +51,9 @@
#define %nodefault %feature("nodefault","1")
#define %default %feature("nodefault","0")
#define %clearnodefault %feature("nodefault","")
-#define %makedefault %cleardefault
+#define %makedefault %clearnodefault
/* the %exception directive */
#ifdef SWIGCSHARP
Index: Lib/swiginit.swg
===================================================================
RCS file: /cvsroot/swig/SWIG/Lib/swiginit.swg,v
retrieving revision 1.5
diff -u -4 -r1.5 swiginit.swg
--- Lib/swiginit.swg 12 Sep 2005 23:25:03 -0000 1.5
+++ Lib/swiginit.swg 29 Jan 2006 02:05:55 -0000
@@ -40,14 +40,19 @@
**/
#ifdef __cplusplus
extern "C" {
+#if 0
+} /* c-mode */
+#endif
+#endif
+
+#if 0
+#define SWIGRUNTIME_DEBUG
#endif
SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
- swig_type_info *type, *ret;
- swig_cast_info *cast;
size_t i;
swig_module_info *module_head;
static int init_run = 0;
@@ -71,18 +76,35 @@
SWIG_SetModule(clientdata, &swig_module);
}
/* Now work on filling in swig_module.types */
+#ifdef SWIGRUNTIME_DEBUG
+ printf("SWIG_InitializeModule: size %d\n", swig_module.size);
+#endif
for (i = 0; i < swig_module.size; ++i) {
- type = 0;
+ swig_type_info *type = 0;
+ swig_type_info *ret;
+ swig_cast_info *cast;
+
+#ifdef SWIGRUNTIME_DEBUG
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+#endif
/* if there is another module already loaded */
if (swig_module.next != &swig_module) {
type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
}
if (type) {
/* Overwrite clientdata field */
- if (swig_module.type_initial[i]->clientdata) type->clientdata = swig_module.type_initial[i]->clientdata;
+#ifdef SWIGRUNTIME_DEBUG
+ printf("SWIG_InitializeModule: found type %s\n", type->name);
+#endif
+ if (swig_module.type_initial[i]->clientdata) {
+ type->clientdata = swig_module.type_initial[i]->clientdata;
+#ifdef SWIGRUNTIME_DEBUG
+ printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
+#endif
+ }
} else {
type = swig_module.type_initial[i];
}
@@ -91,31 +113,66 @@
while (cast->type) {
/* Don't need to add information already in the list */
ret = 0;
+#ifdef SWIGRUNTIME_DEBUG
+ printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
+#endif
if (swig_module.next != &swig_module) {
ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
+#ifdef SWIGRUNTIME_DEBUG
+ if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
+#endif
}
- if (ret && type == swig_module.type_initial[i]) {
- cast->type = ret;
- ret = 0;
+ if (ret) {
+ if (type == swig_module.type_initial[i]) {
+#ifdef SWIGRUNTIME_DEBUG
+ printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
+#endif
+ cast->type = ret;
+ ret = 0;
+ } else {
+ /* Check for casting already in the list */
+ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
+#ifdef SWIGRUNTIME_DEBUG
+ if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
+#endif
+ if (!ocast) ret = 0;
+ }
}
-
+
if (!ret) {
+#ifdef SWIGRUNTIME_DEBUG
+ printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
+#endif
if (type->cast) {
type->cast->prev = cast;
cast->next = type->cast;
}
type->cast = cast;
}
-
cast++;
}
-
/* Set entry in modules->types array equal to the type */
swig_module.types[i] = type;
}
swig_module.types[i] = 0;
+
+#ifdef SWIGRUNTIME_DEBUG
+ printf("**** SWIG_InitializeModule: Cast List ******\n");
+ for (i = 0; i < swig_module.size; ++i) {
+ int j = 0;
+ swig_cast_info *cast = swig_module.cast_initial[i];
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
+ while (cast->type) {
+ printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
+ cast++;
+ ++j;
+ }
+ printf("---- Total casts: %d\n",j);
+ }
+ printf("**** SWIG_InitializeModule: Cast List ******\n");
+#endif
}
/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
@@ -145,6 +202,9 @@
}
}
#ifdef __cplusplus
+#if 0
+{ /* c-mode */
+#endif
}
#endif
Index: Source/Modules/python.cxx
===================================================================
RCS file: /cvsroot/swig/SWIG/Source/Modules/python.cxx,v
retrieving revision 1.107
diff -u -4 -r1.107 python.cxx
--- Source/Modules/python.cxx 7 Oct 2005 13:17:41 -0000 1.107
+++ Source/Modules/python.cxx 29 Jan 2006 02:05:56 -0000
@@ -36,9 +36,8 @@
static File *f_directors_h = 0;
static File *f_init = 0;
static File *f_shadow_py = 0;
static String *f_shadow = 0;
-static String *f_shadow_imports = 0;
static String *f_shadow_stubs = 0;
static String *methods;
static String *class_name;
@@ -281,8 +280,20 @@
Swig_banner(f_runtime);
Printf(f_runtime,"#define SWIGPYTHON\n");
+ String *package_version = NewString(PACKAGE_VERSION);
+ char *token = strtok(Char(package_version), ".");
+ String *vers = NewString("#define SWIG_VERSION 0x");
+ while (token) {
+ int len = strlen(token);
+ Printf(vers, "%s%s", (len == 1) ? "0" : "", token);
+ token = strtok(NULL, ".");
+ }
+ Printf(f_runtime, "%s\n", vers);
+ Delete(package_version);
+ Delete(vers);
+
if (directorsEnabled()) {
Printf(f_runtime,"#define SWIG_DIRECTORS\n");
}
@@ -322,9 +333,8 @@
}
Delete(filen); filen = NULL;
f_shadow = NewString("");
- f_shadow_imports = NewString("");
f_shadow_stubs = NewString("");
Swig_register_filebyname("shadow",f_shadow);
Swig_register_filebyname("python",f_shadow);
@@ -343,8 +353,10 @@
if (mod_docstring && Len(mod_docstring)) {
Printv(f_shadow, "\n\"\"\"\n", mod_docstring, "\n\"\"\"\n", NIL);
Delete(mod_docstring); mod_docstring = NULL;
}
+
+ Printf(f_shadow,"\nimport %s\n\n", module);
/* if (!modern) */
/* always needed, a class can be forced to be no-modern, such as an exception */
{
@@ -445,10 +457,8 @@
Printf(f_wrappers,"}\n");
Printf(f_wrappers,"#endif\n");
if (shadow) {
- Printf(f_shadow_imports,"\nimport %s\n", module);
- Printv(f_shadow_py, f_shadow_imports, "\n",NIL);
Printv(f_shadow_py, f_shadow, "\n",NIL);
Printv(f_shadow_py, f_shadow_stubs, "\n",NIL);
Close(f_shadow_py);
@@ -507,12 +517,9 @@
}
// finally, output the name of the imported module
Printf(import, "%s\n", modname);
-
- if (!Strstr(f_shadow_imports, import)) {
- Printf(f_shadow_imports, "%s", import);
- }
+ Printf(f_shadow, "%s", import);
Delete(import);
}
}
return Language::importDirective(n);
@@ -774,10 +781,15 @@
// Do the param type too?
if (showTypes) {
type = SwigType_base(type);
- lookup = Swig_symbol_clookup(type, 0);
- if (lookup) type = Getattr(lookup, "sym:name");
+ SwigType* qt = SwigType_typedef_resolve_all(type);
+ if (SwigType_isenum(qt))
+ type = NewString("int");
+ else {
+ lookup = Swig_symbol_clookup(type, 0);
+ if (lookup) type = Getattr(lookup, "sym:name");
+ }
Printf(doc, "%s ", type);
}
if (name) {

View File

@@ -1,157 +0,0 @@
#!/bin/bash
# Are we using bash on win32? If so source that file and then exit.
if [ "$OSTYPE" = "cygwin" ]; then
source b.win32
exit
fi
function getpyver {
if [ "$1" = "15" ]; then
PYVER=1.5
elif [ "$1" = "20" ]; then
PYVER=2.0
elif [ "$1" = "21" ]; then
PYVER=2.1
elif [ "$1" = "22" ]; then
PYVER=2.2
elif [ "$1" = "23" ]; then
PYVER=2.3
elif [ "$1" = "24" ]; then
PYVER=2.4
else
echo You must specify Python version as first parameter.
exit
fi
}
getpyver $1
shift
python$PYVER -c "import sys;print '\n', sys.version, '\n'"
SETUP="python$PYVER -u setup.py"
FLAGS="USE_SWIG=1 SWIG=/opt/swig/bin/swig"
OTHERFLAGS=""
PORTFLAGS=""
UNIFLAG="UNICODE=1"
if [ "$1" = "gtk1" -o "$1" = "gtk" ]; then
PORTFLAGS="WXPORT=gtk"
UNIFLAG="UNICODE=0"
shift
elif [ "$1" = "gtk2" ]; then
PORTFLAGS="WXPORT=gtk2"
UNIFLAG="UNICODE=1"
shift
fi
for p in $*; do
if [ "$p" = "UNICODE=0" -o "$p" = "UNICODE=1" ]; then
UNIFLAG=""
break
fi
done
FLAGS="$FLAGS $PORTFLAGS $UNIFLAG"
# "c" --> clean
if [ "$1" = "c" ]; then
shift
CMD="$SETUP $FLAGS $OTHERFLAGS clean $*"
OTHERCMD="rm -f wx/*.so"
# "d" --> clean extension modules only
elif [ "$1" = "d" ]; then
shift
CMD="rm -f wx/*.so"
# "t" --> touch *.i files
elif [ "$1" = "t" ]; then
shift
CMD='find . -name "*.i" | xargs touch'
# "i" --> install
elif [ "$1" = "i" ]; then
shift
CMD="$SETUP $FLAGS $OTHERFLAGS build_ext install $*"
# "s" --> source dist
elif [ "$1" = "s" ]; then
shift
CMD="$SETUP $OTHERFLAGS sdist $*"
# "r" --> rpm dist
elif [ "$1" = "r" ]; then
WXPYVER=`python$PYVER -c "import setup;print setup.VERSION"`
for VER in 21 22; do
getpyver $VER
echo "*****************************************************************"
echo "******* Building wxPython for Python $PYVER"
echo "*****************************************************************"
SETUP="python$PYVER -u setup.py"
# save the original
cp setup.py setup.py.save
# fix up setup.py the way we want...
sed "s/BUILD_GLCANVAS = /BUILD_GLCANVAS = 0 #/" < setup.py.save > setup.py.temp
sed "s/GL_ONLY = /GL_ONLY = 1 #/" < setup.py.temp > setup.py
# build wxPython-gl RPM
$SETUP $OTHERFLAGS bdist_rpm --binary-only --doc-files README.txt --python=python$PYVER
### --requires=python$PYVER
rm dist/wxPython-gl*.tar.gz
# Build wxPython RPM
cp setup.py setup.py.temp
sed "s/GL_ONLY = /GL_ONLY = 0 #/" < setup.py.temp > setup.py
$SETUP $OTHERFLAGS bdist_rpm --binary-only --python=python$PYVER
### --requires=python$PYVER
# put the oringal setup.py back
cp setup.py.save setup.py
rm setup.py.*
# rename the binary RPM's
mv dist/wxPython-$WXPYVER-1.i386.rpm dist/wxPython-$WXPYVER-1-Py$VER.i386.rpm
mv dist/wxPython-gl-$WXPYVER-1.i386.rpm dist/wxPython-gl-$WXPYVER-1-Py$VER.i386.rpm
done
# rebuild the source dists without the munched up setup.py
$SETUP $OTHERFLAGS bdist_rpm --source-only
exit 0
# "f" --> FINAL (no debug)
elif [ "$1" = "f" ]; then
shift
CMD="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*"
# (no command arg) --> normal build for development
else
CMD="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace --debug $*"
fi
echo $CMD
eval $CMD
RC=$?
if [ "$RC" = "0" -a "$OTHERCMD" != "" ]; then
echo $OTHERCMD
$OTHERCMD
RC=$?
fi
exit $RC

View File

@@ -1,3 +0,0 @@
@echo off
call bash.bat -c "b.win32 %*"

View File

@@ -1,131 +0,0 @@
#!/bin/bash
# ----------------------------------------------------------------------
# To Robin: I tried to avoid making any changes to the existing
# build scripts, but my env requires me to specify Windows paths...
# if this breaks something at your end, let me know and we can
# figure out some solution for both of us.
if [ "$SWIGDIR" = "" ]; then
SWIGDIR=$PROJECTS\\SWIG-1.3.27
fi
# Use non-default python?
case $1 in
21 | 2.1) VER=21; shift ;;
22 | 2.2) VER=22; shift ;;
23 | 2.3) VER=23; shift ;;
24 | 2.4) VER=24; shift ;;
*) VER=24
esac
PYTHON=$TOOLS/python$VER/python.exe
SETUP="$PYTHON -u setup.py"
$PYTHON -c "import sys;print '\n', sys.version, '\n'"
FLAGS="USE_SWIG=1 SWIG=$SWIGDIR\\swig.exe"
UNIFLAG="UNICODE=1"
for p in $*; do
if [ "$p" = "UNICODE=0" -o "$p" = "UNICODE=1" ]; then
UNIFLAG=""
break
fi
done
FLAGS="$FLAGS $UNIFLAG"
# "c" --> clean
if [ "$1" = "c" ]; then
shift
CMD="$SETUP $FLAGS clean $@"
OTHERCMD="rm wx/*.pyd"
# just remove the *.pyd's
elif [ "$1" = "d" ]; then
shift
CMD="rm wx/*.pyd"
# touch all the *.i files so swig will regenerate
elif [ "$1" = "t" ]; then
shift
CMD=
find . -name "*.i" | xargs -l touch
# "i" --> install
elif [ "$1" = "i" ]; then
shift
CMD="$SETUP build install"
# "r" --> make installer
elif [ "$1" = "r" ]; then
shift
CMD="$PYTHON -u distrib\make_installer.py $@"
# "s" --> source dist
elif [ "$1" = "s" ]; then
shift
CMD="$SETUP sdist"
# "f" --> FINAL
elif [ "$1" == "f" ]; then
shift
CMD="$SETUP $FLAGS FINAL=1 build_ext --inplace $@"
# "h" --> HYBRID
elif [ "$1" = "h" ]; then
shift
CMD="$SETUP $FLAGS HYBRID=1 build_ext --inplace $@"
# "a" --> make all installers
elif [ "$1" = "a" ]; then
shift
CMD=
# $0 22 d
# $0 22 h
# $0 22 r
# $0 22 d UNICODE=1
# $0 22 h UNICODE=1
# $0 22 r UNICODE=1
$0 23 d
$0 23 h
$0 23 r
$0 23 d UNICODE=1
$0 23 h UNICODE=1
$0 23 r UNICODE=1
# "b" --> both debug and hybrid builds
elif [ "$1" = "b" ]; then
shift
CMD="echo Finished!"
$0 $VER $@
$0 $VER h $@
# (no command arg) --> normal debug build for development
else
CMD="$SETUP $FLAGS HYBRID=0 build_ext --inplace --debug $@"
fi
if [ "$CMD" != "" ]; then
echo $CMD
$CMD
fi
if [ "$OTHERCMD" != "" ]; then
echo $OTHERCMD
$OTHERCMD
fi

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
update.log

View File

@@ -1,3 +0,0 @@
These sub directories contain add-on modules that are not part of the
core wxPython, either because of licensing issues, optional code in
wxWindows, contrib code in wxWindows, or whatever.

View File

@@ -1,211 +0,0 @@
#---------------------------------------------------------------------------
# Some helper and utility functions for ActiveX
t4 = " " * 4
t8 = " " * 8
def GetAXInfo(ax):
"""
Returns a printable summary of the TypeInfo from the ActiveX instance
passed in.
"""
def ProcessFuncX(f, out, name):
out.append(name)
out.append(t4 + "retType: %s" % f.retType.vt_type)
if f.params:
out.append(t4 + "params:")
for p in f.params:
out.append(t8 + p.name)
out.append(t8+t4+ "in:%s out:%s optional:%s type:%s" % (p.isIn, p.isOut, p.isOptional, p.vt_type))
out.append('')
def ProcessPropX(p, out):
out.append(GernerateAXModule.trimPropName(p.name))
out.append(t4+ "type:%s arg:%s canGet:%s canSet:%s" % (p.type.vt_type, p.arg.vt_type, p.canGet, p.canSet))
out.append('')
out = []
out.append("PROPERTIES")
out.append("-"*20)
for p in ax.GetAXProperties():
ProcessPropX(p, out)
out.append('\n\n')
out.append("METHODS")
out.append("-"*20)
for m in ax.GetAXMethods():
ProcessFuncX(m, out, GernerateAXModule.trimMethodName(m.name))
out.append('\n\n')
out.append("EVENTS")
out.append("-"*20)
for e in ax.GetAXEvents():
ProcessFuncX(e, out, GernerateAXModule.trimEventName(e.name))
out.append('\n\n')
return "\n".join(out)
class GernerateAXModule:
def __init__(self, ax, className, modulePath, moduleName=None, verbose=False):
"""
Make a Python module file with a class that has been specialized
for the AcitveX object.
ax An instance of the ActiveXWindow class
className The name to use for the new class
modulePath The path where the new module should be written to
moduleName The name of the .py file to create. If not given
then the className will be used.
"""
import os
if moduleName is None:
moduleName = className + '.py'
filename = os.path.join(modulePath, moduleName)
if verbose:
print "Creating module in:", filename
print " ProgID: ", ax.GetCLSID().GetProgIDString()
print " CLSID: ", ax.GetCLSID().GetCLSIDString()
print
self.mf = file(filename, "w")
self.WriteFileHeader(ax)
self.WriteEvents(ax)
self.WriteClassHeader(ax, className)
self.WriteMethods(ax)
self.WriteProperties(ax)
self.WriteDocs(ax)
self.mf.close()
del self.mf
def WriteFileHeader(self, ax):
self.write("# This module was generated by the wx.activex.GernerateAXModule class\n"
"# (See also the genaxmodule script.)\n")
self.write("import wx")
self.write("import wx.activex\n")
self.write("clsID = '%s'\nprogID = '%s'\n"
% (ax.GetCLSID().GetCLSIDString(), ax.GetCLSID().GetProgIDString()))
self.write("\n")
def WriteEvents(self, ax):
events = ax.GetAXEvents()
if events:
self.write("# Create eventTypes and event binders")
for e in events:
self.write("wxEVT_%s = wx.activex.RegisterActiveXEvent('%s')"
% (self.trimEventName(e.name), e.name))
self.write()
for e in events:
n = self.trimEventName(e.name)
self.write("EVT_%s = wx.PyEventBinder(wxEVT_%s, 1)" % (n,n))
self.write("\n")
def WriteClassHeader(self, ax, className):
self.write("# Derive a new class from ActiveXWindow")
self.write("""\
class %s(wx.activex.ActiveXWindow):
def __init__(self, parent, ID=-1, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=0, name='%s'):
wx.activex.ActiveXWindow.__init__(self, parent,
wx.activex.CLSID('%s'),
ID, pos, size, style, name)
""" % (className, className, ax.GetCLSID().GetCLSIDString()) )
def WriteMethods(self, ax):
methods = ax.GetAXMethods()
if methods:
self.write(t4, "# Methods exported by the ActiveX object")
for m in methods:
name = self.trimMethodName(m.name)
self.write(t4, "def %s(self%s):" % (name, self.getParameters(m, True)))
self.write(t8, "return self.CallAXMethod('%s'%s)" % (m.name, self.getParameters(m, False)))
self.write()
def WriteProperties(self, ax):
props = ax.GetAXProperties()
if props:
self.write(t4, "# Getters, Setters and properties")
for p in props:
getterName = setterName = "None"
if p.canGet:
getterName = "_get_" + p.name
self.write(t4, "def %s(self):" % getterName)
self.write(t8, "return self.GetAXProp('%s')" % p.name)
if p.canSet:
setterName = "_set_" + p.name
self.write(t4, "def %s(self, %s):" % (setterName, p.arg.name))
self.write(t8, "self.SetAXProp('%s', %s)" % (p.name, p.arg.name))
self.write(t4, "%s = property(%s, %s)" %
(self.trimPropName(p.name), getterName, setterName))
self.write()
def WriteDocs(self, ax):
self.write()
doc = GetAXInfo(ax)
for line in doc.split('\n'):
self.write("# ", line)
def write(self, *args):
for a in args:
self.mf.write(a)
self.mf.write("\n")
def trimEventName(name):
if name.startswith("On"):
name = name[2:]
return name
trimEventName = staticmethod(trimEventName)
def trimPropName(name):
#name = name[0].lower() + name[1:]
name = name.lower()
import keyword
if name in keyword.kwlist: name += '_'
return name
trimPropName = staticmethod(trimPropName)
def trimMethodName(name):
import keyword
if name in keyword.kwlist: name += '_'
return name
trimMethodName = staticmethod(trimMethodName)
def getParameters(self, m, withDefaults):
import keyword
st = ""
# collect the input parameters, if both isIn and isOut are
# False then assume it is an input paramater
params = []
for p in m.params:
if p.isIn or (not p.isIn and not p.isOut):
params.append(p)
# did we get any?
for p in params:
name = p.name
if name in keyword.kwlist: name += '_'
st += ", "
st += name
if withDefaults and p.isOptional:
st += '=None'
return st
#---------------------------------------------------------------------------

View File

@@ -1,16 +0,0 @@
// A bunch of %rename directives generated by BuildRenamers in config.py
// in order to remove the wx prefix from all global scope names.
#ifndef BUILDING_RENAMERS
%rename(ParamX) wxParamX;
%rename(FuncX) wxFuncX;
%rename(PropX) wxPropX;
%rename(ParamXArray) wxParamXArray;
%rename(FuncXArray) wxFuncXArray;
%rename(PropXArray) wxPropXArray;
%rename(ActiveXWindow) wxActiveXWindow;
%rename(ActiveXEvent) wxActiveXEvent;
%rename(IEHtmlWindowBase) wxIEHtmlWindowBase;
#endif

View File

@@ -1,2 +0,0 @@
EVT*

File diff suppressed because it is too large Load Diff

View File

@@ -1,670 +0,0 @@
# This file was created automatically by SWIG 1.3.27.
# Don't modify this file, modify the SWIG interface instead.
import _activex
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "this"):
if isinstance(value, class_type):
self.__dict__[name] = value.this
if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
del value.thisown
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static) or hasattr(self,name) or (name == "thisown"):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError,name
import types
try:
_object = types.ObjectType
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
del types
def _swig_setattr_nondynamic_method(set):
def set_attr(self,name,value):
if hasattr(self,name) or (name in ("this", "thisown")):
set(self,name,value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
return set_attr
import _core
wx = _core
__docfilter__ = wx.__DocFilter(globals())
#---------------------------------------------------------------------------
class CLSID(object):
"""
This class wraps the Windows CLSID structure and is used to
specify the class of the ActiveX object that is to be created. A
CLSID can be constructed from either a ProgID string, (such as
'WordPad.Document.1') or a classID string, (such as
'{CA8A9783-280D-11CF-A24D-444553540000}').
"""
def __repr__(self):
return "<%s.%s; proxy of C++ CLSID instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
__init__(self, String id) -> CLSID
This class wraps the Windows CLSID structure and is used to
specify the class of the ActiveX object that is to be created. A
CLSID can be constructed from either a ProgID string, (such as
'WordPad.Document.1') or a classID string, (such as
'{CA8A9783-280D-11CF-A24D-444553540000}').
"""
newobj = _activex.new_CLSID(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_activex.delete_CLSID):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def GetCLSIDString(*args, **kwargs):
"""GetCLSIDString(self) -> String"""
return _activex.CLSID_GetCLSIDString(*args, **kwargs)
def GetProgIDString(*args, **kwargs):
"""GetProgIDString(self) -> String"""
return _activex.CLSID_GetProgIDString(*args, **kwargs)
def __str__(self): return self.GetCLSIDString()
class CLSIDPtr(CLSID):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = CLSID
_activex.CLSID_swigregister(CLSIDPtr)
#---------------------------------------------------------------------------
class ParamX(object):
"""Proxy of C++ ParamX class"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxParamX instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
flags = property(_activex.ParamX_flags_get)
isPtr = property(_activex.ParamX_isPtr_get)
isSafeArray = property(_activex.ParamX_isSafeArray_get)
isOptional = property(_activex.ParamX_isOptional_get)
vt = property(_activex.ParamX_vt_get)
name = property(_activex.ParamX_name_get)
vt_type = property(_activex.ParamX_vt_type_get)
isIn = property(_activex.ParamX_IsIn)
isOut = property(_activex.ParamX_IsOut)
isRetVal = property(_activex.ParamX_IsRetVal)
class ParamXPtr(ParamX):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = ParamX
_activex.ParamX_swigregister(ParamXPtr)
class FuncX(object):
"""Proxy of C++ FuncX class"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxFuncX instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
name = property(_activex.FuncX_name_get)
memid = property(_activex.FuncX_memid_get)
hasOut = property(_activex.FuncX_hasOut_get)
retType = property(_activex.FuncX_retType_get)
params = property(_activex.FuncX_params_get)
class FuncXPtr(FuncX):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = FuncX
_activex.FuncX_swigregister(FuncXPtr)
class PropX(object):
"""Proxy of C++ PropX class"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxPropX instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
name = property(_activex.PropX_name_get)
memid = property(_activex.PropX_memid_get)
type = property(_activex.PropX_type_get)
arg = property(_activex.PropX_arg_get)
putByRef = property(_activex.PropX_putByRef_get)
canGet = property(_activex.PropX_CanGet)
canSet = property(_activex.PropX_CanSet)
class PropXPtr(PropX):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = PropX
_activex.PropX_swigregister(PropXPtr)
class ParamXArray(object):
"""Proxy of C++ ParamXArray class"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxParamXArray instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __nonzero__(*args, **kwargs):
"""__nonzero__(self) -> bool"""
return _activex.ParamXArray___nonzero__(*args, **kwargs)
def __len__(*args, **kwargs):
"""__len__(self) -> int"""
return _activex.ParamXArray___len__(*args, **kwargs)
def __getitem__(*args, **kwargs):
"""__getitem__(self, int idx) -> ParamX"""
return _activex.ParamXArray___getitem__(*args, **kwargs)
class ParamXArrayPtr(ParamXArray):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = ParamXArray
_activex.ParamXArray_swigregister(ParamXArrayPtr)
class FuncXArray(object):
"""Proxy of C++ FuncXArray class"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxFuncXArray instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __nonzero__(*args, **kwargs):
"""__nonzero__(self) -> bool"""
return _activex.FuncXArray___nonzero__(*args, **kwargs)
def __len__(*args, **kwargs):
"""__len__(self) -> int"""
return _activex.FuncXArray___len__(*args, **kwargs)
def __getitem__(*args, **kwargs):
"""__getitem__(self, int idx) -> FuncX"""
return _activex.FuncXArray___getitem__(*args, **kwargs)
class FuncXArrayPtr(FuncXArray):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = FuncXArray
_activex.FuncXArray_swigregister(FuncXArrayPtr)
class PropXArray(object):
"""Proxy of C++ PropXArray class"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxPropXArray instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __nonzero__(*args, **kwargs):
"""__nonzero__(self) -> bool"""
return _activex.PropXArray___nonzero__(*args, **kwargs)
def __len__(*args, **kwargs):
"""__len__(self) -> int"""
return _activex.PropXArray___len__(*args, **kwargs)
def __getitem__(*args, **kwargs):
"""__getitem__(self, int idx) -> PropX"""
return _activex.PropXArray___getitem__(*args, **kwargs)
class PropXArrayPtr(PropXArray):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = PropXArray
_activex.PropXArray_swigregister(PropXArrayPtr)
#---------------------------------------------------------------------------
class ActiveXWindow(_core.Window):
"""
ActiveXWindow derives from wxWindow and the constructor accepts a
CLSID for the ActiveX Control that should be created. The
ActiveXWindow class simply adds methods that allow you to query
some of the TypeInfo exposed by the ActiveX object, and also to
get/set properties or call methods by name. The Python
implementation automatically handles converting parameters and
return values to/from the types expected by the ActiveX code as
specified by the TypeInfo.
"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxActiveXWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
__init__(self, Window parent, CLSID clsId, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=0,
String name=PanelNameStr) -> ActiveXWindow
Creates an ActiveX control from the clsID given and makes it act
as much like a regular wx.Window as possible.
"""
newobj = _activex.new_ActiveXWindow(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
self._setOORInfo(self)
def GetCLSID(*args, **kwargs):
"""
GetCLSID(self) -> CLSID
Return the CLSID used to construct this ActiveX window
"""
return _activex.ActiveXWindow_GetCLSID(*args, **kwargs)
def GetAXEventCount(*args, **kwargs):
"""
GetAXEventCount(self) -> int
Number of events defined for this control
"""
return _activex.ActiveXWindow_GetAXEventCount(*args, **kwargs)
def GetAXEventDesc(*args, **kwargs):
"""
GetAXEventDesc(self, int idx) -> FuncX
Returns event description by index
"""
return _activex.ActiveXWindow_GetAXEventDesc(*args, **kwargs)
def GetAXPropCount(*args, **kwargs):
"""
GetAXPropCount(self) -> int
Number of properties defined for this control
"""
return _activex.ActiveXWindow_GetAXPropCount(*args, **kwargs)
def GetAXPropDesc(*args):
"""
GetAXPropDesc(self, int idx) -> PropX
GetAXPropDesc(self, String name) -> PropX
"""
return _activex.ActiveXWindow_GetAXPropDesc(*args)
def GetAXMethodCount(*args, **kwargs):
"""
GetAXMethodCount(self) -> int
Number of methods defined for this control
"""
return _activex.ActiveXWindow_GetAXMethodCount(*args, **kwargs)
def GetAXMethodDesc(*args):
"""
GetAXMethodDesc(self, int idx) -> FuncX
GetAXMethodDesc(self, String name) -> FuncX
"""
return _activex.ActiveXWindow_GetAXMethodDesc(*args)
def GetAXEvents(*args, **kwargs):
"""
GetAXEvents(self) -> FuncXArray
Returns a sequence of FuncX objects describing the events
available for this ActiveX object.
"""
return _activex.ActiveXWindow_GetAXEvents(*args, **kwargs)
def GetAXMethods(*args, **kwargs):
"""
GetAXMethods(self) -> FuncXArray
Returns a sequence of FuncX objects describing the methods
available for this ActiveX object.
"""
return _activex.ActiveXWindow_GetAXMethods(*args, **kwargs)
def GetAXProperties(*args, **kwargs):
"""
GetAXProperties(self) -> PropXArray
Returns a sequence of PropX objects describing the properties
available for this ActiveX object.
"""
return _activex.ActiveXWindow_GetAXProperties(*args, **kwargs)
def SetAXProp(*args, **kwargs):
"""
SetAXProp(self, String name, PyObject value)
Set a property of the ActiveX object by name.
"""
return _activex.ActiveXWindow_SetAXProp(*args, **kwargs)
def GetAXProp(*args, **kwargs):
"""
GetAXProp(self, String name) -> PyObject
Get the value of an ActiveX property by name.
"""
return _activex.ActiveXWindow_GetAXProp(*args, **kwargs)
def _CallAXMethod(*args):
"""
_CallAXMethod(self, String name, PyObject args) -> PyObject
The implementation for CallMethod. Calls an ActiveX method, by
name passing the parameters given in args.
"""
return _activex.ActiveXWindow__CallAXMethod(*args)
def CallAXMethod(self, name, *args):
"""
Front-end for _CallMethod. Simply passes all positional args
after the name as a single tuple to _CallMethod.
"""
return self._CallAXMethod(name, args)
class ActiveXWindowPtr(ActiveXWindow):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = ActiveXWindow
_activex.ActiveXWindow_swigregister(ActiveXWindowPtr)
#---------------------------------------------------------------------------
def RegisterActiveXEvent(*args, **kwargs):
"""
RegisterActiveXEvent(String eventName) -> wxEventType
Creates a standard wx event ID for the given eventName.
"""
return _activex.RegisterActiveXEvent(*args, **kwargs)
class ActiveXEvent(_core.CommandEvent):
"""
An instance of ActiveXEvent is sent to the handler for all bound
ActiveX events. Any event parameters from the ActiveX cntrol are
turned into attributes of the Python proxy for this event object.
Additionally, there is a property called eventName that will
return (surprisingly <wink>) the name of the ActiveX event.
"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxActiveXEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
eventName = property(_activex.ActiveXEvent_EventName)
def _preCallInit(*args, **kwargs):
"""_preCallInit(self, PyObject pyself)"""
return _activex.ActiveXEvent__preCallInit(*args, **kwargs)
def _postCallCleanup(*args, **kwargs):
"""_postCallCleanup(self, PyObject pyself)"""
return _activex.ActiveXEvent__postCallCleanup(*args, **kwargs)
class ActiveXEventPtr(ActiveXEvent):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = ActiveXEvent
_activex.ActiveXEvent_swigregister(ActiveXEventPtr)
#---------------------------------------------------------------------------
class IEHtmlWindowBase(ActiveXWindow):
def __repr__(self):
return "<%s.%s; proxy of C++ wxIEHtmlWindowBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
newobj = _activex.new_IEHtmlWindowBase(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
self._setOORInfo(self)
def SetCharset(*args, **kwargs): return _activex.IEHtmlWindowBase_SetCharset(*args, **kwargs)
def LoadString(*args, **kwargs): return _activex.IEHtmlWindowBase_LoadString(*args, **kwargs)
def LoadStream(*args, **kwargs): return _activex.IEHtmlWindowBase_LoadStream(*args, **kwargs)
def GetStringSelection(*args, **kwargs): return _activex.IEHtmlWindowBase_GetStringSelection(*args, **kwargs)
def GetText(*args, **kwargs): return _activex.IEHtmlWindowBase_GetText(*args, **kwargs)
class IEHtmlWindowBasePtr(IEHtmlWindowBase):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = IEHtmlWindowBase
_activex.IEHtmlWindowBase_swigregister(IEHtmlWindowBasePtr)
#---------------------------------------------------------------------------
# Some helper and utility functions for ActiveX
t4 = " " * 4
t8 = " " * 8
def GetAXInfo(ax):
"""
Returns a printable summary of the TypeInfo from the ActiveX instance
passed in.
"""
def ProcessFuncX(f, out, name):
out.append(name)
out.append(t4 + "retType: %s" % f.retType.vt_type)
if f.params:
out.append(t4 + "params:")
for p in f.params:
out.append(t8 + p.name)
out.append(t8+t4+ "in:%s out:%s optional:%s type:%s" % (p.isIn, p.isOut, p.isOptional, p.vt_type))
out.append('')
def ProcessPropX(p, out):
out.append(GernerateAXModule.trimPropName(p.name))
out.append(t4+ "type:%s arg:%s canGet:%s canSet:%s" % (p.type.vt_type, p.arg.vt_type, p.canGet, p.canSet))
out.append('')
out = []
out.append("PROPERTIES")
out.append("-"*20)
for p in ax.GetAXProperties():
ProcessPropX(p, out)
out.append('\n\n')
out.append("METHODS")
out.append("-"*20)
for m in ax.GetAXMethods():
ProcessFuncX(m, out, GernerateAXModule.trimMethodName(m.name))
out.append('\n\n')
out.append("EVENTS")
out.append("-"*20)
for e in ax.GetAXEvents():
ProcessFuncX(e, out, GernerateAXModule.trimEventName(e.name))
out.append('\n\n')
return "\n".join(out)
class GernerateAXModule:
def __init__(self, ax, className, modulePath, moduleName=None, verbose=False):
"""
Make a Python module file with a class that has been specialized
for the AcitveX object.
ax An instance of the ActiveXWindow class
className The name to use for the new class
modulePath The path where the new module should be written to
moduleName The name of the .py file to create. If not given
then the className will be used.
"""
import os
if moduleName is None:
moduleName = className + '.py'
filename = os.path.join(modulePath, moduleName)
if verbose:
print "Creating module in:", filename
print " ProgID: ", ax.GetCLSID().GetProgIDString()
print " CLSID: ", ax.GetCLSID().GetCLSIDString()
print
self.mf = file(filename, "w")
self.WriteFileHeader(ax)
self.WriteEvents(ax)
self.WriteClassHeader(ax, className)
self.WriteMethods(ax)
self.WriteProperties(ax)
self.WriteDocs(ax)
self.mf.close()
del self.mf
def WriteFileHeader(self, ax):
self.write("# This module was generated by the wx.activex.GernerateAXModule class\n"
"# (See also the genaxmodule script.)\n")
self.write("import wx")
self.write("import wx.activex\n")
self.write("clsID = '%s'\nprogID = '%s'\n"
% (ax.GetCLSID().GetCLSIDString(), ax.GetCLSID().GetProgIDString()))
self.write("\n")
def WriteEvents(self, ax):
events = ax.GetAXEvents()
if events:
self.write("# Create eventTypes and event binders")
for e in events:
self.write("wxEVT_%s = wx.activex.RegisterActiveXEvent('%s')"
% (self.trimEventName(e.name), e.name))
self.write()
for e in events:
n = self.trimEventName(e.name)
self.write("EVT_%s = wx.PyEventBinder(wxEVT_%s, 1)" % (n,n))
self.write("\n")
def WriteClassHeader(self, ax, className):
self.write("# Derive a new class from ActiveXWindow")
self.write("""\
class %s(wx.activex.ActiveXWindow):
def __init__(self, parent, ID=-1, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=0, name='%s'):
wx.activex.ActiveXWindow.__init__(self, parent,
wx.activex.CLSID('%s'),
ID, pos, size, style, name)
""" % (className, className, ax.GetCLSID().GetCLSIDString()) )
def WriteMethods(self, ax):
methods = ax.GetAXMethods()
if methods:
self.write(t4, "# Methods exported by the ActiveX object")
for m in methods:
name = self.trimMethodName(m.name)
self.write(t4, "def %s(self%s):" % (name, self.getParameters(m, True)))
self.write(t8, "return self.CallAXMethod('%s'%s)" % (m.name, self.getParameters(m, False)))
self.write()
def WriteProperties(self, ax):
props = ax.GetAXProperties()
if props:
self.write(t4, "# Getters, Setters and properties")
for p in props:
getterName = setterName = "None"
if p.canGet:
getterName = "_get_" + p.name
self.write(t4, "def %s(self):" % getterName)
self.write(t8, "return self.GetAXProp('%s')" % p.name)
if p.canSet:
setterName = "_set_" + p.name
self.write(t4, "def %s(self, %s):" % (setterName, p.arg.name))
self.write(t8, "self.SetAXProp('%s', %s)" % (p.name, p.arg.name))
self.write(t4, "%s = property(%s, %s)" %
(self.trimPropName(p.name), getterName, setterName))
self.write()
def WriteDocs(self, ax):
self.write()
doc = GetAXInfo(ax)
for line in doc.split('\n'):
self.write("# ", line)
def write(self, *args):
for a in args:
self.mf.write(a)
self.mf.write("\n")
def trimEventName(name):
if name.startswith("On"):
name = name[2:]
return name
trimEventName = staticmethod(trimEventName)
def trimPropName(name):
#name = name[0].lower() + name[1:]
name = name.lower()
import keyword
if name in keyword.kwlist: name += '_'
return name
trimPropName = staticmethod(trimPropName)
def trimMethodName(name):
import keyword
if name in keyword.kwlist: name += '_'
return name
trimMethodName = staticmethod(trimMethodName)
def getParameters(self, m, withDefaults):
import keyword
st = ""
# collect the input parameters, if both isIn and isOut are
# False then assume it is an input paramater
params = []
for p in m.params:
if p.isIn or (not p.isIn and not p.isOut):
params.append(p)
# did we get any?
for p in params:
name = p.name
if name in keyword.kwlist: name += '_'
st += ", "
st += name
if withDefaults and p.isOptional:
st += '=None'
return st
#---------------------------------------------------------------------------

File diff suppressed because one or more lines are too long

View File

@@ -1,133 +0,0 @@
/*
wxActiveX Library Licence, Version 3
====================================
Copyright (C) 2003 Lindsay Mathieson [, ...]
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
wxActiveX LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public Licence as published by
the Free Software Foundation; either version 2 of the Licence, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public Licence for more details.
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxActiveX Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as
to the status of such modified files, you must delete this exception
notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
*/
// This module contains the declarations of the stream adapters and such that
// used to be in IEHtmlWin.cpp, so that they can be used independently in the
// wxPython wrappers...
#ifndef _IEHTMLSTREAM_H_
#define _IEHTMLSTREAM_H_
class IStreamAdaptorBase : public IStream
{
private:
DECLARE_OLE_UNKNOWN(IStreamAdaptorBase);
public:
string prepend;
IStreamAdaptorBase() {}
virtual ~IStreamAdaptorBase() {}
virtual int Read(char *buf, int cb) = 0;
// ISequentialStream
HRESULT STDMETHODCALLTYPE Read(void __RPC_FAR *pv, ULONG cb, ULONG __RPC_FAR *pcbRead);
HRESULT STDMETHODCALLTYPE Write(const void __RPC_FAR *pv, ULONG cb, ULONG __RPC_FAR *pcbWritten) {return E_NOTIMPL;}
// IStream
HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER __RPC_FAR *plibNewPosition) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE SetSize(ULARGE_INTEGER libNewSize) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE CopyTo(IStream __RPC_FAR *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER __RPC_FAR *pcbRead, ULARGE_INTEGER __RPC_FAR *pcbWritten) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE Commit(DWORD grfCommitFlags) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE Revert(void) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE LockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE UnlockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE Stat(STATSTG __RPC_FAR *pstatstg, DWORD grfStatFlag) {return E_NOTIMPL;}
HRESULT STDMETHODCALLTYPE Clone(IStream __RPC_FAR *__RPC_FAR *ppstm) {return E_NOTIMPL;}
};
class IStreamAdaptor : public IStreamAdaptorBase
{
private:
istream *m_is;
public:
IStreamAdaptor(istream *is);
~IStreamAdaptor();
int Read(char *buf, int cb);
};
class IwxStreamAdaptor : public IStreamAdaptorBase
{
private:
wxInputStream *m_is;
public:
IwxStreamAdaptor(wxInputStream *is);
~IwxStreamAdaptor();
int Read(char *buf, int cb);
};
class wxOwnedMemInputStream : public wxMemoryInputStream
{
public:
char *m_data;
wxOwnedMemInputStream(char *data, size_t len);
~wxOwnedMemInputStream();
};
wxAutoOleInterface<IHTMLTxtRange> wxieGetSelRange(IOleObject *oleObject);
#endif

View File

@@ -1,478 +0,0 @@
/*
wxActiveX Library Licence, Version 3
====================================
Copyright (C) 2003 Lindsay Mathieson [, ...]
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
wxActiveX LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public Licence as published by
the Free Software Foundation; either version 2 of the Licence, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public Licence for more details.
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxActiveX Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as
to the status of such modified files, you must delete this exception
notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
*/
#include "IEHtmlWin.h"
#include <wx/strconv.h>
#include <wx/string.h>
#include <wx/event.h>
#include <wx/listctrl.h>
#include <wx/mstream.h>
#include <oleidl.h>
#include <winerror.h>
#include <exdispid.h>
#include <exdisp.h>
#include <olectl.h>
#include <Mshtml.h>
#include <sstream>
#include <IEHtmlStream.h>
using namespace std;
//////////////////////////////////////////////////////////////////////
// Stream adapters and such
HRESULT STDMETHODCALLTYPE IStreamAdaptorBase::Read(void __RPC_FAR *pv, ULONG cb, ULONG __RPC_FAR *pcbRead)
{
if (prepend.size() > 0)
{
int n = wxMin(prepend.size(), cb);
prepend.copy((char *) pv, n);
prepend = prepend.substr(n);
if (pcbRead)
*pcbRead = n;
return S_OK;
};
int rc = Read((char *) pv, cb);
if (pcbRead)
*pcbRead = rc;
return S_OK;
};
DEFINE_OLE_TABLE(IStreamAdaptorBase)
OLE_IINTERFACE(IUnknown)
OLE_IINTERFACE(ISequentialStream)
OLE_IINTERFACE(IStream)
END_OLE_TABLE;
IStreamAdaptor::IStreamAdaptor(istream *is)
: IStreamAdaptorBase(), m_is(is)
{
wxASSERT(m_is != NULL);
}
IStreamAdaptor::~IStreamAdaptor()
{
delete m_is;
}
int IStreamAdaptor::Read(char *buf, int cb)
{
m_is->read(buf, cb);
return m_is->gcount();
}
IwxStreamAdaptor::IwxStreamAdaptor(wxInputStream *is)
: IStreamAdaptorBase(), m_is(is)
{
wxASSERT(m_is != NULL);
}
IwxStreamAdaptor::~IwxStreamAdaptor()
{
delete m_is;
}
// ISequentialStream
int IwxStreamAdaptor::Read(char *buf, int cb)
{
m_is->Read(buf, cb);
return m_is->LastRead();
};
wxOwnedMemInputStream::wxOwnedMemInputStream(char *data, size_t len)
: wxMemoryInputStream(data, len), m_data(data)
{}
wxOwnedMemInputStream::~wxOwnedMemInputStream()
{
free(m_data);
}
//////////////////////////////////////////////////////////////////////
BEGIN_EVENT_TABLE(wxIEHtmlWin, wxActiveX)
END_EVENT_TABLE()
static const CLSID CLSID_MozillaBrowser =
{ 0x1339B54C, 0x3453, 0x11D2,
{ 0x93, 0xB9, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 } };
//#define PROGID "Shell.Explorer"
#define PROGID CLSID_WebBrowser
//#define PROGID CLSID_MozillaBrowser
//#define PROGID CLSID_HTMLDocument
//#define PROGID "MSCAL.Calendar"
//#define PROGID ""
//#define PROGID "SoftwareFX.ChartFX.20"
wxIEHtmlWin::wxIEHtmlWin(wxWindow * parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name) :
wxActiveX(parent, PROGID, id, pos, size, style, name)
{
SetupBrowser();
}
wxIEHtmlWin::~wxIEHtmlWin()
{
}
void wxIEHtmlWin::SetupBrowser()
{
HRESULT hret;
// Get IWebBrowser2 Interface
hret = m_webBrowser.QueryInterface(IID_IWebBrowser2, m_ActiveX);
assert(SUCCEEDED(hret));
// web browser setup
m_webBrowser->put_MenuBar(VARIANT_FALSE);
m_webBrowser->put_AddressBar(VARIANT_FALSE);
m_webBrowser->put_StatusBar(VARIANT_FALSE);
m_webBrowser->put_ToolBar(VARIANT_FALSE);
m_webBrowser->put_RegisterAsBrowser(VARIANT_TRUE);
m_webBrowser->put_RegisterAsDropTarget(VARIANT_TRUE);
m_webBrowser->Navigate( L"about:blank", NULL, NULL, NULL, NULL );
}
void wxIEHtmlWin::SetEditMode(bool seton)
{
m_bAmbientUserMode = ! seton;
AmbientPropertyChanged(DISPID_AMBIENT_USERMODE);
};
bool wxIEHtmlWin::GetEditMode()
{
return ! m_bAmbientUserMode;
};
void wxIEHtmlWin::SetCharset(const wxString& charset)
{
// HTML Document ?
IDispatch *pDisp = NULL;
HRESULT hret = m_webBrowser->get_Document(&pDisp);
wxAutoOleInterface<IDispatch> disp(pDisp);
if (disp.Ok())
{
wxAutoOleInterface<IHTMLDocument2> doc(IID_IHTMLDocument2, disp);
if (doc.Ok())
doc->put_charset((BSTR) (const wchar_t *) charset.wc_str(wxConvUTF8));
//doc->put_charset((BSTR) wxConvUTF8.cMB2WC(charset).data());
};
};
void wxIEHtmlWin::LoadUrl(const wxString& url)
{
VARIANTARG navFlag, targetFrame, postData, headers;
navFlag.vt = VT_EMPTY;
navFlag.vt = VT_I2;
navFlag.iVal = navNoReadFromCache;
targetFrame.vt = VT_EMPTY;
postData.vt = VT_EMPTY;
headers.vt = VT_EMPTY;
HRESULT hret = 0;
hret = m_webBrowser->Navigate((BSTR) (const wchar_t *) url.wc_str(wxConvUTF8),
&navFlag, &targetFrame, &postData, &headers);
};
bool wxIEHtmlWin::LoadString(const wxString& html)
{
char *data = NULL;
size_t len = html.length();
#ifdef UNICODE
len *= 2;
#endif
data = (char *) malloc(len);
memcpy(data, html.c_str(), len);
return LoadStream(new wxOwnedMemInputStream(data, len));
};
bool wxIEHtmlWin::LoadStream(IStreamAdaptorBase *pstrm)
{
// need to prepend this as poxy MSHTML will not recognise a HTML comment
// as starting a html document and treats it as plain text
// Does nayone know how to force it to html mode ?
pstrm->prepend = "<html>";
// strip leading whitespace as it can confuse MSHTML
wxAutoOleInterface<IStream> strm(pstrm);
// Document Interface
IDispatch *pDisp = NULL;
HRESULT hret = m_webBrowser->get_Document(&pDisp);
if (! pDisp)
return false;
wxAutoOleInterface<IDispatch> disp(pDisp);
// get IPersistStreamInit
wxAutoOleInterface<IPersistStreamInit>
pPersistStreamInit(IID_IPersistStreamInit, disp);
if (pPersistStreamInit.Ok())
{
HRESULT hr = pPersistStreamInit->InitNew();
if (SUCCEEDED(hr))
hr = pPersistStreamInit->Load(strm);
return SUCCEEDED(hr);
}
else
return false;
};
bool wxIEHtmlWin::LoadStream(istream *is)
{
// wrap reference around stream
IStreamAdaptor *pstrm = new IStreamAdaptor(is);
pstrm->AddRef();
return LoadStream(pstrm);
};
bool wxIEHtmlWin::LoadStream(wxInputStream *is)
{
// wrap reference around stream
IwxStreamAdaptor *pstrm = new IwxStreamAdaptor(is);
pstrm->AddRef();
return LoadStream(pstrm);
};
bool wxIEHtmlWin::GoBack()
{
HRESULT hret = 0;
hret = m_webBrowser->GoBack();
return hret == S_OK;
}
bool wxIEHtmlWin::GoForward()
{
HRESULT hret = 0;
hret = m_webBrowser->GoForward();
return hret == S_OK;
}
bool wxIEHtmlWin::GoHome()
{
try
{
CallMethod(_T("GoHome"));
return true;
}
catch(exception&)
{
return false;
};
}
bool wxIEHtmlWin::GoSearch()
{
HRESULT hret = 0;
hret = m_webBrowser->GoSearch();
return hret == S_OK;
}
bool wxIEHtmlWin::Refresh(wxIEHtmlRefreshLevel level)
{
VARIANTARG levelArg;
HRESULT hret = 0;
levelArg.vt = VT_I2;
levelArg.iVal = level;
hret = m_webBrowser->Refresh2(&levelArg);
return hret == S_OK;
}
bool wxIEHtmlWin::Stop()
{
HRESULT hret = 0;
hret = m_webBrowser->Stop();
return hret == S_OK;
}
///////////////////////////////////////////////////////////////////////////////
static wxAutoOleInterface<IHTMLSelectionObject> GetSelObject(IOleObject *oleObject)
{
// Query for IWebBrowser interface
wxAutoOleInterface<IWebBrowser2> wb(IID_IWebBrowser2, oleObject);
if (! wb.Ok())
return wxAutoOleInterface<IHTMLSelectionObject>();
IDispatch *iDisp = NULL;
HRESULT hr = wb->get_Document(&iDisp);
if (hr != S_OK)
return wxAutoOleInterface<IHTMLSelectionObject>();
// Query for Document Interface
wxAutoOleInterface<IHTMLDocument2> hd(IID_IHTMLDocument2, iDisp);
iDisp->Release();
if (! hd.Ok())
return wxAutoOleInterface<IHTMLSelectionObject>();
IHTMLSelectionObject *_so = NULL;
hr = hd->get_selection(&_so);
// take ownership of selection object
wxAutoOleInterface<IHTMLSelectionObject> so(_so);
return so;
};
wxAutoOleInterface<IHTMLTxtRange> wxieGetSelRange(IOleObject *oleObject)
{
wxAutoOleInterface<IHTMLTxtRange> tr;
wxAutoOleInterface<IHTMLSelectionObject> so(GetSelObject(oleObject));
if (! so)
return tr;
IDispatch *iDisp = NULL;
HRESULT hr = so->createRange(&iDisp);
if (hr != S_OK)
return tr;
// Query for IHTMLTxtRange interface
tr.QueryInterface(IID_IHTMLTxtRange, iDisp);
iDisp->Release();
return tr;
};
wxString wxIEHtmlWin::GetStringSelection(bool asHTML)
{
wxAutoOleInterface<IHTMLTxtRange> tr(wxieGetSelRange(m_oleObject));
if (! tr)
return wxEmptyString;
BSTR text = NULL;
HRESULT hr = E_FAIL;
if (asHTML)
hr = tr->get_htmlText(&text);
else
hr = tr->get_text(&text);
if (hr != S_OK)
return wxEmptyString;
wxString s = text;
SysFreeString(text);
return s;
};
wxString wxIEHtmlWin::GetText(bool asHTML)
{
if (! m_webBrowser.Ok())
return wxEmptyString;
// get document dispatch interface
IDispatch *iDisp = NULL;
HRESULT hr = m_webBrowser->get_Document(&iDisp);
if (hr != S_OK)
return wxEmptyString;
// Query for Document Interface
wxAutoOleInterface<IHTMLDocument2> hd(IID_IHTMLDocument2, iDisp);
iDisp->Release();
if (! hd.Ok())
return wxEmptyString;
// get body element
IHTMLElement *_body = NULL;
hd->get_body(&_body);
if (! _body)
return wxEmptyString;
wxAutoOleInterface<IHTMLElement> body(_body);
// get inner text
BSTR text = NULL;
hr = E_FAIL;
if (asHTML)
hr = body->get_innerHTML(&text);
else
hr = body->get_innerText(&text);
if (hr != S_OK)
return wxEmptyString;
wxString s = text;
SysFreeString(text);
return s;
};

View File

@@ -1,120 +0,0 @@
/*
wxActiveX Library Licence, Version 3
====================================
Copyright (C) 2003 Lindsay Mathieson [, ...]
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
wxActiveX LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public Licence as published by
the Free Software Foundation; either version 2 of the Licence, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public Licence for more details.
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxActiveX Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as
to the status of such modified files, you must delete this exception
notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
*/
/*! \file iehtmlwin.h
\brief implements wxIEHtmlWin window class
*/
#ifndef _IEHTMLWIN_H_
#define _IEHTMLWIN_H_
#pragma warning( disable : 4101 4786)
#pragma warning( disable : 4786)
#include <wx/setup.h>
#include <wx/wx.h>
#include <exdisp.h>
#include <iostream>
using namespace std;
#include "wxactivex.h"
enum wxIEHtmlRefreshLevel
{
wxIEHTML_REFRESH_NORMAL = 0,
wxIEHTML_REFRESH_IFEXPIRED = 1,
wxIEHTML_REFRESH_CONTINUE = 2,
wxIEHTML_REFRESH_COMPLETELY = 3
};
class IStreamAdaptorBase;
class wxIEHtmlWin : public wxActiveX
{
public:
wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
virtual ~wxIEHtmlWin();
void LoadUrl(const wxString& url);
bool LoadString(const wxString& html);
bool LoadStream(istream *strm);
bool LoadStream(wxInputStream *is);
void SetCharset(const wxString& charset);
void SetEditMode(bool seton);
bool GetEditMode();
wxString GetStringSelection(bool asHTML = false);
wxString GetText(bool asHTML = false);
bool GoBack();
bool GoForward();
bool GoHome();
bool GoSearch();
bool Refresh(wxIEHtmlRefreshLevel level);
bool Stop();
DECLARE_EVENT_TABLE();
protected:
void SetupBrowser();
bool LoadStream(IStreamAdaptorBase *pstrm);
wxAutoOleInterface<IWebBrowser2> m_webBrowser;
};
#endif /* _IEHTMLWIN_H_ */

View File

@@ -1,6 +0,0 @@
The contents of this dir are from the 9-Jan-2004 version of wxie.zip
downloaded from:
http://members.optusnet.com.au/~blackpaw1/wxactivex.html

View File

@@ -1,205 +0,0 @@
# Doxyfile 1.3-rc2
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = wxActiveX
PROJECT_NUMBER =
OUTPUT_DIRECTORY =
OUTPUT_LANGUAGE = English
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
SHORT_NAMES = NO
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = YES
INHERIT_DOCS = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
DISTRIBUTE_GROUP_DOC = YES
TAB_SIZE = 8
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ALIASES =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_FORMAT = "$file($line): $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = .\wxactivex.h .\iehtmlwin.h
FILE_PATTERNS = *.cpp \
*.c \
*.h \
*.cxx \
*.idl
RECURSIVE = NO
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = NO
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 4
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = doxydoc
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = no
CHM_FILE = wxactivex.chm
HHC_LOCATION = hhc.exe
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = YES
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_SCHEMA =
XML_DTD =
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME = search.cgi
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH = /usr/local/bin/
EXT_DOC_PATHS =

View File

@@ -1,53 +0,0 @@
wxActiveX Library Licence, Version 3
====================================
Copyright (C) 2003 Lindsay Mathieson [, ...]
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
wxActiveX LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public Licence as published by
the Free Software Foundation; either version 2 of the Licence, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public Licence for more details.
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxActiveX Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as
to the status of such modified files, you must delete this exception
notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.

View File

@@ -1,24 +0,0 @@
CC = gcc
PROGRAM = wxIE
CFLAGS = -I/m/snowball/icicle/gswd/devenv/include -D__WXMOTIF__
LFLAGS = -L/m/snowball/icicle/devenv/lib
# implementation
.SUFFIXES: .o .cpp
SOURCES:sh= /bin/ls *.cpp
OBJECTS = $(SOURCES:.cpp=.o)
.cpp.o :
$(CC) -c $(CFLAGS) `wx-config --cflags` -o $@ $<
$(PROGRAM): $(OBJECTS)
$(CC) -o $(PROGRAM) $(OBJECTS) $(LFLAGS) `wx-config --libs`
clean:
rm -f *.o $(PROGRAM)

View File

@@ -1,24 +0,0 @@
CC = gcc
PROGRAM = wxIE
CFLAGS = -I/m/snowball/icicle/gswd/devenv/include -D__WXGTK__
LFLAGS = -L/m/snowball/icicle/devenv/lib
# implementation
.SUFFIXES: .o .cpp
SOURCES:sh= /bin/ls *.cpp
OBJECTS = $(SOURCES:.cpp=.o)
.cpp.o :
$(CC) -c $(CFLAGS) `wx-config --cflags` -o $@ $<
$(PROGRAM): $(OBJECTS)
$(CC) -o $(PROGRAM) $(OBJECTS) $(LFLAGS) `wx-config --libs`
clean:
rm -f *.o $(PROGRAM)

View File

@@ -1,24 +0,0 @@
CC = gcc
PROGRAM = wxIE
CFLAGS = -I/m/snowball/icicle/gswd/devenv/include -D__WXMOTIF__
LFLAGS = -L/m/snowball/icicle/devenv/lib
# implementation
.SUFFIXES: .o .cpp
SOURCES:sh= /bin/ls *.cpp
OBJECTS = $(SOURCES:.cpp=.o)
.cpp.o :
$(CC) -c $(CFLAGS) `wx-config --cflags` -o $@ $<
$(PROGRAM): $(OBJECTS)
$(CC) -o $(PROGRAM) $(OBJECTS) $(LFLAGS) `wx-config --libs`
clean:
rm -f *.o $(PROGRAM)

View File

@@ -1,2 +0,0 @@
Flash needs the following GUID for its event interface
{D27CDB6D-AE6D-11CF-96B8-444553540000}

View File

@@ -1,149 +0,0 @@
Lindsay Mathieson
Email : <lmathieson@optusnet.com.au>
This is prelimanary stuff - the controls need extra methods and events etc,
feel free to email with suggestions &/or patches.
Tested with wxWindows 2.3.2.
Built with MS Visual C++ 6.0 & DevStudio
Minor use of templates and STL
-----------------------------------------------------------
This sample illustrates using wxActiveX and wxIEHtmlWin too:
1. Host an arbitrary ActiveX control
1.1 - Capture and logging of all events from control
2. Specifically host the MSHTML Control
wxActiveX:
==========
wxActiveX is used to host and siplay any activeX control, all the wxWindows developer
needs to know is either the ProgID or CLSID of the control in question.
Derived From:
- wxWindow
Include Files:
- wxactivex.h
Source Files:
- wxactivex.cpp
Event Handling:
---------------
- EVT_ACTIVEX(id, eventName, handler) (handler = void OnActiveX(wxActiveXEvent& event))
- EVT_ACTIVEX_DISPID(id, eventDispId, handler) (handler = void OnActiveX(wxActiveXEvent& event))
class wxActiveXEvent : public wxNotifyEvent
wxString EventName();
int ParamCount() const;
wxString ParamType(int idx);
wxString ParamName(int idx);
wxVariant operator[] (int idx) const; // parameter by index
wxVariant& operator[] (int idx);
wxVariant operator[] (wxString name) const; // named parameters
wxVariant& operator[] (wxString name);
Members:
--------
wxActiveX::wxActiveX(wxWindow * parent, REFCLSID clsid, wxWindowID id = -1);
- Creates a activeX control identified by clsid
e.g
wxFrame *frame = new wxFrame(this, -1, "test");
wxActiveX *X = new wxActiveX(frame, CLSID_WebBrowser);
wxActiveX::wxActiveX(wxWindow * parent, wxString progId, wxWindowID id = -1);
- Creates a activeX control identified by progId
e.g.
wxFrame *frame = new wxFrame(this, -1, "test");
wxActiveX *X = new wxActiveX(frame, "MSCAL.Calendar");
wxActiveX::~wxActiveX();
- Destroys the control
- disconnects all connection points
- int GetEventCount() const;
Number of events generated by control
- const FuncX& GetEvent(int idx) const;
Names, Params and Typeinfo for events
HRESULT wxActiveX::ConnectAdvise(REFIID riid, IUnknown *eventSink);
- Connects a event sink. Connections are automaticlly diconnected in the destructor
e.g.
FS_DWebBrowserEvents2 *events = new FS_DWebBrowserEvents2(iecontrol);
hret = iecontrol->ConnectAdvise(DIID_DWebBrowserEvents2, events);
if (! SUCCEEDED(hret))
delete events;
Sample Events:
--------------
EVT_ACTIVEX(ID_MSHTML, "BeforeNavigate2", OnMSHTMLBeforeNavigate2X)
void wxIEFrame::OnMSHTMLBeforeNavigate2X(wxActiveXEvent& event)
{
wxString url = event["Url"];
int rc = wxMessageBox(url, "Allow open url ?", wxYES_NO);
if (rc != wxYES)
event["Cancel"] = true;
};
wxIEHtmlWin:
============
wxIEHtmlWin is a specialisation of the wxActiveX control for hosting the MSHTML control.
Derived From:
- wxActiveX
- wxWindow
Event Handling:
---------------
- see wxActiveX
Members:
--------
wxIEHtmlWin::wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1);
- Constructs and initialises the MSHTML control
- LoadUrl("about:blank") is called
wxIEHtmlWin::~wxIEHtmlWin();
- destroys the control
void wxIEHtmlWin::LoadUrl(const wxString&);
- Attempts to browse to the url, the control uses its internal (MS)
network streams
bool wxIEHtmlWin::LoadString(wxString html);
- Load the passed HTML string
bool wxIEHtmlWin::LoadStream(istream *strm);
- load the passed HTML stream. The control takes ownership of
the pointer, deleting when finished.
bool wxIEHtmlWin::LoadStream(wxInputStream *is);
- load the passed HTML stream. The control takes ownership of
the pointer, deleting when finished.
void wxIEHtmlWin::SetCharset(wxString charset);
- Sets the charset of the loaded document
void wxIEHtmlWin::SetEditMode(bool seton);
- Sets edit mode.
NOTE: This does work, but is bare bones - we need more events exposed before
this is usable as an HTML editor.
bool wxIEHtmlWin::GetEditMode();
- Returns the edit mode setting
wxString wxIEHtmlWin::GetStringSelection(bool asHTML = false);
- Returns the currently selected text (plain or HTML text)
wxString GetText(bool asHTML = false);
- Returns the body text (plain or HTML text)
Lindsay Mathieson
Email : <lmathieson@optusnet.com.au>

View File

@@ -1,70 +0,0 @@
/*
wxActiveX Library Licence, Version 3
====================================
Copyright (C) 2003 Lindsay Mathieson [, ...]
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
wxActiveX LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public Licence as published by
the Free Software Foundation; either version 2 of the Licence, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public Licence for more details.
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxActiveX Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as
to the status of such modified files, you must delete this exception
notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
*/
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by wxIE.rc
//
#define DUMMY 4
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -1,284 +0,0 @@
/*
wxActiveX Library Licence, Version 3
====================================
Copyright (C) 2003 Lindsay Mathieson [, ...]
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
wxActiveX LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public Licence as published by
the Free Software Foundation; either version 2 of the Licence, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public Licence for more details.
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxActiveX Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as
to the status of such modified files, you must delete this exception
notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
*/
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx/wx.h".
#if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "wx/wx.h"
#endif
#include "wx/wxprec.h"
#include "wx/filedlg.h"
#include "wx/textdlg.h"
#include "wxActiveXFrame.h"
#include <sstream>
using namespace std;
#include "wx/splitter.h"
#include "wx/textctrl.h"
#include "wx/clipbrd.h"
#include <wx/msgdlg.h>
enum
{
// menu items
MENU_GETTYPEINFO = 700,
MENU_INVOKEMETHOD,
MENU_TEST
};
BEGIN_EVENT_TABLE(wxActiveXFrame, wxFrame)
EVT_MENU(MENU_GETTYPEINFO, wxActiveXFrame::OnGetTypeInfo)
EVT_MENU(MENU_INVOKEMETHOD, wxActiveXFrame::OnInvokeMethod)
EVT_MENU(MENU_TEST, wxActiveXFrame::OnTest)
END_EVENT_TABLE()
wxActiveXFrame::wxActiveXFrame(wxWindow *parent, wxString title) :
wxFrame(parent, -1, title)
{
// create a menu bar
wxMenu *xMenu = new wxMenu("", wxMENU_TEAROFF);
xMenu->Append(MENU_GETTYPEINFO, "Get Type Info", "");
xMenu->Append(MENU_INVOKEMETHOD, "Invoke Method (no params)", "");
xMenu->Append(MENU_TEST, "Test", "For debugging purposes");
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar();
menuBar->Append(xMenu, "&ActiveX");
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
wxSplitterWindow *sp = new wxSplitterWindow(this);
X = new wxActiveX(sp, title, 101);
textLog = new wxTextCtrl(sp, -1, "", wxPoint(0,0), wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY);
sp->SplitHorizontally(X, textLog, 0);
// conenct all events
for (int i = 0; i < X->GetEventCount(); i++)
{
const wxActiveX::FuncX& func = X->GetEventDesc(i);
const wxEventType& ev = RegisterActiveXEvent((DISPID) func.memid);
Connect(101, ev, (wxObjectEventFunction) OnActiveXEvent);
};
}
wxString VarTypeAsString(VARTYPE vt)
{
#define VT(vtype, desc) case vtype : return desc
if (vt & VT_BYREF)
vt -= VT_BYREF;
if (vt & VT_ARRAY)
vt -= VT_ARRAY;
switch (vt)
{
VT(VT_SAFEARRAY, "SafeArray");
VT(VT_EMPTY, "empty");
VT(VT_NULL, "null");
VT(VT_UI1, "byte");
VT(VT_I1, "char");
VT(VT_I2, "short");
VT(VT_I4, "long");
VT(VT_UI2, "unsigned short");
VT(VT_UI4, "unsigned long");
VT(VT_INT, "int");
VT(VT_UINT, "unsigned int");
VT(VT_R4, "real(4)");
VT(VT_R8, "real(8)");
VT(VT_CY, "Currency");
VT(VT_DATE, "wxDate");
VT(VT_BSTR, "wxString");
VT(VT_DISPATCH, "IDispatch");
VT(VT_ERROR, "SCode Error");
VT(VT_BOOL, "bool");
VT(VT_VARIANT, "wxVariant");
VT(VT_UNKNOWN, "IUknown");
VT(VT_VOID, "void");
VT(VT_PTR, "void *");
VT(VT_USERDEFINED, "*user defined*");
default:
{
wxString s;
s << "Unknown(" << vt << ")";
return s;
};
};
#undef VT
};
#define ENDL "\r\n"
void OutFunc(wxString& os, const wxActiveX::FuncX& func)
{
os << VarTypeAsString(func.retType.vt) << " " << func.name << "(";
for (unsigned int p = 0; p < func.params.size(); p++)
{
const wxActiveX::ParamX& param = func.params[p];
if (param.IsIn() && param.IsOut())
os << "[IN OUT] ";
else if (param.IsIn())
os << "[IN] ";
else if (param.IsIn())
os << "[OUT] ";
os << VarTypeAsString(param.vt) << " " << (param.isPtr ? "*" : "") << param.name;
if (p < func.params.size() - 1)
os << ", ";
};
os << ")" << ENDL;
};
void wxActiveXFrame::OnGetTypeInfo(wxCommandEvent& event)
{
wxString os;
int i =0;
os <<
"Props" << ENDL <<
"=====" << ENDL;
for (i = 0; i < X->GetPropCount(); i++)
{
wxActiveX::PropX prop = X->GetPropDesc(i);
os << VarTypeAsString(prop.type.vt) << " " << prop.name << "(";
if (prop.CanSet())
{
os << VarTypeAsString(prop.arg.vt);
};
os << ")" << ENDL;
};
os << ENDL;
os <<
"Events" << ENDL <<
"======" << ENDL;
for (i = 0; i < X->GetEventCount(); i++)
OutFunc(os, X->GetEventDesc(i));
os << ENDL;
os <<
"Methods" << ENDL <<
"=======" << ENDL;
for (i = 0; i < X->GetMethodCount(); i++)
OutFunc(os, X->GetMethodDesc(i));
os << ENDL;
if (wxTheClipboard->Open())
{
wxDataObjectSimple *wo = new wxTextDataObject(os);
wxTheClipboard->SetData(wo);
wxTheClipboard->Flush();
wxTheClipboard->Close();
};
wxMessageBox(os, "Type Info", wxOK, this);
};
void wxActiveXFrame::OnInvokeMethod(wxCommandEvent& event)
{
//wxTextEntryDialog dlg(this, "Method");
//if (dlg.ShowModal() == wxID_OK)
// X->CallMethod(dlg.GetValue());
};
void wxActiveXFrame::OnTest(wxCommandEvent& event)
{
// flash testing
wxVariant args[] = {0L, "http://www.macromedia.com/support/flash/ts/documents/java_script_comm/flash_to_javascript.swf"};
X->CallMethod("LoadMovie", args);
//X->Prop("Movie") = "http://www.macromedia.com/support/flash/ts/documents/java_script_comm/flash_to_javascript.swf";
// mc cal testing
//X->Prop("year") = 1964L;
//X->Prop("Value") = wxDateTime::Now();
// pdf testing
//wxVariant file = "C:\\WINNT\\wx2\\docs\\pdf\\dialoged.pdf";
//X->CallMethod("LoadFile", &file);
};
void wxActiveXFrame::OnActiveXEvent(wxActiveXEvent& event)
{
#ifdef UNICODE
wostringstream os;
#else
ostringstream os;
#endif
os << (const wxChar *) event.EventName() << wxT("(");
for (int p = 0; p < event.ParamCount(); p++)
{
os <<
(const wxChar *) event.ParamType(p) << wxT(" ") <<
(const wxChar *) event.ParamName(p) << wxT(" = ") <<
(const wxChar *) (wxString) event[p];
if (p < event.ParamCount() - 1)
os << wxT(", ");
};
os << wxT(")") << endl;
wxString data = os.str().c_str();
textLog->AppendText(data);
};

View File

@@ -1,77 +0,0 @@
/*
wxActiveX Library Licence, Version 3
====================================
Copyright (C) 2003 Lindsay Mathieson [, ...]
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
wxActiveX LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public Licence as published by
the Free Software Foundation; either version 2 of the Licence, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public Licence for more details.
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxActiveX Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as
to the status of such modified files, you must delete this exception
notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
*/
#ifndef wxActiveXFrame_h
#define wxActiveXFrame_h
#include "wxactivex.h"
class wxActiveXFrame : public wxFrame
{
public:
wxActiveX *X;
wxTextCtrl *textLog;
wxActiveXFrame(wxWindow *parent, wxString title);
DECLARE_EVENT_TABLE()
void OnGetTypeInfo(wxCommandEvent& event);
void OnInvokeMethod(wxCommandEvent& event);
void OnTest(wxCommandEvent& event);
void OnActiveXEvent(wxActiveXEvent& event);
};
#endif

View File

@@ -1,404 +0,0 @@
# Microsoft Developer Studio Project File - Name="wxIE" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=wxIE - Win32 Unicode Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "wxIE.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "wxIE.mak" CFG="wxIE - Win32 Unicode Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "wxIE - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "wxIE - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "wxIE - Win32 Unicode Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "wxIE - Win32 Unicode Release" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "wxIE - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "$(WXWIN)\include" /I "$(WXWIN)\contrib\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /c
# ADD BASE RSC /l 0xc09 /d "NDEBUG"
# ADD RSC /l 0xc09 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"$(WXWIN)\Lib" /libpath:"$(WXWIN)\contrib\Lib"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "wxIE - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(WXWIN)\lib\vc_dll\mswd" /I "$(WXWIN)\include" /I "$(WXWIN)\contrib\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /GZ /c
# ADD BASE RSC /l 0xc09 /d "_DEBUG"
# ADD RSC /l 0xc09 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxbase25d.lib wxbase25d_net.lib wxbase25d_xml.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"$(WXWIN)\Lib" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"$(WXWIN)\contrib\Lib"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "wxIE - Win32 Unicode Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "wxIE___Win32_Unicode_Debug"
# PROP BASE Intermediate_Dir "wxIE___Win32_Unicode_Debug"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "wxIE___Win32_Unicode_Debug"
# PROP Intermediate_Dir "wxIE___Win32_Unicode_Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(WXWIN)\include" /I "$(WXWIN)\contrib\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(WXWIN)\include" /I "$(WXWIN)\contrib\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D UNICODE=1 /Yu"wx/wxprec.h" /FD /GZ /c
# ADD BASE RSC /l 0xc09 /d "_DEBUG"
# ADD RSC /l 0xc09 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"wxIE.exe" /pdbtype:sept /libpath:"$(WXWIN)\Lib" /libpath:"$(WXWIN)\contrib\Lib"
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswud.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"wxIE.exe" /pdbtype:sept /libpath:"$(WXWIN)\Lib" /libpath:"$(WXWIN)\contrib\Lib"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "wxIE - Win32 Unicode Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "wxIE___Win32_Unicode_Release"
# PROP BASE Intermediate_Dir "wxIE___Win32_Unicode_Release"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "wxIE___Win32_Unicode_Release"
# PROP Intermediate_Dir "wxIE___Win32_Unicode_Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "$(WXWIN)\include" /I "$(WXWIN)\contrib\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "$(WXWIN)\include" /I "$(WXWIN)\contrib\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /c
# ADD BASE RSC /l 0xc09 /d "NDEBUG"
# ADD RSC /l 0xc09 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"wxIE.exe"
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswu.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"wxIE.exe" /libpath:"$(WXWIN)\Lib" /libpath:"$(WXWIN)\contrib\Lib"
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "wxIE - Win32 Release"
# Name "wxIE - Win32 Debug"
# Name "wxIE - Win32 Unicode Debug"
# Name "wxIE - Win32 Unicode Release"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\IEHtmlWin.cpp
!IF "$(CFG)" == "wxIE - Win32 Release"
# SUBTRACT CPP /YX
!ELSEIF "$(CFG)" == "wxIE - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "wxIE - Win32 Unicode Debug"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "wxIE - Win32 Unicode Release"
# SUBTRACT BASE CPP /YX
# SUBTRACT CPP /YX
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\wxactivex.cpp
!IF "$(CFG)" == "wxIE - Win32 Release"
!ELSEIF "$(CFG)" == "wxIE - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "wxIE - Win32 Unicode Debug"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "wxIE - Win32 Unicode Release"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\wxActiveXFrame.cpp
# End Source File
# Begin Source File
SOURCE=.\wxIE.rc
# End Source File
# Begin Source File
SOURCE=.\wxIEApp.cpp
# ADD CPP /Yc"wx/wxprec.h"
# End Source File
# Begin Source File
SOURCE=.\wxIEFrm.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\IEHtmlWin.h
# End Source File
# Begin Source File
SOURCE=.\resource.h
# End Source File
# Begin Source File
SOURCE=.\wxactivex.h
# End Source File
# Begin Source File
SOURCE=.\wxActiveXFrame.h
# End Source File
# Begin Source File
SOURCE=.\wxIEApp.h
# End Source File
# Begin Source File
SOURCE=.\wxIEFrm.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\wx\msw\blank.cur
# End Source File
# Begin Source File
SOURCE=.\wx\msw\bullseye.cur
# End Source File
# Begin Source File
SOURCE=.\wx\msw\colours.bmp
# End Source File
# Begin Source File
SOURCE=.\wx\msw\cross.bmp
# End Source File
# Begin Source File
SOURCE=.\wx\msw\disable.bmp
# End Source File
# Begin Source File
SOURCE=.\wx\msw\error.ico
# End Source File
# Begin Source File
SOURCE=.\wx\msw\hand.cur
# End Source File
# Begin Source File
SOURCE=.\wx\msw\info.ico
# End Source File
# Begin Source File
SOURCE=.\wx\msw\magnif1.cur
# End Source File
# Begin Source File
SOURCE=.\wx\msw\noentry.cur
# End Source File
# Begin Source File
SOURCE=.\wx\msw\pbrush.cur
# End Source File
# Begin Source File
SOURCE=.\wx\msw\pencil.cur
# End Source File
# Begin Source File
SOURCE=.\wx\msw\plot_dwn.bmp
# End Source File
# Begin Source File
SOURCE=.\wx\msw\plot_enl.bmp
# End Source File
# Begin Source File
SOURCE=.\wx\msw\plot_shr.bmp
# End Source File
# Begin Source File
SOURCE=.\wx\msw\plot_up.bmp
# End Source File
# Begin Source File
SOURCE=.\wx\msw\plot_zin.bmp
# End Source File
# Begin Source File
SOURCE=.\wx\msw\plot_zot.bmp
# End Source File
# Begin Source File
SOURCE=.\wx\msw\pntleft.cur
# End Source File
# Begin Source File
SOURCE=.\wx\msw\pntright.cur
# End Source File
# Begin Source File
SOURCE=.\wx\msw\query.cur
# End Source File
# Begin Source File
SOURCE=.\wx\msw\question.ico
# End Source File
# Begin Source File
SOURCE=.\wx\msw\roller.cur
# End Source File
# Begin Source File
SOURCE=.\wx\msw\size.cur
# End Source File
# Begin Source File
SOURCE=.\wx\msw\tick.bmp
# End Source File
# Begin Source File
SOURCE=.\wx\msw\tip.ico
# End Source File
# Begin Source File
SOURCE=.\wx\msw\warning.ico
# End Source File
# Begin Source File
SOURCE=.\wx\msw\watch1.cur
# End Source File
# Begin Source File
SOURCE=.\wxIE.ico
# End Source File
# End Group
# Begin Source File
SOURCE=.\default.doxygen
# End Source File
# Begin Source File
SOURCE=.\license.txt
# End Source File
# Begin Source File
SOURCE=.\makefile
# PROP Exclude_From_Scan -1
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=.\makefile.gtk
# PROP Exclude_From_Scan -1
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=.\makefile.mtf
# PROP Exclude_From_Scan -1
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=.\notes.txt
# End Source File
# Begin Source File
SOURCE=.\readme.txt
# End Source File
# Begin Source File
SOURCE=.\wxIE.xpm
# PROP Exclude_From_Scan -1
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
# End Source File
# End Target
# End Project

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

View File

@@ -1,169 +0,0 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
//#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
#include <winuser.rh>
#include <commctrl.rh>
#include <dde.rh>
#include <winnt.rh>
#include <dlgs.h>
#include <winver.h>
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
/*
WXDISABLE_BUTTON_BITMAP BITMAP MOVEABLE PURE "wx/msw/disable.bmp"
WXBITMAP_STD_COLOURS BITMAP MOVEABLE PURE "wx/msw/colours.bmp"
TICK_BMP BITMAP MOVEABLE PURE "wx/msw/tick.bmp"
PLOT_ZOT_BMP BITMAP MOVEABLE PURE "wx/msw/plot_zot.bmp"
PLOT_ZIN_BMP BITMAP MOVEABLE PURE "wx/msw/plot_zin.bmp"
PLOT_UP_BMP BITMAP MOVEABLE PURE "wx/msw/plot_up.bmp"
PLOT_SHR_BMP BITMAP MOVEABLE PURE "wx/msw/plot_shr.bmp"
PLOT_ENL_BMP BITMAP MOVEABLE PURE "wx/msw/plot_enl.bmp"
PLOT_DWN_BMP BITMAP MOVEABLE PURE "wx/msw/plot_dwn.bmp"
CROSS_BMP BITMAP MOVEABLE PURE "wx/msw/cross.bmp"
*/
/////////////////////////////////////////////////////////////////////////////
//
// Cursor
//
/*
WXCURSOR_WATCH CURSOR DISCARDABLE "wx\\msw\\watch1.cur"
WXCURSOR_SIZING CURSOR DISCARDABLE "wx/msw/size.cur"
WXCURSOR_ROLLER CURSOR DISCARDABLE "wx/msw/roller.cur"
WXCURSOR_QARROW CURSOR DISCARDABLE "wx/msw/query.cur"
WXCURSOR_PRIGHT CURSOR DISCARDABLE "wx/msw/pntright.cur"
WXCURSOR_PLEFT CURSOR DISCARDABLE "wx/msw/pntleft.cur"
WXCURSOR_PENCIL CURSOR DISCARDABLE "wx/msw/pencil.cur"
WXCURSOR_PBRUSH CURSOR DISCARDABLE "wx/msw/pbrush.cur"
WXCURSOR_NO_ENTRY CURSOR DISCARDABLE "wx/msw/noentry.cur"
WXCURSOR_MAGNIFIER CURSOR DISCARDABLE "wx/msw/magnif1.cur"
WXCURSOR_HAND CURSOR DISCARDABLE "wx/msw/hand.cur"
WXCURSOR_BULLSEYE CURSOR DISCARDABLE "wx/msw/bullseye.cur"
WXCURSOR_BLANK CURSOR DISCARDABLE "wx/msw/blank.cur"
*/
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
WXRESIZEABLEDIALOG DIALOG DISCARDABLE 34, 22, 144, 75
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
BEGIN
END
WXNOCAPTIONDIALOG DIALOG DISCARDABLE 34, 22, 144, 75
STYLE WS_POPUP
BEGIN
END
WXCAPTIONDIALOG DIALOG DISCARDABLE 34, 22, 144, 75
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dummy dialog"
BEGIN
END
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
WXIE ICON DISCARDABLE "wxIE.ico"
/*
WXICON_WARNING ICON DISCARDABLE "wx\\msw\\warning.ico"
WXICON_TIP ICON DISCARDABLE "wx/msw/tip.ico"
WXICON_QUESTION ICON DISCARDABLE "wx/msw/question.ico"
WXICON_INFO ICON DISCARDABLE "wx/msw/info.ico"
WXICON_ERROR ICON DISCARDABLE "wx/msw/error.ico"
*/
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
WXWINDOWMENU MENU DISCARDABLE
BEGIN
POPUP "&Window"
BEGIN
MENUITEM "&Cascade", 4002
MENUITEM "Tile &Horizontally", 4001
MENUITEM "Tile &Vertically", 4005
MENUITEM "", 65535
MENUITEM "&Arrange Icons", 4003
MENUITEM "&Next", 4004
END
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -1,44 +0,0 @@
/* XPM */
static char *wxIE_xpm[] = {
/* columns rows colors chars-per-pixel */
"32 32 6 1",
" c Black",
". c Blue",
"X c #00bf00",
"o c Red",
"O c Yellow",
"+ c Gray100",
/* pixels */
" ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" "
};

View File

@@ -1,99 +0,0 @@
/*
wxActiveX Library Licence, Version 3
====================================
Copyright (C) 2003 Lindsay Mathieson [, ...]
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
wxActiveX LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public Licence as published by
the Free Software Foundation; either version 2 of the Licence, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public Licence for more details.
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxActiveX Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as
to the status of such modified files, you must delete this exception
notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
*/
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx/wx.h".
#if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "wx/wx.h"
#endif
#include "wx/wxprec.h"
#include "wxIEApp.h"
#include "wxIEFrm.h"
#include "resource.h"
// Create a new application object: this macro will allow wxWindows to create
// the application object during program execution (it's better than using a
// static object for many reasons) and also declares the accessor function
// wxGetApp() which will return the reference of the right type (i.e. wxIEApp and
// not wxApp)
IMPLEMENT_APP(wxIEApp)
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// the application class
// ----------------------------------------------------------------------------
// 'Main program' equivalent: the program execution "starts" here
bool wxIEApp::OnInit()
{
// create the main application window
wxIEFrame *frame = new wxIEFrame(wxT("IE Test"));
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
frame->Show(TRUE);
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the
// application would exit immediately.
return TRUE;
}

View File

@@ -1,66 +0,0 @@
/*
wxActiveX Library Licence, Version 3
====================================
Copyright (C) 2003 Lindsay Mathieson [, ...]
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
wxActiveX LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public Licence as published by
the Free Software Foundation; either version 2 of the Licence, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public Licence for more details.
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxActiveX Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as
to the status of such modified files, you must delete this exception
notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
*/
// Define a new application type, each program should derive a class from wxApp
class wxIEApp : public wxApp
{
public:
// override base class virtuals
// ----------------------------
// this one is called on application startup and is a good place for the app
// initialization (doing it here and not in the ctor allows to have an error
// return: if OnInit() returns false, the application terminates)
virtual bool OnInit();
};

View File

@@ -1,381 +0,0 @@
/*
wxActiveX Library Licence, Version 3
====================================
Copyright (C) 2003 Lindsay Mathieson [, ...]
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
wxActiveX LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public Licence as published by
the Free Software Foundation; either version 2 of the Licence, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public Licence for more details.
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxActiveX Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as
to the status of such modified files, you must delete this exception
notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
*/
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx/wx.h".
#if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "wx/wx.h"
#endif
#include "wx/wxprec.h"
#include "wx/filedlg.h"
#include "wxIEApp.h"
#include "wxIEFrm.h"
#include "wxActiveXFrame.h"
#include <istream>
#include <fstream>
using namespace std;
#include <exdispid.h>
// ----------------------------------------------------------------------------
// resources
// ----------------------------------------------------------------------------
// the application icon
#if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "wxIE.xpm"
#endif
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// IDs for the controls and the menu commands
enum
{
// menu items
FILE_QUIT = 1,
FILE_OPEN,
FILE_BROWSE,
FILE_HTML_EDITMODE,
FILE_TEST_HTML,
FILE_TEST_SELECT,
FILE_TEST_HTMLSELECT,
FILE_TEST_GETTEXT,
FILE_TEST_HTMLGETTEXT,
FILE_TEST_HOME,
FILE_TEST_ACTIVEX,
FILE_ABOUT,
// controls
ID_MSHTML = 501,
ID_PROGRESS_GAUGE
};
// ----------------------------------------------------------------------------
// event tables and other macros for wxWindows
// ----------------------------------------------------------------------------
// the event tables connect the wxWindows events with the functions (event
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(wxIEFrame, wxFrame)
EVT_SIZE(wxIEFrame::OnSize)
EVT_MENU(FILE_QUIT, wxIEFrame::OnQuit)
EVT_MENU(FILE_BROWSE, wxIEFrame::OnBrowse)
EVT_MENU(FILE_OPEN, wxIEFrame::OnOpen)
EVT_MENU(FILE_HTML_EDITMODE, wxIEFrame::OnEditMode)
EVT_UPDATE_UI(FILE_HTML_EDITMODE, wxIEFrame::OnEditModeUI)
EVT_MENU(FILE_TEST_HTML, wxIEFrame::OnTestHTML)
EVT_MENU(FILE_TEST_SELECT, wxIEFrame::OnTestSelect)
EVT_MENU(FILE_TEST_HTMLSELECT, wxIEFrame::OnTestHTMLSelect)
EVT_MENU(FILE_TEST_GETTEXT, wxIEFrame::OnTestGetText)
EVT_MENU(FILE_TEST_HTMLGETTEXT, wxIEFrame::OnTestHTMLGetText)
EVT_MENU(FILE_TEST_HOME, wxIEFrame::OnTestHome)
EVT_MENU(FILE_TEST_ACTIVEX, wxIEFrame::OnTestActiveX)
EVT_MENU(FILE_ABOUT, wxIEFrame::OnAbout)
// ActiveX Events
EVT_ACTIVEX_DISPID(ID_MSHTML, DISPID_STATUSTEXTCHANGE, OnMSHTMLStatusTextChangeX)
EVT_ACTIVEX(ID_MSHTML, "BeforeNavigate2", OnMSHTMLBeforeNavigate2X)
EVT_ACTIVEX(ID_MSHTML, "TitleChange", OnMSHTMLTitleChangeX)
EVT_ACTIVEX(ID_MSHTML, "NewWindow2", OnMSHTMLNewWindow2X)
EVT_ACTIVEX(ID_MSHTML, "ProgressChange", OnMSHTMLProgressChangeX)
END_EVENT_TABLE()
// ----------------------------------------------------------------------------
// main frame
// ----------------------------------------------------------------------------
// frame constructor
wxIEFrame::wxIEFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size)
{
// set the frame icon
SetIcon(wxICON(wxIE));
// create a menu bar
wxMenu *menuFile = new wxMenu("", wxMENU_TEAROFF);
// the "About" item should be in the help menu
wxMenu *helpMenu = new wxMenu;
helpMenu->Append(FILE_ABOUT, "&About...\tCtrl-A", "Show about dialog");
menuFile->Append(FILE_TEST_HTML, "Test HTML", "Demonstrates LoadString()");
menuFile->Append(FILE_OPEN, "Open HTML File", "Demonstrates LoadStream(istream *)");
menuFile->Append(FILE_BROWSE, "Browse Web Page", "Demonstrates LoadUrl(url)");
menuFile->Append(FILE_HTML_EDITMODE, "Edit Mode", "Demonstrates editing html", true);
menuFile->AppendSeparator();
menuFile->Append(FILE_TEST_SELECT, "Get Selected Text", "Demonstrates GetStringSelection(false)");
menuFile->Append(FILE_TEST_HTMLSELECT, "Get HTML Selected Text", "Demonstrates GetStringSelection(true)");
menuFile->AppendSeparator();
menuFile->Append(FILE_TEST_GETTEXT, "Get Text", "Demonstrates GetText(false)");
menuFile->Append(FILE_TEST_HTMLGETTEXT, "Get HTML Text", "Demonstrates GetText(true)");
menuFile->Append(FILE_TEST_HOME, "Open Home Page", "Demonstrates GoHome()");
menuFile->AppendSeparator();
menuFile->Append(FILE_TEST_ACTIVEX, "Display a ActiveX control", "Demonstrates the Generic ActiveX Container");
menuFile->AppendSeparator();
menuFile->Append(FILE_QUIT, "E&xit\tAlt-X", "Quit this program");
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar();
menuBar->Append(menuFile, "&File");
menuBar->Append(helpMenu, "&Help");
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
// create a status bar just for fun (by default with 1 pane only)
wxStatusBar * sb = CreateStatusBar(2);
SetStatusText("Ready");
// progress gauge (belongs to status bar)
m_gauge = new wxGauge(sb, ID_PROGRESS_GAUGE, 100);
// IE Control
m_ie = new wxIEHtmlWin(this, ID_MSHTML);
}
// event handlers
void wxIEFrame::OnSize(wxSizeEvent& event)
{
wxFrame::OnSize(event);
wxStatusBar* sb = GetStatusBar();
if (! sb)
return;
wxRect rc;
sb->GetFieldRect(1, rc);
m_gauge->SetSize(rc);
};
void wxIEFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
// TRUE is to force the frame to close
Close(TRUE);
}
void wxIEFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxString msg;
msg.Printf( _T("About wxIE...\n"));
wxMessageBox(msg, "About wxIE", wxOK | wxICON_INFORMATION, this);
}
void wxIEFrame::OnTestHTML(wxCommandEvent& WXUNUSED(event))
{
wxString html =
"<HTML><BODY><H1>Hello World</H1>Plain Text</body></html>";
m_ie->LoadString(html);
}
void wxIEFrame::OnTestSelect(wxCommandEvent& WXUNUSED(event))
{
wxString s = m_ie->GetStringSelection();
wxMessageBox(s);
}
void wxIEFrame::OnTestHTMLSelect(wxCommandEvent& WXUNUSED(event))
{
wxString s = m_ie->GetStringSelection(true);
wxMessageBox(s);
}
void wxIEFrame::OnTestGetText(wxCommandEvent& WXUNUSED(event))
{
wxString s = m_ie->GetText();
wxMessageBox(s);
}
void wxIEFrame::OnTestHTMLGetText(wxCommandEvent& WXUNUSED(event))
{
wxString s = m_ie->GetText(true);
wxMessageBox(s);
}
void wxIEFrame::OnTestHome(wxCommandEvent& WXUNUSED(event))
{
m_ie->GoHome();
};
void wxIEFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
{
wxFileDialog dlg(this, "Chooose a HTML File", "", "", "HTML files (*.html; *.htm)|*.html;*.htm|",wxOPEN);
if (dlg.ShowModal() == wxID_OK)
{
wxString fname = dlg.GetPath();
ifstream *is = new ifstream(fname.mb_str());
m_ie->LoadStream(is);
};
}
void wxIEFrame::OnEditMode(wxCommandEvent& WXUNUSED(event))
{
m_ie->SetEditMode(! m_ie->GetEditMode());
}
void wxIEFrame::OnEditModeUI(wxUpdateUIEvent& event)
{
if (m_ie)
event.Check(m_ie->GetEditMode());
}
void wxIEFrame::OnBrowse(wxCommandEvent& WXUNUSED(event))
{
wxString url = wxGetTextFromUser("Enter URL:", "Browse", "", this);
m_ie->LoadUrl(url);
}
void wxIEFrame::OnMSHTMLStatusTextChangeX(wxActiveXEvent& event)
{
SetStatusText(event["Text"]);
};
void wxIEFrame::OnMSHTMLBeforeNavigate2X(wxActiveXEvent& event)
{
wxString url = event["Url"];
if (url == "about:blank")
return;
int rc = wxMessageBox(url, "Allow open url ?", wxYES_NO);
if (rc != wxYES)
event["Cancel"] = true;
};
void wxIEFrame::OnMSHTMLTitleChangeX(wxActiveXEvent& event)
{
SetTitle(event["Text"]);
};
void wxIEFrame::OnMSHTMLNewWindow2X(wxActiveXEvent& event)
{
int rc = wxMessageBox("New Window requested", "Allow New Window ?", wxYES_NO);
if (rc != wxYES)
event["Cancel"] = true;
};
void wxIEFrame::OnMSHTMLProgressChangeX(wxActiveXEvent& event)
{
if ((long) event["ProgressMax"] != m_gauge->GetRange())
m_gauge->SetRange((long) event["ProgressMax"]);
m_gauge->SetValue((long) event["Progress"]);
};
void wxIEFrame::OnTestActiveX(wxCommandEvent& WXUNUSED(event))
{
// Some known prog ids
//#define PROGID "Shell.Explorer"
//#define PROGID CLSID_WebBrowser
//#define PROGID CLSID_MozillaBrowser
//#define PROGID CLSID_HTMLDocument
//#define PROGID "MSCAL.Calendar"
//#define PROGID "WordPad.Document"
//#define PROGID "SoftwareFX.ChartFX"
//#define PROGID "PDF.PdfCtrl"
#define PROGID "ShockwaveFlash.ShockwaveFlash"
wxDialog dlg(this, -1, wxString(wxT("Test ActiveX")));
wxFlexGridSizer *sz = new wxFlexGridSizer(2);
sz->Add(new wxStaticText(&dlg, -1, wxT("Enter a ActiveX ProgId")), 0, wxALL, 5 );
wxComboBox *cb = new wxComboBox(&dlg, 101, "");
cb->Append(wxT("ShockwaveFlash.ShockwaveFlash"));
cb->Append(wxT("MSCAL.Calendar"));
cb->Append(wxT("Shell.Explorer"));
cb->Append(wxT("WordPad.Document.1"));
cb->Append(wxT("SoftwareFX.ChartFX.20"));
cb->Append(wxT("PDF.PdfCtrl.5"));
cb->SetSelection(0);
sz->Add(cb, 0, wxALL, 5 );
// next row
sz->Add(new wxButton(&dlg, wxID_CANCEL, "Cancel"), 0, wxALIGN_RIGHT|wxALL, 5 );
sz->Add(new wxButton(&dlg, wxID_OK, "Ok"), 0, wxALIGN_RIGHT|wxALL, 5 );
dlg.SetAutoLayout( TRUE );
dlg.SetSizer(sz);
sz->Fit(&dlg);
sz->SetSizeHints(&dlg);
if (dlg.ShowModal() == wxID_OK)
{
wxString progId = cb->GetValue();
wxActiveXFrame *frame = new wxActiveXFrame(this, progId);
frame->Show();
};
}

View File

@@ -1,95 +0,0 @@
/*
wxActiveX Library Licence, Version 3
====================================
Copyright (C) 2003 Lindsay Mathieson [, ...]
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
wxActiveX LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public Licence as published by
the Free Software Foundation; either version 2 of the Licence, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public Licence for more details.
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxActiveX Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as
to the status of such modified files, you must delete this exception
notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
*/
#include "IEHtmlWin.h"
#include "wx/gauge.h"
// Define a new frame type: this is going to be our main frame
class wxIEFrame : public wxFrame
{
public:
wxIEHtmlWin *m_ie;
wxGauge *m_gauge;
// ctor(s)
wxIEFrame(const wxString& title, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize);
// event handlers (these functions should _not_ be virtual)
void OnSize(wxSizeEvent& event);
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnEditMode(wxCommandEvent& event);
void OnEditModeUI(wxUpdateUIEvent& event);
void OnBrowse(wxCommandEvent& event);
void OnOpen(wxCommandEvent& event);
void OnTestHTML(wxCommandEvent& event);
void OnTestSelect(wxCommandEvent& event);
void OnTestHTMLSelect(wxCommandEvent& event);
void OnTestGetText(wxCommandEvent& event);
void OnTestHTMLGetText(wxCommandEvent& event);
void OnTestHome(wxCommandEvent& event);
void OnTestActiveX(wxCommandEvent& event);
private:
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
void OnMSHTMLStatusTextChangeX(wxActiveXEvent& event);
void OnMSHTMLBeforeNavigate2X(wxActiveXEvent& event);
void OnMSHTMLTitleChangeX(wxActiveXEvent& event);
void OnMSHTMLNewWindow2X(wxActiveXEvent& event);
void OnMSHTMLProgressChangeX(wxActiveXEvent& event);
};

File diff suppressed because it is too large Load Diff

View File

@@ -1,680 +0,0 @@
/*
wxActiveX Library Licence, Version 3
====================================
Copyright (C) 2003 Lindsay Mathieson [, ...]
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
wxActiveX LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public Licence as published by
the Free Software Foundation; either version 2 of the Licence, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public Licence for more details.
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxActiveX Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as
to the status of such modified files, you must delete this exception
notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.
*/
/*! \file wxactivex.h
\brief implements wxActiveX window class and OLE tools
*/
#ifndef WX_ACTIVE_X
#define WX_ACTIVE_X
#pragma warning( disable : 4101 4786)
#pragma warning( disable : 4786)
#include <wx/setup.h>
#include <wx/wx.h>
#include <wx/variant.h>
#include <wx/datetime.h>
#include <oleidl.h>
#include <exdisp.h>
#include <docobj.h>
#include <iostream>
#include <vector>
#include <map>
using namespace std;
/// \brief wxActiveX Namespace for stuff I want to keep out of other tools way.
namespace NS_wxActiveX
{
/// STL utilty class.
/// specific to wxActiveX, for creating
/// case insenstive maps etc
struct less_wxStringI
{
bool operator()(const wxString& x, const wxString& y) const
{
return x.CmpNoCase(y) < 0;
};
};
};
//////////////////////////////////////////
/// Template class for smart interface handling.
/// - Automatically dereferences ole interfaces
/// - Smart Copy Semantics
/// - Can Create Interfaces
/// - Can query for other interfaces
template <class I> class wxAutoOleInterface
{
protected:
I *m_interface;
public:
/// takes ownership of an existing interface
/// Assumed to already have a AddRef() applied
explicit wxAutoOleInterface(I *pInterface = NULL) : m_interface(pInterface) {}
/// queries for an interface
wxAutoOleInterface(REFIID riid, IUnknown *pUnk) : m_interface(NULL)
{
QueryInterface(riid, pUnk);
};
/// queries for an interface
wxAutoOleInterface(REFIID riid, IDispatch *pDispatch) : m_interface(NULL)
{
QueryInterface(riid, pDispatch);
};
/// Creates an Interface
wxAutoOleInterface(REFCLSID clsid, REFIID riid) : m_interface(NULL)
{
CreateInstance(clsid, riid);
};
/// copy constructor
wxAutoOleInterface(const wxAutoOleInterface<I>& ti) : m_interface(NULL)
{
operator = (ti);
}
/// assignment operator
wxAutoOleInterface<I>& operator = (const wxAutoOleInterface<I>& ti)
{
if (ti.m_interface)
ti.m_interface->AddRef();
Free();
m_interface = ti.m_interface;
return *this;
}
/// takes ownership of an existing interface
/// Assumed to already have a AddRef() applied
wxAutoOleInterface<I>& operator = (I *&ti)
{
Free();
m_interface = ti;
return *this;
}
/// invokes Free()
~wxAutoOleInterface()
{
Free();
};
/// Releases interface (i.e decrements refCount)
inline void Free()
{
if (m_interface)
m_interface->Release();
m_interface = NULL;
};
/// queries for an interface
HRESULT QueryInterface(REFIID riid, IUnknown *pUnk)
{
Free();
wxCHECK(pUnk != NULL, -1);
return pUnk->QueryInterface(riid, (void **) &m_interface);
};
/// Create a Interface instance
HRESULT CreateInstance(REFCLSID clsid, REFIID riid)
{
Free();
return CoCreateInstance(clsid, NULL, CLSCTX_ALL, riid, (void **) &m_interface);
};
/// returns the interface pointer
inline operator I *() const {return m_interface;}
/// returns the dereferenced interface pointer
inline I* operator ->() {return m_interface;}
/// returns a pointer to the interface pointer
inline I** GetRef() {return &m_interface;}
/// returns true if we have a valid interface pointer
inline bool Ok() const {return m_interface != NULL;}
};
/// \brief Converts a std HRESULT to its error code.
/// Hardcoded, by no means a definitive list.
wxString OLEHResultToString(HRESULT hr);
/// \brief Returns the string description of a IID.
/// Hardcoded, by no means a definitive list.
wxString GetIIDName(REFIID riid);
//#define __WXOLEDEBUG
#ifdef __WXOLEDEBUG
#define WXOLE_TRACE(str) {OutputDebugString(str);OutputDebugString("\r\n");}
#define WXOLE_TRACEOUT(stuff)\
{\
wxString os;\
os << stuff << "\r\n";\
WXOLE_TRACE(os.mb_str());\
}
#define WXOLE_WARN(__hr,msg)\
{\
if (__hr != S_OK)\
{\
wxString s = "*** ";\
s += msg;\
s += " : "+ OLEHResultToString(__hr);\
WXOLE_TRACE(s.c_str());\
}\
}
#else
#define WXOLE_TRACE(str)
#define WXOLE_TRACEOUT(stuff)
#define WXOLE_WARN(_proc,msg) {_proc;}
#endif
class wxOleInit
{
public:
static IMalloc *GetIMalloc();
wxOleInit();
~wxOleInit();
};
#define DECLARE_OLE_UNKNOWN(cls)\
private:\
class TAutoInitInt\
{\
public:\
LONG l;\
TAutoInitInt() : l(0) {}\
};\
TAutoInitInt refCount, lockCount;\
wxOleInit oleInit;\
static void _GetInterface(cls *self, REFIID iid, void **_interface, const char *&desc);\
public:\
LONG GetRefCount();\
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void ** ppvObject);\
ULONG STDMETHODCALLTYPE AddRef();\
ULONG STDMETHODCALLTYPE Release();\
ULONG STDMETHODCALLTYPE AddLock();\
ULONG STDMETHODCALLTYPE ReleaseLock()
#define DEFINE_OLE_TABLE(cls)\
LONG cls::GetRefCount() {return refCount.l;}\
HRESULT STDMETHODCALLTYPE cls::QueryInterface(REFIID iid, void ** ppvObject)\
{\
if (! ppvObject)\
{\
WXOLE_TRACE("*** NULL POINTER ***");\
return E_FAIL;\
};\
const char *desc = NULL;\
cls::_GetInterface(this, iid, ppvObject, desc);\
if (! *ppvObject)\
{\
WXOLE_TRACEOUT("<" << GetIIDName(iid).c_str() << "> Not Found");\
return E_NOINTERFACE;\
};\
WXOLE_TRACEOUT("QI : <" << desc <<">");\
((IUnknown * )(*ppvObject))->AddRef();\
return S_OK;\
};\
ULONG STDMETHODCALLTYPE cls::AddRef()\
{\
WXOLE_TRACEOUT(# cls << "::Add ref(" << refCount.l << ")");\
InterlockedIncrement(&refCount.l);\
return refCount.l;\
};\
ULONG STDMETHODCALLTYPE cls::Release()\
{\
if (refCount.l > 0)\
{\
InterlockedDecrement(&refCount.l);\
WXOLE_TRACEOUT(# cls << "::Del ref(" << refCount.l << ")");\
if (refCount.l == 0)\
{\
delete this;\
return 0;\
};\
return refCount.l;\
}\
else\
return 0;\
}\
ULONG STDMETHODCALLTYPE cls::AddLock()\
{\
WXOLE_TRACEOUT(# cls << "::Add Lock(" << lockCount.l << ")");\
InterlockedIncrement(&lockCount.l);\
return lockCount.l;\
};\
ULONG STDMETHODCALLTYPE cls::ReleaseLock()\
{\
if (lockCount.l > 0)\
{\
InterlockedDecrement(&lockCount.l);\
WXOLE_TRACEOUT(# cls << "::Del Lock(" << lockCount.l << ")");\
return lockCount.l;\
}\
else\
return 0;\
}\
DEFINE_OLE_BASE(cls)
#define DEFINE_OLE_BASE(cls)\
void cls::_GetInterface(cls *self, REFIID iid, void **_interface, const char *&desc)\
{\
*_interface = NULL;\
desc = NULL;
#define OLE_INTERFACE(_iid, _type)\
if (IsEqualIID(iid, _iid))\
{\
WXOLE_TRACE("Found Interface <" # _type ">");\
*_interface = (IUnknown *) (_type *) self;\
desc = # _iid;\
return;\
}
#define OLE_IINTERFACE(_face) OLE_INTERFACE(IID_##_face, _face)
#define OLE_INTERFACE_CUSTOM(func)\
if (func(self, iid, _interface, desc))\
{\
return;\
}
#define END_OLE_TABLE\
}
/// Main class for embedding a ActiveX control.
/// Use by itself or derive from it
/// \note The utility program (wxie) can generate a list of events, methods & properties
/// for a control.
/// First display the control (File|Display),
/// then get the type info (ActiveX|Get Type Info) - these are copied to the clipboard.
/// Eventually this will be expanded to autogenerate
/// wxWindows source files for a control with all methods etc encapsulated.
/// \par Usage:
/// construct using a ProgId or class id
/// \code new wxActiveX(parent, CLSID_WebBrowser, id, pos, size, style, name)\endcode
/// \code new wxActiveX(parent, "ShockwaveFlash.ShockwaveFlash", id, pos, size, style, name)\endcode
/// \par Properties
/// Properties can be set using \c SetProp() and set/retrieved using \c Prop()
/// \code SetProp(name, wxVariant(x)) \endcode or
/// \code wxString Prop("<name>") = x\endcode
/// \code wxString result = Prop("<name>")\endcode
/// \code flash_ctl.Prop("movie") = "file:///movies/test.swf";\endcode
/// \code flash_ctl.Prop("Playing") = false;\endcode
/// \code wxString current_movie = flash_ctl.Prop("movie");\endcode
/// \par Methods
/// Methods are invoked with \c CallMethod()
/// \code wxVariant result = CallMethod("<name>", args, nargs = -1)\endcode
/// \code wxVariant args[] = {0L, "file:///e:/dev/wxie/bug-zap.swf"};
/// wxVariant result = X->CallMethod("LoadMovie", args);\endcode
/// \par events
/// respond to events with the
/// \c EVT_ACTIVEX(controlId, eventName, handler) &
/// \c EVT_ACTIVEX_DISPID(controlId, eventDispId, handler) macros
/// \code
/// BEGIN_EVENT_TABLE(wxIEFrame, wxFrame)
/// EVT_ACTIVEX_DISPID(ID_MSHTML, DISPID_STATUSTEXTCHANGE, OnMSHTMLStatusTextChangeX)
/// EVT_ACTIVEX(ID_MSHTML, "BeforeNavigate2", OnMSHTMLBeforeNavigate2X)
/// EVT_ACTIVEX(ID_MSHTML, "TitleChange", OnMSHTMLTitleChangeX)
/// EVT_ACTIVEX(ID_MSHTML, "NewWindow2", OnMSHTMLNewWindow2X)
/// EVT_ACTIVEX(ID_MSHTML, "ProgressChange", OnMSHTMLProgressChangeX)
/// END_EVENT_TABLE()\endcode
class wxActiveX : public wxWindow {
public:
/// General parameter and return type infoformation for Events, Properties and Methods.
/// refer to ELEMDESC, IDLDESC in MSDN
class ParamX
{
public:
USHORT flags;
bool isPtr;
bool isSafeArray;
bool isOptional;
VARTYPE vt;
wxString name;
ParamX() : isOptional(false), vt(VT_EMPTY) {}
inline bool IsIn() const {return (flags & IDLFLAG_FIN) != 0;}
inline bool IsOut() const {return (flags & IDLFLAG_FOUT) != 0;}
inline bool IsRetVal() const {return (flags & IDLFLAG_FRETVAL) != 0;}
};
typedef vector<ParamX> ParamXArray;
/// Type & Parameter info for Events and Methods.
/// refer to FUNCDESC in MSDN
class FuncX
{
public:
wxString name;
MEMBERID memid;
bool hasOut;
ParamX retType;
ParamXArray params;
};
typedef vector<FuncX> FuncXArray;
/// Type info for properties.
class PropX
{
public:
wxString name;
MEMBERID memid;
ParamX type;
ParamX arg;
bool putByRef;
PropX() : putByRef (false) {}
inline bool CanGet() const {return type.vt != VT_EMPTY;}
inline bool CanSet() const {return arg.vt != VT_EMPTY;}
};
typedef vector<PropX> PropXArray;
/// Create using clsid.
wxActiveX(wxWindow * parent, REFCLSID clsid, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
/// create using progid.
wxActiveX(wxWindow * parent, const wxString& progId, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
virtual ~wxActiveX();
/// Number of events defined for this control.
inline int GetEventCount() const {return m_events.size();}
/// returns event description by index.
/// throws exception for invalid index
const FuncX& GetEventDesc(int idx) const;
/// Number of properties defined for this control.
inline int GetPropCount() const {return m_props.size();}
/// returns property description by index.
/// throws exception for invalid index
const PropX& GetPropDesc(int idx) const;
/// returns property description by name.
/// throws exception for invalid name
const PropX& GetPropDesc(const wxString& name) const;
/// Number of methods defined for this control.
inline int GetMethodCount() const {return m_methods.size();}
/// returns method description by name.
/// throws exception for invalid index
const FuncX& GetMethodDesc(int idx) const;
/// returns method description by name.
/// throws exception for invalid name
const FuncX& GetMethodDesc(const wxString& name) const;
/// Set property VARIANTARG value by MEMBERID.
void SetProp(MEMBERID name, VARIANTARG& value);
/// Set property using wxVariant by name.
void SetProp(const wxString &name, const wxVariant &value);
class wxPropertySetter
{
public:
wxActiveX *m_ctl;
wxString m_propName;
wxPropertySetter(wxActiveX *ctl, const wxString& propName) :
m_ctl(ctl), m_propName(propName) {}
inline const wxPropertySetter& operator = (wxVariant v) const
{
m_ctl->SetProp(m_propName, v);
return *this;
};
inline operator wxVariant() const {return m_ctl->GetPropAsWxVariant(m_propName);};
inline operator wxString() const {return m_ctl->GetPropAsString(m_propName);};
inline operator char() const {return m_ctl->GetPropAsChar(m_propName);};
inline operator long() const {return m_ctl->GetPropAsLong(m_propName);};
inline operator bool() const {return m_ctl->GetPropAsBool(m_propName);};
inline operator double() const {return m_ctl->GetPropAsDouble(m_propName);};
inline operator wxDateTime() const {return m_ctl->GetPropAsDateTime(m_propName);};
inline operator void *() const {return m_ctl->GetPropAsPointer(m_propName);};
};
/// \fn inline wxPropertySetter Prop(wxString name) {return wxPropertySetter(this, name);}
/// \param name Property name to read/set
/// \return wxPropertySetter, which has overloads for setting/getting the property
/// \brief Generic Get/Set Property by name.
/// Automatically handles most types
/// \par Usage:
/// - Prop("\<name\>") = \<value\>
/// - var = Prop("\<name\>")
/// - e.g:
/// - \code flash_ctl.Prop("movie") = "file:///movies/test.swf";\endcode
/// - \code flash_ctl.Prop("Playing") = false;\endcode
/// - \code wxString current_movie = flash_ctl.Prop("movie");\endcode
/// \exception raises exception if \<name\> is invalid
/// \note Have to add a few more type conversions yet ...
inline wxPropertySetter Prop(wxString name) {return wxPropertySetter(this, name);}
VARIANT GetPropAsVariant(MEMBERID name);
VARIANT GetPropAsVariant(const wxString& name);
wxVariant GetPropAsWxVariant(const wxString& name);
wxString GetPropAsString(const wxString& name);
char GetPropAsChar(const wxString& name);
long GetPropAsLong(const wxString& name);
bool GetPropAsBool(const wxString& name);
double GetPropAsDouble(const wxString& name);
wxDateTime GetPropAsDateTime(const wxString& name);
void *GetPropAsPointer(const wxString& name);
// methods
// VARIANTARG form is passed straight to Invoke,
// so args in *REVERSE* order
VARIANT CallMethod(MEMBERID name, VARIANTARG args[], int argc);
VARIANT CallMethod(const wxString& name, VARIANTARG args[] = NULL, int argc = -1);
// args are in *NORMAL* order
// args can be a single wxVariant or an array
/// \fn wxVariant CallMethod(wxString name, wxVariant args[], int nargs = -1);
/// \param name name of method to call
/// \param args array of wxVariant's, defaults to NULL (no args)
/// \param nargs number of arguments passed via args. Defaults to actual number of args for the method
/// \return wxVariant
/// \brief Call a method of the ActiveX control.
/// Automatically handles most types
/// \par Usage:
/// - result = CallMethod("\<name\>", args, nargs)
/// - e.g.
/// - \code
/// wxVariant args[] = {0L, "file:///e:/dev/wxie/bug-zap.swf"};
/// wxVariant result = X->CallMethod("LoadMovie", args);\endcode
/// \exception raises exception if \<name\> is invalid
/// \note Since wxVariant has built in type conversion, most the std types can be passed easily
wxVariant CallMethod(const wxString& name, wxVariant args[], int nargs = -1);
HRESULT ConnectAdvise(REFIID riid, IUnknown *eventSink);
void OnSize(wxSizeEvent&);
void OnPaint(wxPaintEvent& event);
void OnMouse(wxMouseEvent& event);
void OnSetFocus(wxFocusEvent&);
void OnKillFocus(wxFocusEvent&);
DECLARE_EVENT_TABLE();
protected:
friend class FrameSite;
friend class wxActiveXEvents;
unsigned long m_pdwRegister;
typedef map<MEMBERID, int> MemberIdMap;
typedef map<wxString, int, NS_wxActiveX::less_wxStringI> NameMap;
typedef wxAutoOleInterface<IConnectionPoint> wxOleConnectionPoint;
typedef pair<wxOleConnectionPoint, DWORD> wxOleConnection;
typedef vector<wxOleConnection> wxOleConnectionArray;
wxAutoOleInterface<IDispatch> m_Dispatch;
wxAutoOleInterface<IOleClientSite> m_clientSite;
wxAutoOleInterface<IUnknown> m_ActiveX;
wxAutoOleInterface<IOleObject> m_oleObject;
wxAutoOleInterface<IOleInPlaceObject> m_oleInPlaceObject;
wxAutoOleInterface<IOleInPlaceActiveObject>
m_oleInPlaceActiveObject;
wxAutoOleInterface<IOleDocumentView> m_docView;
wxAutoOleInterface<IViewObject> m_viewObject;
HWND m_oleObjectHWND;
bool m_bAmbientUserMode;
DWORD m_docAdviseCookie;
wxOleConnectionArray m_connections;
void CreateActiveX(REFCLSID clsid);
void CreateActiveX(LPOLESTR progId);
HRESULT AmbientPropertyChanged(DISPID dispid);
void GetTypeInfo();
void GetTypeInfo(ITypeInfo *ti, bool defInterface, bool defEventSink);
// events
FuncXArray m_events;
MemberIdMap m_eventMemberIds;
// properties
PropXArray m_props;
NameMap m_propNames;
// Methods
FuncXArray m_methods;
NameMap m_methodNames;
virtual bool MSWTranslateMessage(WXMSG* pMsg);
long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
DECLARE_CLASS(wxActiveX)
};
// events
class wxActiveXEvent : public wxCommandEvent
{
private:
friend class wxActiveXEvents;
wxVariant m_params;
public:
virtual wxEvent *Clone() const { return new wxActiveXEvent(*this); }
wxString EventName();
int ParamCount() const;
wxString ParamType(int idx);
wxString ParamName(int idx);
wxVariant& operator[] (int idx);
wxVariant& operator[] (wxString name);
private:
DECLARE_CLASS(wxActiveXEvent)
};
const wxEventType& RegisterActiveXEvent(const wxChar *eventName);
const wxEventType& RegisterActiveXEvent(DISPID event);
typedef void (wxEvtHandler::*wxActiveXEventFunction)(wxActiveXEvent&);
/// \def EVT_ACTIVEX(id, eventName, fn)
/// \brief Event handle for events by name
#define EVT_ACTIVEX(id, eventName, fn) DECLARE_EVENT_TABLE_ENTRY(RegisterActiveXEvent(wxT(eventName)), id, -1, (wxObjectEventFunction) (wxEventFunction) (wxActiveXEventFunction) & fn, (wxObject *) NULL ),
/// \def EVT_ACTIVEX_DISPID(id, eventDispId, fn)
/// \brief Event handle for events by DISPID (dispath id)
#define EVT_ACTIVEX_DISPID(id, eventDispId, fn) DECLARE_EVENT_TABLE_ENTRY(RegisterActiveXEvent(eventDispId), id, -1, (wxObjectEventFunction) (wxEventFunction) (wxActiveXEventFunction) & fn, (wxObject *) NULL ),
//util
bool wxDateTimeToVariant(wxDateTime dt, VARIANTARG& va);
bool VariantToWxDateTime(VARIANTARG va, wxDateTime& dt);
/// \relates wxActiveX
/// \fn bool MSWVariantToVariant(VARIANTARG& va, wxVariant& vx);
/// \param va VARAIANTARG to convert from
/// \param vx Destination wxVariant
/// \return success/failure (true/false)
/// \brief Convert MSW VARIANTARG to wxVariant.
/// Handles basic types, need to add:
/// - VT_ARRAY | VT_*
/// - better support for VT_UNKNOWN (currently treated as void *)
/// - better support for VT_DISPATCH (currently treated as void *)
bool MSWVariantToVariant(VARIANTARG& va, wxVariant& vx);
/// \relates wxActiveX
/// \fn bool VariantToMSWVariant(const wxVariant& vx, VARIANTARG& va);
/// \param vx wxVariant to convert from
/// \param va Destination VARIANTARG
/// \return success/failure (true/false)
/// \brief Convert wxVariant to MSW VARIANTARG.
/// Handles basic types, need to add:
/// - VT_ARRAY | VT_*
/// - better support for VT_UNKNOWN (currently treated as void *)
/// - better support for VT_DISPATCH (currently treated as void *)
bool VariantToMSWVariant(const wxVariant& vx, VARIANTARG& va);
#endif /* _IEHTMLWIN_H_ */

View File

@@ -1,2 +0,0 @@
del wxie.zip
pkzip -max -add -dir -recurse -excl=CVS\*.* -excl=CVS\*.* -excl=debug\*.* wxie *.*

View File

@@ -1,16 +0,0 @@
// A bunch of %rename directives generated by BuildRenamers in config.py
// in order to remove the wx prefix from all global scope names.
#ifndef BUILDING_RENAMERS
%rename(ANIM_UNSPECIFIED) wxANIM_UNSPECIFIED;
%rename(ANIM_DONOTREMOVE) wxANIM_DONOTREMOVE;
%rename(ANIM_TOBACKGROUND) wxANIM_TOBACKGROUND;
%rename(ANIM_TOPREVIOUS) wxANIM_TOPREVIOUS;
%rename(AnimationPlayer) wxAnimationPlayer;
%rename(AnimationBase) wxAnimationBase;
%rename(GIFAnimation) wxGIFAnimation;
%rename(AN_FIT_ANIMATION) wxAN_FIT_ANIMATION;
%rename(GIFAnimationCtrl) wxGIFAnimationCtrl;
#endif

View File

@@ -1,326 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: animate.i
// Purpose: Wrappers for the animation classes in wx/contrib
//
// Author: Robin Dunn
//
// Created: 4-April-2005
// RCS-ID: $Id$
// Copyright: (c) 2005 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%define DOCSTRING
"Simple animation player classes, including `GIFAnimationCtrl` for displaying
animated GIF files
"
%enddef
%module(package="wx", docstring=DOCSTRING) animate
%{
#include "wx/wxPython/wxPython.h"
#include "wx/wxPython/pyclasses.h"
#include <wx/animate/animate.h>
%}
//---------------------------------------------------------------------------
%import core.i
%pythoncode { import wx }
%pythoncode { __docfilter__ = wx._core.__DocFilter(globals()) }
MAKE_CONST_WXSTRING2(AnimationControlNameStr, wxT("animationControl"));
MAKE_CONST_WXSTRING_NOSWIG(EmptyString);
%include _animate_rename.i
//---------------------------------------------------------------------------
enum wxAnimationDisposal
{
wxANIM_UNSPECIFIED = -1,
wxANIM_DONOTREMOVE = 0,
wxANIM_TOBACKGROUND = 1,
wxANIM_TOPREVIOUS = 2
} ;
/* wxAnimationPlayer
* Create an object of this class, and either pass an wxXXXAnimation object in
* the constructor, or call SetAnimation. Then call Play(). The wxAnimation
* object is only destroyed in the destructor if destroyAnimation is true in
* the constructor.
*/
class wxAnimationPlayer : public wxObject
{
public:
wxAnimationPlayer(wxAnimationBase *animation = NULL,
bool destroyAnimation = false);
~wxAnimationPlayer();
void SetAnimation(wxAnimationBase* animation, bool destroyAnimation = false);
wxAnimationBase* GetAnimation() const;
void SetDestroyAnimation(bool destroyAnimation);
bool GetDestroyAnimation() const;
void SetCurrentFrame(int currentFrame);
int GetCurrentFrame() const;
void SetWindow(wxWindow* window);
wxWindow* GetWindow() const;
void SetPosition(const wxPoint& pos);
wxPoint GetPosition() const;
void SetLooped(bool looped);
bool GetLooped() const;
bool HasAnimation() const;
bool IsPlaying() const;
// Specify whether the GIF's background colour is to be shown,
// or whether the window background should show through (the default)
void UseBackgroundColour(bool useBackground);
bool UsingBackgroundColour() const;
// Set and use a user-specified background colour (valid for transparent
// animations only)
void SetCustomBackgroundColour(const wxColour& col,
bool useCustomBackgroundColour = true);
bool UsingCustomBackgroundColour() const;
const wxColour& GetCustomBackgroundColour() const;
// Another refinement - suppose we're drawing the animation in a separate
// control or window. We may wish to use the background of the parent
// window as the background of our animation. This allows us to specify
// whether to grab from the parent or from this window.
void UseParentBackground(bool useParent);
bool UsingParentBackground() const;
// Play
virtual bool Play(wxWindow& window, const wxPoint& pos = wxPoint(0, 0), bool looped = true);
// Build animation (list of wxImages). If not called before Play
// is called, Play will call this automatically.
virtual bool Build();
// Stop the animation
virtual void Stop();
// Draw the current view of the animation into this DC.
// Call this from your OnPaint, for example.
virtual void Draw(wxDC& dc);
virtual int GetFrameCount() const;
%newobject GetFrame;
virtual wxImage* GetFrame(int i) const; // Creates a new wxImage
virtual wxAnimationDisposal GetDisposalMethod(int i) const;
virtual wxRect GetFrameRect(int i) const; // Position and size of frame
virtual int GetDelay(int i) const; // Delay for this frame
virtual wxSize GetLogicalScreenSize() const;
virtual bool GetBackgroundColour(wxColour& col) const ;
virtual bool GetTransparentColour(wxColour& col) const ;
// Play the frame
virtual bool PlayFrame(int frame, wxWindow& window, const wxPoint& pos);
%Rename(PlayNextFrame,
virtual bool, PlayFrame());
virtual void DrawFrame(int frame, wxDC& dc, const wxPoint& pos);
virtual void DrawBackground(wxDC& dc, const wxPoint& pos, const wxColour& colour);
// Clear the wxImage cache
virtual void ClearCache();
// Save the pertinent area of the window so we can restore
// it if drawing transparently
void SaveBackground(const wxRect& rect);
wxBitmap& GetBackingStore();
};
//---------------------------------------------------------------------------
/* wxAnimationBase
* Base class for animations.
* A wxXXXAnimation only stores the animation, providing accessors to
* wxAnimationPlayer. Currently an animation is read-only, but we could
* extend the API for adding frames programmatically, and perhaps have a
* wxMemoryAnimation class that stores its frames in memory, and is able to
* save all files with suitable filenames. You could then use e.g. Ulead GIF
* Animator to load the image files into a GIF animation.
*/
class wxAnimationBase : public wxObject
{
public:
//wxAnimationBase() {}; // It's an ABC
~wxAnimationBase() {};
//// Accessors. Should be overridden by each derived class.
virtual int GetFrameCount() const;
%newobject GetFrame;
virtual wxImage* GetFrame(int i) const;
virtual wxAnimationDisposal GetDisposalMethod(int i) const;
virtual wxRect GetFrameRect(int i) const; // Position and size of frame
virtual int GetDelay(int i) const; // Delay for this frame
virtual wxSize GetLogicalScreenSize() const;
virtual bool GetBackgroundColour(wxColour& col) const;
virtual bool GetTransparentColour(wxColour& col) const;
// Is the animation OK?
virtual bool IsValid() const;
virtual bool LoadFile(const wxString& filename);
};
// TODO: Add a wxPyAnimationBase class
//---------------------------------------------------------------------------
/* wxGIFAnimation
* This will be moved to a separate file in due course.
*/
class wxGIFAnimation : public wxAnimationBase
{
public:
wxGIFAnimation() ;
~wxGIFAnimation() ;
//// Accessors
virtual int GetFrameCount() const;
%newobject GetFrame;
virtual wxImage* GetFrame(int i) const;
virtual wxAnimationDisposal GetDisposalMethod(int i) const;
virtual wxRect GetFrameRect(int i) const; // Position and size of frame
virtual int GetDelay(int i) const; // Delay for this frame
virtual wxSize GetLogicalScreenSize() const ;
virtual bool GetBackgroundColour(wxColour& col) const ;
virtual bool GetTransparentColour(wxColour& col) const ;
virtual bool IsValid() const;
//// Operations
virtual bool LoadFile(const wxString& filename);
};
//---------------------------------------------------------------------------
/*
* wxAnimationCtrlBase
* Abstract base class for format-specific animation controls.
* This class implements most of the functionality; all a derived
* class has to do is create the appropriate animation class on demand.
*/
// Resize to animation size if this is set
enum { wxAN_FIT_ANIMATION };
// class wxAnimationCtrlBase: public wxControl
// {
// public:
// %pythonAppend wxAnimationCtrlBase "self._setOORInfo(self)"
// %pythonAppend wxAnimationCtrlBase() ""
// wxAnimationCtrlBase(wxWindow *parent, wxWindowID id,
// const wxString& filename = wxPyEmptyString,
// const wxPoint& pos = wxDefaultPosition,
// const wxSize& size = wxDefaultSize,
// long style = wxAN_FIT_ANIMATION|wxNO_BORDER,
// const wxString& name = wxPyAnimationControlNameStr);
// %RenameCtor(PreAnimationCtrlBase, wxAnimationCtrlBase());
// bool Create(wxWindow *parent, wxWindowID id,
// const wxString& filename = wxPyEmptyString,
// const wxPoint& pos = wxDefaultPosition,
// const wxSize& size = wxDefaultSize,
// long style = wxAN_FIT_ANIMATION|wxNO_BORDER,
// const wxString& name = wxPyAnimationControlNameStr);
// //// Operations
// virtual bool LoadFile(const wxString& filename = wxPyEmptyString);
// virtual bool Play(bool looped = true) ;
// virtual void Stop();
// virtual void FitToAnimation();
// //// Accessors
// virtual bool IsPlaying() const;
// virtual wxAnimationPlayer& GetPlayer();
// virtual wxAnimationBase* GetAnimation();
// const wxString& GetFilename() const;
// void SetFilename(const wxString& filename);
// };
/*
* wxGIFAnimationCtrl
* Provides a GIF animation class when required.
*/
MustHaveApp(wxGIFAnimationCtrl);
class wxGIFAnimationCtrl: public wxControl //wxAnimationCtrlBase
{
public:
%pythonAppend wxGIFAnimationCtrl "self._setOORInfo(self)"
%pythonAppend wxGIFAnimationCtrl() ""
wxGIFAnimationCtrl(wxWindow *parent, wxWindowID id=-1,
const wxString& filename = wxPyEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxAN_FIT_ANIMATION|wxNO_BORDER,
const wxString& name = wxPyAnimationControlNameStr);
%RenameCtor(PreGIFAnimationCtrl, wxGIFAnimationCtrl());
bool Create(wxWindow *parent, wxWindowID id=-1,
const wxString& filename = wxPyEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxAN_FIT_ANIMATION|wxNO_BORDER,
const wxString& name = wxPyAnimationControlNameStr);
//// Operations
virtual bool LoadFile(const wxString& filename = wxPyEmptyString);
virtual bool Play(bool looped = true) ;
virtual void Stop();
virtual void FitToAnimation();
//// Accessors
virtual bool IsPlaying() const;
virtual wxAnimationPlayer& GetPlayer();
virtual wxAnimationBase* GetAnimation();
const wxString& GetFilename() const;
void SetFilename(const wxString& filename);
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------

View File

@@ -1,447 +0,0 @@
# This file was created automatically by SWIG 1.3.27.
# Don't modify this file, modify the SWIG interface instead.
"""
Simple animation player classes, including `GIFAnimationCtrl` for displaying
animated GIF files
"""
import _animate
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "this"):
if isinstance(value, class_type):
self.__dict__[name] = value.this
if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
del value.thisown
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static) or hasattr(self,name) or (name == "thisown"):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError,name
import types
try:
_object = types.ObjectType
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
del types
def _swig_setattr_nondynamic_method(set):
def set_attr(self,name,value):
if hasattr(self,name) or (name in ("this", "thisown")):
set(self,name,value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
return set_attr
import _core
import wx
__docfilter__ = wx._core.__DocFilter(globals())
ANIM_UNSPECIFIED = _animate.ANIM_UNSPECIFIED
ANIM_DONOTREMOVE = _animate.ANIM_DONOTREMOVE
ANIM_TOBACKGROUND = _animate.ANIM_TOBACKGROUND
ANIM_TOPREVIOUS = _animate.ANIM_TOPREVIOUS
class AnimationPlayer(_core.Object):
"""Proxy of C++ AnimationPlayer class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxAnimationPlayer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""__init__(self, AnimationBase animation=None, bool destroyAnimation=False) -> AnimationPlayer"""
newobj = _animate.new_AnimationPlayer(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_animate.delete_AnimationPlayer):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def SetAnimation(*args, **kwargs):
"""SetAnimation(self, AnimationBase animation, bool destroyAnimation=False)"""
return _animate.AnimationPlayer_SetAnimation(*args, **kwargs)
def GetAnimation(*args, **kwargs):
"""GetAnimation(self) -> AnimationBase"""
return _animate.AnimationPlayer_GetAnimation(*args, **kwargs)
def SetDestroyAnimation(*args, **kwargs):
"""SetDestroyAnimation(self, bool destroyAnimation)"""
return _animate.AnimationPlayer_SetDestroyAnimation(*args, **kwargs)
def GetDestroyAnimation(*args, **kwargs):
"""GetDestroyAnimation(self) -> bool"""
return _animate.AnimationPlayer_GetDestroyAnimation(*args, **kwargs)
def SetCurrentFrame(*args, **kwargs):
"""SetCurrentFrame(self, int currentFrame)"""
return _animate.AnimationPlayer_SetCurrentFrame(*args, **kwargs)
def GetCurrentFrame(*args, **kwargs):
"""GetCurrentFrame(self) -> int"""
return _animate.AnimationPlayer_GetCurrentFrame(*args, **kwargs)
def SetWindow(*args, **kwargs):
"""SetWindow(self, Window window)"""
return _animate.AnimationPlayer_SetWindow(*args, **kwargs)
def GetWindow(*args, **kwargs):
"""GetWindow(self) -> Window"""
return _animate.AnimationPlayer_GetWindow(*args, **kwargs)
def SetPosition(*args, **kwargs):
"""SetPosition(self, Point pos)"""
return _animate.AnimationPlayer_SetPosition(*args, **kwargs)
def GetPosition(*args, **kwargs):
"""GetPosition(self) -> Point"""
return _animate.AnimationPlayer_GetPosition(*args, **kwargs)
def SetLooped(*args, **kwargs):
"""SetLooped(self, bool looped)"""
return _animate.AnimationPlayer_SetLooped(*args, **kwargs)
def GetLooped(*args, **kwargs):
"""GetLooped(self) -> bool"""
return _animate.AnimationPlayer_GetLooped(*args, **kwargs)
def HasAnimation(*args, **kwargs):
"""HasAnimation(self) -> bool"""
return _animate.AnimationPlayer_HasAnimation(*args, **kwargs)
def IsPlaying(*args, **kwargs):
"""IsPlaying(self) -> bool"""
return _animate.AnimationPlayer_IsPlaying(*args, **kwargs)
def UseBackgroundColour(*args, **kwargs):
"""UseBackgroundColour(self, bool useBackground)"""
return _animate.AnimationPlayer_UseBackgroundColour(*args, **kwargs)
def UsingBackgroundColour(*args, **kwargs):
"""UsingBackgroundColour(self) -> bool"""
return _animate.AnimationPlayer_UsingBackgroundColour(*args, **kwargs)
def SetCustomBackgroundColour(*args, **kwargs):
"""SetCustomBackgroundColour(self, Colour col, bool useCustomBackgroundColour=True)"""
return _animate.AnimationPlayer_SetCustomBackgroundColour(*args, **kwargs)
def UsingCustomBackgroundColour(*args, **kwargs):
"""UsingCustomBackgroundColour(self) -> bool"""
return _animate.AnimationPlayer_UsingCustomBackgroundColour(*args, **kwargs)
def GetCustomBackgroundColour(*args, **kwargs):
"""GetCustomBackgroundColour(self) -> Colour"""
return _animate.AnimationPlayer_GetCustomBackgroundColour(*args, **kwargs)
def UseParentBackground(*args, **kwargs):
"""UseParentBackground(self, bool useParent)"""
return _animate.AnimationPlayer_UseParentBackground(*args, **kwargs)
def UsingParentBackground(*args, **kwargs):
"""UsingParentBackground(self) -> bool"""
return _animate.AnimationPlayer_UsingParentBackground(*args, **kwargs)
def Play(*args, **kwargs):
"""Play(self, Window window, Point pos=wxPoint(0, 0), bool looped=True) -> bool"""
return _animate.AnimationPlayer_Play(*args, **kwargs)
def Build(*args, **kwargs):
"""Build(self) -> bool"""
return _animate.AnimationPlayer_Build(*args, **kwargs)
def Stop(*args, **kwargs):
"""Stop(self)"""
return _animate.AnimationPlayer_Stop(*args, **kwargs)
def Draw(*args, **kwargs):
"""Draw(self, DC dc)"""
return _animate.AnimationPlayer_Draw(*args, **kwargs)
def GetFrameCount(*args, **kwargs):
"""GetFrameCount(self) -> int"""
return _animate.AnimationPlayer_GetFrameCount(*args, **kwargs)
def GetFrame(*args, **kwargs):
"""GetFrame(self, int i) -> Image"""
return _animate.AnimationPlayer_GetFrame(*args, **kwargs)
def GetDisposalMethod(*args, **kwargs):
"""GetDisposalMethod(self, int i) -> int"""
return _animate.AnimationPlayer_GetDisposalMethod(*args, **kwargs)
def GetFrameRect(*args, **kwargs):
"""GetFrameRect(self, int i) -> Rect"""
return _animate.AnimationPlayer_GetFrameRect(*args, **kwargs)
def GetDelay(*args, **kwargs):
"""GetDelay(self, int i) -> int"""
return _animate.AnimationPlayer_GetDelay(*args, **kwargs)
def GetLogicalScreenSize(*args, **kwargs):
"""GetLogicalScreenSize(self) -> Size"""
return _animate.AnimationPlayer_GetLogicalScreenSize(*args, **kwargs)
def GetBackgroundColour(*args, **kwargs):
"""GetBackgroundColour(self, Colour col) -> bool"""
return _animate.AnimationPlayer_GetBackgroundColour(*args, **kwargs)
def GetTransparentColour(*args, **kwargs):
"""GetTransparentColour(self, Colour col) -> bool"""
return _animate.AnimationPlayer_GetTransparentColour(*args, **kwargs)
def PlayFrame(*args, **kwargs):
"""PlayFrame(self, int frame, Window window, Point pos) -> bool"""
return _animate.AnimationPlayer_PlayFrame(*args, **kwargs)
def PlayNextFrame(*args, **kwargs):
"""PlayNextFrame(self) -> bool"""
return _animate.AnimationPlayer_PlayNextFrame(*args, **kwargs)
def DrawFrame(*args, **kwargs):
"""DrawFrame(self, int frame, DC dc, Point pos)"""
return _animate.AnimationPlayer_DrawFrame(*args, **kwargs)
def DrawBackground(*args, **kwargs):
"""DrawBackground(self, DC dc, Point pos, Colour colour)"""
return _animate.AnimationPlayer_DrawBackground(*args, **kwargs)
def ClearCache(*args, **kwargs):
"""ClearCache(self)"""
return _animate.AnimationPlayer_ClearCache(*args, **kwargs)
def SaveBackground(*args, **kwargs):
"""SaveBackground(self, Rect rect)"""
return _animate.AnimationPlayer_SaveBackground(*args, **kwargs)
def GetBackingStore(*args, **kwargs):
"""GetBackingStore(self) -> Bitmap"""
return _animate.AnimationPlayer_GetBackingStore(*args, **kwargs)
class AnimationPlayerPtr(AnimationPlayer):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = AnimationPlayer
_animate.AnimationPlayer_swigregister(AnimationPlayerPtr)
cvar = _animate.cvar
AnimationControlNameStr = cvar.AnimationControlNameStr
class AnimationBase(_core.Object):
"""Proxy of C++ AnimationBase class"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxAnimationBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __del__(self, destroy=_animate.delete_AnimationBase):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def GetFrameCount(*args, **kwargs):
"""GetFrameCount(self) -> int"""
return _animate.AnimationBase_GetFrameCount(*args, **kwargs)
def GetFrame(*args, **kwargs):
"""GetFrame(self, int i) -> Image"""
return _animate.AnimationBase_GetFrame(*args, **kwargs)
def GetDisposalMethod(*args, **kwargs):
"""GetDisposalMethod(self, int i) -> int"""
return _animate.AnimationBase_GetDisposalMethod(*args, **kwargs)
def GetFrameRect(*args, **kwargs):
"""GetFrameRect(self, int i) -> Rect"""
return _animate.AnimationBase_GetFrameRect(*args, **kwargs)
def GetDelay(*args, **kwargs):
"""GetDelay(self, int i) -> int"""
return _animate.AnimationBase_GetDelay(*args, **kwargs)
def GetLogicalScreenSize(*args, **kwargs):
"""GetLogicalScreenSize(self) -> Size"""
return _animate.AnimationBase_GetLogicalScreenSize(*args, **kwargs)
def GetBackgroundColour(*args, **kwargs):
"""GetBackgroundColour(self, Colour col) -> bool"""
return _animate.AnimationBase_GetBackgroundColour(*args, **kwargs)
def GetTransparentColour(*args, **kwargs):
"""GetTransparentColour(self, Colour col) -> bool"""
return _animate.AnimationBase_GetTransparentColour(*args, **kwargs)
def IsValid(*args, **kwargs):
"""IsValid(self) -> bool"""
return _animate.AnimationBase_IsValid(*args, **kwargs)
def LoadFile(*args, **kwargs):
"""LoadFile(self, String filename) -> bool"""
return _animate.AnimationBase_LoadFile(*args, **kwargs)
class AnimationBasePtr(AnimationBase):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = AnimationBase
_animate.AnimationBase_swigregister(AnimationBasePtr)
class GIFAnimation(AnimationBase):
"""Proxy of C++ GIFAnimation class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGIFAnimation instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""__init__(self) -> GIFAnimation"""
newobj = _animate.new_GIFAnimation(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_animate.delete_GIFAnimation):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def GetFrameCount(*args, **kwargs):
"""GetFrameCount(self) -> int"""
return _animate.GIFAnimation_GetFrameCount(*args, **kwargs)
def GetFrame(*args, **kwargs):
"""GetFrame(self, int i) -> Image"""
return _animate.GIFAnimation_GetFrame(*args, **kwargs)
def GetDisposalMethod(*args, **kwargs):
"""GetDisposalMethod(self, int i) -> int"""
return _animate.GIFAnimation_GetDisposalMethod(*args, **kwargs)
def GetFrameRect(*args, **kwargs):
"""GetFrameRect(self, int i) -> Rect"""
return _animate.GIFAnimation_GetFrameRect(*args, **kwargs)
def GetDelay(*args, **kwargs):
"""GetDelay(self, int i) -> int"""
return _animate.GIFAnimation_GetDelay(*args, **kwargs)
def GetLogicalScreenSize(*args, **kwargs):
"""GetLogicalScreenSize(self) -> Size"""
return _animate.GIFAnimation_GetLogicalScreenSize(*args, **kwargs)
def GetBackgroundColour(*args, **kwargs):
"""GetBackgroundColour(self, Colour col) -> bool"""
return _animate.GIFAnimation_GetBackgroundColour(*args, **kwargs)
def GetTransparentColour(*args, **kwargs):
"""GetTransparentColour(self, Colour col) -> bool"""
return _animate.GIFAnimation_GetTransparentColour(*args, **kwargs)
def IsValid(*args, **kwargs):
"""IsValid(self) -> bool"""
return _animate.GIFAnimation_IsValid(*args, **kwargs)
def LoadFile(*args, **kwargs):
"""LoadFile(self, String filename) -> bool"""
return _animate.GIFAnimation_LoadFile(*args, **kwargs)
class GIFAnimationPtr(GIFAnimation):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = GIFAnimation
_animate.GIFAnimation_swigregister(GIFAnimationPtr)
AN_FIT_ANIMATION = _animate.AN_FIT_ANIMATION
class GIFAnimationCtrl(_core.Control):
"""Proxy of C++ GIFAnimationCtrl class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGIFAnimationCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
__init__(self, Window parent, int id=-1, String filename=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=wxAN_FIT_ANIMATION|wxNO_BORDER,
String name=AnimationControlNameStr) -> GIFAnimationCtrl
"""
newobj = _animate.new_GIFAnimationCtrl(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
self._setOORInfo(self)
def Create(*args, **kwargs):
"""
Create(self, Window parent, int id=-1, String filename=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=wxAN_FIT_ANIMATION|wxNO_BORDER,
String name=AnimationControlNameStr) -> bool
"""
return _animate.GIFAnimationCtrl_Create(*args, **kwargs)
def LoadFile(*args, **kwargs):
"""LoadFile(self, String filename=EmptyString) -> bool"""
return _animate.GIFAnimationCtrl_LoadFile(*args, **kwargs)
def Play(*args, **kwargs):
"""Play(self, bool looped=True) -> bool"""
return _animate.GIFAnimationCtrl_Play(*args, **kwargs)
def Stop(*args, **kwargs):
"""Stop(self)"""
return _animate.GIFAnimationCtrl_Stop(*args, **kwargs)
def FitToAnimation(*args, **kwargs):
"""FitToAnimation(self)"""
return _animate.GIFAnimationCtrl_FitToAnimation(*args, **kwargs)
def IsPlaying(*args, **kwargs):
"""IsPlaying(self) -> bool"""
return _animate.GIFAnimationCtrl_IsPlaying(*args, **kwargs)
def GetPlayer(*args, **kwargs):
"""GetPlayer(self) -> AnimationPlayer"""
return _animate.GIFAnimationCtrl_GetPlayer(*args, **kwargs)
def GetAnimation(*args, **kwargs):
"""GetAnimation(self) -> AnimationBase"""
return _animate.GIFAnimationCtrl_GetAnimation(*args, **kwargs)
def GetFilename(*args, **kwargs):
"""GetFilename(self) -> String"""
return _animate.GIFAnimationCtrl_GetFilename(*args, **kwargs)
def SetFilename(*args, **kwargs):
"""SetFilename(self, String filename)"""
return _animate.GIFAnimationCtrl_SetFilename(*args, **kwargs)
class GIFAnimationCtrlPtr(GIFAnimationCtrl):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = GIFAnimationCtrl
_animate.GIFAnimationCtrl_swigregister(GIFAnimationCtrlPtr)
def PreGIFAnimationCtrl(*args, **kwargs):
"""PreGIFAnimationCtrl() -> GIFAnimationCtrl"""
val = _animate.new_PreGIFAnimationCtrl(*args, **kwargs)
val.thisown = 1
return val

File diff suppressed because one or more lines are too long

View File

@@ -1,447 +0,0 @@
# This file was created automatically by SWIG 1.3.27.
# Don't modify this file, modify the SWIG interface instead.
"""
Simple animation player classes, including `GIFAnimationCtrl` for displaying
animated GIF files
"""
import _animate
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "this"):
if isinstance(value, class_type):
self.__dict__[name] = value.this
if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
del value.thisown
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static) or hasattr(self,name) or (name == "thisown"):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError,name
import types
try:
_object = types.ObjectType
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
del types
def _swig_setattr_nondynamic_method(set):
def set_attr(self,name,value):
if hasattr(self,name) or (name in ("this", "thisown")):
set(self,name,value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
return set_attr
import _core
import wx
__docfilter__ = wx._core.__DocFilter(globals())
ANIM_UNSPECIFIED = _animate.ANIM_UNSPECIFIED
ANIM_DONOTREMOVE = _animate.ANIM_DONOTREMOVE
ANIM_TOBACKGROUND = _animate.ANIM_TOBACKGROUND
ANIM_TOPREVIOUS = _animate.ANIM_TOPREVIOUS
class AnimationPlayer(_core.Object):
"""Proxy of C++ AnimationPlayer class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxAnimationPlayer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""__init__(self, AnimationBase animation=None, bool destroyAnimation=False) -> AnimationPlayer"""
newobj = _animate.new_AnimationPlayer(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_animate.delete_AnimationPlayer):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def SetAnimation(*args, **kwargs):
"""SetAnimation(self, AnimationBase animation, bool destroyAnimation=False)"""
return _animate.AnimationPlayer_SetAnimation(*args, **kwargs)
def GetAnimation(*args, **kwargs):
"""GetAnimation(self) -> AnimationBase"""
return _animate.AnimationPlayer_GetAnimation(*args, **kwargs)
def SetDestroyAnimation(*args, **kwargs):
"""SetDestroyAnimation(self, bool destroyAnimation)"""
return _animate.AnimationPlayer_SetDestroyAnimation(*args, **kwargs)
def GetDestroyAnimation(*args, **kwargs):
"""GetDestroyAnimation(self) -> bool"""
return _animate.AnimationPlayer_GetDestroyAnimation(*args, **kwargs)
def SetCurrentFrame(*args, **kwargs):
"""SetCurrentFrame(self, int currentFrame)"""
return _animate.AnimationPlayer_SetCurrentFrame(*args, **kwargs)
def GetCurrentFrame(*args, **kwargs):
"""GetCurrentFrame(self) -> int"""
return _animate.AnimationPlayer_GetCurrentFrame(*args, **kwargs)
def SetWindow(*args, **kwargs):
"""SetWindow(self, Window window)"""
return _animate.AnimationPlayer_SetWindow(*args, **kwargs)
def GetWindow(*args, **kwargs):
"""GetWindow(self) -> Window"""
return _animate.AnimationPlayer_GetWindow(*args, **kwargs)
def SetPosition(*args, **kwargs):
"""SetPosition(self, Point pos)"""
return _animate.AnimationPlayer_SetPosition(*args, **kwargs)
def GetPosition(*args, **kwargs):
"""GetPosition(self) -> Point"""
return _animate.AnimationPlayer_GetPosition(*args, **kwargs)
def SetLooped(*args, **kwargs):
"""SetLooped(self, bool looped)"""
return _animate.AnimationPlayer_SetLooped(*args, **kwargs)
def GetLooped(*args, **kwargs):
"""GetLooped(self) -> bool"""
return _animate.AnimationPlayer_GetLooped(*args, **kwargs)
def HasAnimation(*args, **kwargs):
"""HasAnimation(self) -> bool"""
return _animate.AnimationPlayer_HasAnimation(*args, **kwargs)
def IsPlaying(*args, **kwargs):
"""IsPlaying(self) -> bool"""
return _animate.AnimationPlayer_IsPlaying(*args, **kwargs)
def UseBackgroundColour(*args, **kwargs):
"""UseBackgroundColour(self, bool useBackground)"""
return _animate.AnimationPlayer_UseBackgroundColour(*args, **kwargs)
def UsingBackgroundColour(*args, **kwargs):
"""UsingBackgroundColour(self) -> bool"""
return _animate.AnimationPlayer_UsingBackgroundColour(*args, **kwargs)
def SetCustomBackgroundColour(*args, **kwargs):
"""SetCustomBackgroundColour(self, Colour col, bool useCustomBackgroundColour=True)"""
return _animate.AnimationPlayer_SetCustomBackgroundColour(*args, **kwargs)
def UsingCustomBackgroundColour(*args, **kwargs):
"""UsingCustomBackgroundColour(self) -> bool"""
return _animate.AnimationPlayer_UsingCustomBackgroundColour(*args, **kwargs)
def GetCustomBackgroundColour(*args, **kwargs):
"""GetCustomBackgroundColour(self) -> Colour"""
return _animate.AnimationPlayer_GetCustomBackgroundColour(*args, **kwargs)
def UseParentBackground(*args, **kwargs):
"""UseParentBackground(self, bool useParent)"""
return _animate.AnimationPlayer_UseParentBackground(*args, **kwargs)
def UsingParentBackground(*args, **kwargs):
"""UsingParentBackground(self) -> bool"""
return _animate.AnimationPlayer_UsingParentBackground(*args, **kwargs)
def Play(*args, **kwargs):
"""Play(self, Window window, Point pos=wxPoint(0, 0), bool looped=True) -> bool"""
return _animate.AnimationPlayer_Play(*args, **kwargs)
def Build(*args, **kwargs):
"""Build(self) -> bool"""
return _animate.AnimationPlayer_Build(*args, **kwargs)
def Stop(*args, **kwargs):
"""Stop(self)"""
return _animate.AnimationPlayer_Stop(*args, **kwargs)
def Draw(*args, **kwargs):
"""Draw(self, DC dc)"""
return _animate.AnimationPlayer_Draw(*args, **kwargs)
def GetFrameCount(*args, **kwargs):
"""GetFrameCount(self) -> int"""
return _animate.AnimationPlayer_GetFrameCount(*args, **kwargs)
def GetFrame(*args, **kwargs):
"""GetFrame(self, int i) -> Image"""
return _animate.AnimationPlayer_GetFrame(*args, **kwargs)
def GetDisposalMethod(*args, **kwargs):
"""GetDisposalMethod(self, int i) -> int"""
return _animate.AnimationPlayer_GetDisposalMethod(*args, **kwargs)
def GetFrameRect(*args, **kwargs):
"""GetFrameRect(self, int i) -> Rect"""
return _animate.AnimationPlayer_GetFrameRect(*args, **kwargs)
def GetDelay(*args, **kwargs):
"""GetDelay(self, int i) -> int"""
return _animate.AnimationPlayer_GetDelay(*args, **kwargs)
def GetLogicalScreenSize(*args, **kwargs):
"""GetLogicalScreenSize(self) -> Size"""
return _animate.AnimationPlayer_GetLogicalScreenSize(*args, **kwargs)
def GetBackgroundColour(*args, **kwargs):
"""GetBackgroundColour(self, Colour col) -> bool"""
return _animate.AnimationPlayer_GetBackgroundColour(*args, **kwargs)
def GetTransparentColour(*args, **kwargs):
"""GetTransparentColour(self, Colour col) -> bool"""
return _animate.AnimationPlayer_GetTransparentColour(*args, **kwargs)
def PlayFrame(*args, **kwargs):
"""PlayFrame(self, int frame, Window window, Point pos) -> bool"""
return _animate.AnimationPlayer_PlayFrame(*args, **kwargs)
def PlayNextFrame(*args, **kwargs):
"""PlayNextFrame(self) -> bool"""
return _animate.AnimationPlayer_PlayNextFrame(*args, **kwargs)
def DrawFrame(*args, **kwargs):
"""DrawFrame(self, int frame, DC dc, Point pos)"""
return _animate.AnimationPlayer_DrawFrame(*args, **kwargs)
def DrawBackground(*args, **kwargs):
"""DrawBackground(self, DC dc, Point pos, Colour colour)"""
return _animate.AnimationPlayer_DrawBackground(*args, **kwargs)
def ClearCache(*args, **kwargs):
"""ClearCache(self)"""
return _animate.AnimationPlayer_ClearCache(*args, **kwargs)
def SaveBackground(*args, **kwargs):
"""SaveBackground(self, Rect rect)"""
return _animate.AnimationPlayer_SaveBackground(*args, **kwargs)
def GetBackingStore(*args, **kwargs):
"""GetBackingStore(self) -> Bitmap"""
return _animate.AnimationPlayer_GetBackingStore(*args, **kwargs)
class AnimationPlayerPtr(AnimationPlayer):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = AnimationPlayer
_animate.AnimationPlayer_swigregister(AnimationPlayerPtr)
cvar = _animate.cvar
AnimationControlNameStr = cvar.AnimationControlNameStr
class AnimationBase(_core.Object):
"""Proxy of C++ AnimationBase class"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxAnimationBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __del__(self, destroy=_animate.delete_AnimationBase):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def GetFrameCount(*args, **kwargs):
"""GetFrameCount(self) -> int"""
return _animate.AnimationBase_GetFrameCount(*args, **kwargs)
def GetFrame(*args, **kwargs):
"""GetFrame(self, int i) -> Image"""
return _animate.AnimationBase_GetFrame(*args, **kwargs)
def GetDisposalMethod(*args, **kwargs):
"""GetDisposalMethod(self, int i) -> int"""
return _animate.AnimationBase_GetDisposalMethod(*args, **kwargs)
def GetFrameRect(*args, **kwargs):
"""GetFrameRect(self, int i) -> Rect"""
return _animate.AnimationBase_GetFrameRect(*args, **kwargs)
def GetDelay(*args, **kwargs):
"""GetDelay(self, int i) -> int"""
return _animate.AnimationBase_GetDelay(*args, **kwargs)
def GetLogicalScreenSize(*args, **kwargs):
"""GetLogicalScreenSize(self) -> Size"""
return _animate.AnimationBase_GetLogicalScreenSize(*args, **kwargs)
def GetBackgroundColour(*args, **kwargs):
"""GetBackgroundColour(self, Colour col) -> bool"""
return _animate.AnimationBase_GetBackgroundColour(*args, **kwargs)
def GetTransparentColour(*args, **kwargs):
"""GetTransparentColour(self, Colour col) -> bool"""
return _animate.AnimationBase_GetTransparentColour(*args, **kwargs)
def IsValid(*args, **kwargs):
"""IsValid(self) -> bool"""
return _animate.AnimationBase_IsValid(*args, **kwargs)
def LoadFile(*args, **kwargs):
"""LoadFile(self, String filename) -> bool"""
return _animate.AnimationBase_LoadFile(*args, **kwargs)
class AnimationBasePtr(AnimationBase):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = AnimationBase
_animate.AnimationBase_swigregister(AnimationBasePtr)
class GIFAnimation(AnimationBase):
"""Proxy of C++ GIFAnimation class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGIFAnimation instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""__init__(self) -> GIFAnimation"""
newobj = _animate.new_GIFAnimation(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_animate.delete_GIFAnimation):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def GetFrameCount(*args, **kwargs):
"""GetFrameCount(self) -> int"""
return _animate.GIFAnimation_GetFrameCount(*args, **kwargs)
def GetFrame(*args, **kwargs):
"""GetFrame(self, int i) -> Image"""
return _animate.GIFAnimation_GetFrame(*args, **kwargs)
def GetDisposalMethod(*args, **kwargs):
"""GetDisposalMethod(self, int i) -> int"""
return _animate.GIFAnimation_GetDisposalMethod(*args, **kwargs)
def GetFrameRect(*args, **kwargs):
"""GetFrameRect(self, int i) -> Rect"""
return _animate.GIFAnimation_GetFrameRect(*args, **kwargs)
def GetDelay(*args, **kwargs):
"""GetDelay(self, int i) -> int"""
return _animate.GIFAnimation_GetDelay(*args, **kwargs)
def GetLogicalScreenSize(*args, **kwargs):
"""GetLogicalScreenSize(self) -> Size"""
return _animate.GIFAnimation_GetLogicalScreenSize(*args, **kwargs)
def GetBackgroundColour(*args, **kwargs):
"""GetBackgroundColour(self, Colour col) -> bool"""
return _animate.GIFAnimation_GetBackgroundColour(*args, **kwargs)
def GetTransparentColour(*args, **kwargs):
"""GetTransparentColour(self, Colour col) -> bool"""
return _animate.GIFAnimation_GetTransparentColour(*args, **kwargs)
def IsValid(*args, **kwargs):
"""IsValid(self) -> bool"""
return _animate.GIFAnimation_IsValid(*args, **kwargs)
def LoadFile(*args, **kwargs):
"""LoadFile(self, String filename) -> bool"""
return _animate.GIFAnimation_LoadFile(*args, **kwargs)
class GIFAnimationPtr(GIFAnimation):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = GIFAnimation
_animate.GIFAnimation_swigregister(GIFAnimationPtr)
AN_FIT_ANIMATION = _animate.AN_FIT_ANIMATION
class GIFAnimationCtrl(_core.Control):
"""Proxy of C++ GIFAnimationCtrl class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGIFAnimationCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
__init__(self, Window parent, int id=-1, String filename=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=wxAN_FIT_ANIMATION|wxNO_BORDER,
String name=AnimationControlNameStr) -> GIFAnimationCtrl
"""
newobj = _animate.new_GIFAnimationCtrl(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
self._setOORInfo(self)
def Create(*args, **kwargs):
"""
Create(self, Window parent, int id=-1, String filename=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=wxAN_FIT_ANIMATION|wxNO_BORDER,
String name=AnimationControlNameStr) -> bool
"""
return _animate.GIFAnimationCtrl_Create(*args, **kwargs)
def LoadFile(*args, **kwargs):
"""LoadFile(self, String filename=EmptyString) -> bool"""
return _animate.GIFAnimationCtrl_LoadFile(*args, **kwargs)
def Play(*args, **kwargs):
"""Play(self, bool looped=True) -> bool"""
return _animate.GIFAnimationCtrl_Play(*args, **kwargs)
def Stop(*args, **kwargs):
"""Stop(self)"""
return _animate.GIFAnimationCtrl_Stop(*args, **kwargs)
def FitToAnimation(*args, **kwargs):
"""FitToAnimation(self)"""
return _animate.GIFAnimationCtrl_FitToAnimation(*args, **kwargs)
def IsPlaying(*args, **kwargs):
"""IsPlaying(self) -> bool"""
return _animate.GIFAnimationCtrl_IsPlaying(*args, **kwargs)
def GetPlayer(*args, **kwargs):
"""GetPlayer(self) -> AnimationPlayer"""
return _animate.GIFAnimationCtrl_GetPlayer(*args, **kwargs)
def GetAnimation(*args, **kwargs):
"""GetAnimation(self) -> AnimationBase"""
return _animate.GIFAnimationCtrl_GetAnimation(*args, **kwargs)
def GetFilename(*args, **kwargs):
"""GetFilename(self) -> String"""
return _animate.GIFAnimationCtrl_GetFilename(*args, **kwargs)
def SetFilename(*args, **kwargs):
"""SetFilename(self, String filename)"""
return _animate.GIFAnimationCtrl_SetFilename(*args, **kwargs)
class GIFAnimationCtrlPtr(GIFAnimationCtrl):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = GIFAnimationCtrl
_animate.GIFAnimationCtrl_swigregister(GIFAnimationCtrlPtr)
def PreGIFAnimationCtrl(*args, **kwargs):
"""PreGIFAnimationCtrl() -> GIFAnimationCtrl"""
val = _animate.new_PreGIFAnimationCtrl(*args, **kwargs)
val.thisown = 1
return val

File diff suppressed because one or more lines are too long

View File

@@ -1,447 +0,0 @@
# This file was created automatically by SWIG 1.3.27.
# Don't modify this file, modify the SWIG interface instead.
"""
Simple animation player classes, including `GIFAnimationCtrl` for displaying
animated GIF files
"""
import _animate
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "this"):
if isinstance(value, class_type):
self.__dict__[name] = value.this
if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
del value.thisown
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static) or hasattr(self,name) or (name == "thisown"):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError,name
import types
try:
_object = types.ObjectType
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
del types
def _swig_setattr_nondynamic_method(set):
def set_attr(self,name,value):
if hasattr(self,name) or (name in ("this", "thisown")):
set(self,name,value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
return set_attr
import _core
import wx
__docfilter__ = wx._core.__DocFilter(globals())
ANIM_UNSPECIFIED = _animate.ANIM_UNSPECIFIED
ANIM_DONOTREMOVE = _animate.ANIM_DONOTREMOVE
ANIM_TOBACKGROUND = _animate.ANIM_TOBACKGROUND
ANIM_TOPREVIOUS = _animate.ANIM_TOPREVIOUS
class AnimationPlayer(_core.Object):
"""Proxy of C++ AnimationPlayer class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxAnimationPlayer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""__init__(self, AnimationBase animation=None, bool destroyAnimation=False) -> AnimationPlayer"""
newobj = _animate.new_AnimationPlayer(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_animate.delete_AnimationPlayer):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def SetAnimation(*args, **kwargs):
"""SetAnimation(self, AnimationBase animation, bool destroyAnimation=False)"""
return _animate.AnimationPlayer_SetAnimation(*args, **kwargs)
def GetAnimation(*args, **kwargs):
"""GetAnimation(self) -> AnimationBase"""
return _animate.AnimationPlayer_GetAnimation(*args, **kwargs)
def SetDestroyAnimation(*args, **kwargs):
"""SetDestroyAnimation(self, bool destroyAnimation)"""
return _animate.AnimationPlayer_SetDestroyAnimation(*args, **kwargs)
def GetDestroyAnimation(*args, **kwargs):
"""GetDestroyAnimation(self) -> bool"""
return _animate.AnimationPlayer_GetDestroyAnimation(*args, **kwargs)
def SetCurrentFrame(*args, **kwargs):
"""SetCurrentFrame(self, int currentFrame)"""
return _animate.AnimationPlayer_SetCurrentFrame(*args, **kwargs)
def GetCurrentFrame(*args, **kwargs):
"""GetCurrentFrame(self) -> int"""
return _animate.AnimationPlayer_GetCurrentFrame(*args, **kwargs)
def SetWindow(*args, **kwargs):
"""SetWindow(self, Window window)"""
return _animate.AnimationPlayer_SetWindow(*args, **kwargs)
def GetWindow(*args, **kwargs):
"""GetWindow(self) -> Window"""
return _animate.AnimationPlayer_GetWindow(*args, **kwargs)
def SetPosition(*args, **kwargs):
"""SetPosition(self, Point pos)"""
return _animate.AnimationPlayer_SetPosition(*args, **kwargs)
def GetPosition(*args, **kwargs):
"""GetPosition(self) -> Point"""
return _animate.AnimationPlayer_GetPosition(*args, **kwargs)
def SetLooped(*args, **kwargs):
"""SetLooped(self, bool looped)"""
return _animate.AnimationPlayer_SetLooped(*args, **kwargs)
def GetLooped(*args, **kwargs):
"""GetLooped(self) -> bool"""
return _animate.AnimationPlayer_GetLooped(*args, **kwargs)
def HasAnimation(*args, **kwargs):
"""HasAnimation(self) -> bool"""
return _animate.AnimationPlayer_HasAnimation(*args, **kwargs)
def IsPlaying(*args, **kwargs):
"""IsPlaying(self) -> bool"""
return _animate.AnimationPlayer_IsPlaying(*args, **kwargs)
def UseBackgroundColour(*args, **kwargs):
"""UseBackgroundColour(self, bool useBackground)"""
return _animate.AnimationPlayer_UseBackgroundColour(*args, **kwargs)
def UsingBackgroundColour(*args, **kwargs):
"""UsingBackgroundColour(self) -> bool"""
return _animate.AnimationPlayer_UsingBackgroundColour(*args, **kwargs)
def SetCustomBackgroundColour(*args, **kwargs):
"""SetCustomBackgroundColour(self, Colour col, bool useCustomBackgroundColour=True)"""
return _animate.AnimationPlayer_SetCustomBackgroundColour(*args, **kwargs)
def UsingCustomBackgroundColour(*args, **kwargs):
"""UsingCustomBackgroundColour(self) -> bool"""
return _animate.AnimationPlayer_UsingCustomBackgroundColour(*args, **kwargs)
def GetCustomBackgroundColour(*args, **kwargs):
"""GetCustomBackgroundColour(self) -> Colour"""
return _animate.AnimationPlayer_GetCustomBackgroundColour(*args, **kwargs)
def UseParentBackground(*args, **kwargs):
"""UseParentBackground(self, bool useParent)"""
return _animate.AnimationPlayer_UseParentBackground(*args, **kwargs)
def UsingParentBackground(*args, **kwargs):
"""UsingParentBackground(self) -> bool"""
return _animate.AnimationPlayer_UsingParentBackground(*args, **kwargs)
def Play(*args, **kwargs):
"""Play(self, Window window, Point pos=wxPoint(0, 0), bool looped=True) -> bool"""
return _animate.AnimationPlayer_Play(*args, **kwargs)
def Build(*args, **kwargs):
"""Build(self) -> bool"""
return _animate.AnimationPlayer_Build(*args, **kwargs)
def Stop(*args, **kwargs):
"""Stop(self)"""
return _animate.AnimationPlayer_Stop(*args, **kwargs)
def Draw(*args, **kwargs):
"""Draw(self, DC dc)"""
return _animate.AnimationPlayer_Draw(*args, **kwargs)
def GetFrameCount(*args, **kwargs):
"""GetFrameCount(self) -> int"""
return _animate.AnimationPlayer_GetFrameCount(*args, **kwargs)
def GetFrame(*args, **kwargs):
"""GetFrame(self, int i) -> Image"""
return _animate.AnimationPlayer_GetFrame(*args, **kwargs)
def GetDisposalMethod(*args, **kwargs):
"""GetDisposalMethod(self, int i) -> int"""
return _animate.AnimationPlayer_GetDisposalMethod(*args, **kwargs)
def GetFrameRect(*args, **kwargs):
"""GetFrameRect(self, int i) -> Rect"""
return _animate.AnimationPlayer_GetFrameRect(*args, **kwargs)
def GetDelay(*args, **kwargs):
"""GetDelay(self, int i) -> int"""
return _animate.AnimationPlayer_GetDelay(*args, **kwargs)
def GetLogicalScreenSize(*args, **kwargs):
"""GetLogicalScreenSize(self) -> Size"""
return _animate.AnimationPlayer_GetLogicalScreenSize(*args, **kwargs)
def GetBackgroundColour(*args, **kwargs):
"""GetBackgroundColour(self, Colour col) -> bool"""
return _animate.AnimationPlayer_GetBackgroundColour(*args, **kwargs)
def GetTransparentColour(*args, **kwargs):
"""GetTransparentColour(self, Colour col) -> bool"""
return _animate.AnimationPlayer_GetTransparentColour(*args, **kwargs)
def PlayFrame(*args, **kwargs):
"""PlayFrame(self, int frame, Window window, Point pos) -> bool"""
return _animate.AnimationPlayer_PlayFrame(*args, **kwargs)
def PlayNextFrame(*args, **kwargs):
"""PlayNextFrame(self) -> bool"""
return _animate.AnimationPlayer_PlayNextFrame(*args, **kwargs)
def DrawFrame(*args, **kwargs):
"""DrawFrame(self, int frame, DC dc, Point pos)"""
return _animate.AnimationPlayer_DrawFrame(*args, **kwargs)
def DrawBackground(*args, **kwargs):
"""DrawBackground(self, DC dc, Point pos, Colour colour)"""
return _animate.AnimationPlayer_DrawBackground(*args, **kwargs)
def ClearCache(*args, **kwargs):
"""ClearCache(self)"""
return _animate.AnimationPlayer_ClearCache(*args, **kwargs)
def SaveBackground(*args, **kwargs):
"""SaveBackground(self, Rect rect)"""
return _animate.AnimationPlayer_SaveBackground(*args, **kwargs)
def GetBackingStore(*args, **kwargs):
"""GetBackingStore(self) -> Bitmap"""
return _animate.AnimationPlayer_GetBackingStore(*args, **kwargs)
class AnimationPlayerPtr(AnimationPlayer):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = AnimationPlayer
_animate.AnimationPlayer_swigregister(AnimationPlayerPtr)
cvar = _animate.cvar
AnimationControlNameStr = cvar.AnimationControlNameStr
class AnimationBase(_core.Object):
"""Proxy of C++ AnimationBase class"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxAnimationBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __del__(self, destroy=_animate.delete_AnimationBase):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def GetFrameCount(*args, **kwargs):
"""GetFrameCount(self) -> int"""
return _animate.AnimationBase_GetFrameCount(*args, **kwargs)
def GetFrame(*args, **kwargs):
"""GetFrame(self, int i) -> Image"""
return _animate.AnimationBase_GetFrame(*args, **kwargs)
def GetDisposalMethod(*args, **kwargs):
"""GetDisposalMethod(self, int i) -> int"""
return _animate.AnimationBase_GetDisposalMethod(*args, **kwargs)
def GetFrameRect(*args, **kwargs):
"""GetFrameRect(self, int i) -> Rect"""
return _animate.AnimationBase_GetFrameRect(*args, **kwargs)
def GetDelay(*args, **kwargs):
"""GetDelay(self, int i) -> int"""
return _animate.AnimationBase_GetDelay(*args, **kwargs)
def GetLogicalScreenSize(*args, **kwargs):
"""GetLogicalScreenSize(self) -> Size"""
return _animate.AnimationBase_GetLogicalScreenSize(*args, **kwargs)
def GetBackgroundColour(*args, **kwargs):
"""GetBackgroundColour(self, Colour col) -> bool"""
return _animate.AnimationBase_GetBackgroundColour(*args, **kwargs)
def GetTransparentColour(*args, **kwargs):
"""GetTransparentColour(self, Colour col) -> bool"""
return _animate.AnimationBase_GetTransparentColour(*args, **kwargs)
def IsValid(*args, **kwargs):
"""IsValid(self) -> bool"""
return _animate.AnimationBase_IsValid(*args, **kwargs)
def LoadFile(*args, **kwargs):
"""LoadFile(self, String filename) -> bool"""
return _animate.AnimationBase_LoadFile(*args, **kwargs)
class AnimationBasePtr(AnimationBase):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = AnimationBase
_animate.AnimationBase_swigregister(AnimationBasePtr)
class GIFAnimation(AnimationBase):
"""Proxy of C++ GIFAnimation class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGIFAnimation instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""__init__(self) -> GIFAnimation"""
newobj = _animate.new_GIFAnimation(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_animate.delete_GIFAnimation):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def GetFrameCount(*args, **kwargs):
"""GetFrameCount(self) -> int"""
return _animate.GIFAnimation_GetFrameCount(*args, **kwargs)
def GetFrame(*args, **kwargs):
"""GetFrame(self, int i) -> Image"""
return _animate.GIFAnimation_GetFrame(*args, **kwargs)
def GetDisposalMethod(*args, **kwargs):
"""GetDisposalMethod(self, int i) -> int"""
return _animate.GIFAnimation_GetDisposalMethod(*args, **kwargs)
def GetFrameRect(*args, **kwargs):
"""GetFrameRect(self, int i) -> Rect"""
return _animate.GIFAnimation_GetFrameRect(*args, **kwargs)
def GetDelay(*args, **kwargs):
"""GetDelay(self, int i) -> int"""
return _animate.GIFAnimation_GetDelay(*args, **kwargs)
def GetLogicalScreenSize(*args, **kwargs):
"""GetLogicalScreenSize(self) -> Size"""
return _animate.GIFAnimation_GetLogicalScreenSize(*args, **kwargs)
def GetBackgroundColour(*args, **kwargs):
"""GetBackgroundColour(self, Colour col) -> bool"""
return _animate.GIFAnimation_GetBackgroundColour(*args, **kwargs)
def GetTransparentColour(*args, **kwargs):
"""GetTransparentColour(self, Colour col) -> bool"""
return _animate.GIFAnimation_GetTransparentColour(*args, **kwargs)
def IsValid(*args, **kwargs):
"""IsValid(self) -> bool"""
return _animate.GIFAnimation_IsValid(*args, **kwargs)
def LoadFile(*args, **kwargs):
"""LoadFile(self, String filename) -> bool"""
return _animate.GIFAnimation_LoadFile(*args, **kwargs)
class GIFAnimationPtr(GIFAnimation):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = GIFAnimation
_animate.GIFAnimation_swigregister(GIFAnimationPtr)
AN_FIT_ANIMATION = _animate.AN_FIT_ANIMATION
class GIFAnimationCtrl(_core.Control):
"""Proxy of C++ GIFAnimationCtrl class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGIFAnimationCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
__init__(self, Window parent, int id=-1, String filename=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=wxAN_FIT_ANIMATION|wxNO_BORDER,
String name=AnimationControlNameStr) -> GIFAnimationCtrl
"""
newobj = _animate.new_GIFAnimationCtrl(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
self._setOORInfo(self)
def Create(*args, **kwargs):
"""
Create(self, Window parent, int id=-1, String filename=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=wxAN_FIT_ANIMATION|wxNO_BORDER,
String name=AnimationControlNameStr) -> bool
"""
return _animate.GIFAnimationCtrl_Create(*args, **kwargs)
def LoadFile(*args, **kwargs):
"""LoadFile(self, String filename=EmptyString) -> bool"""
return _animate.GIFAnimationCtrl_LoadFile(*args, **kwargs)
def Play(*args, **kwargs):
"""Play(self, bool looped=True) -> bool"""
return _animate.GIFAnimationCtrl_Play(*args, **kwargs)
def Stop(*args, **kwargs):
"""Stop(self)"""
return _animate.GIFAnimationCtrl_Stop(*args, **kwargs)
def FitToAnimation(*args, **kwargs):
"""FitToAnimation(self)"""
return _animate.GIFAnimationCtrl_FitToAnimation(*args, **kwargs)
def IsPlaying(*args, **kwargs):
"""IsPlaying(self) -> bool"""
return _animate.GIFAnimationCtrl_IsPlaying(*args, **kwargs)
def GetPlayer(*args, **kwargs):
"""GetPlayer(self) -> AnimationPlayer"""
return _animate.GIFAnimationCtrl_GetPlayer(*args, **kwargs)
def GetAnimation(*args, **kwargs):
"""GetAnimation(self) -> AnimationBase"""
return _animate.GIFAnimationCtrl_GetAnimation(*args, **kwargs)
def GetFilename(*args, **kwargs):
"""GetFilename(self) -> String"""
return _animate.GIFAnimationCtrl_GetFilename(*args, **kwargs)
def SetFilename(*args, **kwargs):
"""SetFilename(self, String filename)"""
return _animate.GIFAnimationCtrl_SetFilename(*args, **kwargs)
class GIFAnimationCtrlPtr(GIFAnimationCtrl):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = GIFAnimationCtrl
_animate.GIFAnimationCtrl_swigregister(GIFAnimationCtrlPtr)
def PreGIFAnimationCtrl(*args, **kwargs):
"""PreGIFAnimationCtrl() -> GIFAnimationCtrl"""
val = _animate.new_PreGIFAnimationCtrl(*args, **kwargs)
val.thisown = 1
return val

File diff suppressed because one or more lines are too long

View File

@@ -1,123 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dllwidget.cpp
// Purpose: Dynamically loadable C++ widget for wxPython
// Author: Vaclav Slavik
// Created: 2001/12/03
// RCS-ID: $Id$
// Copyright: (c) 2001 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/defs.h"
#include "wx/dynlib.h"
#include "wx/sizer.h"
#include "dllwidget.h"
IMPLEMENT_ABSTRACT_CLASS(wxDllWidget, wxPanel)
wxDllWidget::wxDllWidget(wxWindow *parent,
wxWindowID id,
const wxString& dllName, const wxString& className,
const wxPoint& pos, const wxSize& size,
long style)
: wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL | wxNO_BORDER,
className + wxT("_container")),
m_widget(NULL), m_lib(NULL), m_controlAdded(false)
{
SetBackgroundColour(wxColour(255, 0, 255));
if ( !!className )
LoadWidget(dllName, className, style);
}
wxDllWidget::~wxDllWidget()
{
UnloadWidget();
}
void wxDllWidget::AddChild(wxWindowBase *child)
{
wxASSERT_MSG( !m_controlAdded, wxT("Couldn't load two widgets into one container!") );
wxPanel::AddChild(child);
m_controlAdded = true;
wxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
sizer->Add((wxWindow*)child, 1, wxEXPAND);
SetSizer(sizer);
Layout();
}
wxString wxDllWidget::GetDllExt()
{
return wxDllLoader::GetDllExt();
}
typedef WXDLLEXPORT bool (*DLL_WidgetFactory_t)(const wxString& className,
wxWindow *parent,
long style,
wxWindow **classInst,
wxSendCommandFunc *cmdFunc);
bool wxDllWidget::LoadWidget(const wxString& dll, const wxString& className,
long style)
{
UnloadWidget();
// Load the dynamic library
m_lib = new wxDynamicLibrary(dll);
if ( !m_lib->IsLoaded() )
{
delete m_lib;
m_lib = NULL;
return false;
}
DLL_WidgetFactory_t factory;
factory = (DLL_WidgetFactory_t) m_lib->GetSymbol(wxT("DLL_WidgetFactory"));
if ( factory == NULL)
{
delete m_lib;
m_lib = NULL;
return false;
}
if ( !factory(className, this, style, &m_widget, &m_cmdFunc) )
{
delete m_widget;
delete m_lib;
m_lib = NULL;
m_widget = NULL;
return false;
}
return true;
}
void wxDllWidget::UnloadWidget()
{
if ( m_widget )
{
DestroyChildren();
m_widget = NULL;
delete m_lib;
m_lib = NULL;
}
}
int wxDllWidget::SendCommand(int cmd, const wxString& param)
{
wxASSERT_MSG( m_widget && m_cmdFunc, wxT("Sending command to not loaded widget!"));
return m_cmdFunc(m_widget, cmd, param);
}

View File

@@ -1,139 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dllwidget.h
// Purpose: Dynamically loadable C++ widget for wxPython
// Author: Vaclav Slavik
// Created: 2001/12/03
// RCS-ID: $Id$
// Copyright: (c) 2001 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __DLLWIDGET_H__
#define __DLLWIDGET_H__
#include "wx/panel.h"
/*
wxDllWidget can be used to embed a wxWindow implemented in C++ in your
wxPython application without the need to write a SWIG interface. Widget's code
is stored in shared library or DLL that exports DLL_WidgetFactory symbol
and loaded at runtime. All you have to do is to pass the name of DLL and the class
to create to wxDllWidget's ctor.
Runtime-loadable widget must have HandleCommand method (see the example) that is
used to communicate with Python app. You call wxDllWidget.SendCommand(cmd,param) from
Python and it in turn calls HandleCommand of the loaded widget.
You must use DECLARE_DLL_WIDGET, BEGIN_WIDGET_LIBRARY, END_WIDGET_LIBRARY and
REGISTER_WIDGET macros in your C++ module in order to provide all the meat
wxDllWidget needs.
Example of use:
#define CMD_MAKEWHITE 1
class MyWindow : public wxWindow
{
public:
MyWindow(wxWindow *parent, long style)
: wxWindow(parent, wxID_ANY) {}
int HandleCommand(int cmd, const wxString& param)
{
if (cmd == CMD_MAKEWHITE)
SetBackgroundColour(*wxWHITE);
return 0;
}
};
DECLARE_DLL_WIDGET(MyWindow)
class MyCanvasWindow : public wxScrolledWindow
{
...
};
DECLARE_DLL_WIDGET(MyCanvasWindow)
BEGIN_WIDGET_LIBRARY()
REGISTER_WIDGET(MyWindow)
REGISTER_WIDGET(MyCanvasWindow)
END_WIDGET_LIBRARY()
*/
class WXDLLEXPORT wxDynamicLibrary;
typedef int (*wxSendCommandFunc)(wxWindow *wnd, int cmd, const wxString& param);
class wxDllWidget : public wxPanel
{
public:
wxDllWidget(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxString& dllName = wxEmptyString,
const wxString& className = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
virtual ~wxDllWidget();
bool Ok() { return m_widget != NULL; }
virtual int SendCommand(int cmd, const wxString& param = wxEmptyString);
virtual wxWindow* GetWidgetWindow() { return m_widget; }
virtual void AddChild(wxWindowBase *child);
static wxString GetDllExt();
protected:
bool LoadWidget(const wxString& dll, const wxString& className, long style);
void UnloadWidget();
protected:
wxWindow* m_widget;
wxSendCommandFunc m_cmdFunc;
wxDynamicLibrary* m_lib;
bool m_controlAdded;
private:
DECLARE_ABSTRACT_CLASS(wxDllWidget)
};
#define DECLARE_DLL_WIDGET(widget) \
static int SendCommandTo##widget(wxWindow *wnd, int cmd, const wxString& param) \
{ \
return wxStaticCast(wnd, widget)->HandleCommand(cmd, param); \
}
#define BEGIN_WIDGET_LIBRARY() \
extern "C" WXEXPORT bool DLL_WidgetFactory( \
const wxString& className, \
wxWindow *parent, \
long style, \
wxWindow **classInst, \
wxSendCommandFunc *cmdFunc) \
{ \
wxClassInfo::CleanUpClasses(); \
wxClassInfo::InitializeClasses();
#define REGISTER_WIDGET(widget) \
if ( className == wxT(#widget) ) \
{ \
*classInst = new widget(parent, style); \
*cmdFunc = SendCommandTo##widget; \
return true; \
}
#define END_WIDGET_LIBRARY() \
return false; \
}
#endif // __DLLWIDGET_H__

View File

@@ -1,6 +0,0 @@
# The SWIG module is named dllwidget_ to avoid name clashes, so
# this stub just imports everything in it so the friendly module
# name can be used elsewhere.
from dllwidget_ import *

View File

@@ -1,467 +0,0 @@
/*
* FILE : contrib/dllwidget/dllwidget_.cpp
*
* This file was automatically generated by :
* Simplified Wrapper and Interface Generator (SWIG)
* Version 1.1 (Build 883)
*
* Portions Copyright (c) 1995-1998
* The University of Utah and The Regents of the University of California.
* Permission is granted to distribute this file in any manner provided
* this notice remains intact.
*
* Do not make changes to this file--changes will be lost!
*
*/
#define SWIGCODE
/* Implementation : PYTHON */
#define SWIGPYTHON
#include "Python.h"
#include <string.h>
#include <stdlib.h>
/* Definitions for Windows/Unix exporting */
#if defined(__WIN32__)
# if defined(_MSC_VER)
# define SWIGEXPORT(a) __declspec(dllexport) a
# else
# if defined(__BORLANDC__)
# define SWIGEXPORT(a) a _export
# else
# define SWIGEXPORT(a) a
# endif
# endif
#else
# define SWIGEXPORT(a) a
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
extern char *SWIG_GetPtrObj(PyObject *, void **, char *);
extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
extern PyObject *SWIG_newvarlink(void);
#ifdef __cplusplus
}
#endif
#define SWIG_init initdllwidget_c
#define SWIG_name "dllwidget_c"
#include "wxPython.h"
#include "dllwidget.h"
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
PyObject* o3;
if (!target) {
target = o;
} else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
} else {
if (!PyTuple_Check(target)) {
o2 = target;
target = PyTuple_New(1);
PyTuple_SetItem(target, 0, o2);
}
o3 = PyTuple_New(1);
PyTuple_SetItem(o3, 0, o);
o2 = target;
target = PySequence_Concat(o2, o3);
Py_DECREF(o2);
Py_DECREF(o3);
}
return target;
}
// Put some wx default wxChar* values into wxStrings.
static const wxString wxPyEmptyString(wxT(""));
#ifdef __cplusplus
extern "C" {
#endif
static void *SwigwxDllWidgetTowxPanel(void *ptr) {
wxDllWidget *src;
wxPanel *dest;
src = (wxDllWidget *) ptr;
dest = (wxPanel *) src;
return (void *) dest;
}
static void *SwigwxDllWidgetTowxWindow(void *ptr) {
wxDllWidget *src;
wxWindow *dest;
src = (wxDllWidget *) ptr;
dest = (wxWindow *) src;
return (void *) dest;
}
static void *SwigwxDllWidgetTowxEvtHandler(void *ptr) {
wxDllWidget *src;
wxEvtHandler *dest;
src = (wxDllWidget *) ptr;
dest = (wxEvtHandler *) src;
return (void *) dest;
}
static void *SwigwxDllWidgetTowxObject(void *ptr) {
wxDllWidget *src;
wxObject *dest;
src = (wxDllWidget *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxDllWidget(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxDllWidget(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
static PyObject *_wrap_new_wxDllWidget(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxDllWidget * _result;
wxWindow * _arg0;
wxWindowID _arg1 = (wxWindowID ) -1;
wxString * _arg2 = (wxString *) &wxPyEmptyString;
wxString * _arg3 = (wxString *) &wxPyEmptyString;
wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition;
wxSize * _arg5 = (wxSize *) &wxDefaultSize;
long _arg6 = (long ) 0;
PyObject * _argo0 = 0;
PyObject * _obj2 = 0;
PyObject * _obj3 = 0;
wxPoint temp;
PyObject * _obj4 = 0;
wxSize temp0;
PyObject * _obj5 = 0;
char *_kwnames[] = { "parent","id","dllName","className","pos","size","style", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOOOl:new_wxDllWidget",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_obj5,&_arg6))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDllWidget. Expected _wxWindow_p.");
return NULL;
}
}
if (_obj2)
{
_arg2 = wxString_in_helper(_obj2);
if (_arg2 == NULL)
return NULL;
}
if (_obj3)
{
_arg3 = wxString_in_helper(_obj3);
if (_arg3 == NULL)
return NULL;
}
if (_obj4)
{
_arg4 = &temp;
if (! wxPoint_helper(_obj4, &_arg4))
return NULL;
}
if (_obj5)
{
_arg5 = &temp0;
if (! wxSize_helper(_obj5, &_arg5))
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxDllWidget *)new_wxDllWidget(_arg0,_arg1,*_arg2,*_arg3,*_arg4,*_arg5,_arg6);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxDllWidget_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
{
if (_obj2)
delete _arg2;
}
{
if (_obj3)
delete _arg3;
}
return _resultobj;
}
#define wxDllWidget_Ok(_swigobj) (_swigobj->Ok())
static PyObject *_wrap_wxDllWidget_Ok(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxDllWidget * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDllWidget_Ok",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDllWidget_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDllWidget_Ok. Expected _wxDllWidget_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxDllWidget_Ok(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxDllWidget_SendCommand(_swigobj,_swigarg0,_swigarg1) (_swigobj->SendCommand(_swigarg0,_swigarg1))
static PyObject *_wrap_wxDllWidget_SendCommand(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
wxDllWidget * _arg0;
int _arg1;
wxString * _arg2 = (wxString *) &wxPyEmptyString;
PyObject * _argo0 = 0;
PyObject * _obj2 = 0;
char *_kwnames[] = { "self","cmd","param", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxDllWidget_SendCommand",_kwnames,&_argo0,&_arg1,&_obj2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDllWidget_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDllWidget_SendCommand. Expected _wxDllWidget_p.");
return NULL;
}
}
if (_obj2)
{
_arg2 = wxString_in_helper(_obj2);
if (_arg2 == NULL)
return NULL;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (int )wxDllWidget_SendCommand(_arg0,_arg1,*_arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
if (_obj2)
delete _arg2;
}
return _resultobj;
}
#define wxDllWidget_GetWidgetWindow(_swigobj) (_swigobj->GetWidgetWindow())
static PyObject *_wrap_wxDllWidget_GetWidgetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
wxDllWidget * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDllWidget_GetWidgetWindow",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDllWidget_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDllWidget_GetWidgetWindow. Expected _wxDllWidget_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxWindow *)wxDllWidget_GetWidgetWindow(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
return _resultobj;
}
static PyObject *_wrap_wxDllWidget_GetDllExt(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxString * _result;
char *_kwnames[] = { NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDllWidget_GetDllExt",_kwnames))
return NULL;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = new wxString (wxDllWidget::GetDllExt());
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
_resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
}
{
delete _result;
}
return _resultobj;
}
static PyMethodDef dllwidget_cMethods[] = {
{ "wxDllWidget_GetDllExt", (PyCFunction) _wrap_wxDllWidget_GetDllExt, METH_VARARGS | METH_KEYWORDS },
{ "wxDllWidget_GetWidgetWindow", (PyCFunction) _wrap_wxDllWidget_GetWidgetWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxDllWidget_SendCommand", (PyCFunction) _wrap_wxDllWidget_SendCommand, METH_VARARGS | METH_KEYWORDS },
{ "wxDllWidget_Ok", (PyCFunction) _wrap_wxDllWidget_Ok, METH_VARARGS | METH_KEYWORDS },
{ "new_wxDllWidget", (PyCFunction) _wrap_new_wxDllWidget, METH_VARARGS | METH_KEYWORDS },
{ NULL, NULL }
};
#ifdef __cplusplus
}
#endif
/*
* This table is used by the pointer type-checker
*/
static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_signed_long","_long",0},
{ "_wxPrintQuality","_wxCoord",0},
{ "_wxPrintQuality","_int",0},
{ "_wxPrintQuality","_signed_int",0},
{ "_wxPrintQuality","_unsigned_int",0},
{ "_wxPrintQuality","_wxWindowID",0},
{ "_wxPrintQuality","_uint",0},
{ "_wxPrintQuality","_EBool",0},
{ "_wxPrintQuality","_size_t",0},
{ "_wxPrintQuality","_time_t",0},
{ "_byte","_unsigned_char",0},
{ "_long","_unsigned_long",0},
{ "_long","_signed_long",0},
{ "_size_t","_wxCoord",0},
{ "_size_t","_wxPrintQuality",0},
{ "_size_t","_time_t",0},
{ "_size_t","_unsigned_int",0},
{ "_size_t","_int",0},
{ "_size_t","_wxWindowID",0},
{ "_size_t","_uint",0},
{ "_wxPanel","_wxDllWidget",SwigwxDllWidgetTowxPanel},
{ "_uint","_wxCoord",0},
{ "_uint","_wxPrintQuality",0},
{ "_uint","_time_t",0},
{ "_uint","_size_t",0},
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxChar","_char",0},
{ "_char","_wxChar",0},
{ "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
{ "_EBool","_wxCoord",0},
{ "_EBool","_wxPrintQuality",0},
{ "_EBool","_signed_int",0},
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
{ "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
{ "_signed_int","_wxWindowID",0},
{ "_signed_int","_int",0},
{ "_WXTYPE","_wxDateTime_t",0},
{ "_WXTYPE","_short",0},
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_unsigned_short","_wxDateTime_t",0},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},
{ "_wxObject","_wxDllWidget",SwigwxDllWidgetTowxObject},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
{ "_unsigned_char","_byte",0},
{ "_unsigned_int","_wxCoord",0},
{ "_unsigned_int","_wxPrintQuality",0},
{ "_unsigned_int","_time_t",0},
{ "_unsigned_int","_size_t",0},
{ "_unsigned_int","_uint",0},
{ "_unsigned_int","_wxWindowID",0},
{ "_unsigned_int","_int",0},
{ "_short","_wxDateTime_t",0},
{ "_short","_WXTYPE",0},
{ "_short","_unsigned_short",0},
{ "_short","_signed_short",0},
{ "_wxWindowID","_wxCoord",0},
{ "_wxWindowID","_wxPrintQuality",0},
{ "_wxWindowID","_time_t",0},
{ "_wxWindowID","_size_t",0},
{ "_wxWindowID","_EBool",0},
{ "_wxWindowID","_uint",0},
{ "_wxWindowID","_int",0},
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
{ "_int","_wxCoord",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_time_t",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
{ "_int","_uint",0},
{ "_int","_wxWindowID",0},
{ "_int","_unsigned_int",0},
{ "_int","_signed_int",0},
{ "_wxDateTime_t","_unsigned_short",0},
{ "_wxDateTime_t","_short",0},
{ "_wxDateTime_t","_WXTYPE",0},
{ "_time_t","_wxCoord",0},
{ "_time_t","_wxPrintQuality",0},
{ "_time_t","_unsigned_int",0},
{ "_time_t","_int",0},
{ "_time_t","_wxWindowID",0},
{ "_time_t","_uint",0},
{ "_time_t","_size_t",0},
{ "_wxCoord","_int",0},
{ "_wxCoord","_signed_int",0},
{ "_wxCoord","_unsigned_int",0},
{ "_wxCoord","_wxWindowID",0},
{ "_wxCoord","_uint",0},
{ "_wxCoord","_EBool",0},
{ "_wxCoord","_size_t",0},
{ "_wxCoord","_time_t",0},
{ "_wxCoord","_wxPrintQuality",0},
{ "_wxEvtHandler","_wxDllWidget",SwigwxDllWidgetTowxEvtHandler},
{ "_wxWindow","_wxDllWidget",SwigwxDllWidgetTowxWindow},
{0,0,0}};
static PyObject *SWIG_globals;
#ifdef __cplusplus
extern "C"
#endif
SWIGEXPORT(void) initdllwidget_c() {
PyObject *m, *d;
SWIG_globals = SWIG_newvarlink();
m = Py_InitModule("dllwidget_c", dllwidget_cMethods);
d = PyModule_GetDict(m);
wxClassInfo::CleanUpClasses();
wxClassInfo::InitializeClasses();
{
int i;
for (i = 0; _swig_mapping[i].n1; i++)
SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv);
}
}

View File

@@ -1,115 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dllwidget_.i
// Purpose: Load wx widgets from external DLLs
//
// Author: Robin Dunn
//
// Created: 04-Dec-2001
// RCS-ID: $Id$
// Copyright: (c) 2001 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module dllwidget_
%{
#include "wxPython.h"
#include "dllwidget.h"
%}
//---------------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
%extern wx.i
%extern windows.i
%extern _defs.i
//----------------------------------------------------------------------
%{
// Put some wx default wxChar* values into wxStrings.
static const wxString wxPyEmptyString(wxT(""));
%}
//---------------------------------------------------------------------------
/*
wxDllWidget can be used to embed a wxWindow implemented in C++ in your
wxPython application without the need to write a SWIG interface. Widget's code
is stored in shared library or DLL that exports DLL_WidgetFactory symbol
and loaded at runtime. All you have to do is to pass the name of DLL and the class
to create to wxDllWidget's ctor.
Runtime-loadable widget must have HandleCommand method (see the example) that is
used to communicate with Python app. You call wxDllWidget.SendCommand(cmd,param) from
Python and it in turn calls HandleCommand of the loaded widget.
You must use DECLARE_DLL_WIDGET, BEGIN_WIDGET_LIBRARY, END_WIDGET_LIBRARY and
REGISTER_WIDGET macros in your C++ module in order to provide all the meat
wxDllWidget needs.
Example of use:
#define CMD_MAKEWHITE 1
class MyWindow : public wxWindow
{
public:
MyWindow(wxWindow *parent, long style)
: wxWindow(parent, -1) {}
int HandleCommand(int cmd, const wxString& param)
{
if (cmd == CMD_MAKEWHITE)
SetBackgroundColour(*wxWHITE);
return 0;
}
};
DECLARE_DLL_WIDGET(MyWindow)
class MyCanvasWindow : public wxScrolledWindow
{
...
};
DECLARE_DLL_WIDGET(MyCanvasWindow)
BEGIN_WIDGET_LIBRARY()
REGISTER_WIDGET(MyWindow)
REGISTER_WIDGET(MyCanvasWindow)
END_WIDGET_LIBRARY()
*/
class wxDllWidget : public wxPanel
{
public:
wxDllWidget(wxWindow *parent,
wxWindowID id = -1,
const wxString& dllName = wxPyEmptyString,
const wxString& className = wxPyEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
bool Ok();
int SendCommand(int cmd, const wxString& param = wxPyEmptyString);
wxWindow* GetWidgetWindow();
static wxString GetDllExt();
};
//---------------------------------------------------------------------------
%init %{
%}
//---------------------------------------------------------------------------

View File

@@ -1,78 +0,0 @@
# This file was created automatically by SWIG.
import dllwidget_c
from misc import *
from misc2 import *
from windows import *
from gdi import *
from fonts import *
from clip_dnd import *
from events import *
from streams import *
from utils import *
from mdi import *
from frames import *
from stattool import *
from controls import *
from controls2 import *
from windows2 import *
from cmndlgs import *
from windows3 import *
from image import *
from printfw import *
from sizers import *
from filesys import *
class wxDllWidgetPtr(wxPanelPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Ok(self, *_args, **_kwargs):
val = dllwidget_c.wxDllWidget_Ok(self, *_args, **_kwargs)
return val
def SendCommand(self, *_args, **_kwargs):
val = dllwidget_c.wxDllWidget_SendCommand(self, *_args, **_kwargs)
return val
def GetWidgetWindow(self, *_args, **_kwargs):
val = dllwidget_c.wxDllWidget_GetWidgetWindow(self, *_args, **_kwargs)
return val
def __repr__(self):
return "<%s.%s instance; proxy of C++ wxDllWidget instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
class wxDllWidget(wxDllWidgetPtr):
def __init__(self,*_args,**_kwargs):
self.this = dllwidget_c.new_wxDllWidget(*_args,**_kwargs)
self.thisown = 1
self._setOORInfo(self)
#-------------- FUNCTION WRAPPERS ------------------
wxDllWidget_GetDllExt = dllwidget_c.wxDllWidget_GetDllExt
#-------------- VARIABLE WRAPPERS ------------------

View File

@@ -1 +0,0 @@
contrib

View File

@@ -1,41 +0,0 @@
// A bunch of %rename directives generated by BuildRenamers in config.py
// in order to remove the wx prefix from all global scope names.
#ifndef BUILDING_RENAMERS
%rename(DS_MANAGE_SCROLLBARS) wxDS_MANAGE_SCROLLBARS;
%rename(DS_DRAG_CORNER) wxDS_DRAG_CORNER;
%rename(DynamicSashSplitEvent) wxDynamicSashSplitEvent;
%rename(DynamicSashUnifyEvent) wxDynamicSashUnifyEvent;
%rename(DynamicSashWindow) wxDynamicSashWindow;
%rename(EL_ALLOW_NEW) wxEL_ALLOW_NEW;
%rename(EL_ALLOW_EDIT) wxEL_ALLOW_EDIT;
%rename(EL_ALLOW_DELETE) wxEL_ALLOW_DELETE;
%rename(EditableListBox) wxEditableListBox;
%rename(RemotelyScrolledTreeCtrl) wxRemotelyScrolledTreeCtrl;
%rename(ThinSplitterWindow) wxThinSplitterWindow;
%rename(SplitterScrolledWindow) wxSplitterScrolledWindow;
%rename(LED_ALIGN_LEFT) wxLED_ALIGN_LEFT;
%rename(LED_ALIGN_RIGHT) wxLED_ALIGN_RIGHT;
%rename(LED_ALIGN_CENTER) wxLED_ALIGN_CENTER;
%rename(LED_ALIGN_MASK) wxLED_ALIGN_MASK;
%rename(LED_DRAW_FADED) wxLED_DRAW_FADED;
%rename(LEDNumberCtrl) wxLEDNumberCtrl;
%rename(TL_ALIGN_LEFT) wxTL_ALIGN_LEFT;
%rename(TL_ALIGN_RIGHT) wxTL_ALIGN_RIGHT;
%rename(TL_ALIGN_CENTER) wxTL_ALIGN_CENTER;
%rename(TREE_HITTEST_ONITEMCOLUMN) wxTREE_HITTEST_ONITEMCOLUMN;
%rename(TL_SEARCH_VISIBLE) wxTL_SEARCH_VISIBLE;
%rename(TL_SEARCH_LEVEL) wxTL_SEARCH_LEVEL;
%rename(TL_SEARCH_FULL) wxTL_SEARCH_FULL;
%rename(TL_SEARCH_PARTIAL) wxTL_SEARCH_PARTIAL;
%rename(TL_SEARCH_NOCASE) wxTL_SEARCH_NOCASE;
%rename(TR_DONT_ADJUST_MAC) wxTR_DONT_ADJUST_MAC;
%rename(TreeListColumnInfo) wxTreeListColumnInfo;
%rename(SCALE_HORIZONTAL) wxSCALE_HORIZONTAL;
%rename(SCALE_VERTICAL) wxSCALE_VERTICAL;
%rename(SCALE_UNIFORM) wxSCALE_UNIFORM;
%rename(SCALE_CUSTOM) wxSCALE_CUSTOM;
%rename(StaticPicture) wxStaticPicture;
#endif

View File

@@ -1,3 +0,0 @@
# Other names that need to be reverse-renamed for the old namespace
EVT*

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1,556 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: treelistctrl.h
// Purpose: wxTreeListCtrl class
// Author: Robert Roebling
// Modified by: Alberto Griggio, 2002
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Robert Roebling, Julian Smart, Alberto Griggio,
// Vadim Zeitlin, Otto Wyss
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef TREELISTCTRL_H
#define TREELISTCTRL_H
#include <wx/treectrl.h>
#include <wx/control.h>
#include <wx/pen.h>
#include <wx/listctrl.h> // for wxListEvent
#ifdef GIZMOISDLL
#define GIZMODLLEXPORT WXDLLEXPORT
#else
#define GIZMODLLEXPORT
#endif
class GIZMODLLEXPORT wxTreeListItem;
class GIZMODLLEXPORT wxTreeListHeaderWindow;
class GIZMODLLEXPORT wxTreeListMainWindow;
// Using this typedef removes an ambiguity when calling Remove()
#ifdef __WXMSW__
#if !wxCHECK_VERSION(2, 5, 0)
typedef long wxTreeItemIdValue;
#else
typedef void *wxTreeItemIdValue;
#endif
#endif
#define wxTR_DONT_ADJUST_MAC 0x0100 // Don't adjust the style for the Mac
//-----------------------------------------------------------------------------
// wxTreeListColumnAttrs
//-----------------------------------------------------------------------------
enum wxTreeListColumnAlign {
wxTL_ALIGN_LEFT,
wxTL_ALIGN_RIGHT,
wxTL_ALIGN_CENTER
};
class GIZMODLLEXPORT wxTreeListColumnInfo: public wxObject {
public:
enum { DEFAULT_COL_WIDTH = 100 };
wxTreeListColumnInfo(const wxString &text = wxT(""),
int image = -1,
size_t width = DEFAULT_COL_WIDTH,
bool shown = true,
wxTreeListColumnAlign alignment = wxTL_ALIGN_LEFT)
{
m_image = image;
m_selected_image = -1;
m_text = text;
m_width = width;
m_shown = shown;
m_alignment = alignment;
}
wxTreeListColumnInfo(const wxTreeListColumnInfo& other)
{
m_image = other.m_image;
m_selected_image = other.m_selected_image;
m_text = other.m_text;
m_width = other.m_width;
m_shown = other.m_shown;
m_alignment = other.m_alignment;
}
~wxTreeListColumnInfo() {}
// getters
bool GetShown() const { return m_shown; }
wxTreeListColumnAlign GetAlignment() const { return m_alignment; }
wxString GetText() const { return m_text; }
int GetImage() const { return m_image; }
int GetSelectedImage() const { return m_selected_image; }
size_t GetWidth() const { return m_width; }
// setters
wxTreeListColumnInfo& SetShown(bool shown)
{ m_shown = shown; return *this; }
wxTreeListColumnInfo& SetAlignment(wxTreeListColumnAlign alignment)
{ m_alignment = alignment; return *this; }
wxTreeListColumnInfo& SetText(const wxString& text)
{ m_text = text; return *this; }
wxTreeListColumnInfo& SetImage(int image)
{ m_image = image; return *this; }
wxTreeListColumnInfo& SetSelectedImage(int image)
{ m_selected_image = image; return *this; }
wxTreeListColumnInfo& SetWidth(size_t with)
{ m_width = with; return *this; }
private:
bool m_shown;
wxTreeListColumnAlign m_alignment;
wxString m_text;
int m_image;
int m_selected_image;
size_t m_width;
};
//----------------------------------------------------------------------------
// wxTreeListCtrl - the multicolumn tree control
//----------------------------------------------------------------------------
// flags for FindItem
const int wxTL_SEARCH_VISIBLE = 0x0000;
const int wxTL_SEARCH_LEVEL = 0x0001;
const int wxTL_SEARCH_FULL = 0x0002;
const int wxTL_SEARCH_PARTIAL = 0x0010;
const int wxTL_SEARCH_NOCASE = 0x0020;
// additional flag for HitTest
const int wxTREE_HITTEST_ONITEMCOLUMN = 0x2000;
extern GIZMODLLEXPORT const wxChar* wxTreeListCtrlNameStr;
class GIZMODLLEXPORT wxTreeListCtrl : public wxControl
{
public:
// creation
// --------
wxTreeListCtrl()
: m_header_win(0), m_main_win(0), m_headerHeight(0)
{}
wxTreeListCtrl(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_DEFAULT_STYLE,
const wxValidator &validator = wxDefaultValidator,
const wxString& name = wxTreeListCtrlNameStr )
: m_header_win(0), m_main_win(0), m_headerHeight(0)
{
Create(parent, id, pos, size, style, validator, name);
}
virtual ~wxTreeListCtrl() {}
bool Create(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_DEFAULT_STYLE,
const wxValidator &validator = wxDefaultValidator,
const wxString& name = wxTreeListCtrlNameStr );
void Refresh(bool erase=TRUE, const wxRect* rect=NULL);
void SetFocus();
// accessors
// ---------
// get the total number of items in the control
size_t GetCount() const;
// indent is the number of pixels the children are indented relative to
// the parents position. SetIndent() also redraws the control
// immediately.
unsigned int GetIndent() const;
void SetIndent(unsigned int indent);
// line spacing is the space above and below the text on each line
unsigned int GetLineSpacing() const;
void SetLineSpacing(unsigned int spacing);
// image list: these functions allow to associate an image list with
// the control and retrieve it. Note that when assigned with
// SetImageList, the control does _not_ delete
// the associated image list when it's deleted in order to allow image
// lists to be shared between different controls. If you use
// AssignImageList, the control _does_ delete the image list.
//
// The normal image list is for the icons which correspond to the
// normal tree item state (whether it is selected or not).
// Additionally, the application might choose to show a state icon
// which corresponds to an app-defined item state (for example,
// checked/unchecked) which are taken from the state image list.
wxImageList *GetImageList() const;
wxImageList *GetStateImageList() const;
wxImageList *GetButtonsImageList() const;
void SetImageList(wxImageList *imageList);
void SetStateImageList(wxImageList *imageList);
void SetButtonsImageList(wxImageList *imageList);
void AssignImageList(wxImageList *imageList);
void AssignStateImageList(wxImageList *imageList);
void AssignButtonsImageList(wxImageList *imageList);
// Functions to work with tree list ctrl columns
// adds a column
void AddColumn(const wxString& text)
{ AddColumn(wxTreeListColumnInfo(text)); }
void AddColumn(const wxString& text,
size_t width,
wxTreeListColumnAlign alignment = wxTL_ALIGN_LEFT)
{ AddColumn(wxTreeListColumnInfo(text,
-1,
width,
true,
alignment)); }
void AddColumn(const wxTreeListColumnInfo& col);
// inserts a column before the given one
void InsertColumn(size_t before, const wxString& text)
{ InsertColumn(before, wxTreeListColumnInfo(text)); }
void InsertColumn(size_t before, const wxTreeListColumnInfo& col);
// deletes the given column - does not delete the corresponding column
// of each item
void RemoveColumn(size_t column);
// returns the number of columns in the ctrl
size_t GetColumnCount() const;
void SetColumnWidth(size_t column, size_t width);
int GetColumnWidth(size_t column) const;
// tells which column is the "main" one, i.e. the "threaded" one
void SetMainColumn(size_t column);
size_t GetMainColumn() const;
void SetColumnText(size_t column, const wxString& text);
wxString GetColumnText(size_t column) const;
void SetColumn(size_t column, const wxTreeListColumnInfo& info);
wxTreeListColumnInfo& GetColumn(size_t column);
const wxTreeListColumnInfo& GetColumn(size_t column) const;
// other column-related methods
void SetColumnAlignment(size_t column, wxTreeListColumnAlign align);
wxTreeListColumnAlign GetColumnAlignment(size_t column) const;
void SetColumnImage(size_t column, int image);
int GetColumnImage(size_t column) const;
void ShowColumn(size_t column, bool shown);
bool IsColumnShown(size_t column) const;
// Functions to work with tree list ctrl items.
// accessors
// ---------
// retrieve item's label (of the main column)
wxString GetItemText(const wxTreeItemId& item) const
{ return GetItemText(item, GetMainColumn()); }
// retrieves item's label of the given column
wxString GetItemText(const wxTreeItemId& item, size_t column) const;
// get one of the images associated with the item (normal by default)
int GetItemImage(const wxTreeItemId& item,
wxTreeItemIcon which = wxTreeItemIcon_Normal) const
{ return GetItemImage(item, GetMainColumn(), which); }
int GetItemImage(const wxTreeItemId& item, size_t column,
wxTreeItemIcon which = wxTreeItemIcon_Normal) const;
// get the data associated with the item
wxTreeItemData *GetItemData(const wxTreeItemId& item) const;
bool GetItemBold(const wxTreeItemId& item) const;
wxColour GetItemTextColour(const wxTreeItemId& item) const;
wxColour GetItemBackgroundColour(const wxTreeItemId& item) const;
wxFont GetItemFont(const wxTreeItemId& item) const;
// modifiers
// ---------
// set item's label
void SetItemText(const wxTreeItemId& item, const wxString& text)
{ SetItemText(item, GetMainColumn(), text); }
void SetItemText(const wxTreeItemId& item, size_t column,
const wxString& text);
// get one of the images associated with the item (normal by default)
void SetItemImage(const wxTreeItemId& item, int image,
wxTreeItemIcon which = wxTreeItemIcon_Normal)
{ SetItemImage(item, GetMainColumn(), image, which); }
// the which parameter is ignored for all columns but the main one
void SetItemImage(const wxTreeItemId& item, size_t column, int image,
wxTreeItemIcon which = wxTreeItemIcon_Normal);
// associate some data with the item
void SetItemData(const wxTreeItemId& item, wxTreeItemData *data);
// force appearance of [+] button near the item. This is useful to
// allow the user to expand the items which don't have any children now
// - but instead add them only when needed, thus minimizing memory
// usage and loading time.
void SetItemHasChildren(const wxTreeItemId& item, bool has = TRUE);
// the item will be shown in bold
void SetItemBold(const wxTreeItemId& item, bool bold = TRUE);
// set the item's text colour
void SetItemTextColour(const wxTreeItemId& item, const wxColour& colour);
// set the item's background colour
void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& colour);
// set the item's font (should be of the same height for all items)
void SetItemFont(const wxTreeItemId& item, const wxFont& font);
// set the window font
virtual bool SetFont( const wxFont &font );
// set the styles.
void SetWindowStyle(const long styles);
long GetWindowStyle() const;
long GetWindowStyleFlag() const { return GetWindowStyle(); }
// item status inquiries
// ---------------------
// is the item visible (it might be outside the view or not expanded)?
bool IsVisible(const wxTreeItemId& item) const;
// does the item has any children?
bool HasChildren(const wxTreeItemId& item) const
{ return ItemHasChildren(item); }
bool ItemHasChildren(const wxTreeItemId& item) const;
// is the item expanded (only makes sense if HasChildren())?
bool IsExpanded(const wxTreeItemId& item) const;
// is this item currently selected (the same as has focus)?
bool IsSelected(const wxTreeItemId& item) const;
// is item text in bold font?
bool IsBold(const wxTreeItemId& item) const;
// does the layout include space for a button?
// number of children
// ------------------
// if 'recursively' is FALSE, only immediate children count, otherwise
// the returned number is the number of all items in this branch
size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = TRUE);
// navigation
// ----------
// wxTreeItemId.IsOk() will return FALSE if there is no such item
// get the root tree item
wxTreeItemId GetRootItem() const;
// get the item currently selected (may return NULL if no selection)
wxTreeItemId GetSelection() const;
// get the items currently selected, return the number of such item
size_t GetSelections(wxArrayTreeItemIds&) const;
// get the parent of this item (may return NULL if root)
wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
// for this enumeration function you must pass in a "cookie" parameter
// which is opaque for the application but is necessary for the library
// to make these functions reentrant (i.e. allow more than one
// enumeration on one and the same object simultaneously). Of course,
// the "cookie" passed to GetFirstChild() and GetNextChild() should be
// the same!
// get the first child of this item
#if !wxCHECK_VERSION(2, 5, 0)
wxTreeItemId GetFirstChild(const wxTreeItemId& item, long& cookie) const;
#else
wxTreeItemId GetFirstChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
#endif
// get the next child
#if !wxCHECK_VERSION(2, 5, 0)
wxTreeItemId GetNextChild(const wxTreeItemId& item, long& cookie) const;
#else
wxTreeItemId GetNextChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
#endif
// get the prev child
#if !wxCHECK_VERSION(2, 5, 0)
wxTreeItemId GetPrevChild(const wxTreeItemId& item, long& cookie) const;
#else
wxTreeItemId GetPrevChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
#endif
// get the last child of this item - this method doesn't use cookies
wxTreeItemId GetLastChild(const wxTreeItemId& item) const;
// get the next sibling of this item
wxTreeItemId GetNextSibling(const wxTreeItemId& item) const;
// get the previous sibling
wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const;
// get first visible item
wxTreeItemId GetFirstVisibleItem() const;
// get the next visible item: item must be visible itself!
// see IsVisible() and wxTreeCtrl::GetFirstVisibleItem()
wxTreeItemId GetNextVisible(const wxTreeItemId& item) const;
// get the previous visible item: item must be visible itself!
wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const;
// Only for internal use right now, but should probably be public
wxTreeItemId GetNext(const wxTreeItemId& item) const;
// operations
// ----------
// add the root node to the tree
wxTreeItemId AddRoot(const wxString& text,
int image = -1, int selectedImage = -1,
wxTreeItemData *data = NULL);
// insert a new item in as the first child of the parent
wxTreeItemId PrependItem(const wxTreeItemId& parent,
const wxString& text,
int image = -1, int selectedImage = -1,
wxTreeItemData *data = NULL);
// insert a new item after a given one
wxTreeItemId InsertItem(const wxTreeItemId& parent,
const wxTreeItemId& idPrevious,
const wxString& text,
int image = -1, int selectedImage = -1,
wxTreeItemData *data = NULL);
// insert a new item before the one with the given index
wxTreeItemId InsertItem(const wxTreeItemId& parent,
size_t index,
const wxString& text,
int image = -1, int selectedImage = -1,
wxTreeItemData *data = NULL);
// insert a new item in as the last child of the parent
wxTreeItemId AppendItem(const wxTreeItemId& parent,
const wxString& text,
int image = -1, int selectedImage = -1,
wxTreeItemData *data = NULL);
// delete this item and associated data if any
void Delete(const wxTreeItemId& item);
// delete all children (but don't delete the item itself)
// NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
void DeleteChildren(const wxTreeItemId& item);
// delete all items from the tree
// NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
void DeleteAllItems();
// expand this item
void Expand(const wxTreeItemId& item);
// expand this item and all subitems recursively
void ExpandAll(const wxTreeItemId& item);
// collapse the item without removing its children
void Collapse(const wxTreeItemId& item);
// collapse the item and remove all children
void CollapseAndReset(const wxTreeItemId& item);
// toggles the current state
void Toggle(const wxTreeItemId& item);
// remove the selection from currently selected item (if any)
void Unselect();
void UnselectAll();
// select this item
void SelectItem(const wxTreeItemId& item, bool unselect_others=TRUE,
bool extended_select=FALSE);
void SelectAll(bool extended_select=FALSE);
// make sure this item is visible (expanding the parent item and/or
// scrolling to this item if necessary)
void EnsureVisible(const wxTreeItemId& item);
// scroll to this item (but don't expand its parent)
void ScrollTo(const wxTreeItemId& item);
//void AdjustMyScrollbars();
// The first function is more portable (because easier to implement
// on other platforms), but the second one returns some extra info.
wxTreeItemId HitTest(const wxPoint& point)
{ int dummy; return HitTest(point, dummy); }
wxTreeItemId HitTest(const wxPoint& point, int& flags)
{ int col; return HitTest(point, flags, col); }
wxTreeItemId HitTest(const wxPoint& point, int& flags, int& column);
// get the bounding rectangle of the item (or of its label only)
bool GetBoundingRect(const wxTreeItemId& item,
wxRect& rect,
bool textOnly = FALSE) const;
// Start editing the item label: this (temporarily) replaces the item
// with a one line edit control. The item will be selected if it hadn't
// been before.
void EditLabel( const wxTreeItemId& item ) { Edit( item ); }
void Edit( const wxTreeItemId& item );
// sorting
// this function is called to compare 2 items and should return -1, 0
// or +1 if the first item is less than, equal to or greater than the
// second one. The base class version performs alphabetic comparaison
// of item labels (GetText)
virtual int OnCompareItems(const wxTreeItemId& item1,
const wxTreeItemId& item2);
// sort the children of this item using OnCompareItems
//
// NB: this function is not reentrant and not MT-safe (FIXME)!
void SortChildren(const wxTreeItemId& item);
// searching
wxTreeItemId FindItem (const wxTreeItemId& item, const wxString& str, int flags = 0);
// overridden base class virtuals
virtual bool SetBackgroundColour(const wxColour& colour);
virtual bool SetForegroundColour(const wxColour& colour);
wxTreeListHeaderWindow* GetHeaderWindow() const
{ return m_header_win; }
wxTreeListMainWindow* GetMainWindow() const
{ return m_main_win; }
virtual wxSize DoGetBestSize() const;
protected:
// header window, responsible for column visualization and manipulation
wxTreeListHeaderWindow* m_header_win;
// main window, the "true" tree ctrl
wxTreeListMainWindow* m_main_win;
// // the common part of all ctors
// void Init();
void OnGetToolTip( wxTreeEvent &event );
void OnSize(wxSizeEvent& event);
void CalculateAndSetHeaderHeight();
void DoHeaderLayout();
private:
size_t fill_column;
size_t m_headerHeight;
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxTreeListCtrl)
};
#endif // TREELISTCTRL_H

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +0,0 @@
*.exp
*.lib
*.obj
*.pch
Makefile
Makefile.pre
Setup
build.local
config.c
glcanvas.h
glcanvasc.ilk
glcanvasc.pyd
sedscript

View File

@@ -1,9 +0,0 @@
// A bunch of %rename directives generated by BuildRenamers in config.py
// in order to remove the wx prefix from all global scope names.
#ifndef BUILDING_RENAMERS
%rename(GLContext) wxGLContext;
%rename(GLCanvas) wxGLCanvas;
#endif

View File

@@ -1,171 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: glcanvas.i
// Purpose: SWIG definitions for the OpenGL wxWindows classes
//
// Author: Robin Dunn
//
// Created: 15-Mar-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%define DOCSTRING
"`GLCanvas` provides an OpenGL Context on a `wx.Window`."
%enddef
%module(package="wx", docstring=DOCSTRING) glcanvas
%{
#include "wx/wxPython/wxPython.h"
#include "wx/wxPython/pyclasses.h"
#include <wx/glcanvas.h>
%}
//---------------------------------------------------------------------------
%import core.i
%pythoncode { wx = _core }
%pythoncode { __docfilter__ = wx.__DocFilter(globals()) }
MAKE_CONST_WXSTRING2(GLCanvasNameStr, wxT("GLCanvas"));
MAKE_CONST_WXSTRING_NOSWIG(EmptyString);
%include _glcanvas_rename.i
//---------------------------------------------------------------------------
class wxPalette;
//---------------------------------------------------------------------------
MustHaveApp(wxGLContext);
class wxGLContext : public wxObject {
public:
#ifndef __WXMAC__
wxGLContext(bool isRGB, wxGLCanvas *win,
const wxPalette& palette = wxNullPalette,
const wxGLContext* other = NULL);
#else
%extend {
wxGLContext(bool isRGB, wxGLCanvas *win,
const wxPalette& palette = wxNullPalette,
const wxGLContext* other = NULL) {
AGLPixelFormat fmt; // TODO: How should this be initialized?
return new wxGLContext(fmt, win, palette, other);
}
}
#endif
~wxGLContext();
void SetCurrent();
void SetColour(const wxString& colour);
void SwapBuffers();
#ifdef __WXGTK__
void SetupPixelFormat();
void SetupPalette(const wxPalette& palette);
wxPalette CreateDefaultPalette();
wxPalette* GetPalette();
#endif
wxWindow* GetWindow();
};
//---------------------------------------------------------------------------
enum {
WX_GL_RGBA, // use true color palette
WX_GL_BUFFER_SIZE, // bits for buffer if not WX_GL_RGBA
WX_GL_LEVEL, // 0 for main buffer, >0 for overlay, <0 for underlay
WX_GL_DOUBLEBUFFER, // use doublebuffer
WX_GL_STEREO, // use stereoscopic display
WX_GL_AUX_BUFFERS, // number of auxiliary buffers
WX_GL_MIN_RED, // use red buffer with most bits (> MIN_RED bits)
WX_GL_MIN_GREEN, // use green buffer with most bits (> MIN_GREEN bits)
WX_GL_MIN_BLUE, // use blue buffer with most bits (> MIN_BLUE bits)
WX_GL_MIN_ALPHA, // use blue buffer with most bits (> MIN_ALPHA bits)
WX_GL_DEPTH_SIZE, // bits for Z-buffer (0,16,32)
WX_GL_STENCIL_SIZE, // bits for stencil buffer
WX_GL_MIN_ACCUM_RED, // use red accum buffer with most bits (> MIN_ACCUM_RED bits)
WX_GL_MIN_ACCUM_GREEN, // use green buffer with most bits (> MIN_ACCUM_GREEN bits)
WX_GL_MIN_ACCUM_BLUE, // use blue buffer with most bits (> MIN_ACCUM_BLUE bits)
WX_GL_MIN_ACCUM_ALPHA // use blue buffer with most bits (> MIN_ACCUM_ALPHA bits)
};
%typemap(in) int *attribList (int *temp) {
int i;
if (PySequence_Check($input)) {
int size = PyObject_Length($input);
temp = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
for (i = 0; i < size; i++) {
temp[i] = PyInt_AsLong(PySequence_GetItem($input, i));
}
temp[size] = 0;
$1 = temp;
}
}
%typemap(freearg) int *attribList
{
delete [] $1;
}
MustHaveApp(wxGLCanvas);
class wxGLCanvas : public wxWindow {
public:
%pythonAppend wxGLCanvas "self._setOORInfo(self)"
wxGLCanvas(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxPyGLCanvasNameStr,
int *attribList = NULL,
const wxPalette& palette = wxNullPalette);
%pythonAppend wxGLCanvas "val._setOORInfo(val)"
%RenameCtor(GLCanvasWithContext,
wxGLCanvas( wxWindow *parent,
const wxGLContext *shared = NULL,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPyGLCanvasNameStr,
int *attribList = NULL,
const wxPalette& palette = wxNullPalette ));
void SetCurrent();
void SetColour(const wxString& colour);
void SwapBuffers();
wxGLContext* GetContext();
#ifdef __WXMSW__
void SetupPixelFormat(int *attribList = NULL);
void SetupPalette(const wxPalette& palette);
wxPalette CreateDefaultPalette();
wxPalette* GetPalette();
#endif
};
//---------------------------------------------------------------------------
%init %{
%}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------

View File

@@ -1,2 +0,0 @@
*~
_glcanvas.cpp

View File

@@ -1,184 +0,0 @@
# This file was created automatically by SWIG 1.3.27.
# Don't modify this file, modify the SWIG interface instead.
"""
`GLCanvas` provides an OpenGL Context on a `wx.Window`.
"""
import _glcanvas
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "this"):
if isinstance(value, class_type):
self.__dict__[name] = value.this
if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
del value.thisown
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static) or hasattr(self,name) or (name == "thisown"):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError,name
import types
try:
_object = types.ObjectType
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
del types
def _swig_setattr_nondynamic_method(set):
def set_attr(self,name,value):
if hasattr(self,name) or (name in ("this", "thisown")):
set(self,name,value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
return set_attr
import _core
wx = _core
__docfilter__ = wx.__DocFilter(globals())
class GLContext(_core.Object):
"""Proxy of C++ GLContext class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGLContext instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
__init__(self, bool isRGB, GLCanvas win, wxPalette palette=wxNullPalette,
GLContext other=None) -> GLContext
"""
newobj = _glcanvas.new_GLContext(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_glcanvas.delete_GLContext):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def SetCurrent(*args, **kwargs):
"""SetCurrent(self)"""
return _glcanvas.GLContext_SetCurrent(*args, **kwargs)
def SetColour(*args, **kwargs):
"""SetColour(self, String colour)"""
return _glcanvas.GLContext_SetColour(*args, **kwargs)
def SwapBuffers(*args, **kwargs):
"""SwapBuffers(self)"""
return _glcanvas.GLContext_SwapBuffers(*args, **kwargs)
def SetupPixelFormat(*args, **kwargs):
"""SetupPixelFormat(self)"""
return _glcanvas.GLContext_SetupPixelFormat(*args, **kwargs)
def SetupPalette(*args, **kwargs):
"""SetupPalette(self, wxPalette palette)"""
return _glcanvas.GLContext_SetupPalette(*args, **kwargs)
def CreateDefaultPalette(*args, **kwargs):
"""CreateDefaultPalette(self) -> wxPalette"""
return _glcanvas.GLContext_CreateDefaultPalette(*args, **kwargs)
def GetPalette(*args, **kwargs):
"""GetPalette(self) -> wxPalette"""
return _glcanvas.GLContext_GetPalette(*args, **kwargs)
def GetWindow(*args, **kwargs):
"""GetWindow(self) -> Window"""
return _glcanvas.GLContext_GetWindow(*args, **kwargs)
class GLContextPtr(GLContext):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = GLContext
_glcanvas.GLContext_swigregister(GLContextPtr)
cvar = _glcanvas.cvar
GLCanvasNameStr = cvar.GLCanvasNameStr
WX_GL_RGBA = _glcanvas.WX_GL_RGBA
WX_GL_BUFFER_SIZE = _glcanvas.WX_GL_BUFFER_SIZE
WX_GL_LEVEL = _glcanvas.WX_GL_LEVEL
WX_GL_DOUBLEBUFFER = _glcanvas.WX_GL_DOUBLEBUFFER
WX_GL_STEREO = _glcanvas.WX_GL_STEREO
WX_GL_AUX_BUFFERS = _glcanvas.WX_GL_AUX_BUFFERS
WX_GL_MIN_RED = _glcanvas.WX_GL_MIN_RED
WX_GL_MIN_GREEN = _glcanvas.WX_GL_MIN_GREEN
WX_GL_MIN_BLUE = _glcanvas.WX_GL_MIN_BLUE
WX_GL_MIN_ALPHA = _glcanvas.WX_GL_MIN_ALPHA
WX_GL_DEPTH_SIZE = _glcanvas.WX_GL_DEPTH_SIZE
WX_GL_STENCIL_SIZE = _glcanvas.WX_GL_STENCIL_SIZE
WX_GL_MIN_ACCUM_RED = _glcanvas.WX_GL_MIN_ACCUM_RED
WX_GL_MIN_ACCUM_GREEN = _glcanvas.WX_GL_MIN_ACCUM_GREEN
WX_GL_MIN_ACCUM_BLUE = _glcanvas.WX_GL_MIN_ACCUM_BLUE
WX_GL_MIN_ACCUM_ALPHA = _glcanvas.WX_GL_MIN_ACCUM_ALPHA
class GLCanvas(_core.Window):
"""Proxy of C++ GLCanvas class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGLCanvas instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
__init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=0, String name=GLCanvasNameStr,
int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
"""
newobj = _glcanvas.new_GLCanvas(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
self._setOORInfo(self)
def SetCurrent(*args, **kwargs):
"""SetCurrent(self)"""
return _glcanvas.GLCanvas_SetCurrent(*args, **kwargs)
def SetColour(*args, **kwargs):
"""SetColour(self, String colour)"""
return _glcanvas.GLCanvas_SetColour(*args, **kwargs)
def SwapBuffers(*args, **kwargs):
"""SwapBuffers(self)"""
return _glcanvas.GLCanvas_SwapBuffers(*args, **kwargs)
def GetContext(*args, **kwargs):
"""GetContext(self) -> GLContext"""
return _glcanvas.GLCanvas_GetContext(*args, **kwargs)
class GLCanvasPtr(GLCanvas):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = GLCanvas
_glcanvas.GLCanvas_swigregister(GLCanvasPtr)
def GLCanvasWithContext(*args, **kwargs):
"""
GLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize,
long style=0, String name=GLCanvasNameStr,
int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
"""
val = _glcanvas.new_GLCanvasWithContext(*args, **kwargs)
val.thisown = 1
val._setOORInfo(val)
return val

File diff suppressed because one or more lines are too long

View File

@@ -1,168 +0,0 @@
# This file was created automatically by SWIG 1.3.27.
# Don't modify this file, modify the SWIG interface instead.
"""
`GLCanvas` provides an OpenGL Context on a `wx.Window`.
"""
import _glcanvas
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "this"):
if isinstance(value, class_type):
self.__dict__[name] = value.this
if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
del value.thisown
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static) or hasattr(self,name) or (name == "thisown"):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError,name
import types
try:
_object = types.ObjectType
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
del types
def _swig_setattr_nondynamic_method(set):
def set_attr(self,name,value):
if hasattr(self,name) or (name in ("this", "thisown")):
set(self,name,value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
return set_attr
import _core
wx = _core
__docfilter__ = wx.__DocFilter(globals())
class GLContext(_core.Object):
"""Proxy of C++ GLContext class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGLContext instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
__init__(self, bool isRGB, GLCanvas win, wxPalette palette=wxNullPalette,
GLContext other=None) -> GLContext
"""
newobj = _glcanvas.new_GLContext(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_glcanvas.delete_GLContext):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def SetCurrent(*args, **kwargs):
"""SetCurrent(self)"""
return _glcanvas.GLContext_SetCurrent(*args, **kwargs)
def SetColour(*args, **kwargs):
"""SetColour(self, String colour)"""
return _glcanvas.GLContext_SetColour(*args, **kwargs)
def SwapBuffers(*args, **kwargs):
"""SwapBuffers(self)"""
return _glcanvas.GLContext_SwapBuffers(*args, **kwargs)
def GetWindow(*args, **kwargs):
"""GetWindow(self) -> Window"""
return _glcanvas.GLContext_GetWindow(*args, **kwargs)
class GLContextPtr(GLContext):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = GLContext
_glcanvas.GLContext_swigregister(GLContextPtr)
cvar = _glcanvas.cvar
GLCanvasNameStr = cvar.GLCanvasNameStr
WX_GL_RGBA = _glcanvas.WX_GL_RGBA
WX_GL_BUFFER_SIZE = _glcanvas.WX_GL_BUFFER_SIZE
WX_GL_LEVEL = _glcanvas.WX_GL_LEVEL
WX_GL_DOUBLEBUFFER = _glcanvas.WX_GL_DOUBLEBUFFER
WX_GL_STEREO = _glcanvas.WX_GL_STEREO
WX_GL_AUX_BUFFERS = _glcanvas.WX_GL_AUX_BUFFERS
WX_GL_MIN_RED = _glcanvas.WX_GL_MIN_RED
WX_GL_MIN_GREEN = _glcanvas.WX_GL_MIN_GREEN
WX_GL_MIN_BLUE = _glcanvas.WX_GL_MIN_BLUE
WX_GL_MIN_ALPHA = _glcanvas.WX_GL_MIN_ALPHA
WX_GL_DEPTH_SIZE = _glcanvas.WX_GL_DEPTH_SIZE
WX_GL_STENCIL_SIZE = _glcanvas.WX_GL_STENCIL_SIZE
WX_GL_MIN_ACCUM_RED = _glcanvas.WX_GL_MIN_ACCUM_RED
WX_GL_MIN_ACCUM_GREEN = _glcanvas.WX_GL_MIN_ACCUM_GREEN
WX_GL_MIN_ACCUM_BLUE = _glcanvas.WX_GL_MIN_ACCUM_BLUE
WX_GL_MIN_ACCUM_ALPHA = _glcanvas.WX_GL_MIN_ACCUM_ALPHA
class GLCanvas(_core.Window):
"""Proxy of C++ GLCanvas class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGLCanvas instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
__init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=0, String name=GLCanvasNameStr,
int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
"""
newobj = _glcanvas.new_GLCanvas(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
self._setOORInfo(self)
def SetCurrent(*args, **kwargs):
"""SetCurrent(self)"""
return _glcanvas.GLCanvas_SetCurrent(*args, **kwargs)
def SetColour(*args, **kwargs):
"""SetColour(self, String colour)"""
return _glcanvas.GLCanvas_SetColour(*args, **kwargs)
def SwapBuffers(*args, **kwargs):
"""SwapBuffers(self)"""
return _glcanvas.GLCanvas_SwapBuffers(*args, **kwargs)
def GetContext(*args, **kwargs):
"""GetContext(self) -> GLContext"""
return _glcanvas.GLCanvas_GetContext(*args, **kwargs)
class GLCanvasPtr(GLCanvas):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = GLCanvas
_glcanvas.GLCanvas_swigregister(GLCanvasPtr)
def GLCanvasWithContext(*args, **kwargs):
"""
GLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize,
long style=0, String name=GLCanvasNameStr,
int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
"""
val = _glcanvas.new_GLCanvasWithContext(*args, **kwargs)
val.thisown = 1
val._setOORInfo(val)
return val

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
*~

View File

@@ -1,184 +0,0 @@
# This file was created automatically by SWIG 1.3.27.
# Don't modify this file, modify the SWIG interface instead.
"""
`GLCanvas` provides an OpenGL Context on a `wx.Window`.
"""
import _glcanvas
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "this"):
if isinstance(value, class_type):
self.__dict__[name] = value.this
if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
del value.thisown
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static) or hasattr(self,name) or (name == "thisown"):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError,name
import types
try:
_object = types.ObjectType
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
del types
def _swig_setattr_nondynamic_method(set):
def set_attr(self,name,value):
if hasattr(self,name) or (name in ("this", "thisown")):
set(self,name,value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
return set_attr
import _core
wx = _core
__docfilter__ = wx.__DocFilter(globals())
class GLContext(_core.Object):
"""Proxy of C++ GLContext class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGLContext instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
__init__(self, bool isRGB, GLCanvas win, wxPalette palette=wxNullPalette,
GLContext other=None) -> GLContext
"""
newobj = _glcanvas.new_GLContext(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_glcanvas.delete_GLContext):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def SetCurrent(*args, **kwargs):
"""SetCurrent(self)"""
return _glcanvas.GLContext_SetCurrent(*args, **kwargs)
def SetColour(*args, **kwargs):
"""SetColour(self, String colour)"""
return _glcanvas.GLContext_SetColour(*args, **kwargs)
def SwapBuffers(*args, **kwargs):
"""SwapBuffers(self)"""
return _glcanvas.GLContext_SwapBuffers(*args, **kwargs)
def GetWindow(*args, **kwargs):
"""GetWindow(self) -> Window"""
return _glcanvas.GLContext_GetWindow(*args, **kwargs)
class GLContextPtr(GLContext):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = GLContext
_glcanvas.GLContext_swigregister(GLContextPtr)
cvar = _glcanvas.cvar
GLCanvasNameStr = cvar.GLCanvasNameStr
WX_GL_RGBA = _glcanvas.WX_GL_RGBA
WX_GL_BUFFER_SIZE = _glcanvas.WX_GL_BUFFER_SIZE
WX_GL_LEVEL = _glcanvas.WX_GL_LEVEL
WX_GL_DOUBLEBUFFER = _glcanvas.WX_GL_DOUBLEBUFFER
WX_GL_STEREO = _glcanvas.WX_GL_STEREO
WX_GL_AUX_BUFFERS = _glcanvas.WX_GL_AUX_BUFFERS
WX_GL_MIN_RED = _glcanvas.WX_GL_MIN_RED
WX_GL_MIN_GREEN = _glcanvas.WX_GL_MIN_GREEN
WX_GL_MIN_BLUE = _glcanvas.WX_GL_MIN_BLUE
WX_GL_MIN_ALPHA = _glcanvas.WX_GL_MIN_ALPHA
WX_GL_DEPTH_SIZE = _glcanvas.WX_GL_DEPTH_SIZE
WX_GL_STENCIL_SIZE = _glcanvas.WX_GL_STENCIL_SIZE
WX_GL_MIN_ACCUM_RED = _glcanvas.WX_GL_MIN_ACCUM_RED
WX_GL_MIN_ACCUM_GREEN = _glcanvas.WX_GL_MIN_ACCUM_GREEN
WX_GL_MIN_ACCUM_BLUE = _glcanvas.WX_GL_MIN_ACCUM_BLUE
WX_GL_MIN_ACCUM_ALPHA = _glcanvas.WX_GL_MIN_ACCUM_ALPHA
class GLCanvas(_core.Window):
"""Proxy of C++ GLCanvas class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGLCanvas instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
__init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=0, String name=GLCanvasNameStr,
int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
"""
newobj = _glcanvas.new_GLCanvas(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
self._setOORInfo(self)
def SetCurrent(*args, **kwargs):
"""SetCurrent(self)"""
return _glcanvas.GLCanvas_SetCurrent(*args, **kwargs)
def SetColour(*args, **kwargs):
"""SetColour(self, String colour)"""
return _glcanvas.GLCanvas_SetColour(*args, **kwargs)
def SwapBuffers(*args, **kwargs):
"""SwapBuffers(self)"""
return _glcanvas.GLCanvas_SwapBuffers(*args, **kwargs)
def GetContext(*args, **kwargs):
"""GetContext(self) -> GLContext"""
return _glcanvas.GLCanvas_GetContext(*args, **kwargs)
def SetupPixelFormat(*args, **kwargs):
"""SetupPixelFormat(self, int attribList=None)"""
return _glcanvas.GLCanvas_SetupPixelFormat(*args, **kwargs)
def SetupPalette(*args, **kwargs):
"""SetupPalette(self, wxPalette palette)"""
return _glcanvas.GLCanvas_SetupPalette(*args, **kwargs)
def CreateDefaultPalette(*args, **kwargs):
"""CreateDefaultPalette(self) -> wxPalette"""
return _glcanvas.GLCanvas_CreateDefaultPalette(*args, **kwargs)
def GetPalette(*args, **kwargs):
"""GetPalette(self) -> wxPalette"""
return _glcanvas.GLCanvas_GetPalette(*args, **kwargs)
class GLCanvasPtr(GLCanvas):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = GLCanvas
_glcanvas.GLCanvas_swigregister(GLCanvasPtr)
def GLCanvasWithContext(*args, **kwargs):
"""
GLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize,
long style=0, String name=GLCanvasNameStr,
int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
"""
val = _glcanvas.new_GLCanvasWithContext(*args, **kwargs)
val.thisown = 1
val._setOORInfo(val)
return val

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +0,0 @@
Makefile
contrib
oglc.exp
oglc.ilk
oglc.pch
oglc.pyd

View File

@@ -1,30 +0,0 @@
// A bunch of %rename directives generated by BuildRenamers in config.py
// in order to remove the wx prefix from all global scope names.
#ifndef BUILDING_RENAMERS
%rename(ShapeRegion) wxShapeRegion;
%rename(AttachmentPoint) wxAttachmentPoint;
%rename(PyShapeEvtHandler) wxPyShapeEvtHandler;
%rename(PyShape) wxPyShape;
%rename(PseudoMetaFile) wxPseudoMetaFile;
%rename(PyRectangleShape) wxPyRectangleShape;
%rename(PyControlPoint) wxPyControlPoint;
%rename(PyBitmapShape) wxPyBitmapShape;
%rename(PyDrawnShape) wxPyDrawnShape;
%rename(OGLConstraint) wxOGLConstraint;
%rename(PyCompositeShape) wxPyCompositeShape;
%rename(PyDividedShape) wxPyDividedShape;
%rename(PyDivisionShape) wxPyDivisionShape;
%rename(PyEllipseShape) wxPyEllipseShape;
%rename(PyCircleShape) wxPyCircleShape;
%rename(ArrowHead) wxArrowHead;
%rename(PyLineShape) wxPyLineShape;
%rename(PyPolygonShape) wxPyPolygonShape;
%rename(PyTextShape) wxPyTextShape;
%rename(Diagram) wxDiagram;
%rename(PyShapeCanvas) wxPyShapeCanvas;
%rename(OGLInitialize) wxOGLInitialize;
%rename(OGLCleanUp) wxOGLCleanUp;
#endif

View File

@@ -1,18 +0,0 @@
ShapeCanvas
ShapeEvtHandler
Shape
RectangleShape
BitmapShape
DrawnShape
CompositeShape
DividedShape
DivisionShape
EllipseShape
CircleShape
LineShape
PolygonShape
TextShape
ControlPoint

View File

@@ -1,410 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: oglbasic.i
// Purpose: SWIG definitions for the wxWindows Object Graphics Library
//
// Author: Robin Dunn
//
// Created: 3-Sept-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
// Not a %module
//---------------------------------------------------------------------------
%newgroup;
class wxShapeRegion : public wxObject {
public:
wxShapeRegion();
//~wxShapeRegion();
void SetText(const wxString& s);
void SetFont(wxFont *f);
void SetMinSize(double w, double h);
void SetSize(double w, double h);
void SetPosition(double x, double y);
void SetProportions(double x, double y);
void SetFormatMode(int mode);
void SetName(const wxString& s);
void SetColour(const wxString& col);
wxString GetText();
wxFont *GetFont();
void GetMinSize(double *OUTPUT, double *OUTPUT);
void GetProportion(double *OUTPUT, double *OUTPUT);
void GetSize(double *OUTPUT, double *OUTPUT);
void GetPosition(double *OUTPUT, double *OUTPUT);
int GetFormatMode();
wxString GetName();
wxString GetColour();
wxColour GetActualColourObject();
wxList& GetFormattedText();
wxString GetPenColour();
int GetPenStyle();
void SetPenStyle(int style);
void SetPenColour(const wxString& col);
wxPen *GetActualPen();
double GetWidth();
double GetHeight();
void ClearText();
};
//---------------------------------------------------------------------------
/*
* User-defined attachment point
*/
class wxAttachmentPoint: public wxObject
{
public:
wxAttachmentPoint(int id=0, double x=0.0, double y=0.0);
int m_id; // Identifier
double m_x; // x offset from centre of object
double m_y; // y offset from centre of object
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyShapeEvtHandler,wxShapeEvtHandler);
%}
class wxPyShapeEvtHandler : public wxObject {
public:
%pythonAppend wxPyShapeEvtHandler "self._setOORandCallbackInfo(PyShapeEvtHandler)"
%typemap(out) wxPyShapeEvtHandler*; // turn off this typemap
wxPyShapeEvtHandler(wxPyShapeEvtHandler *prev = NULL,
wxPyShape *shape = NULL);
%typemap(out) wxPyShapeEvtHandler* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
void _setCallbackInfo(PyObject* self, PyObject* _class);
%extend {
void _setOORInfo(PyObject* _self) {
self->SetClientObject(new wxPyOORClientData(_self));
}
}
%pythoncode {
def _setOORandCallbackInfo(self, _class):
self._setOORInfo(self)
self._setCallbackInfo(self, _class)
}
void SetShape(wxPyShape *sh);
wxPyShape *GetShape();
void SetPreviousHandler(wxPyShapeEvtHandler* handler);
wxPyShapeEvtHandler* GetPreviousHandler();
wxPyShapeEvtHandler* CreateNewCopy();
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = false);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyShape, wxShape);
%}
class wxPyShape : public wxPyShapeEvtHandler {
public:
%pythonAppend wxPyShape "self._setOORandCallbackInfo(PyShape)"
%typemap(out) wxPyShape*; // turn off this typemap
wxPyShape(wxPyShapeCanvas *can = NULL);
%typemap(out) wxPyShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
void _setCallbackInfo(PyObject* self, PyObject* _class);
void GetBoundingBoxMax(double *OUTPUT, double *OUTPUT);
void GetBoundingBoxMin(double *OUTPUT, double *OUTPUT);
bool GetPerimeterPoint(double x1, double y1,
double x2, double y2,
double *OUTPUT, double *OUTPUT);
wxPyShapeCanvas *GetCanvas();
void SetCanvas(wxPyShapeCanvas *the_canvas);
void AddToCanvas(wxPyShapeCanvas *the_canvas, wxPyShape *addAfter = NULL);
void InsertInCanvas(wxPyShapeCanvas *the_canvas);
void RemoveFromCanvas(wxPyShapeCanvas *the_canvas);
double GetX();
double GetY();
void SetX(double x);
void SetY(double y);
wxPyShape *GetParent();
void SetParent(wxPyShape *p);
wxPyShape *GetTopAncestor();
// wxList& GetChildren();
%extend {
PyObject* GetChildren() {
wxList& list = self->GetChildren();
return wxPy_ConvertShapeList(&list);
}
}
void Unlink();
void SetDrawHandles(bool drawH);
bool GetDrawHandles();
void MakeControlPoints();
void DeleteControlPoints(wxDC *dc = NULL);
void ResetControlPoints();
wxPyShapeEvtHandler *GetEventHandler();
void SetEventHandler(wxPyShapeEvtHandler *handler);
void MakeMandatoryControlPoints();
void ResetMandatoryControlPoints();
bool Recompute();
void CalculateSize();
void Select(bool select = true, wxDC* dc = NULL);
void SetHighlight(bool hi = true, bool recurse = false);
bool IsHighlighted() ;
bool Selected();
bool AncestorSelected();
void SetSensitivityFilter(int sens = OP_ALL, bool recursive = false);
int GetSensitivityFilter();
void SetDraggable(bool drag, bool recursive = false);
void SetFixedSize(bool x, bool y);
void GetFixedSize(bool *OUTPUT, bool *OUTPUT) ;
bool GetFixedWidth();
bool GetFixedHeight();
void SetSpaceAttachments(bool sp);
bool GetSpaceAttachments() ;
void SetShadowMode(int mode, bool redraw = false);
int GetShadowMode();
bool HitTest(double x, double y, int *OUTPUT, double *OUTPUT);
void SetCentreResize(bool cr);
bool GetCentreResize();
void SetMaintainAspectRatio(bool ar);
bool GetMaintainAspectRatio();
// wxList& GetLines();
%extend {
PyObject* GetLines() {
wxList& list = self->GetLines();
return wxPy_ConvertShapeList(&list);
}
}
void SetDisableLabel(bool flag);
bool GetDisableLabel();
void SetAttachmentMode(int mode);
int GetAttachmentMode();
void SetId(long i);
long GetId();
void SetPen(wxPen *pen);
void SetBrush(wxBrush *brush);
// void SetClientData(wxObject *client_data);
// wxObject *GetClientData();
// The real client data methods are being used for OOR, so just fake it.
%pythoncode {
def SetClientData(self, data):
self.clientData = data
def GetClientData(self):
if hasattr(self, 'clientData'):
return self.clientData
else:
return None
}
void Show(bool show);
bool IsShown();
void Move(wxDC& dc, double x1, double y1, bool display = true);
void Erase(wxDC& dc);
void EraseContents(wxDC& dc);
void Draw(wxDC& dc);
void Flash();
void MoveLinks(wxDC& dc);
void DrawContents(wxDC& dc);
void SetSize(double x, double y, bool recursive = true);
void SetAttachmentSize(double x, double y);
void Attach(wxPyShapeCanvas *can);
void Detach();
bool Constrain();
void AddLine(wxPyLineShape *line, wxPyShape *other,
int attachFrom = 0, int attachTo = 0,
int positionFrom = -1, int positionTo = -1);
int GetLinePosition(wxPyLineShape* line);
void AddText(const wxString& string);
wxPen *GetPen();
wxBrush *GetBrush();
void SetDefaultRegionSize();
void FormatText(wxDC& dc, const wxString& s, int regionId = 0);
void SetFormatMode(int mode, int regionId = 0);
int GetFormatMode(int regionId = 0);
void SetFont(wxFont *font, int regionId = 0);
wxFont *GetFont(int regionId = 0);
void SetTextColour(const wxString& colour, int regionId = 0);
wxString GetTextColour(int regionId = 0);
int GetNumberOfTextRegions();
void SetRegionName(const wxString& name, int regionId = 0);
wxString GetRegionName(int regionId);
int GetRegionId(const wxString& name);
void NameRegions(const wxString& parentName = wxPyEmptyString);
// wxList& GetRegions();
%extend {
PyObject* GetRegions() {
wxList& list = self->GetRegions();
return wxPy_ConvertList(&list);
}
}
void AddRegion(wxShapeRegion *region);
void ClearRegions();
void AssignNewIds();
wxPyShape *FindRegion(const wxString& regionName, int *OUTPUT);
void FindRegionNames(wxStringList& list);
void ClearText(int regionId = 0);
void RemoveLine(wxPyLineShape *line);
#ifdef wxUSE_PROLOGIO
void WriteAttributes(wxExpr *clause);
void ReadAttributes(wxExpr *clause);
void ReadConstraints(wxExpr *clause, wxExprDatabase *database);
void WriteRegions(wxExpr *clause);
void ReadRegions(wxExpr *clause);
#endif
bool GetAttachmentPosition(int attachment, double *OUTPUT, double *OUTPUT,
int nth = 0, int no_arcs = 1, wxPyLineShape *line = NULL);
int GetNumberOfAttachments();
bool AttachmentIsValid(int attachment);
%extend {
PyObject* GetAttachments() {
wxList& list = self->GetAttachments();
return wxPy_ConvertList(&list);
}
}
bool GetAttachmentPositionEdge(int attachment, double *OUTPUT, double *OUTPUT,
int nth = 0, int no_arcs = 1, wxPyLineShape *line = NULL);
wxRealPoint CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2,
int nth, int noArcs, wxPyLineShape* line);
bool AttachmentSortTest(int attachmentPoint, const wxRealPoint& pt1, const wxRealPoint& pt2);
void EraseLinks(wxDC& dc, int attachment = -1, bool recurse = false);
void DrawLinks(wxDC& dc, int attachment = -1, bool recurse = false);
bool MoveLineToNewAttachment(wxDC& dc, wxPyLineShape *to_move,
double x, double y);
//void ApplyAttachmentOrdering(wxList& linesToSort);
%extend {
void ApplyAttachmentOrdering(PyObject* linesToSort) {
wxList* list = wxPy_wxListHelper(linesToSort, wxT("wxPyLineShape"));
self->ApplyAttachmentOrdering(*list);
delete list;
}
}
wxRealPoint GetBranchingAttachmentRoot(int attachment);
bool GetBranchingAttachmentInfo(int attachment, wxRealPoint& root, wxRealPoint& neck,
wxRealPoint& shoulder1, wxRealPoint& shoulder2);
bool GetBranchingAttachmentPoint(int attachment, int n, wxRealPoint& attachmentPoint,
wxRealPoint& stemPoint);
int GetAttachmentLineCount(int attachment);
void SetBranchNeckLength(int len);
int GetBranchNeckLength();
void SetBranchStemLength(int len);
int GetBranchStemLength();
void SetBranchSpacing(int len);
int GetBranchSpacing();
void SetBranchStyle(long style);
long GetBranchStyle();
int PhysicalToLogicalAttachment(int physicalAttachment);
int LogicalToPhysicalAttachment(int logicalAttachment);
bool Draggable();
bool HasDescendant(wxPyShape *image);
wxPyShape *CreateNewCopy(bool resetMapping = true, bool recompute = true);
void Copy(wxPyShape& copy);
void CopyWithHandler(wxPyShape& copy);
void Rotate(double x, double y, double theta);
double GetRotation();
void SetRotation(double rotation);
void ClearAttachments();
void Recentre(wxDC& dc);
void ClearPointList(wxList& list);
wxPen GetBackgroundPen();
wxBrush GetBackgroundBrush();
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = false);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------

View File

@@ -1,161 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: oglcanvas.i
// Purpose: SWIG definitions for the wxWindows Object Graphics Library
//
// Author: Robin Dunn
//
// Created: 7-Sept-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
// not a %module
//---------------------------------------------------------------------------
%{
// Put some wx default wxChar* values into wxStrings.
DECLARE_DEF_STRING(ShapeCanvasNameStr);
%}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxDiagram : public wxObject {
public:
wxDiagram();
//~wxDiagram();
void AddShape(wxPyShape* shape, wxPyShape *addAfter = NULL);
void Clear(wxDC& dc);
void DeleteAllShapes();
void DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2);
wxPyShape* FindShape(long id);
wxPyShapeCanvas* GetCanvas();
int GetCount();
double GetGridSpacing();
int GetMouseTolerance();
// wxList* GetShapeList();
%extend {
PyObject* GetShapeList() {
wxList* list = self->GetShapeList();
return wxPy_ConvertShapeList(list);
}
}
bool GetQuickEditMode();
bool GetSnapToGrid();
void InsertShape(wxPyShape *shape);
#ifdef wxUSE_PROLOGIO
bool LoadFile(const wxString& filename);
bool SaveFile(const wxString& filename);
#endif
#ifdef wxUSE_PROLOGIO
// **** Have to deal with wxExpr and wxExprDatabase first...
//void OnDatabaseLoad(wxExprDatabase& database);
//void OnDatabaseSave(wxExprDatabase& database);
//bool OnHeaderLoad(wxExprDatabase& database, wxExpr& expr);
//bool OnHeaderSave(wxExprDatabase& database, wxExpr& expr);
//bool OnShapeLoad(wxExprDatabase& database, wxPyShape& shape, wxExpr& expr);
//bool OnShapeSave(wxExprDatabase& database, wxPyShape& shape, wxExpr& expr);
#endif
#ifdef wxUSE_PROLOGIO
void ReadContainerGeometry(wxExprDatabase& database);
void ReadLines(wxExprDatabase& database);
void ReadNodes(wxExprDatabase& database);
#endif
void RecentreAll(wxDC& dc);
void Redraw(wxDC& dc);
void RemoveAllShapes();
void RemoveShape(wxPyShape* shape);
void SetCanvas(wxPyShapeCanvas* canvas);
void SetGridSpacing(double spacing);
void SetMouseTolerance(int tolerance);
void SetQuickEditMode(bool mode);
void SetSnapToGrid(bool snap);
void ShowAll(bool show);
void Snap(double *INOUT, double *INOUT);
};
//---------------------------------------------------------------------------
%{
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnBeginDragLeft);
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnBeginDragRight);
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnEndDragLeft);
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnEndDragRight);
IMP_PYCALLBACK__BOOL2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnDragLeft);
IMP_PYCALLBACK__BOOL2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnDragRight);
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnLeftClick);
IMP_PYCALLBACK__2DBLINT(wxPyShapeCanvas, wxShapeCanvas, OnRightClick);
%}
MustHaveApp(wxPyShapeCanvas);
class wxPyShapeCanvas : public wxScrolledWindow {
public:
%pythonAppend wxPyShapeCanvas "self._setOORandCallbackInfo(PyShapeCanvas)"
%typemap(out) wxPyShapeCanvas*; // turn off this typemap
wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBORDER,
const wxString& name = wxPyShapeCanvasNameStr);
%typemap(out) wxPyShapeCanvas* { $result = wxPyMake_wxObject($1, $owner); }
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pythoncode {
def _setOORandCallbackInfo(self, _class):
self._setOORInfo(self)
self._setCallbackInfo(self, _class)
}
void AddShape(wxPyShape *shape, wxPyShape *addAfter = NULL);
// **** Need a typemap for wxClassInfo, or fully implement wxObject, etc.....
wxPyShape* FindShape(double x1, double y, int *OUTPUT,
wxClassInfo *info = NULL, wxPyShape* notImage = NULL);
wxPyShape * FindFirstSensitiveShape(double x1, double y, int *OUTPUT, int op);
wxDiagram* GetDiagram();
bool GetQuickEditMode();
void InsertShape(wxPyShape* shape);
void base_OnBeginDragLeft(double x, double y, int keys = 0);
void base_OnBeginDragRight(double x, double y, int keys = 0);
void base_OnEndDragLeft(double x, double y, int keys = 0);
void base_OnEndDragRight(double x, double y, int keys = 0);
void base_OnDragLeft(bool draw, double x, double y, int keys = 0);
void base_OnDragRight(bool draw, double x, double y, int keys = 0);
void base_OnLeftClick(double x, double y, int keys = 0);
void base_OnRightClick(double x, double y, int keys = 0);
void Redraw(wxDC& dc);
void RemoveShape(wxPyShape *shape);
void SetDiagram(wxDiagram *diagram);
void Snap(double *INOUT, double *INOUT);
%pythoncode {
def GetShapeList(self):
return self.GetDiagram().GetShapeList()
}
};
//---------------------------------------------------------------------------

View File

@@ -1,96 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: _ogldefs.i
// Purpose: SWIG definitions for the wxWindows Object Graphics Library
//
// Author: Robin Dunn
//
// Created: 27-Aug-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
//---------------------------------------------------------------------------
// Typemaps just for OGL
// OOR Support
%typemap(out) wxPyShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
%typemap(out) wxPyShapeEvtHandler* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
%typemap(out) wxPyDivisionShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
%typemap(out) wxPyShapeCanvas* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxDiagram* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxOGLConstraint* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxPseudoMetaFile* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxArrowHead* { $result = wxPyMake_wxObject($1, $owner); }
// wxOGL doesn't use a ref-counted copy of pens and brushes, so we'll
// use the pen and brush lists to simulate that...
%typemap(in) wxPen* {
wxPen* temp;
if ($input) {
if ($input == Py_None) { temp = NULL; }
else if (! wxPyConvertSwigPtr($input, (void **) &temp, wxT("wxPen"))) {
PyErr_SetString(PyExc_TypeError, "Type error, expected wxPen.");
return NULL;
}
}
if (temp)
$1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
temp->GetWidth(),
temp->GetStyle());
else
$1 = NULL;
}
%typemap(in) wxBrush* {
wxBrush* temp;
if ($input) {
if ($input == Py_None) { temp = NULL; }
else if (! wxPyConvertSwigPtr($input, (void **) &temp, wxT("wxBrush"))) {
PyErr_SetString(PyExc_TypeError, "Type error, expected wxBrush.");
return NULL;
}
}
if (temp)
$1 = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
else
$1 = NULL;
}
%typemap(in) wxFont* {
wxFont* temp;
if ($input) {
if ($input == Py_None) { temp = NULL; }
else if (! wxPyConvertSwigPtr($input, (void **) &temp, wxT("wxFont"))) {
PyErr_SetString(PyExc_TypeError, "Type error, expected wxFont.");
return NULL;
}
}
if (temp)
$1 = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
temp->GetFamily(),
temp->GetStyle(),
temp->GetWeight(),
temp->GetUnderlined(),
temp->GetFaceName(),
temp->GetEncoding());
else
$1 = NULL;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------

View File

@@ -1,613 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: oglshapes.i
// Purpose: SWIG definitions for the wxWindows Object Graphics Library
//
// Author: Robin Dunn
//
// Created: 3-Sept-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
// not a %module
//---------------------------------------------------------------------------
enum {
oglMETAFLAGS_OUTLINE,
oglMETAFLAGS_ATTACHMENTS
};
//---------------------------------------------------------------------------
%typemap(in) (int points, wxPoint* points_array ) {
$2 = wxPoint_LIST_helper($input, &$1);
if ($2 == NULL) SWIG_fail;
}
%typemap(freearg) (int points, wxPoint* points_array ) {
if ($2) delete [] $2;
}
//---------------------------------------------------------------------------
class wxPseudoMetaFile : public wxObject {
public:
wxPseudoMetaFile();
~wxPseudoMetaFile();
void Draw(wxDC& dc, double xoffset, double yoffset);
#ifdef wxUSE_PROLOGIO
void WriteAttributes(wxExpr *clause, int whichAngle);
void ReadAttributes(wxExpr *clause, int whichAngle);
#endif
void Clear();
void Copy(wxPseudoMetaFile& copy);
void Scale(double sx, double sy);
void ScaleTo(double w, double h);
void Translate(double x, double y);
void Rotate(double x, double y, double theta);
bool LoadFromMetaFile(const wxString& filename, double *width, double *height);
void GetBounds(double *minX, double *minY, double *maxX, double *maxY);
void CalculateSize(wxPyDrawnShape* shape);
// **** fix these... is it even possible? these are lists of various GDI opperations (not the objects...)
// wxList& GetOutlineColours();
// wxList& GetFillColours();
// wxList& GetOps();
void SetRotateable(bool rot);
bool GetRotateable();
void SetSize(double w, double h);
void SetFillBrush(wxBrush* brush);
wxBrush* GetFillBrush();
void SetOutlinePen(wxPen* pen);
wxPen* GetOutlinePen();
void SetOutlineOp(int op);
int GetOutlineOp();
bool IsValid();
void DrawLine(const wxPoint& pt1, const wxPoint& pt2);
void DrawRectangle(const wxRect& rect);
void DrawRoundedRectangle(const wxRect& rect, double radius);
void DrawArc(const wxPoint& centrePt, const wxPoint& startPt, const wxPoint& endPt);
void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
void DrawEllipse(const wxRect& rect);
void DrawPoint(const wxPoint& pt);
void DrawText(const wxString& text, const wxPoint& pt);
void DrawLines(int points, wxPoint* points_array);
void DrawPolygon(int points, wxPoint* points_array, int flags = 0);
void DrawSpline(int points, wxPoint* points_array);
void SetClippingRect(const wxRect& rect);
void DestroyClippingRect();
void SetPen(wxPen* pen, bool isOutline = FALSE);
void SetBrush(wxBrush* brush, bool isFill = FALSE);
void SetFont(wxFont* font);
void SetTextColour(const wxColour& colour);
void SetBackgroundColour(const wxColour& colour);
void SetBackgroundMode(int mode);
};
//---------------------------------------------------------------------------
%{
// Using this macro can sometimes provoke an Internal Compiler Error in MSVC
// 6, so instead I'l just expand it out by hand...
// WXSHAPE_IMP_CALLBACKS(wxPyRectangleShape, wxRectangleShape);
IMP_PYCALLBACK__ (wxPyRectangleShape, wxRectangleShape, OnDelete);
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDraw);
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDrawContents);
IMP_PYCALLBACK__DCBOOL (wxPyRectangleShape, wxRectangleShape, OnDrawBranches);
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnMoveLinks);
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnErase);
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnEraseContents);
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnHighlight);
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnLeftClick);
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnLeftDoubleClick);
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnRightClick);
IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnSize);
IMP_PYCALLBACK_BOOL_DC4DBLBOOL (wxPyRectangleShape, wxRectangleShape, OnMovePre);
IMP_PYCALLBACK__DC4DBLBOOL (wxPyRectangleShape, wxRectangleShape, OnMovePost);
IMP_PYCALLBACK__BOOL2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnDragLeft);
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnBeginDragLeft);
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnEndDragLeft);
IMP_PYCALLBACK__BOOL2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnDragRight);
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnBeginDragRight);
IMP_PYCALLBACK__2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnEndDragRight);
IMP_PYCALLBACK__DC4DBL (wxPyRectangleShape, wxRectangleShape, OnDrawOutline);
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnDrawControlPoints);
IMP_PYCALLBACK__DC (wxPyRectangleShape, wxRectangleShape, OnEraseControlPoints);
IMP_PYCALLBACK__DCBOOL (wxPyRectangleShape, wxRectangleShape, OnMoveLink);
IMP_PYCALLBACK__WXCPBOOL2DBL2INT(wxPyRectangleShape, wxRectangleShape, OnSizingDragLeft);
IMP_PYCALLBACK__WXCP2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnSizingBeginDragLeft);
IMP_PYCALLBACK__WXCP2DBL2INT (wxPyRectangleShape, wxRectangleShape, OnSizingEndDragLeft);
IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnBeginSize);
IMP_PYCALLBACK__2DBL (wxPyRectangleShape, wxRectangleShape, OnEndSize)
%}
class wxPyRectangleShape : public wxPyShape {
public:
%pythonAppend wxPyRectangleShape "self._setOORandCallbackInfo(PyRectangleShape)"
wxPyRectangleShape(double width = 0.0, double height = 0.0);
void _setCallbackInfo(PyObject* self, PyObject* _class);
void SetCornerRadius(double radius);
double GetCornerRadius();
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyControlPoint, wxControlPoint);
%}
class wxPyControlPoint : public wxPyRectangleShape {
public:
%pythonAppend wxPyControlPoint "self._setOORandCallbackInfo(PyControlPoint)"
wxPyControlPoint(wxPyShapeCanvas *the_canvas = NULL,
wxPyShape *object = NULL,
double size = 0.0, double the_xoffset = 0.0,
double the_yoffset = 0.0, int the_type = 0);
void _setCallbackInfo(PyObject* self, PyObject* _class);
void SetCornerRadius(double radius);
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyBitmapShape, wxBitmapShape);
%}
class wxPyBitmapShape : public wxPyRectangleShape {
public:
%pythonAppend wxPyBitmapShape "self._setOORandCallbackInfo(PyBitmapShape)"
wxPyBitmapShape();
void _setCallbackInfo(PyObject* self, PyObject* _class);
wxBitmap& GetBitmap();
wxString GetFilename();
void SetBitmap(const wxBitmap& bitmap);
void SetFilename(const wxString& filename);
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyDrawnShape, wxDrawnShape);
%}
class wxPyDrawnShape : public wxPyRectangleShape {
public:
%pythonAppend wxPyDrawnShape "self._setOORandCallbackInfo(PyDrawnShape)"
wxPyDrawnShape();
void _setCallbackInfo(PyObject* self, PyObject* _class);
void CalculateSize();
void DestroyClippingRect();
void DrawArc(const wxPoint& centrePoint, const wxPoint& startPoint,
const wxPoint& endPoint);
void DrawAtAngle(int angle);
void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
void DrawLine(const wxPoint& point1, const wxPoint& point2);
void DrawLines(int points, wxPoint* points_array);
void DrawPoint(const wxPoint& point);
void DrawPolygon(int points, wxPoint* points_array, int flags = 0);
void DrawRectangle(const wxRect& rect);
void DrawRoundedRectangle(const wxRect& rect, double radius);
void DrawSpline(int points, wxPoint* points_array);
void DrawText(const wxString& text, const wxPoint& point);
int GetAngle();
wxPseudoMetaFile& GetMetaFile();
double GetRotation();
bool LoadFromMetaFile(const wxString& filename);
void Rotate(double x, double y, double theta);
void SetClippingRect(const wxRect& rect);
void SetDrawnBackgroundColour(const wxColour& colour);
void SetDrawnBackgroundMode(int mode);
void SetDrawnBrush(wxBrush* pen, bool isOutline = FALSE);
void SetDrawnFont(wxFont* font);
void SetDrawnPen(wxPen* pen, bool isOutline = FALSE);
void SetDrawnTextColour(const wxColour& colour);
void Scale(double sx, double sy);
void SetSaveToFile(bool save);
void Translate(double x, double y);
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
class wxOGLConstraint : public wxObject {
public:
//wxOGLConstraint(int type, wxPyShape *constraining, wxList& constrained);
%extend {
wxOGLConstraint(int type, wxPyShape *constraining, PyObject* constrained) {
wxList* list = wxPy_wxListHelper(constrained, wxT("wxPyShape"));
wxOGLConstraint* rv = new wxOGLConstraint(type, constraining, *list);
delete list;
return rv;
}
}
//~wxOGLConstraint(); The wxCompositShape takes ownership of the constraint
bool Evaluate();
void SetSpacing(double x, double y);
bool Equals(double a, double b);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyCompositeShape, wxCompositeShape);
%}
class wxPyCompositeShape : public wxPyRectangleShape {
public:
%pythonAppend wxPyCompositeShape "self._setOORandCallbackInfo(PyCompositeShape)"
wxPyCompositeShape();
void _setCallbackInfo(PyObject* self, PyObject* _class);
void AddChild(wxPyShape *child, wxPyShape *addAfter = NULL);
wxOGLConstraint * AddConstraint(wxOGLConstraint *constraint);
//wxOGLConstraint * AddConstraint(int type,
// wxPyShape *constraining,
// wxList& constrained);
%extend {
wxOGLConstraint * AddConstrainedShapes(int type, wxPyShape *constraining,
PyObject* constrained) {
wxList* list = wxPy_wxListHelper(constrained, wxT("wxPyShape"));
wxOGLConstraint* rv = self->AddConstraint(type, constraining, *list);
delete list;
return rv;
}
}
%Rename(AddSimpleConstraint, wxOGLConstraint*, AddConstraint(int type,
wxPyShape *constraining,
wxPyShape *constrained));
void CalculateSize();
bool ContainsDivision(wxPyDivisionShape *division);
void DeleteConstraint(wxOGLConstraint *constraint);
void DeleteConstraintsInvolvingChild(wxPyShape *child);
// **** Needs an output typemap
//wxOGLConstraint * FindConstraint(long id, wxPyCompositeShape **actualComposite);
wxPyShape * FindContainerImage();
// wxList& GetConstraints();
// wxList& GetDivisions();
%extend {
PyObject* GetConstraints() {
wxList& list = self->GetConstraints();
return wxPy_ConvertList(&list);
}
PyObject* GetDivisions() {
wxList& list = self->GetDivisions();
return wxPy_ConvertShapeList(&list);
}
}
void MakeContainer();
bool Recompute();
void RemoveChild(wxPyShape *child);
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyDividedShape, wxDividedShape);
%}
class wxPyDividedShape : public wxPyRectangleShape {
public:
%pythonAppend wxPyDividedShape "self._setOORandCallbackInfo(PyDividedShape)"
wxPyDividedShape(double width = 0.0, double height = 0.0);
void _setCallbackInfo(PyObject* self, PyObject* _class);
void EditRegions();
void SetRegionSizes();
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyDivisionShape, wxDivisionShape);
%}
class wxPyDivisionShape : public wxPyCompositeShape {
public:
%pythonAppend wxPyDivisionShape "self._setOORandCallbackInfo(PyDivisionShape)"
%typemap(out) wxPyDivisionShape*; // turn off this typemap
wxPyDivisionShape();
%typemap(out) wxPyDivisionShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
void _setCallbackInfo(PyObject* self, PyObject* _class);
void AdjustBottom(double bottom, bool test);
void AdjustLeft(double left, bool test);
void AdjustRight(double right, bool test);
void AdjustTop(double top, bool test);
void Divide(int direction);
void EditEdge(int side);
wxPyDivisionShape * GetBottomSide();
int GetHandleSide();
wxPyDivisionShape * GetLeftSide();
wxString GetLeftSideColour();
wxPen * GetLeftSidePen();
wxPyDivisionShape * GetRightSide();
wxPyDivisionShape * GetTopSide();
wxPen * GetTopSidePen();
void ResizeAdjoining(int side, double newPos, bool test);
void PopupMenu(double x, double y);
void SetBottomSide(wxPyDivisionShape *shape);
void SetHandleSide(int side);
void SetLeftSide(wxPyDivisionShape *shape);
void SetLeftSideColour(const wxString& colour);
void SetLeftSidePen(wxPen *pen);
void SetRightSide(wxPyDivisionShape *shape);
void SetTopSide(wxPyDivisionShape *shape);
void SetTopSideColour(const wxString& colour);
void SetTopSidePen(wxPen *pen);
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------

View File

@@ -1,411 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: oglshapes2.i
// Purpose: SWIG definitions for the wxWindows Object Graphics Library
//
// Author: Robin Dunn
//
// Created: 3-Sept-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
// not a %module
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyEllipseShape, wxEllipseShape);
%}
class wxPyEllipseShape : public wxPyShape {
public:
%pythonAppend wxPyEllipseShape "self._setOORandCallbackInfo(PyEllipseShape)"
wxPyEllipseShape(double width = 0.0, double height = 0.0);
void _setCallbackInfo(PyObject* self, PyObject* _class);
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyCircleShape, wxCircleShape);
%}
class wxPyCircleShape : public wxPyEllipseShape {
public:
%pythonAppend wxPyCircleShape "self._setOORandCallbackInfo(PyCircleShape)"
wxPyCircleShape(double width = 0.0);
void _setCallbackInfo(PyObject* self, PyObject* _class);
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class wxArrowHead : public wxObject {
public:
wxArrowHead(int type = 0,
int end = 0,
double size = 0.0,
double dist = 0.0,
const wxString& name = wxPyEmptyString,
wxPseudoMetaFile *mf = NULL,
long arrowId = -1);
~wxArrowHead();
int _GetType();
int GetPosition();
void SetPosition(int pos);
double GetXOffset();
double GetYOffset();
double GetSpacing();
double GetSize();
wxString GetName();
void SetXOffset(double x);
void SetYOffset(double y);
wxPseudoMetaFile *GetMetaFile();
long GetId();
int GetArrowEnd();
double GetArrowSize();
void SetSize(double size);
void SetSpacing(double sp);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyLineShape, wxLineShape);
%}
class wxPyLineShape : public wxPyShape {
public:
%pythonAppend wxPyLineShape "self._setOORandCallbackInfo(PyLineShape)"
wxPyLineShape();
void _setCallbackInfo(PyObject* self, PyObject* _class);
void AddArrow(int type, int end = ARROW_POSITION_END,
double arrowSize = 10.0, double xOffset = 0.0,
const wxString& name = wxPyEmptyString, wxPseudoMetaFile *mf = NULL,
long arrowId = -1);
//void AddArrowOrdered(wxArrowHead *arrow, wxList& referenceList, int end);
%extend {
void AddArrowOrdered(wxArrowHead *arrow, PyObject* referenceList, int end) {
wxList* list = wxPy_wxListHelper(referenceList, wxT("wxArrowHead"));
self->AddArrowOrdered(arrow, *list, end);
delete list;
}
}
bool ClearArrow(const wxString& name);
void ClearArrowsAtPosition(int position = -1);
void DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool proportionalOffset);
%Rename(DeleteArrowHeadId, bool, DeleteArrowHead(long arrowId));
bool DeleteArrowHead(int position, const wxString& name);
bool DeleteLineControlPoint();
void DrawArrows(wxDC& dc);
void DrawRegion(wxDC& dc, wxShapeRegion *region, double x, double y);
void EraseRegion(wxDC& dc, wxShapeRegion *region, double x, double y);
%Rename(FindArrowHeadId, wxArrowHead *, FindArrowHead(long arrowId));
wxArrowHead * FindArrowHead(int position, const wxString& name);
void FindLineEndPoints(double *OUTPUT, double *OUTPUT,
double *OUTPUT, double *OUTPUT);
int FindLinePosition(double x, double y);
double FindMinimumWidth();
void FindNth(wxPyShape *image, int *OUTPUT, int *OUTPUT, bool incoming);
int GetAttachmentFrom();
int GetAttachmentTo();
void GetEnds(double *OUTPUT, double *OUTPUT, double *OUTPUT, double *OUTPUT);
wxPyShape * GetFrom();
void GetLabelPosition(int position, double *OUTPUT, double *OUTPUT);
wxRealPoint * GetNextControlPoint(wxPyShape *shape);
wxPyShape * GetTo();
void Initialise();
void InsertLineControlPoint(wxDC* dc);
bool IsEnd(wxPyShape *shape);
bool IsSpline();
void MakeLineControlPoints(int n);
// inline wxList *GetLineControlPoints() { return m_lineControlPoints; }
%extend {
PyObject* GetLineControlPoints() {
wxList* list = self->GetLineControlPoints();
return wxPy_ConvertRealPointList(list);
}
// part of Patch# 893337
void SetLineControlPoints(PyObject* list) {
wxList* real_point_list = wxPy_wxRealPoint_ListHelper(list);
self->MakeLineControlPoints((int)(real_point_list->GetCount()));
wxList* old_control_points = self->GetLineControlPoints();
wxNode* old_node = old_control_points->GetFirst();
wxNode* real_node = real_point_list->GetFirst();
while(old_node)
{
wxRealPoint* old_point = (wxRealPoint*)old_node->GetData();
wxRealPoint* new_point = (wxRealPoint*)real_node->GetData();
old_point->x = new_point->x;
old_point->y = new_point->y;
old_node = old_node->GetNext();
real_node = real_node->GetNext();
}
self->ClearPointList(*real_point_list);
delete real_point_list;
}
}
void SetAttachmentFrom(int fromAttach);
void SetAttachments(int fromAttach, int toAttach);
void SetAttachmentTo(int toAttach);
void SetEnds(double x1, double y1, double x2, double y2);
void SetFrom(wxPyShape *object);
void SetIgnoreOffsets(bool ignore);
void SetSpline(bool spline);
void SetTo(wxPyShape *object);
void Straighten(wxDC* dc = NULL);
void Unlink();
void SetAlignmentOrientation(bool isEnd, bool isHoriz);
void SetAlignmentType(bool isEnd, int alignType);
bool GetAlignmentOrientation(bool isEnd);
int GetAlignmentType(bool isEnd);
int GetAlignmentStart() const;
int GetAlignmentEnd() const;
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyPolygonShape, wxPolygonShape);
%}
class wxPyPolygonShape : public wxPyShape {
public:
%pythonAppend wxPyPolygonShape "self._setOORandCallbackInfo(PyPolygonShape)"
wxPyPolygonShape();
void _setCallbackInfo(PyObject* self, PyObject* _class);
// void Create(wxList* points);
%extend {
PyObject* Create(PyObject* points) {
wxList* list = wxPy_wxRealPoint_ListHelper(points);
if (list) {
self->Create(list);
Py_INCREF(Py_None);
return Py_None;
}
else return NULL;
}
}
void AddPolygonPoint(int pos = 0);
void CalculatePolygonCentre();
void DeletePolygonPoint(int pos = 0);
// wxList* GetPoints();
%extend {
PyObject* GetPoints() {
wxList* list = self->GetPoints();
return wxPy_ConvertRealPointList(list);
}
PyObject* GetOriginalPoints() {
wxList* list = self->GetOriginalPoints();
PyObject* pyList;
PyObject* pyObj;
wxObject* wxObj;
wxNode* node = list->GetFirst();
wxPyBlock_t blocked = wxPyBeginBlockThreads();
pyList = PyList_New(0);
while (node) {
wxObj = node->GetData();
pyObj = wxPyConstructObject(wxObj, wxT("wxRealPoint"), 0);
PyList_Append(pyList, pyObj);
node = node->GetNext();
}
wxPyEndBlockThreads(blocked);
return pyList;
}
}
double GetOriginalWidth() const;
double GetOriginalHeight() const;
void SetOriginalWidth(double w);
void SetOriginalHeight(double h);
void UpdateOriginalPoints();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------
%{
WXSHAPE_IMP_CALLBACKS(wxPyTextShape, wxTextShape);
%}
class wxPyTextShape : public wxPyRectangleShape {
public:
%pythonAppend wxPyTextShape "self._setOORandCallbackInfo(PyTextShape)"
wxPyTextShape(double width = 0.0, double height = 0.0);
void _setCallbackInfo(PyObject* self, PyObject* _class);
void base_OnDelete();
void base_OnDraw(wxDC& dc);
void base_OnDrawContents(wxDC& dc);
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
void base_OnMoveLinks(wxDC& dc);
void base_OnErase(wxDC& dc);
void base_OnEraseContents(wxDC& dc);
void base_OnHighlight(wxDC& dc);
void base_OnLeftClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
void base_OnSize(double x, double y);
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = true);
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
void base_OnDragRight(bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnEndDragRight(double x, double y, int keys=0, int attachment = 0);
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
void base_OnDrawControlPoints(wxDC& dc);
void base_OnEraseControlPoints(wxDC& dc);
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = true);
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
void base_OnBeginSize(double w, double h);
void base_OnEndSize(double w, double h);
// void base_OnChangeAttachment(int attachment, wxPyLineShape* line, wxList& ordering);
};
//---------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1,366 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: ogl.i
// Purpose: SWIG definitions for the wxWindows Object Graphics Library
//
// Author: Robin Dunn
//
// Created: 30-June-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%define DOCSTRING
"The Object Graphics Library provides for simple drawing and manipulation
of 2D objects. (This version is deprecated, please use wx.lib.ogl instead.)"
%enddef
%module(package="wx", docstring=DOCSTRING) ogl
%{
#include "wx/wxPython/wxPython.h"
#include "wx/wxPython/pyclasses.h"
#include "oglhelpers.h"
%}
//---------------------------------------------------------------------------
%import windows.i
%pythoncode { wx = _core }
%pythoncode { __docfilter__ = wx.__DocFilter(globals()) }
%pythoncode {
import warnings
warnings.warn("This module is deprecated. Please use the wx.lib.ogl package instead.",
DeprecationWarning, stacklevel=2)
}
MAKE_CONST_WXSTRING_NOSWIG(EmptyString);
%include _ogl_rename.i
%include _ogldefs.i
%include _oglbasic.i
%include _oglshapes.i
%include _oglshapes2.i
%include _oglcanvas.i
%pythoncode {
%# Aliases
ShapeCanvas = PyShapeCanvas
ShapeEvtHandler = PyShapeEvtHandler
Shape = PyShape
RectangleShape = PyRectangleShape
BitmapShape = PyBitmapShape
DrawnShape = PyDrawnShape
CompositeShape = PyCompositeShape
DividedShape = PyDividedShape
DivisionShape = PyDivisionShape
EllipseShape = PyEllipseShape
CircleShape = PyCircleShape
LineShape = PyLineShape
PolygonShape = PyPolygonShape
TextShape = PyTextShape
ControlPoint = PyControlPoint
}
//---------------------------------------------------------------------------
enum {
KEY_SHIFT,
KEY_CTRL,
ARROW_NONE,
ARROW_END,
ARROW_BOTH,
ARROW_MIDDLE,
ARROW_START,
ARROW_HOLLOW_CIRCLE,
ARROW_FILLED_CIRCLE,
ARROW_ARROW,
ARROW_SINGLE_OBLIQUE,
ARROW_DOUBLE_OBLIQUE,
ARROW_METAFILE,
ARROW_POSITION_END,
ARROW_POSITION_START,
CONTROL_POINT_VERTICAL,
CONTROL_POINT_HORIZONTAL,
CONTROL_POINT_DIAGONAL,
CONTROL_POINT_ENDPOINT_TO,
CONTROL_POINT_ENDPOINT_FROM,
CONTROL_POINT_LINE,
FORMAT_NONE,
FORMAT_CENTRE_HORIZ,
FORMAT_CENTRE_VERT,
FORMAT_SIZE_TO_CONTENTS,
LINE_ALIGNMENT_HORIZ,
LINE_ALIGNMENT_VERT,
LINE_ALIGNMENT_TO_NEXT_HANDLE,
LINE_ALIGNMENT_NONE,
SHADOW_NONE,
SHADOW_LEFT,
SHADOW_RIGHT,
// SHAPE_BASIC,
// SHAPE_RECTANGLE,
// SHAPE_ELLIPSE,
// SHAPE_POLYGON,
// SHAPE_CIRCLE,
// SHAPE_LINE,
// SHAPE_DIVIDED_RECTANGLE,
// SHAPE_COMPOSITE,
// SHAPE_CONTROL_POINT,
// SHAPE_DRAWN,
// SHAPE_DIVISION,
// SHAPE_LABEL_OBJECT,
// SHAPE_BITMAP,
// SHAPE_DIVIDED_OBJECT_CONTROL_POINT,
// OBJECT_REGION,
OP_CLICK_LEFT,
OP_CLICK_RIGHT,
OP_DRAG_LEFT,
OP_DRAG_RIGHT,
OP_ALL,
ATTACHMENT_MODE_NONE,
ATTACHMENT_MODE_EDGE,
ATTACHMENT_MODE_BRANCHING,
BRANCHING_ATTACHMENT_NORMAL,
BRANCHING_ATTACHMENT_BLOB,
gyCONSTRAINT_CENTRED_VERTICALLY,
gyCONSTRAINT_CENTRED_HORIZONTALLY,
gyCONSTRAINT_CENTRED_BOTH,
gyCONSTRAINT_LEFT_OF,
gyCONSTRAINT_RIGHT_OF,
gyCONSTRAINT_ABOVE,
gyCONSTRAINT_BELOW,
gyCONSTRAINT_ALIGNED_TOP,
gyCONSTRAINT_ALIGNED_BOTTOM,
gyCONSTRAINT_ALIGNED_LEFT,
gyCONSTRAINT_ALIGNED_RIGHT,
gyCONSTRAINT_MIDALIGNED_TOP,
gyCONSTRAINT_MIDALIGNED_BOTTOM,
gyCONSTRAINT_MIDALIGNED_LEFT,
gyCONSTRAINT_MIDALIGNED_RIGHT,
DIVISION_SIDE_NONE,
DIVISION_SIDE_LEFT,
DIVISION_SIDE_TOP,
DIVISION_SIDE_RIGHT,
DIVISION_SIDE_BOTTOM,
};
//---------------------------------------------------------------------------
MustHaveApp(wxOGLInitialize);
void wxOGLInitialize();
MustHaveApp(wxOGLCleanUp);
void wxOGLCleanUp();
%{
//---------------------------------------------------------------------------
// Convert from a Python list to a list of className objects. This one will
// work for any class for the VERY generic cases, but beyond that the helper
// needs to know more about the type.
wxList* wxPy_wxListHelper(PyObject* pyList, const wxChar* className) {
wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (!PyList_Check(pyList)) {
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
wxPyEndBlockThreads(blocked);
return NULL;
}
int count = PyList_Size(pyList);
wxList* list = new wxList;
if (! list) {
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
wxPyEndBlockThreads(blocked);
return NULL;
}
for (int x=0; x<count; x++) {
PyObject* pyo = PyList_GetItem(pyList, x);
wxObject* wxo = NULL;
if ( !wxPyConvertSwigPtr(pyo, (void **)&wxo, className) ) {
wxString errmsg;
errmsg.Printf(wxT("Type error, expected list of %s objects"), className);
PyErr_SetString(PyExc_TypeError, errmsg.mb_str());
wxPyEndBlockThreads(blocked);
return NULL;
}
list->Append(wxo);
}
wxPyEndBlockThreads(blocked);
return list;
}
//---------------------------------------------------------------------------
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) {
wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (!PyList_Check(pyList)) {
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
wxPyEndBlockThreads(blocked);
return NULL;
}
int count = PyList_Size(pyList);
wxList* list = new wxList;
if (! list) {
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
wxPyEndBlockThreads(blocked);
return NULL;
}
for (int x=0; x<count; x++) {
PyObject* pyo = PyList_GetItem(pyList, x);
if (PyTuple_Check(pyo)) {
PyObject* o1 = PyNumber_Float(PyTuple_GetItem(pyo, 0));
PyObject* o2 = PyNumber_Float(PyTuple_GetItem(pyo, 1));
double val1 = (o1 ? PyFloat_AsDouble(o1) : 0.0);
double val2 = (o2 ? PyFloat_AsDouble(o2) : 0.0);
list->Append((wxObject*) new wxRealPoint(val1, val2));
} else {
wxRealPoint* wxo = NULL;
if (wxPyConvertSwigPtr(pyo, (void **)&wxo, wxT("wxRealPoint"))) {
PyErr_SetString(PyExc_TypeError, "Type error, expected list of wxRealPoint objects or 2-tuples");
wxPyEndBlockThreads(blocked);
return NULL;
}
list->Append((wxObject*) new wxRealPoint(*wxo));
}
}
wxPyEndBlockThreads(blocked);
return list;
}
//---------------------------------------------------------------------------
PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source, bool setThisOwn) {
PyObject* target = NULL;
if (source && wxIsKindOf(source, wxShapeEvtHandler)) {
// If it's derived from wxShapeEvtHandler then there may
// already be a pointer to a Python object that we can use
// in the OOR data.
wxShapeEvtHandler* seh = (wxShapeEvtHandler*)source;
wxPyOORClientData* data = (wxPyOORClientData*)seh->GetClientObject();
if (data) {
target = data->m_obj;
Py_INCREF(target);
}
}
if (! target) {
target = wxPyMake_wxObject2(source, setThisOwn, false);
if (target != Py_None)
((wxShapeEvtHandler*)source)->SetClientObject(new wxPyOORClientData(target));
}
return target;
}
//---------------------------------------------------------------------------
PyObject* wxPy_ConvertRealPointList(wxListBase* listbase) {
wxList* list = (wxList*)listbase;
PyObject* pyList;
PyObject* pyObj;
wxObject* wxObj;
wxNode* node = list->GetFirst();
wxPyBlock_t blocked = wxPyBeginBlockThreads();
pyList = PyList_New(0);
while (node) {
wxObj = node->GetData();
pyObj = wxPyConstructObject(wxObj, wxT("wxRealPoint"), 0);
PyList_Append(pyList, pyObj);
node = node->GetNext();
}
wxPyEndBlockThreads(blocked);
return pyList;
}
//---------------------------------------------------------------------------
PyObject* wxPy_ConvertShapeList(wxListBase* listbase) {
wxList* list = (wxList*)listbase;
PyObject* pyList;
PyObject* pyObj;
wxObject* wxObj;
wxNode* node = list->GetFirst();
wxPyBlock_t blocked = wxPyBeginBlockThreads();
pyList = PyList_New(0);
while (node) {
wxObj = node->GetData();
pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj, false);
PyList_Append(pyList, pyObj);
node = node->GetNext();
}
wxPyEndBlockThreads(blocked);
return pyList;
}
//---------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxPyShapeCanvas, wxShapeCanvas);
IMPLEMENT_DYNAMIC_CLASS(wxPyShapeEvtHandler, wxShapeEvtHandler);
IMPLEMENT_ABSTRACT_CLASS(wxPyShape, wxShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyRectangleShape, wxRectangleShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyControlPoint, wxControlPoint);
IMPLEMENT_DYNAMIC_CLASS(wxPyBitmapShape, wxBitmapShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyDrawnShape, wxDrawnShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyCompositeShape, wxCompositeShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyDividedShape, wxDividedShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyDivisionShape, wxDivisionShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyEllipseShape, wxEllipseShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyCircleShape, wxCircleShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyLineShape, wxLineShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyPolygonShape, wxPolygonShape);
IMPLEMENT_DYNAMIC_CLASS(wxPyTextShape, wxTextShape);
//---------------------------------------------------------------------------
// extern "C" SWIGEXPORT(void) initoglbasicc();
// extern "C" SWIGEXPORT(void) initoglshapesc();
// extern "C" SWIGEXPORT(void) initoglshapes2c();
// extern "C" SWIGEXPORT(void) initoglcanvasc();
%}
%init %{
// initoglbasicc();
// initoglshapesc();
// initoglshapes2c();
// initoglcanvasc();
wxPyPtrTypeMap_Add("wxControlPoint", "wxPyControlPoint");
wxPyPtrTypeMap_Add("wxShapeCanvas", "wxPyShapeCanvas");
wxPyPtrTypeMap_Add("wxShapeEvtHandler", "wxPyShapeEvtHandler");
wxPyPtrTypeMap_Add("wxShape", "wxPyShape");
wxPyPtrTypeMap_Add("wxRectangleShape", "wxPyRectangleShape");
wxPyPtrTypeMap_Add("wxDrawnShape", "wxPyDrawnShape");
wxPyPtrTypeMap_Add("wxCompositeShape", "wxPyCompositeShape");
wxPyPtrTypeMap_Add("wxDividedShape", "wxPyDividedShape");
wxPyPtrTypeMap_Add("wxDivisionShape", "wxPyDivisionShape");
wxPyPtrTypeMap_Add("wxEllipseShape", "wxPyEllipseShape");
wxPyPtrTypeMap_Add("wxCircleShape", "wxPyCircleShape");
wxPyPtrTypeMap_Add("wxLineShape", "wxPyLineShape");
wxPyPtrTypeMap_Add("wxPolygonShape", "wxPyPolygonShape");
wxPyPtrTypeMap_Add("wxTextShape", "wxPyTextShape");
%}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------

View File

@@ -1,286 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: oglhelpers.h
// Purpose: Some Helper functions to help in data conversions in OGL
//
// Author: Robin Dunn
//
// Created: 9-Sept-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __wxp_ogl_helpers__
#define __wxp_ogl_helpers__
#include <wx/ogl/ogl.h>
#include <wx/ogl/basicp.h>
#include <wx/ogl/constrnt.h>
#include <wx/ogl/bmpshape.h>
#include <wx/ogl/drawn.h>
//---------------------------------------------------------------------------
// Define a macro that will be used in the class definintions below
#define WXSHAPE_DEC_CALLBACKS() \
DEC_PYCALLBACK__ (OnDelete); \
DEC_PYCALLBACK__DC (OnDraw); \
DEC_PYCALLBACK__DC (OnDrawContents); \
DEC_PYCALLBACK__DCBOOL (OnDrawBranches); \
DEC_PYCALLBACK__DC (OnMoveLinks); \
DEC_PYCALLBACK__DC (OnErase); \
DEC_PYCALLBACK__DC (OnEraseContents); \
DEC_PYCALLBACK__DC (OnHighlight); \
DEC_PYCALLBACK__2DBL2INT (OnLeftClick); \
DEC_PYCALLBACK__2DBL2INT (OnLeftDoubleClick); \
DEC_PYCALLBACK__2DBL2INT (OnRightClick); \
DEC_PYCALLBACK__2DBL (OnSize); \
DEC_PYCALLBACK_BOOL_DC4DBLBOOL (OnMovePre); \
DEC_PYCALLBACK__DC4DBLBOOL (OnMovePost); \
DEC_PYCALLBACK__BOOL2DBL2INT (OnDragLeft); \
DEC_PYCALLBACK__2DBL2INT (OnBeginDragLeft); \
DEC_PYCALLBACK__2DBL2INT (OnEndDragLeft); \
DEC_PYCALLBACK__BOOL2DBL2INT (OnDragRight); \
DEC_PYCALLBACK__2DBL2INT (OnBeginDragRight); \
DEC_PYCALLBACK__2DBL2INT (OnEndDragRight); \
DEC_PYCALLBACK__DC4DBL (OnDrawOutline); \
DEC_PYCALLBACK__DC (OnDrawControlPoints); \
DEC_PYCALLBACK__DC (OnEraseControlPoints); \
DEC_PYCALLBACK__DCBOOL (OnMoveLink); \
DEC_PYCALLBACK__WXCPBOOL2DBL2INT(OnSizingDragLeft); \
DEC_PYCALLBACK__WXCP2DBL2INT (OnSizingBeginDragLeft);\
DEC_PYCALLBACK__WXCP2DBL2INT (OnSizingEndDragLeft); \
DEC_PYCALLBACK__2DBL (OnBeginSize); \
DEC_PYCALLBACK__2DBL (OnEndSize); \
PYPRIVATE
#define WXSHAPE_IMP_CALLBACKS(CLASS, PARENT) \
IMP_PYCALLBACK__ (CLASS, PARENT, OnDelete); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnDraw); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnDrawContents); \
IMP_PYCALLBACK__DCBOOL (CLASS, PARENT, OnDrawBranches); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnMoveLinks); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnErase); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnEraseContents); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnHighlight); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnLeftClick); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnLeftDoubleClick); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnRightClick); \
IMP_PYCALLBACK__2DBL (CLASS, PARENT, OnSize); \
IMP_PYCALLBACK_BOOL_DC4DBLBOOL (CLASS, PARENT, OnMovePre); \
IMP_PYCALLBACK__DC4DBLBOOL (CLASS, PARENT, OnMovePost); \
IMP_PYCALLBACK__BOOL2DBL2INT (CLASS, PARENT, OnDragLeft); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnBeginDragLeft); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnEndDragLeft); \
IMP_PYCALLBACK__BOOL2DBL2INT (CLASS, PARENT, OnDragRight); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnBeginDragRight); \
IMP_PYCALLBACK__2DBL2INT (CLASS, PARENT, OnEndDragRight); \
IMP_PYCALLBACK__DC4DBL (CLASS, PARENT, OnDrawOutline); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnDrawControlPoints); \
IMP_PYCALLBACK__DC (CLASS, PARENT, OnEraseControlPoints); \
IMP_PYCALLBACK__DCBOOL (CLASS, PARENT, OnMoveLink); \
IMP_PYCALLBACK__WXCPBOOL2DBL2INT(CLASS, PARENT, OnSizingDragLeft); \
IMP_PYCALLBACK__WXCP2DBL2INT (CLASS, PARENT, OnSizingBeginDragLeft);\
IMP_PYCALLBACK__WXCP2DBL2INT (CLASS, PARENT, OnSizingEndDragLeft); \
IMP_PYCALLBACK__2DBL (CLASS, PARENT, OnBeginSize); \
IMP_PYCALLBACK__2DBL (CLASS, PARENT, OnEndSize)
// This one may be difficult...
//PYCALLBACK__??????? (PARENT, OnChangeAttachment);
//---------------------------------------------------------------------------
// These are prototypes of some helper functions found in ogl.i
wxList* wxPy_wxListHelper(PyObject* pyList, const wxChar* className);
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList);
PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source);
PyObject* wxPy_ConvertShapeList(wxListBase* list);
PyObject* wxPy_ConvertRealPointList(wxListBase* list);
//---------------------------------------------------------------------------
// Classes that derive from the shapes and such, but which know how to turn
// virtual callbacks into Python callbacks.
class wxPyShapeCanvas : public wxShapeCanvas {
DECLARE_DYNAMIC_CLASS(wxPyShapeCanvas);
public:
wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBORDER,
const wxString& name = wxT("shapeCanvas"))
: wxShapeCanvas(parent, id, pos, size, style, name) {}
DEC_PYCALLBACK__2DBLINT(OnBeginDragLeft);
DEC_PYCALLBACK__2DBLINT(OnBeginDragRight);
DEC_PYCALLBACK__2DBLINT(OnEndDragLeft);
DEC_PYCALLBACK__2DBLINT(OnEndDragRight);
DEC_PYCALLBACK__BOOL2DBLINT(OnDragLeft);
DEC_PYCALLBACK__BOOL2DBLINT(OnDragRight);
DEC_PYCALLBACK__2DBLINT(OnLeftClick);
DEC_PYCALLBACK__2DBLINT(OnRightClick);
PYPRIVATE;
};
class wxPyShapeEvtHandler : public wxShapeEvtHandler {
DECLARE_DYNAMIC_CLASS(wxPyShapeEvtHandler);
public:
wxPyShapeEvtHandler(wxShapeEvtHandler *prev = NULL, wxShape *shape = NULL)
: wxShapeEvtHandler(prev, shape) {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyShape : public wxShape {
DECLARE_ABSTRACT_CLASS(wxPyShape);
public:
wxPyShape(wxPyShapeCanvas *can = NULL)
: wxShape(can) {}
virtual void GetBoundingBoxMin(double *width, double *height)
{
if (width) *width = 0.0;
if (height) *height = 0.0;
}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyRectangleShape : public wxRectangleShape {
DECLARE_DYNAMIC_CLASS(wxPyRectangleShape);
public:
wxPyRectangleShape(double width = 0.0, double height = 0.0)
: wxRectangleShape(width, height) {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyControlPoint : public wxControlPoint {
DECLARE_DYNAMIC_CLASS(wxPyControlPoint);
public:
wxPyControlPoint(wxPyShapeCanvas *the_canvas = NULL,
wxPyShape *object = NULL,
double size = 0.0, double the_xoffset = 0.0,
double the_yoffset = 0.0, int the_type = 0)
: wxControlPoint(the_canvas, object, size,
the_xoffset, the_yoffset, the_type) {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyBitmapShape : public wxBitmapShape {
DECLARE_DYNAMIC_CLASS(wxPyBitmapShape);
public:
wxPyBitmapShape() : wxBitmapShape() {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyDrawnShape : public wxDrawnShape {
DECLARE_DYNAMIC_CLASS(wxPyDrawnShape);
public:
wxPyDrawnShape() : wxDrawnShape() {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyCompositeShape : public wxCompositeShape {
DECLARE_DYNAMIC_CLASS(wxPyCompositeShape);
public:
wxPyCompositeShape() : wxCompositeShape() {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyDividedShape : public wxDividedShape {
DECLARE_DYNAMIC_CLASS(wxPyDividedShape);
public:
wxPyDividedShape(double width = 0.0, double height = 0.0)
: wxDividedShape(width, height) {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyDivisionShape : public wxDivisionShape {
DECLARE_DYNAMIC_CLASS(wxPyDivisionShape);
public:
wxPyDivisionShape() : wxDivisionShape() {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyEllipseShape : public wxEllipseShape {
DECLARE_DYNAMIC_CLASS(wxPyEllipseShape);
public:
wxPyEllipseShape(double width = 0.0, double height = 0.0)
: wxEllipseShape(width, height) {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyCircleShape : public wxCircleShape {
DECLARE_DYNAMIC_CLASS(wxPyCircleShape);
public:
wxPyCircleShape(double width = 0.0)
: wxCircleShape(width) {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyLineShape : public wxLineShape {
DECLARE_DYNAMIC_CLASS(wxPyLineShape);
public:
wxPyLineShape() : wxLineShape() {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyPolygonShape : public wxPolygonShape {
DECLARE_DYNAMIC_CLASS(wxPyPolygonShape);
public:
wxPyPolygonShape() : wxPolygonShape() {}
WXSHAPE_DEC_CALLBACKS();
};
class wxPyTextShape : public wxTextShape {
DECLARE_DYNAMIC_CLASS(wxPyTextShape);
public:
wxPyTextShape(double width = 0.0, double height = 0.0)
: wxTextShape(width, height) {}
WXSHAPE_DEC_CALLBACKS();
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#endif

View File

@@ -1,6 +0,0 @@
Makefile
Makefile
contrib
stc_c.exp
stc_c.ilk
stc_c.pch

View File

@@ -1,218 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: _stc_docstrings.i
// Purpose: Docstrings for the wxStyledTextCtrl. The ones in this file
// are maintained by hand for those methods that are not
// auto-generated by gen_iface.py
//
// Author: Robin Dunn
//
// Created: 16-April-2005
// RCS-ID: $Id$
// Copyright: (c) 2005 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
// First include the autogenerated docstrings so if any of them need
// tweaked they can be overridden below
%include _stc_gendocs.i
// TODO: Class docstring
DocStr(wxStyledTextCtrl,
"", "");
// TODO: Main constructor
DocStr(wxStyledTextCtrl::wxStyledTextCtrl,
"", "");
// TODO: "Pre" constructor
DocStr(wxStyledTextCtrl::wxStyledTextCtrl(),
"", "");
DocStr(wxStyledTextCtrl::GetCurrentLine,
"Returns the line number of the line with the caret.", "");
DocStr(wxStyledTextCtrl::StyleSetSpec,
"Extract style settings from a spec-string which is composed of one or
more of the following comma separated elements::
bold turns on bold
italic turns on italics
fore:[name or #RRGGBB] sets the foreground colour
back:[name or #RRGGBB] sets the background colour
face:[facename] sets the font face name to use
size:[num] sets the font size in points
eol turns on eol filling
underline turns on underlining
", "");
DocStr(wxStyledTextCtrl::StyleSetFont,
"Set style size, face, bold, italic, and underline attributes from the
attributes of a `wx.Font`.", "");
DocStr(wxStyledTextCtrl::StyleSetFontAttr,
"Set all font style attributes at once.", "");
DocStr(wxStyledTextCtrl::StyleSetCharacterSet,
"Set the character set of the font in a style. Converts the Scintilla
wx.stc.STC_CHARSET_* set values to a wxFontEncoding.", "");
DocStr(wxStyledTextCtrl::StyleSetFontEncoding,
"Set the font encoding to be used by a style.", "");
DocStr(wxStyledTextCtrl::CmdKeyExecute,
"Perform one of the operations defined by the wx.stc.STC_CMD_* constants.", "");
DocStr(wxStyledTextCtrl::SetMargins,
"Set the left and right margin in the edit area, measured in pixels.", "");
DocAStr(wxStyledTextCtrl::GetSelection,
"GetSelection(self) -> (startPos, endPos)",
"Retrieve the start and end positions of the current selection.", "");
DocStr(wxStyledTextCtrl::PointFromPosition,
"Retrieve the point in the window where a position is displayed.", "");
DocStr(wxStyledTextCtrl::ScrollToLine,
"Scroll enough to make the given line visible.", "");
DocStr(wxStyledTextCtrl::ScrollToColumn,
"Scroll enough to make the given column visible", "");
DocStr(wxStyledTextCtrl::SendMsg,
"Send a message to Scintilla.", "");
DocStr(wxStyledTextCtrl::SetVScrollBar,
"Set the vertical scrollbar to use instead of the one that's built-in.", "");
DocStr(wxStyledTextCtrl::SetHScrollBar,
"Set the horizontal scrollbar to use instead of the ont that's built-in.", "");
DocStr(wxStyledTextCtrl::SaveFile,
"Write the contents of the editor to filename", "");
DocStr(wxStyledTextCtrl::LoadFile,
"Load the contents of filename into the editor", "");
DocStr(wxStyledTextCtrl::DoDragOver,
"Allow for simulating a DnD DragOver.", "");
DocStr(wxStyledTextCtrl::DoDropText,
"Allow for simulating a DnD DropText.", "");
DocStr(wxStyledTextCtrl::SetUseAntiAliasing,
"Specify whether anti-aliased fonts should be used. Will have no
effect on some platforms, but on some (wxMac for example) can greatly
improve performance.", "");
DocStr(wxStyledTextCtrl::GetUseAntiAliasing,
"Returns the current UseAntiAliasing setting.", "");
DocStr(wxStyledTextCtrl::AddTextRaw,
"Add text to the document at current position. The text should be
utf-8 encoded on unicode builds of wxPython, or can be any 8-bit text
in ansi builds.", "");
DocStr(wxStyledTextCtrl::InsertTextRaw,
"Insert string at a position. The text should be utf-8 encoded on
unicode builds of wxPython, or can be any 8-bit text in ansi builds.", "");
DocAStr(wxStyledTextCtrl::GetCurLineRaw,
"GetCurLineRaw() -> (text, index)",
"Retrieve the text of the line containing the caret, and also the index
of the caret on the line. The returned value is a utf-8 encoded
string in unicode builds of wxPython, or raw 8-bit text otherwise.", "");
DocStr(wxStyledTextCtrl::GetLineRaw,
"Retrieve the contents of a line. The returned value is a utf-8
encoded string in unicode builds of wxPython, or raw 8-bit text
otherwise.", "");
DocStr(wxStyledTextCtrl::GetSelectedTextRaw,
"Retrieve the selected text. The returned value is a utf-8 encoded
string in unicode builds of wxPython, or raw 8-bit text otherwise.", "");
DocStr(wxStyledTextCtrl::GetTextRangeRaw,
"Retrieve a range of text. The returned value is a utf-8 encoded
string in unicode builds of wxPython, or raw 8-bit text otherwise.", "");
DocStr(wxStyledTextCtrl::SetTextRaw,
"Replace the contents of the document with the argument text. The text
should be utf-8 encoded on unicode builds of wxPython, or can be any
8-bit text in ansi builds.", "");
DocStr(wxStyledTextCtrl::GetTextRaw,
"Retrieve all the text in the document. The returned value is a utf-8
encoded string in unicode builds of wxPython, or raw 8-bit text
otherwise.", "");
DocStr(wxStyledTextCtrl::AppendTextRaw,
"Append a string to the end of the document without changing the
selection. The text should be utf-8 encoded on unicode builds of
wxPython, or can be any 8-bit text in ansi builds.", "");
// Overrides for some of the generated docstrings
DocAStr(wxStyledTextCtrl::GetCurLine,
"GetCurLine(self) -> (text, pos)",
"Retrieve the text of the line containing the caret, and also theindex
of the caret on the line.", "");
// For some reason these are not getting the right docstrings, but are
// inheriting the docstrings from wxWindow instead. So we'll have to
// replace the whole proxy method instead.
%feature("shadow") wxStyledTextCtrl::LineDown
%{
def LineDown(*args, **kwargs):
"""
LineDown(self)
Move caret down one line.
"""
return _stc.StyledTextCtrl_LineDown(*args, **kwargs)
%}
%feature("shadow") wxStyledTextCtrl::LineUp
%{
def LineUp(*args, **kwargs):
"""
LineUp(self)
Move caret up one line.
"""
return _stc.StyledTextCtrl_LineUp(*args, **kwargs)
%}
%feature("shadow") wxStyledTextCtrl::PageDown
%{
def PageDown(*args, **kwargs):
"""
PageDown(self)
Move caret one page down.
"""
return _stc.StyledTextCtrl_PageDown(*args, **kwargs)
%}
%feature("shadow") wxStyledTextCtrl::PageUp
%{
def PageUp(*args, **kwargs):
"""
PageUp(self)
Move caret one page up.
"""
return _stc.StyledTextCtrl_PageUp(*args, **kwargs)
%}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +0,0 @@
# Other names that need to be reverse-renamed for the old namespace
EVT*

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