This commit was manufactured by cvs2svn to create tag 'WX_2_2_9'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_2_9@13364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
1
wxPython/contrib/.cvsignore
Normal file
1
wxPython/contrib/.cvsignore
Normal file
@@ -0,0 +1 @@
|
||||
update.log
|
3
wxPython/contrib/README
Normal file
3
wxPython/contrib/README
Normal file
@@ -0,0 +1,3 @@
|
||||
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.
|
14
wxPython/contrib/glcanvas/.cvsignore
Normal file
14
wxPython/contrib/glcanvas/.cvsignore
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
*.exp
|
||||
*.lib
|
||||
*.obj
|
||||
*.pch
|
||||
Makefile
|
||||
Makefile.pre
|
||||
Setup
|
||||
build.local
|
||||
config.c
|
||||
glcanvas.h
|
||||
glcanvasc.ilk
|
||||
glcanvasc.pyd
|
||||
sedscript
|
120
wxPython/contrib/glcanvas/glcanvas.i
Normal file
120
wxPython/contrib/glcanvas/glcanvas.i
Normal file
@@ -0,0 +1,120 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
%module glcanvas
|
||||
|
||||
%{
|
||||
#include "export.h"
|
||||
#include <wx/glcanvas.h>
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%include typemaps.i
|
||||
%include my_typemaps.i
|
||||
|
||||
%extern wx.i
|
||||
%extern windows.i
|
||||
%extern windows2.i
|
||||
%extern windows3.i
|
||||
%extern frames.i
|
||||
%extern _defs.i
|
||||
%extern misc.i
|
||||
%extern gdi.i
|
||||
%extern controls.i
|
||||
%extern events.i
|
||||
|
||||
|
||||
%pragma(python) code = "import wx"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class wxPalette;
|
||||
class wxWindow;
|
||||
class wxSize;
|
||||
class wxPoint;
|
||||
class wxGLCanvas;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class wxGLContext {
|
||||
public:
|
||||
wxGLContext(bool isRGB, wxGLCanvas *win, const wxPalette& palette = wxNullPalette);
|
||||
~wxGLContext();
|
||||
|
||||
void SetCurrent();
|
||||
void SetColour(const char *colour);
|
||||
void SwapBuffers();
|
||||
|
||||
#ifdef __WXGTK__
|
||||
void SetupPixelFormat();
|
||||
void SetupPalette(const wxPalette& palette);
|
||||
wxPalette CreateDefaultPalette();
|
||||
wxPalette* GetPalette();
|
||||
#endif
|
||||
|
||||
wxWindow* GetWindow();
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%typemap(python, in) int *attribList (int *temp) {
|
||||
int i;
|
||||
if (PySequence_Check($source)) {
|
||||
int size = PyObject_Length($source);
|
||||
temp = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
|
||||
for (i = 0; i < size; i++) {
|
||||
temp[i] = PyInt_AsLong(PySequence_GetItem($source, i));
|
||||
}
|
||||
temp[size] = 0;
|
||||
$target = temp;
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(python, freearg) int *attribList
|
||||
{
|
||||
delete [] $source;
|
||||
}
|
||||
|
||||
|
||||
|
||||
class wxGLCanvas : public wxScrolledWindow {
|
||||
public:
|
||||
wxGLCanvas(wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const char* name = "GLCanvas",
|
||||
int *attribList = NULL,
|
||||
const wxPalette& palette = wxNullPalette);
|
||||
|
||||
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
|
||||
|
||||
void SetCurrent();
|
||||
void SetColour(const char *colour);
|
||||
void SwapBuffers();
|
||||
|
||||
wxGLContext* GetContext();
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%init %{
|
||||
|
||||
wxClassInfo::CleanUpClasses();
|
||||
wxClassInfo::InitializeClasses();
|
||||
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
2
wxPython/contrib/glcanvas/gtk/.cvsignore
Normal file
2
wxPython/contrib/glcanvas/gtk/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
*~
|
||||
_glcanvas.cpp
|
798
wxPython/contrib/glcanvas/gtk/glcanvas.cpp
Normal file
798
wxPython/contrib/glcanvas/gtk/glcanvas.cpp
Normal file
@@ -0,0 +1,798 @@
|
||||
/*
|
||||
* FILE : contrib/glcanvas/gtk/glcanvas.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 <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
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#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 initglcanvasc
|
||||
|
||||
#define SWIG_name "glcanvasc"
|
||||
|
||||
#include "export.h"
|
||||
#include <wx/glcanvas.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;
|
||||
}
|
||||
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define new_wxGLContext(_swigarg0,_swigarg1,_swigarg2) (new wxGLContext(_swigarg0,_swigarg1,_swigarg2))
|
||||
static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLContext * _result;
|
||||
bool _arg0;
|
||||
wxGLCanvas * _arg1;
|
||||
wxPalette * _arg2 = (wxPalette *) &wxNullPalette;
|
||||
int tempbool0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _argo2 = 0;
|
||||
char *_kwnames[] = { "isRGB","win","palette", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iO|O:new_wxGLContext",_kwnames,&tempbool0,&_argo1,&_argo2))
|
||||
return NULL;
|
||||
_arg0 = (bool ) tempbool0;
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGLCanvas_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLContext. Expected _wxGLCanvas_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo2) {
|
||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPalette_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGLContext. Expected _wxPalette_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxGLContext *)new_wxGLContext(_arg0,_arg1,*_arg2);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define delete_wxGLContext(_swigobj) (delete _swigobj)
|
||||
static PyObject *_wrap_delete_wxGLContext(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLContext * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxGLContext",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxGLContext. Expected _wxGLContext_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
delete_wxGLContext(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLContext_SetCurrent(_swigobj) (_swigobj->SetCurrent())
|
||||
static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLContext * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SetCurrent",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetCurrent. Expected _wxGLContext_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxGLContext_SetCurrent(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLContext_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
|
||||
static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLContext * _arg0;
|
||||
char * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","colour", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLContext_SetColour",_kwnames,&_argo0,&_arg1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetColour. Expected _wxGLContext_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxGLContext_SetColour(_arg0,_arg1);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLContext_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
|
||||
static PyObject *_wrap_wxGLContext_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLContext * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SwapBuffers",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SwapBuffers. Expected _wxGLContext_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxGLContext_SwapBuffers(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLContext_SetupPixelFormat(_swigobj) (_swigobj->SetupPixelFormat())
|
||||
static PyObject *_wrap_wxGLContext_SetupPixelFormat(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLContext * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_SetupPixelFormat",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetupPixelFormat. Expected _wxGLContext_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxGLContext_SetupPixelFormat(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLContext_SetupPalette(_swigobj,_swigarg0) (_swigobj->SetupPalette(_swigarg0))
|
||||
static PyObject *_wrap_wxGLContext_SetupPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLContext * _arg0;
|
||||
wxPalette * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
char *_kwnames[] = { "self","palette", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLContext_SetupPalette",_kwnames,&_argo0,&_argo1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetupPalette. Expected _wxGLContext_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPalette_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGLContext_SetupPalette. Expected _wxPalette_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxGLContext_SetupPalette(_arg0,*_arg1);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLContext_CreateDefaultPalette(_swigobj) (_swigobj->CreateDefaultPalette())
|
||||
static PyObject *_wrap_wxGLContext_CreateDefaultPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxPalette * _result;
|
||||
wxGLContext * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_CreateDefaultPalette",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_CreateDefaultPalette. Expected _wxGLContext_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = new wxPalette (wxGLContext_CreateDefaultPalette(_arg0));
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPalette_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLContext_GetPalette(_swigobj) (_swigobj->GetPalette())
|
||||
static PyObject *_wrap_wxGLContext_GetPalette(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxPalette * _result;
|
||||
wxGLContext * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetPalette",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetPalette. Expected _wxGLContext_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxPalette *)wxGLContext_GetPalette(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxPalette_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow())
|
||||
static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxWindow * _result;
|
||||
wxGLContext * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLContext_GetWindow",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLContext_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetWindow. Expected _wxGLContext_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxWindow *)wxGLContext_GetWindow(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxGLCanvasTowxScrolledWindow(void *ptr) {
|
||||
wxGLCanvas *src;
|
||||
wxScrolledWindow *dest;
|
||||
src = (wxGLCanvas *) ptr;
|
||||
dest = (wxScrolledWindow *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxGLCanvasTowxPanel(void *ptr) {
|
||||
wxGLCanvas *src;
|
||||
wxPanel *dest;
|
||||
src = (wxGLCanvas *) ptr;
|
||||
dest = (wxPanel *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxGLCanvasTowxWindow(void *ptr) {
|
||||
wxGLCanvas *src;
|
||||
wxWindow *dest;
|
||||
src = (wxGLCanvas *) ptr;
|
||||
dest = (wxWindow *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxGLCanvasTowxEvtHandler(void *ptr) {
|
||||
wxGLCanvas *src;
|
||||
wxEvtHandler *dest;
|
||||
src = (wxGLCanvas *) ptr;
|
||||
dest = (wxEvtHandler *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
#define new_wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7) (new wxGLCanvas(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6,_swigarg7))
|
||||
static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLCanvas * _result;
|
||||
wxWindow * _arg0;
|
||||
wxWindowID _arg1 = (wxWindowID ) -1;
|
||||
wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
|
||||
wxSize * _arg3 = (wxSize *) &wxDefaultSize;
|
||||
long _arg4 = (long ) 0;
|
||||
char * _arg5 = (char *) "GLCanvas";
|
||||
int * _arg6 = (int *) NULL;
|
||||
wxPalette * _arg7 = (wxPalette *) &wxNullPalette;
|
||||
PyObject * _argo0 = 0;
|
||||
wxPoint temp;
|
||||
PyObject * _obj2 = 0;
|
||||
wxSize temp0;
|
||||
PyObject * _obj3 = 0;
|
||||
int * temp1;
|
||||
PyObject * _obj6 = 0;
|
||||
PyObject * _argo7 = 0;
|
||||
char *_kwnames[] = { "parent","id","pos","size","style","name","attribList","palette", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlsOO:new_wxGLCanvas",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5,&_obj6,&_argo7))
|
||||
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_wxGLCanvas. Expected _wxWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_obj2)
|
||||
{
|
||||
_arg2 = &temp;
|
||||
if (! wxPoint_helper(_obj2, &_arg2))
|
||||
return NULL;
|
||||
}
|
||||
if (_obj3)
|
||||
{
|
||||
_arg3 = &temp0;
|
||||
if (! wxSize_helper(_obj3, &_arg3))
|
||||
return NULL;
|
||||
}
|
||||
if (_obj6)
|
||||
{
|
||||
int i;
|
||||
if (PySequence_Check(_obj6)) {
|
||||
int size = PyObject_Length(_obj6);
|
||||
temp1 = new int[size+1]; // (int*)malloc((size + 1) * sizeof(int));
|
||||
for (i = 0; i < size; i++) {
|
||||
temp1[i] = PyInt_AsLong(PySequence_GetItem(_obj6, i));
|
||||
}
|
||||
temp1[size] = 0;
|
||||
_arg6 = temp1;
|
||||
}
|
||||
}
|
||||
if (_argo7) {
|
||||
if (_argo7 == Py_None) { _arg7 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxGLCanvas *)new_wxGLCanvas(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLCanvas_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
{
|
||||
delete [] _arg6;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLCanvas_SetCurrent(_swigobj) (_swigobj->SetCurrent())
|
||||
static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLCanvas * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SetCurrent",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetCurrent. Expected _wxGLCanvas_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxGLCanvas_SetCurrent(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLCanvas_SetColour(_swigobj,_swigarg0) (_swigobj->SetColour(_swigarg0))
|
||||
static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLCanvas * _arg0;
|
||||
char * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","colour", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLCanvas_SetColour",_kwnames,&_argo0,&_arg1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SetColour. Expected _wxGLCanvas_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxGLCanvas_SetColour(_arg0,_arg1);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLCanvas_SwapBuffers(_swigobj) (_swigobj->SwapBuffers())
|
||||
static PyObject *_wrap_wxGLCanvas_SwapBuffers(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLCanvas * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_SwapBuffers",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_SwapBuffers. Expected _wxGLCanvas_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxGLCanvas_SwapBuffers(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLCanvas_GetContext(_swigobj) (_swigobj->GetContext())
|
||||
static PyObject *_wrap_wxGLCanvas_GetContext(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxGLContext * _result;
|
||||
wxGLCanvas * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGLCanvas_GetContext",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGLCanvas_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLCanvas_GetContext. Expected _wxGLCanvas_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxGLContext *)wxGLCanvas_GetContext(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxGLContext_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyMethodDef glcanvascMethods[] = {
|
||||
{ "wxGLCanvas_GetContext", (PyCFunction) _wrap_wxGLCanvas_GetContext, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxGLCanvas_SwapBuffers", (PyCFunction) _wrap_wxGLCanvas_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxGLCanvas_SetColour", (PyCFunction) _wrap_wxGLCanvas_SetColour, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxGLCanvas_SetCurrent", (PyCFunction) _wrap_wxGLCanvas_SetCurrent, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxGLCanvas", (PyCFunction) _wrap_new_wxGLCanvas, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxGLContext_GetWindow", (PyCFunction) _wrap_wxGLContext_GetWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxGLContext_GetPalette", (PyCFunction) _wrap_wxGLContext_GetPalette, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxGLContext_CreateDefaultPalette", (PyCFunction) _wrap_wxGLContext_CreateDefaultPalette, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxGLContext_SetupPalette", (PyCFunction) _wrap_wxGLContext_SetupPalette, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxGLContext_SetupPixelFormat", (PyCFunction) _wrap_wxGLContext_SetupPixelFormat, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxGLContext_SwapBuffers", (PyCFunction) _wrap_wxGLContext_SwapBuffers, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxGLContext_SetColour", (PyCFunction) _wrap_wxGLContext_SetColour, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxGLContext_SetCurrent", (PyCFunction) _wrap_wxGLContext_SetCurrent, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "delete_wxGLContext", (PyCFunction) _wrap_delete_wxGLContext, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxGLContext", (PyCFunction) _wrap_new_wxGLContext, 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},
|
||||
{ "_class_wxEvtHandler","_class_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler},
|
||||
{ "_class_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler},
|
||||
{ "_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","_class_wxGLCanvas",SwigwxGLCanvasTowxPanel},
|
||||
{ "_wxPanel","_wxGLCanvas",SwigwxGLCanvasTowxPanel},
|
||||
{ "_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},
|
||||
{ "_EBool","_wxCoord",0},
|
||||
{ "_EBool","_wxPrintQuality",0},
|
||||
{ "_EBool","_signed_int",0},
|
||||
{ "_EBool","_int",0},
|
||||
{ "_EBool","_wxWindowID",0},
|
||||
{ "_unsigned_long","_long",0},
|
||||
{ "_class_wxPanel","_class_wxGLCanvas",SwigwxGLCanvasTowxPanel},
|
||||
{ "_class_wxPanel","_wxGLCanvas",SwigwxGLCanvasTowxPanel},
|
||||
{ "_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},
|
||||
{ "_class_wxWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxWindow},
|
||||
{ "_class_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow},
|
||||
{ "_signed_short","_WXTYPE",0},
|
||||
{ "_signed_short","_short",0},
|
||||
{ "_wxScrolledWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow},
|
||||
{ "_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow},
|
||||
{ "_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","_class_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler},
|
||||
{ "_wxEvtHandler","_wxGLCanvas",SwigwxGLCanvasTowxEvtHandler},
|
||||
{ "_class_wxScrolledWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow},
|
||||
{ "_class_wxScrolledWindow","_wxGLCanvas",SwigwxGLCanvasTowxScrolledWindow},
|
||||
{ "_wxWindow","_class_wxGLCanvas",SwigwxGLCanvasTowxWindow},
|
||||
{ "_wxWindow","_wxGLCanvas",SwigwxGLCanvasTowxWindow},
|
||||
{0,0,0}};
|
||||
|
||||
static PyObject *SWIG_globals;
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
SWIGEXPORT(void) initglcanvasc() {
|
||||
PyObject *m, *d;
|
||||
SWIG_globals = SWIG_newvarlink();
|
||||
m = Py_InitModule("glcanvasc", glcanvascMethods);
|
||||
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);
|
||||
}
|
||||
}
|
123
wxPython/contrib/glcanvas/gtk/glcanvas.py
Normal file
123
wxPython/contrib/glcanvas/gtk/glcanvas.py
Normal file
@@ -0,0 +1,123 @@
|
||||
# This file was created automatically by SWIG.
|
||||
import glcanvasc
|
||||
|
||||
from misc import *
|
||||
|
||||
from misc2 import *
|
||||
|
||||
from windows import *
|
||||
|
||||
from gdi import *
|
||||
|
||||
from clip_dnd import *
|
||||
|
||||
from events import *
|
||||
|
||||
from streams 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 *
|
||||
|
||||
from utils import *
|
||||
import wx
|
||||
class wxGLContextPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,glcanvasc=glcanvasc):
|
||||
if self.thisown == 1 :
|
||||
glcanvasc.delete_wxGLContext(self)
|
||||
def SetCurrent(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLContext_SetCurrent,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetColour(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLContext_SetColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SwapBuffers(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLContext_SwapBuffers,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetupPixelFormat(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLContext_SetupPixelFormat,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetupPalette(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLContext_SetupPalette,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def CreateDefaultPalette(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLContext_CreateDefaultPalette,(self,) + _args, _kwargs)
|
||||
if val: val = wxPalettePtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def GetPalette(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLContext_GetPalette,(self,) + _args, _kwargs)
|
||||
if val: val = wxPalettePtr(val)
|
||||
return val
|
||||
def GetWindow(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLContext_GetWindow,(self,) + _args, _kwargs)
|
||||
if val: val = wxWindowPtr(val)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxGLContext instance at %s>" % (self.this,)
|
||||
class wxGLContext(wxGLContextPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(glcanvasc.new_wxGLContext,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
|
||||
class wxGLCanvasPtr(wxScrolledWindowPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def SetCurrent(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLCanvas_SetCurrent,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetColour(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLCanvas_SetColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SwapBuffers(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLCanvas_SwapBuffers,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetContext(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLCanvas_GetContext,(self,) + _args, _kwargs)
|
||||
if val: val = wxGLContextPtr(val)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxGLCanvas instance at %s>" % (self.this,)
|
||||
class wxGLCanvas(wxGLCanvasPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(glcanvasc.new_wxGLCanvas,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
#wx._StdWindowCallbacks(self)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#-------------- FUNCTION WRAPPERS ------------------
|
||||
|
||||
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
1
wxPython/contrib/glcanvas/msw/.cvsignore
Normal file
1
wxPython/contrib/glcanvas/msw/.cvsignore
Normal file
@@ -0,0 +1 @@
|
||||
*~
|
1107
wxPython/contrib/glcanvas/msw/glcanvas.cpp
Normal file
1107
wxPython/contrib/glcanvas/msw/glcanvas.cpp
Normal file
File diff suppressed because it is too large
Load Diff
109
wxPython/contrib/glcanvas/msw/glcanvas.py
Normal file
109
wxPython/contrib/glcanvas/msw/glcanvas.py
Normal file
@@ -0,0 +1,109 @@
|
||||
# This file was created automatically by SWIG.
|
||||
import glcanvasc
|
||||
|
||||
from misc import *
|
||||
|
||||
from misc2 import *
|
||||
|
||||
from windows import *
|
||||
|
||||
from gdi import *
|
||||
|
||||
from clip_dnd import *
|
||||
|
||||
from events import *
|
||||
|
||||
from streams 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 *
|
||||
|
||||
from utils import *
|
||||
import wx
|
||||
class wxGLContextPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,glcanvasc=glcanvasc):
|
||||
if self.thisown == 1 :
|
||||
glcanvasc.delete_wxGLContext(self)
|
||||
def SetCurrent(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLContext_SetCurrent,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetColour(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLContext_SetColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SwapBuffers(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLContext_SwapBuffers,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetWindow(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLContext_GetWindow,(self,) + _args, _kwargs)
|
||||
if val: val = wxWindowPtr(val)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxGLContext instance at %s>" % (self.this,)
|
||||
class wxGLContext(wxGLContextPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(glcanvasc.new_wxGLContext,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
|
||||
class wxGLCanvasPtr(wxScrolledWindowPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def SetCurrent(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLCanvas_SetCurrent,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetColour(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLCanvas_SetColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SwapBuffers(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLCanvas_SwapBuffers,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetContext(self, *_args, **_kwargs):
|
||||
val = apply(glcanvasc.wxGLCanvas_GetContext,(self,) + _args, _kwargs)
|
||||
if val: val = wxGLContextPtr(val)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxGLCanvas instance at %s>" % (self.this,)
|
||||
class wxGLCanvas(wxGLCanvasPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(glcanvasc.new_wxGLCanvas,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
#wx._StdWindowCallbacks(self)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#-------------- FUNCTION WRAPPERS ------------------
|
||||
|
||||
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
6
wxPython/contrib/ogl/.cvsignore
Normal file
6
wxPython/contrib/ogl/.cvsignore
Normal file
@@ -0,0 +1,6 @@
|
||||
Makefile
|
||||
contrib
|
||||
oglc.exp
|
||||
oglc.ilk
|
||||
oglc.pch
|
||||
oglc.pyd
|
7
wxPython/contrib/ogl/README.txt
Normal file
7
wxPython/contrib/ogl/README.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Since OGL is not always bundled with distributions of wxWindows, in
|
||||
order for it to be a standard part of wxPython I need to bundle it
|
||||
here. The contents of the contrib directory are copies of the
|
||||
relevant parts of the main contrib directory in wxWindows. The
|
||||
build.py script in this directory will also build the needed files
|
||||
from there, so you no longer have to worry about aquiring and building
|
||||
additional libraries beyond wxWindows itself.
|
63
wxPython/contrib/ogl/_ogldefs.i
Normal file
63
wxPython/contrib/ogl/_ogldefs.i
Normal file
@@ -0,0 +1,63 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
class wxOGLConstraint;
|
||||
class wxBitmapShape;
|
||||
class wxDiagram;
|
||||
class wxDrawnShape;
|
||||
class wxCircleShape;
|
||||
class wxCompositeShape;
|
||||
class wxDividedShape;
|
||||
class wxDivisionShape;
|
||||
class wxEllipseShape;
|
||||
class wxLineShape;
|
||||
class wxPolygonShape;
|
||||
class wxRectangleShape;
|
||||
class wxPseudoMetaFile;
|
||||
class wxShape;
|
||||
class wxShapeCanvas;
|
||||
class wxShapeEvtHandler;
|
||||
class wxTextShape;
|
||||
class wxControlPoint;
|
||||
|
||||
class wxPyOGLConstraint;
|
||||
class wxPyBitmapShape;
|
||||
class wxPyDiagram;
|
||||
class wxPyDrawnShape;
|
||||
class wxPyCircleShape;
|
||||
class wxPyCompositeShape;
|
||||
class wxPyDividedShape;
|
||||
class wxPyDivisionShape;
|
||||
class wxPyEllipseShape;
|
||||
class wxPyLineShape;
|
||||
class wxPyPolygonShape;
|
||||
class wxPyRectangleShape;
|
||||
class wxPyPseudoMetaFile;
|
||||
class wxPyShape;
|
||||
class wxPyShapeCanvas;
|
||||
class wxPyShapeEvtHandler;
|
||||
class wxPyTextShape;
|
||||
class wxPyControlPoint;
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
36
wxPython/contrib/ogl/_oglextras.py
Normal file
36
wxPython/contrib/ogl/_oglextras.py
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
wxShapeCanvas = wxPyShapeCanvas
|
||||
wxShapeEvtHandler = wxPyShapeEvtHandler
|
||||
wxShape = wxPyShape
|
||||
wxRectangleShape = wxPyRectangleShape
|
||||
wxBitmapShape = wxPyBitmapShape
|
||||
wxDrawnShape = wxPyDrawnShape
|
||||
wxCompositeShape = wxPyCompositeShape
|
||||
wxDividedShape = wxPyDividedShape
|
||||
wxDivisionShape = wxPyDivisionShape
|
||||
wxEllipseShape = wxPyEllipseShape
|
||||
wxCircleShape = wxPyCircleShape
|
||||
wxLineShape = wxPyLineShape
|
||||
wxPolygonShape = wxPyPolygonShape
|
||||
wxTextShape = wxPyTextShape
|
||||
wxControlPoint = wxPyControlPoint
|
||||
|
||||
# Stuff these names into the wx namespace so wxPyConstructObject can find them
|
||||
import wx
|
||||
wx.wxPyShapeCanvasPtr = wxPyShapeCanvasPtr
|
||||
wx.wxPyShapeEvtHandlerPtr = wxPyShapeEvtHandlerPtr
|
||||
wx.wxPyShapePtr = wxPyShapePtr
|
||||
wx.wxPyRectangleShapePtr = wxPyRectangleShapePtr
|
||||
wx.wxPyBitmapShapePtr = wxPyBitmapShapePtr
|
||||
wx.wxPyDrawnShapePtr = wxPyDrawnShapePtr
|
||||
wx.wxPyCompositeShapePtr = wxPyCompositeShapePtr
|
||||
wx.wxPyDividedShapePtr = wxPyDividedShapePtr
|
||||
wx.wxPyDivisionShapePtr = wxPyDivisionShapePtr
|
||||
wx.wxPyEllipseShapePtr = wxPyEllipseShapePtr
|
||||
wx.wxPyCircleShapePtr = wxPyCircleShapePtr
|
||||
wx.wxPyLineShapePtr = wxPyLineShapePtr
|
||||
wx.wxPyPolygonShapePtr = wxPyPolygonShapePtr
|
||||
wx.wxPyTextShapePtr = wxPyTextShapePtr
|
||||
wx.wxShapeRegionPtr = wxShapeRegionPtr
|
||||
wx.wxOGLConstraintPtr = wxOGLConstraintPtr
|
||||
wx.wxControlPointPtr = wxPyControlPointPtr
|
411
wxPython/contrib/ogl/ogl.cpp
Normal file
411
wxPython/contrib/ogl/ogl.cpp
Normal file
@@ -0,0 +1,411 @@
|
||||
/*
|
||||
* FILE : contrib/ogl/ogl.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 <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
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#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 initoglc
|
||||
|
||||
#define SWIG_name "oglc"
|
||||
|
||||
#include "export.h"
|
||||
#include "oglhelpers.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;
|
||||
}
|
||||
|
||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// 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, char* className) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
if (!PyList_Check(pyList)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
int count = PyList_Size(pyList);
|
||||
wxList* list = new wxList;
|
||||
if (! list) {
|
||||
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
for (int x=0; x<count; x++) {
|
||||
PyObject* pyo = PyList_GetItem(pyList, x);
|
||||
wxObject* wxo = NULL;
|
||||
|
||||
if (SWIG_GetPtrObj(pyo, (void **)&wxo, className)) {
|
||||
char errmsg[1024];
|
||||
sprintf(errmsg, "Type error, expected list of %s objects", className);
|
||||
PyErr_SetString(PyExc_TypeError, errmsg);
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
list->Append(wxo);
|
||||
}
|
||||
wxPySaveThread(doSave);
|
||||
return list;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
if (!PyList_Check(pyList)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
int count = PyList_Size(pyList);
|
||||
wxList* list = new wxList;
|
||||
if (! list) {
|
||||
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
|
||||
wxPySaveThread(doSave);
|
||||
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 (SWIG_GetPtrObj(pyo, (void **)&wxo, "_wxRealPoint_p")) {
|
||||
PyErr_SetString(PyExc_TypeError, "Type error, expected list of wxRealPoint objects or 2-tuples");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
list->Append((wxObject*) new wxRealPoint(*wxo));
|
||||
}
|
||||
}
|
||||
wxPySaveThread(doSave);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
extern "C" SWIGEXPORT(void) initoglbasicc();
|
||||
extern "C" SWIGEXPORT(void) initoglshapesc();
|
||||
extern "C" SWIGEXPORT(void) initoglshapes2c();
|
||||
extern "C" SWIGEXPORT(void) initoglcanvasc();
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
static PyObject *_wrap_wxOGLInitialize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
char *_kwnames[] = { NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxOGLInitialize",_kwnames))
|
||||
return NULL;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxOGLInitialize();
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxOGLCleanUp(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
char *_kwnames[] = { NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxOGLCleanUp",_kwnames))
|
||||
return NULL;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxOGLCleanUp();
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyMethodDef oglcMethods[] = {
|
||||
{ "wxOGLCleanUp", (PyCFunction) _wrap_wxOGLCleanUp, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxOGLInitialize", (PyCFunction) _wrap_wxOGLInitialize, 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},
|
||||
{ "_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},
|
||||
{ "_EBool","_wxCoord",0},
|
||||
{ "_EBool","_wxPrintQuality",0},
|
||||
{ "_EBool","_signed_int",0},
|
||||
{ "_EBool","_int",0},
|
||||
{ "_EBool","_wxWindowID",0},
|
||||
{ "_unsigned_long","_long",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},
|
||||
{ "_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},
|
||||
{0,0,0}};
|
||||
|
||||
static PyObject *SWIG_globals;
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
SWIGEXPORT(void) initoglc() {
|
||||
PyObject *m, *d;
|
||||
SWIG_globals = SWIG_newvarlink();
|
||||
m = Py_InitModule("oglc", oglcMethods);
|
||||
d = PyModule_GetDict(m);
|
||||
PyDict_SetItemString(d,"KEY_SHIFT", PyInt_FromLong((long) KEY_SHIFT));
|
||||
PyDict_SetItemString(d,"KEY_CTRL", PyInt_FromLong((long) KEY_CTRL));
|
||||
PyDict_SetItemString(d,"ARROW_NONE", PyInt_FromLong((long) ARROW_NONE));
|
||||
PyDict_SetItemString(d,"ARROW_END", PyInt_FromLong((long) ARROW_END));
|
||||
PyDict_SetItemString(d,"ARROW_BOTH", PyInt_FromLong((long) ARROW_BOTH));
|
||||
PyDict_SetItemString(d,"ARROW_MIDDLE", PyInt_FromLong((long) ARROW_MIDDLE));
|
||||
PyDict_SetItemString(d,"ARROW_START", PyInt_FromLong((long) ARROW_START));
|
||||
PyDict_SetItemString(d,"ARROW_HOLLOW_CIRCLE", PyInt_FromLong((long) ARROW_HOLLOW_CIRCLE));
|
||||
PyDict_SetItemString(d,"ARROW_FILLED_CIRCLE", PyInt_FromLong((long) ARROW_FILLED_CIRCLE));
|
||||
PyDict_SetItemString(d,"ARROW_ARROW", PyInt_FromLong((long) ARROW_ARROW));
|
||||
PyDict_SetItemString(d,"ARROW_SINGLE_OBLIQUE", PyInt_FromLong((long) ARROW_SINGLE_OBLIQUE));
|
||||
PyDict_SetItemString(d,"ARROW_DOUBLE_OBLIQUE", PyInt_FromLong((long) ARROW_DOUBLE_OBLIQUE));
|
||||
PyDict_SetItemString(d,"ARROW_METAFILE", PyInt_FromLong((long) ARROW_METAFILE));
|
||||
PyDict_SetItemString(d,"ARROW_POSITION_END", PyInt_FromLong((long) ARROW_POSITION_END));
|
||||
PyDict_SetItemString(d,"ARROW_POSITION_START", PyInt_FromLong((long) ARROW_POSITION_START));
|
||||
PyDict_SetItemString(d,"CONTROL_POINT_VERTICAL", PyInt_FromLong((long) CONTROL_POINT_VERTICAL));
|
||||
PyDict_SetItemString(d,"CONTROL_POINT_HORIZONTAL", PyInt_FromLong((long) CONTROL_POINT_HORIZONTAL));
|
||||
PyDict_SetItemString(d,"CONTROL_POINT_DIAGONAL", PyInt_FromLong((long) CONTROL_POINT_DIAGONAL));
|
||||
PyDict_SetItemString(d,"CONTROL_POINT_ENDPOINT_TO", PyInt_FromLong((long) CONTROL_POINT_ENDPOINT_TO));
|
||||
PyDict_SetItemString(d,"CONTROL_POINT_ENDPOINT_FROM", PyInt_FromLong((long) CONTROL_POINT_ENDPOINT_FROM));
|
||||
PyDict_SetItemString(d,"CONTROL_POINT_LINE", PyInt_FromLong((long) CONTROL_POINT_LINE));
|
||||
PyDict_SetItemString(d,"FORMAT_NONE", PyInt_FromLong((long) FORMAT_NONE));
|
||||
PyDict_SetItemString(d,"FORMAT_CENTRE_HORIZ", PyInt_FromLong((long) FORMAT_CENTRE_HORIZ));
|
||||
PyDict_SetItemString(d,"FORMAT_CENTRE_VERT", PyInt_FromLong((long) FORMAT_CENTRE_VERT));
|
||||
PyDict_SetItemString(d,"FORMAT_SIZE_TO_CONTENTS", PyInt_FromLong((long) FORMAT_SIZE_TO_CONTENTS));
|
||||
PyDict_SetItemString(d,"LINE_ALIGNMENT_HORIZ", PyInt_FromLong((long) LINE_ALIGNMENT_HORIZ));
|
||||
PyDict_SetItemString(d,"LINE_ALIGNMENT_VERT", PyInt_FromLong((long) LINE_ALIGNMENT_VERT));
|
||||
PyDict_SetItemString(d,"LINE_ALIGNMENT_TO_NEXT_HANDLE", PyInt_FromLong((long) LINE_ALIGNMENT_TO_NEXT_HANDLE));
|
||||
PyDict_SetItemString(d,"LINE_ALIGNMENT_NONE", PyInt_FromLong((long) LINE_ALIGNMENT_NONE));
|
||||
PyDict_SetItemString(d,"SHADOW_NONE", PyInt_FromLong((long) SHADOW_NONE));
|
||||
PyDict_SetItemString(d,"SHADOW_LEFT", PyInt_FromLong((long) SHADOW_LEFT));
|
||||
PyDict_SetItemString(d,"SHADOW_RIGHT", PyInt_FromLong((long) SHADOW_RIGHT));
|
||||
PyDict_SetItemString(d,"OP_CLICK_LEFT", PyInt_FromLong((long) OP_CLICK_LEFT));
|
||||
PyDict_SetItemString(d,"OP_CLICK_RIGHT", PyInt_FromLong((long) OP_CLICK_RIGHT));
|
||||
PyDict_SetItemString(d,"OP_DRAG_LEFT", PyInt_FromLong((long) OP_DRAG_LEFT));
|
||||
PyDict_SetItemString(d,"OP_DRAG_RIGHT", PyInt_FromLong((long) OP_DRAG_RIGHT));
|
||||
PyDict_SetItemString(d,"OP_ALL", PyInt_FromLong((long) OP_ALL));
|
||||
PyDict_SetItemString(d,"ATTACHMENT_MODE_NONE", PyInt_FromLong((long) ATTACHMENT_MODE_NONE));
|
||||
PyDict_SetItemString(d,"ATTACHMENT_MODE_EDGE", PyInt_FromLong((long) ATTACHMENT_MODE_EDGE));
|
||||
PyDict_SetItemString(d,"ATTACHMENT_MODE_BRANCHING", PyInt_FromLong((long) ATTACHMENT_MODE_BRANCHING));
|
||||
PyDict_SetItemString(d,"BRANCHING_ATTACHMENT_NORMAL", PyInt_FromLong((long) BRANCHING_ATTACHMENT_NORMAL));
|
||||
PyDict_SetItemString(d,"BRANCHING_ATTACHMENT_BLOB", PyInt_FromLong((long) BRANCHING_ATTACHMENT_BLOB));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_VERTICALLY", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_VERTICALLY));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_HORIZONTALLY", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_HORIZONTALLY));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_CENTRED_BOTH", PyInt_FromLong((long) gyCONSTRAINT_CENTRED_BOTH));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_LEFT_OF", PyInt_FromLong((long) gyCONSTRAINT_LEFT_OF));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_RIGHT_OF", PyInt_FromLong((long) gyCONSTRAINT_RIGHT_OF));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_ABOVE", PyInt_FromLong((long) gyCONSTRAINT_ABOVE));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_BELOW", PyInt_FromLong((long) gyCONSTRAINT_BELOW));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_TOP", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_TOP));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_BOTTOM", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_BOTTOM));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_LEFT", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_LEFT));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_ALIGNED_RIGHT", PyInt_FromLong((long) gyCONSTRAINT_ALIGNED_RIGHT));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_TOP", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_TOP));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_BOTTOM", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_BOTTOM));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_LEFT", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_LEFT));
|
||||
PyDict_SetItemString(d,"gyCONSTRAINT_MIDALIGNED_RIGHT", PyInt_FromLong((long) gyCONSTRAINT_MIDALIGNED_RIGHT));
|
||||
PyDict_SetItemString(d,"DIVISION_SIDE_NONE", PyInt_FromLong((long) DIVISION_SIDE_NONE));
|
||||
PyDict_SetItemString(d,"DIVISION_SIDE_LEFT", PyInt_FromLong((long) DIVISION_SIDE_LEFT));
|
||||
PyDict_SetItemString(d,"DIVISION_SIDE_TOP", PyInt_FromLong((long) DIVISION_SIDE_TOP));
|
||||
PyDict_SetItemString(d,"DIVISION_SIDE_RIGHT", PyInt_FromLong((long) DIVISION_SIDE_RIGHT));
|
||||
PyDict_SetItemString(d,"DIVISION_SIDE_BOTTOM", PyInt_FromLong((long) DIVISION_SIDE_BOTTOM));
|
||||
|
||||
|
||||
initoglbasicc();
|
||||
initoglshapesc();
|
||||
initoglshapes2c();
|
||||
initoglcanvasc();
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
245
wxPython/contrib/ogl/ogl.i
Normal file
245
wxPython/contrib/ogl/ogl.i
Normal file
@@ -0,0 +1,245 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
%module ogl
|
||||
|
||||
%{
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%include typemaps.i
|
||||
%include my_typemaps.i
|
||||
|
||||
%extern wx.i
|
||||
%import windows.i
|
||||
%extern _defs.i
|
||||
%extern misc.i
|
||||
%extern gdi.i
|
||||
|
||||
%include _ogldefs.i
|
||||
|
||||
%import oglbasic.i
|
||||
%import oglshapes.i
|
||||
%import oglshapes2.i
|
||||
%import oglcanvas.i
|
||||
|
||||
|
||||
%pragma(python) code = "import wx"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
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,
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void wxOGLInitialize();
|
||||
void wxOGLCleanUp();
|
||||
|
||||
|
||||
%{
|
||||
//---------------------------------------------------------------------------
|
||||
// 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, char* className) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
if (!PyList_Check(pyList)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
int count = PyList_Size(pyList);
|
||||
wxList* list = new wxList;
|
||||
if (! list) {
|
||||
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
for (int x=0; x<count; x++) {
|
||||
PyObject* pyo = PyList_GetItem(pyList, x);
|
||||
wxObject* wxo = NULL;
|
||||
|
||||
if (SWIG_GetPtrObj(pyo, (void **)&wxo, className)) {
|
||||
char errmsg[1024];
|
||||
sprintf(errmsg, "Type error, expected list of %s objects", className);
|
||||
PyErr_SetString(PyExc_TypeError, errmsg);
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
list->Append(wxo);
|
||||
}
|
||||
wxPySaveThread(doSave);
|
||||
return list;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
if (!PyList_Check(pyList)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
int count = PyList_Size(pyList);
|
||||
wxList* list = new wxList;
|
||||
if (! list) {
|
||||
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
|
||||
wxPySaveThread(doSave);
|
||||
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 (SWIG_GetPtrObj(pyo, (void **)&wxo, "_wxRealPoint_p")) {
|
||||
PyErr_SetString(PyExc_TypeError, "Type error, expected list of wxRealPoint objects or 2-tuples");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
list->Append((wxObject*) new wxRealPoint(*wxo));
|
||||
}
|
||||
}
|
||||
wxPySaveThread(doSave);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
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();
|
||||
|
||||
|
||||
wxClassInfo::CleanUpClasses();
|
||||
wxClassInfo::InitializeClasses();
|
||||
|
||||
%}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// And this gets appended to the shadow class file.
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
%pragma(python) include="_oglextras.py";
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
165
wxPython/contrib/ogl/ogl.py
Normal file
165
wxPython/contrib/ogl/ogl.py
Normal file
@@ -0,0 +1,165 @@
|
||||
# This file was created automatically by SWIG.
|
||||
import oglc
|
||||
|
||||
from misc import *
|
||||
|
||||
from misc2 import *
|
||||
|
||||
from windows import *
|
||||
|
||||
from gdi import *
|
||||
|
||||
from clip_dnd import *
|
||||
|
||||
from events import *
|
||||
|
||||
from streams 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 *
|
||||
|
||||
from utils import *
|
||||
|
||||
from oglbasic import *
|
||||
|
||||
from oglshapes import *
|
||||
|
||||
from oglshapes2 import *
|
||||
|
||||
from oglcanvas import *
|
||||
import wx
|
||||
|
||||
|
||||
#-------------- FUNCTION WRAPPERS ------------------
|
||||
|
||||
wxOGLInitialize = oglc.wxOGLInitialize
|
||||
|
||||
wxOGLCleanUp = oglc.wxOGLCleanUp
|
||||
|
||||
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
||||
KEY_SHIFT = oglc.KEY_SHIFT
|
||||
KEY_CTRL = oglc.KEY_CTRL
|
||||
ARROW_NONE = oglc.ARROW_NONE
|
||||
ARROW_END = oglc.ARROW_END
|
||||
ARROW_BOTH = oglc.ARROW_BOTH
|
||||
ARROW_MIDDLE = oglc.ARROW_MIDDLE
|
||||
ARROW_START = oglc.ARROW_START
|
||||
ARROW_HOLLOW_CIRCLE = oglc.ARROW_HOLLOW_CIRCLE
|
||||
ARROW_FILLED_CIRCLE = oglc.ARROW_FILLED_CIRCLE
|
||||
ARROW_ARROW = oglc.ARROW_ARROW
|
||||
ARROW_SINGLE_OBLIQUE = oglc.ARROW_SINGLE_OBLIQUE
|
||||
ARROW_DOUBLE_OBLIQUE = oglc.ARROW_DOUBLE_OBLIQUE
|
||||
ARROW_METAFILE = oglc.ARROW_METAFILE
|
||||
ARROW_POSITION_END = oglc.ARROW_POSITION_END
|
||||
ARROW_POSITION_START = oglc.ARROW_POSITION_START
|
||||
CONTROL_POINT_VERTICAL = oglc.CONTROL_POINT_VERTICAL
|
||||
CONTROL_POINT_HORIZONTAL = oglc.CONTROL_POINT_HORIZONTAL
|
||||
CONTROL_POINT_DIAGONAL = oglc.CONTROL_POINT_DIAGONAL
|
||||
CONTROL_POINT_ENDPOINT_TO = oglc.CONTROL_POINT_ENDPOINT_TO
|
||||
CONTROL_POINT_ENDPOINT_FROM = oglc.CONTROL_POINT_ENDPOINT_FROM
|
||||
CONTROL_POINT_LINE = oglc.CONTROL_POINT_LINE
|
||||
FORMAT_NONE = oglc.FORMAT_NONE
|
||||
FORMAT_CENTRE_HORIZ = oglc.FORMAT_CENTRE_HORIZ
|
||||
FORMAT_CENTRE_VERT = oglc.FORMAT_CENTRE_VERT
|
||||
FORMAT_SIZE_TO_CONTENTS = oglc.FORMAT_SIZE_TO_CONTENTS
|
||||
LINE_ALIGNMENT_HORIZ = oglc.LINE_ALIGNMENT_HORIZ
|
||||
LINE_ALIGNMENT_VERT = oglc.LINE_ALIGNMENT_VERT
|
||||
LINE_ALIGNMENT_TO_NEXT_HANDLE = oglc.LINE_ALIGNMENT_TO_NEXT_HANDLE
|
||||
LINE_ALIGNMENT_NONE = oglc.LINE_ALIGNMENT_NONE
|
||||
SHADOW_NONE = oglc.SHADOW_NONE
|
||||
SHADOW_LEFT = oglc.SHADOW_LEFT
|
||||
SHADOW_RIGHT = oglc.SHADOW_RIGHT
|
||||
OP_CLICK_LEFT = oglc.OP_CLICK_LEFT
|
||||
OP_CLICK_RIGHT = oglc.OP_CLICK_RIGHT
|
||||
OP_DRAG_LEFT = oglc.OP_DRAG_LEFT
|
||||
OP_DRAG_RIGHT = oglc.OP_DRAG_RIGHT
|
||||
OP_ALL = oglc.OP_ALL
|
||||
ATTACHMENT_MODE_NONE = oglc.ATTACHMENT_MODE_NONE
|
||||
ATTACHMENT_MODE_EDGE = oglc.ATTACHMENT_MODE_EDGE
|
||||
ATTACHMENT_MODE_BRANCHING = oglc.ATTACHMENT_MODE_BRANCHING
|
||||
BRANCHING_ATTACHMENT_NORMAL = oglc.BRANCHING_ATTACHMENT_NORMAL
|
||||
BRANCHING_ATTACHMENT_BLOB = oglc.BRANCHING_ATTACHMENT_BLOB
|
||||
gyCONSTRAINT_CENTRED_VERTICALLY = oglc.gyCONSTRAINT_CENTRED_VERTICALLY
|
||||
gyCONSTRAINT_CENTRED_HORIZONTALLY = oglc.gyCONSTRAINT_CENTRED_HORIZONTALLY
|
||||
gyCONSTRAINT_CENTRED_BOTH = oglc.gyCONSTRAINT_CENTRED_BOTH
|
||||
gyCONSTRAINT_LEFT_OF = oglc.gyCONSTRAINT_LEFT_OF
|
||||
gyCONSTRAINT_RIGHT_OF = oglc.gyCONSTRAINT_RIGHT_OF
|
||||
gyCONSTRAINT_ABOVE = oglc.gyCONSTRAINT_ABOVE
|
||||
gyCONSTRAINT_BELOW = oglc.gyCONSTRAINT_BELOW
|
||||
gyCONSTRAINT_ALIGNED_TOP = oglc.gyCONSTRAINT_ALIGNED_TOP
|
||||
gyCONSTRAINT_ALIGNED_BOTTOM = oglc.gyCONSTRAINT_ALIGNED_BOTTOM
|
||||
gyCONSTRAINT_ALIGNED_LEFT = oglc.gyCONSTRAINT_ALIGNED_LEFT
|
||||
gyCONSTRAINT_ALIGNED_RIGHT = oglc.gyCONSTRAINT_ALIGNED_RIGHT
|
||||
gyCONSTRAINT_MIDALIGNED_TOP = oglc.gyCONSTRAINT_MIDALIGNED_TOP
|
||||
gyCONSTRAINT_MIDALIGNED_BOTTOM = oglc.gyCONSTRAINT_MIDALIGNED_BOTTOM
|
||||
gyCONSTRAINT_MIDALIGNED_LEFT = oglc.gyCONSTRAINT_MIDALIGNED_LEFT
|
||||
gyCONSTRAINT_MIDALIGNED_RIGHT = oglc.gyCONSTRAINT_MIDALIGNED_RIGHT
|
||||
DIVISION_SIDE_NONE = oglc.DIVISION_SIDE_NONE
|
||||
DIVISION_SIDE_LEFT = oglc.DIVISION_SIDE_LEFT
|
||||
DIVISION_SIDE_TOP = oglc.DIVISION_SIDE_TOP
|
||||
DIVISION_SIDE_RIGHT = oglc.DIVISION_SIDE_RIGHT
|
||||
DIVISION_SIDE_BOTTOM = oglc.DIVISION_SIDE_BOTTOM
|
||||
|
||||
|
||||
#-------------- USER INCLUDE -----------------------
|
||||
|
||||
|
||||
wxShapeCanvas = wxPyShapeCanvas
|
||||
wxShapeEvtHandler = wxPyShapeEvtHandler
|
||||
wxShape = wxPyShape
|
||||
wxRectangleShape = wxPyRectangleShape
|
||||
wxBitmapShape = wxPyBitmapShape
|
||||
wxDrawnShape = wxPyDrawnShape
|
||||
wxCompositeShape = wxPyCompositeShape
|
||||
wxDividedShape = wxPyDividedShape
|
||||
wxDivisionShape = wxPyDivisionShape
|
||||
wxEllipseShape = wxPyEllipseShape
|
||||
wxCircleShape = wxPyCircleShape
|
||||
wxLineShape = wxPyLineShape
|
||||
wxPolygonShape = wxPyPolygonShape
|
||||
wxTextShape = wxPyTextShape
|
||||
wxControlPoint = wxPyControlPoint
|
||||
|
||||
# Stuff these names into the wx namespace so wxPyConstructObject can find them
|
||||
import wx
|
||||
wx.wxPyShapeCanvasPtr = wxPyShapeCanvasPtr
|
||||
wx.wxPyShapeEvtHandlerPtr = wxPyShapeEvtHandlerPtr
|
||||
wx.wxPyShapePtr = wxPyShapePtr
|
||||
wx.wxPyRectangleShapePtr = wxPyRectangleShapePtr
|
||||
wx.wxPyBitmapShapePtr = wxPyBitmapShapePtr
|
||||
wx.wxPyDrawnShapePtr = wxPyDrawnShapePtr
|
||||
wx.wxPyCompositeShapePtr = wxPyCompositeShapePtr
|
||||
wx.wxPyDividedShapePtr = wxPyDividedShapePtr
|
||||
wx.wxPyDivisionShapePtr = wxPyDivisionShapePtr
|
||||
wx.wxPyEllipseShapePtr = wxPyEllipseShapePtr
|
||||
wx.wxPyCircleShapePtr = wxPyCircleShapePtr
|
||||
wx.wxPyLineShapePtr = wxPyLineShapePtr
|
||||
wx.wxPyPolygonShapePtr = wxPyPolygonShapePtr
|
||||
wx.wxPyTextShapePtr = wxPyTextShapePtr
|
||||
wx.wxShapeRegionPtr = wxShapeRegionPtr
|
||||
wx.wxOGLConstraintPtr = wxOGLConstraintPtr
|
||||
wx.wxControlPointPtr = wxPyControlPointPtr
|
8464
wxPython/contrib/ogl/oglbasic.cpp
Normal file
8464
wxPython/contrib/ogl/oglbasic.cpp
Normal file
File diff suppressed because it is too large
Load Diff
401
wxPython/contrib/ogl/oglbasic.i
Normal file
401
wxPython/contrib/ogl/oglbasic.i
Normal file
@@ -0,0 +1,401 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
%module oglbasic
|
||||
|
||||
%{
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%include typemaps.i
|
||||
%include my_typemaps.i
|
||||
|
||||
%extern wx.i
|
||||
%import windows.i
|
||||
%extern _defs.i
|
||||
%extern misc.i
|
||||
%extern gdi.i
|
||||
|
||||
%include _ogldefs.i
|
||||
|
||||
//%extern oglcanvas.i
|
||||
|
||||
|
||||
%pragma(python) code = "import wx"
|
||||
%pragma(python) code = "from oglcanvas import wxPyShapeCanvasPtr"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
class wxShapeRegion {
|
||||
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();
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%{
|
||||
WXSHAPE_IMP_CALLBACKS(wxPyShapeEvtHandler,wxShapeEvtHandler);
|
||||
%}
|
||||
|
||||
|
||||
class wxPyShapeEvtHandler {
|
||||
public:
|
||||
wxPyShapeEvtHandler(wxPyShapeEvtHandler *prev = NULL,
|
||||
wxPyShape *shape = NULL);
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyShapeEvtHandler)"
|
||||
|
||||
%addmethods {
|
||||
void Destroy() { delete self; }
|
||||
}
|
||||
|
||||
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:
|
||||
// wxPyShape(wxPyShapeCanvas *can = NULL); abstract base class...
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyShape)"
|
||||
|
||||
%addmethods {
|
||||
void Destroy() { delete self; }
|
||||
}
|
||||
|
||||
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();
|
||||
%addmethods {
|
||||
PyObject* GetChildren() {
|
||||
wxList& list = self->GetChildren();
|
||||
return wxPy_ConvertList(&list, "wxPyShape");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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();
|
||||
%addmethods {
|
||||
PyObject* GetLines() {
|
||||
wxList& list = self->GetLines();
|
||||
return wxPy_ConvertList(&list, "wxPyLineShape");
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
%addmethods {
|
||||
void SetClientData(PyObject* userData) {
|
||||
wxPyUserData* data = NULL;
|
||||
if (userData)
|
||||
data = new wxPyUserData(userData);
|
||||
self->SetClientData(data);
|
||||
}
|
||||
|
||||
PyObject* GetClientData() {
|
||||
wxPyUserData* data = (wxPyUserData*)self->GetClientData();
|
||||
if (data) {
|
||||
Py_INCREF(data->m_obj);
|
||||
return data->m_obj;
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
return Py_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 = "");
|
||||
|
||||
// wxList& GetRegions();
|
||||
%addmethods {
|
||||
PyObject* GetRegions() {
|
||||
wxList& list = self->GetRegions();
|
||||
return wxPy_ConvertList(&list, "wxShapeRegion");
|
||||
}
|
||||
}
|
||||
|
||||
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 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);
|
||||
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);
|
||||
%addmethods {
|
||||
void ApplyAttachmentOrdering(PyObject* linesToSort) {
|
||||
wxList* list = wxPy_wxListHelper(linesToSort, "_wxPyLineShape_p");
|
||||
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 ClearAttachments();
|
||||
void Recentre(wxDC& dc);
|
||||
void ClearPointList(wxList& list);
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
797
wxPython/contrib/ogl/oglbasic.py
Normal file
797
wxPython/contrib/ogl/oglbasic.py
Normal file
@@ -0,0 +1,797 @@
|
||||
# This file was created automatically by SWIG.
|
||||
import oglbasicc
|
||||
|
||||
from misc import *
|
||||
|
||||
from misc2 import *
|
||||
|
||||
from windows import *
|
||||
|
||||
from gdi import *
|
||||
|
||||
from clip_dnd import *
|
||||
|
||||
from events import *
|
||||
|
||||
from streams 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 *
|
||||
|
||||
from utils import *
|
||||
import wx
|
||||
from oglcanvas import wxPyShapeCanvasPtr
|
||||
class wxShapeRegionPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def SetText(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_SetText,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetFont(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_SetFont,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetMinSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_SetMinSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_SetSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetPosition(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_SetPosition,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetProportions(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_SetProportions,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetFormatMode(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_SetFormatMode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetName(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_SetName,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetColour(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_SetColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetText(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetText,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetFont(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetFont,(self,) + _args, _kwargs)
|
||||
if val: val = wxFontPtr(val)
|
||||
return val
|
||||
def GetMinSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetMinSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetProportion(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetProportion,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetPosition(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetPosition,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetFormatMode(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetFormatMode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetName(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetName,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetColour(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetActualColourObject(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetActualColourObject,(self,) + _args, _kwargs)
|
||||
if val: val = wxColourPtr(val)
|
||||
return val
|
||||
def GetFormattedText(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetFormattedText,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetPenColour(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetPenColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetPenStyle(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetPenStyle,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetPenStyle(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_SetPenStyle,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetPenColour(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_SetPenColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetActualPen(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetActualPen,(self,) + _args, _kwargs)
|
||||
if val: val = wxPenPtr(val)
|
||||
return val
|
||||
def GetWidth(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetWidth,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetHeight(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_GetHeight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ClearText(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxShapeRegion_ClearText,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxShapeRegion instance at %s>" % (self.this,)
|
||||
class wxShapeRegion(wxShapeRegionPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(oglbasicc.new_wxShapeRegion,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
|
||||
class wxPyShapeEvtHandlerPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def _setSelf(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler__setSelf,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Destroy(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_Destroy,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetShape(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_SetShape,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetShape(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_GetShape,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapePtr(val)
|
||||
return val
|
||||
def SetPreviousHandler(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_SetPreviousHandler,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetPreviousHandler(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_GetPreviousHandler,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapeEvtHandlerPtr(val)
|
||||
return val
|
||||
def CreateNewCopy(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_CreateNewCopy,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapeEvtHandlerPtr(val)
|
||||
return val
|
||||
def base_OnDelete(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDelete,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDraw(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDraw,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawContents(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDrawContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawBranches(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDrawBranches,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLinks(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnMoveLinks,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnErase(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnErase,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseContents(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnEraseContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnHighlight(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnHighlight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftClick(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnLeftClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnRightClick(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnRightClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePre(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnMovePre,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePost(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnMovePost,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnBeginDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnEndDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawOutline(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDrawOutline,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnDrawControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnEraseControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLink(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnMoveLink,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnSizingDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnBeginSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShapeEvtHandler_base_OnEndSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPyShapeEvtHandler instance at %s>" % (self.this,)
|
||||
class wxPyShapeEvtHandler(wxPyShapeEvtHandlerPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(oglbasicc.new_wxPyShapeEvtHandler,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
self._setSelf(self, wxPyShapeEvtHandler)
|
||||
|
||||
|
||||
|
||||
|
||||
class wxPyShapePtr(wxPyShapeEvtHandlerPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def _setSelf(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape__setSelf,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Destroy(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Destroy,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBoundingBoxMax(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetBoundingBoxMax,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBoundingBoxMin(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetBoundingBoxMin,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetPerimeterPoint(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetPerimeterPoint,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetCanvas(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetCanvas,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapeCanvasPtr(val)
|
||||
return val
|
||||
def SetCanvas(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetCanvas,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AddToCanvas(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_AddToCanvas,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def InsertInCanvas(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_InsertInCanvas,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def RemoveFromCanvas(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_RemoveFromCanvas,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetX(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetX,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetY(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetY,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetX(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetX,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetY(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetY,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetParent(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetParent,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapePtr(val)
|
||||
return val
|
||||
def SetParent(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetParent,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetTopAncestor(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetTopAncestor,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapePtr(val)
|
||||
return val
|
||||
def GetChildren(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetChildren,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Unlink(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Unlink,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetDrawHandles(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetDrawHandles,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetDrawHandles(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetDrawHandles,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def MakeControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_MakeControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DeleteControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_DeleteControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ResetControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_ResetControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetEventHandler(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetEventHandler,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapeEvtHandlerPtr(val)
|
||||
return val
|
||||
def SetEventHandler(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetEventHandler,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def MakeMandatoryControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_MakeMandatoryControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ResetMandatoryControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_ResetMandatoryControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Recompute(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Recompute,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def CalculateSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_CalculateSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Select(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Select,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetHighlight(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetHighlight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsHighlighted(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_IsHighlighted,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Selected(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Selected,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AncestorSelected(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_AncestorSelected,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetSensitivityFilter(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetSensitivityFilter,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSensitivityFilter(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetSensitivityFilter,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetDraggable(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetDraggable,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetFixedSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetFixedSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetFixedSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetFixedSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetFixedWidth(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetFixedWidth,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetFixedHeight(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetFixedHeight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetSpaceAttachments(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetSpaceAttachments,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSpaceAttachments(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetSpaceAttachments,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetShadowMode(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetShadowMode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetShadowMode(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetShadowMode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def HitTest(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_HitTest,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetCentreResize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetCentreResize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetCentreResize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetCentreResize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetMaintainAspectRatio(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetMaintainAspectRatio,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetMaintainAspectRatio(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetMaintainAspectRatio,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetLines(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetLines,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetDisableLabel(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetDisableLabel,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetDisableLabel(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetDisableLabel,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetAttachmentMode(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetAttachmentMode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetAttachmentMode(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetAttachmentMode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetId(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetId,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetId(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetId,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetPen(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetPen,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetBrush(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetBrush,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetClientData(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetClientData,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetClientData(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetClientData,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Show(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Show,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsShown(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_IsShown,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Move(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Move,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Erase(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Erase,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def EraseContents(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_EraseContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Draw(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Draw,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Flash(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Flash,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def MoveLinks(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_MoveLinks,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DrawContents(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_DrawContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetAttachmentSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetAttachmentSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Attach(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Attach,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Detach(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Detach,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Constrain(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Constrain,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AddLine(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_AddLine,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetLinePosition(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetLinePosition,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AddText(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_AddText,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetPen(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetPen,(self,) + _args, _kwargs)
|
||||
if val: val = wxPenPtr(val)
|
||||
return val
|
||||
def GetBrush(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetBrush,(self,) + _args, _kwargs)
|
||||
if val: val = wxBrushPtr(val)
|
||||
return val
|
||||
def SetDefaultRegionSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetDefaultRegionSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def FormatText(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_FormatText,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetFormatMode(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetFormatMode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetFormatMode(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetFormatMode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetFont(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetFont,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetFont(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetFont,(self,) + _args, _kwargs)
|
||||
if val: val = wxFontPtr(val)
|
||||
return val
|
||||
def SetTextColour(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetTextColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetTextColour(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetTextColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetNumberOfTextRegions(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetNumberOfTextRegions,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetRegionName(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetRegionName,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetRegionName(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetRegionName,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetRegionId(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetRegionId,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def NameRegions(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_NameRegions,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetRegions(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetRegions,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AddRegion(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_AddRegion,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ClearRegions(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_ClearRegions,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AssignNewIds(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_AssignNewIds,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def FindRegion(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_FindRegion,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def FindRegionNames(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_FindRegionNames,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ClearText(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_ClearText,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def RemoveLine(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_RemoveLine,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetAttachmentPosition(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetAttachmentPosition,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetNumberOfAttachments(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetNumberOfAttachments,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AttachmentIsValid(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_AttachmentIsValid,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetAttachmentPositionEdge(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetAttachmentPositionEdge,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def CalcSimpleAttachment(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_CalcSimpleAttachment,(self,) + _args, _kwargs)
|
||||
if val: val = wxRealPointPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def AttachmentSortTest(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_AttachmentSortTest,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def EraseLinks(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_EraseLinks,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DrawLinks(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_DrawLinks,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def MoveLineToNewAttachment(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_MoveLineToNewAttachment,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ApplyAttachmentOrdering(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_ApplyAttachmentOrdering,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBranchingAttachmentRoot(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetBranchingAttachmentRoot,(self,) + _args, _kwargs)
|
||||
if val: val = wxRealPointPtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def GetBranchingAttachmentInfo(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetBranchingAttachmentInfo,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBranchingAttachmentPoint(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetBranchingAttachmentPoint,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetAttachmentLineCount(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetAttachmentLineCount,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetBranchNeckLength(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetBranchNeckLength,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBranchNeckLength(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetBranchNeckLength,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetBranchStemLength(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetBranchStemLength,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBranchStemLength(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetBranchStemLength,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetBranchSpacing(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetBranchSpacing,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBranchSpacing(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetBranchSpacing,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetBranchStyle(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_SetBranchStyle,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetBranchStyle(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetBranchStyle,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def PhysicalToLogicalAttachment(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_PhysicalToLogicalAttachment,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def LogicalToPhysicalAttachment(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_LogicalToPhysicalAttachment,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Draggable(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Draggable,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def HasDescendant(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_HasDescendant,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def CreateNewCopy(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_CreateNewCopy,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapePtr(val)
|
||||
return val
|
||||
def Copy(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Copy,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def CopyWithHandler(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_CopyWithHandler,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Rotate(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Rotate,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetRotation(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_GetRotation,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ClearAttachments(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_ClearAttachments,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Recentre(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_Recentre,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ClearPointList(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_ClearPointList,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDelete(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnDelete,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDraw(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnDraw,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawContents(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnDrawContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawBranches(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnDrawBranches,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLinks(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnMoveLinks,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnErase(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnErase,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseContents(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnEraseContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnHighlight(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnHighlight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftClick(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnLeftClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnRightClick(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnRightClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePre(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnMovePre,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePost(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnMovePost,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnBeginDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnEndDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawOutline(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnDrawOutline,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnDrawControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnEraseControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLink(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnMoveLink,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnSizingDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnBeginSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndSize(self, *_args, **_kwargs):
|
||||
val = apply(oglbasicc.wxPyShape_base_OnEndSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPyShape instance at %s>" % (self.this,)
|
||||
class wxPyShape(wxPyShapePtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#-------------- FUNCTION WRAPPERS ------------------
|
||||
|
||||
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
2115
wxPython/contrib/ogl/oglcanvas.cpp
Normal file
2115
wxPython/contrib/ogl/oglcanvas.cpp
Normal file
File diff suppressed because it is too large
Load Diff
166
wxPython/contrib/ogl/oglcanvas.i
Normal file
166
wxPython/contrib/ogl/oglcanvas.i
Normal file
@@ -0,0 +1,166 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
%module oglcanvas
|
||||
|
||||
%{
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%include typemaps.i
|
||||
%include my_typemaps.i
|
||||
|
||||
%extern wx.i
|
||||
%import windows.i
|
||||
%extern _defs.i
|
||||
%extern misc.i
|
||||
%extern gdi.i
|
||||
|
||||
%include _ogldefs.i
|
||||
|
||||
%extern oglbasic.i
|
||||
|
||||
|
||||
%pragma(python) code = "import wx"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class wxDiagram {
|
||||
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);
|
||||
%pragma(python) addtoclass = "# replaces broken shadow methods
|
||||
def FindShape(self, *_args, **_kwargs):
|
||||
from oglbasic import wxPyShapePtr
|
||||
val = apply(oglcanvasc.wxDiagram_FindShape,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapePtr(val)
|
||||
return val
|
||||
"
|
||||
|
||||
wxPyShapeCanvas* GetCanvas();
|
||||
int GetCount();
|
||||
double GetGridSpacing();
|
||||
int GetMouseTolerance();
|
||||
|
||||
// wxList* GetShapeList();
|
||||
%addmethods {
|
||||
PyObject* GetShapeList() {
|
||||
wxList* list = self->GetShapeList();
|
||||
return wxPy_ConvertList(list, "wxPyShape");
|
||||
}
|
||||
}
|
||||
|
||||
bool GetQuickEditMode();
|
||||
bool GetSnapToGrid();
|
||||
void InsertShape(wxPyShape *shape);
|
||||
bool LoadFile(const wxString& filename);
|
||||
|
||||
// **** 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);
|
||||
|
||||
|
||||
void ReadContainerGeometry(wxExprDatabase& database);
|
||||
void ReadLines(wxExprDatabase& database);
|
||||
void ReadNodes(wxExprDatabase& database);
|
||||
void RecentreAll(wxDC& dc);
|
||||
void Redraw(wxDC& dc);
|
||||
void RemoveAllShapes();
|
||||
void RemoveShape(wxPyShape* shape);
|
||||
bool SaveFile(const wxString& filename);
|
||||
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 *OUTPUT, double *OUTPUT);
|
||||
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%{
|
||||
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);
|
||||
%}
|
||||
|
||||
|
||||
class wxPyShapeCanvas : public wxScrolledWindow {
|
||||
public:
|
||||
wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxBORDER);
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyShapeCanvas)"
|
||||
|
||||
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
|
||||
%pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)"
|
||||
|
||||
void AddShape(wxPyShape *shape, wxPyShape *addAfter = NULL);
|
||||
|
||||
// **** Need a typemap for wxClassInfo, or 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 *OUTPUT, double *OUTPUT);
|
||||
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
239
wxPython/contrib/ogl/oglcanvas.py
Normal file
239
wxPython/contrib/ogl/oglcanvas.py
Normal file
@@ -0,0 +1,239 @@
|
||||
# This file was created automatically by SWIG.
|
||||
import oglcanvasc
|
||||
|
||||
from misc import *
|
||||
|
||||
from misc2 import *
|
||||
|
||||
from windows import *
|
||||
|
||||
from gdi import *
|
||||
|
||||
from clip_dnd import *
|
||||
|
||||
from events import *
|
||||
|
||||
from streams 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 *
|
||||
|
||||
from utils import *
|
||||
import wx
|
||||
class wxDiagramPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,oglcanvasc=oglcanvasc):
|
||||
if self.thisown == 1 :
|
||||
oglcanvasc.delete_wxDiagram(self)
|
||||
def AddShape(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_AddShape,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Clear(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_Clear,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DeleteAllShapes(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_DeleteAllShapes,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DrawOutline(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_DrawOutline,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def FindShape(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_FindShape,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapePtr(val)
|
||||
return val
|
||||
def GetCanvas(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_GetCanvas,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapeCanvasPtr(val)
|
||||
return val
|
||||
def GetCount(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_GetCount,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetGridSpacing(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_GetGridSpacing,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetMouseTolerance(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_GetMouseTolerance,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetShapeList(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_GetShapeList,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetQuickEditMode(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_GetQuickEditMode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSnapToGrid(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_GetSnapToGrid,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def InsertShape(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_InsertShape,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def LoadFile(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_LoadFile,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ReadContainerGeometry(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_ReadContainerGeometry,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ReadLines(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_ReadLines,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ReadNodes(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_ReadNodes,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def RecentreAll(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_RecentreAll,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Redraw(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_Redraw,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def RemoveAllShapes(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_RemoveAllShapes,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def RemoveShape(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_RemoveShape,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SaveFile(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_SaveFile,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetCanvas(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_SetCanvas,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetGridSpacing(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_SetGridSpacing,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetMouseTolerance(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_SetMouseTolerance,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetQuickEditMode(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_SetQuickEditMode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetSnapToGrid(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_SetSnapToGrid,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ShowAll(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_ShowAll,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Snap(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxDiagram_Snap,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxDiagram instance at %s>" % (self.this,)
|
||||
# replaces broken shadow methods
|
||||
def FindShape(self, *_args, **_kwargs):
|
||||
from oglbasic import wxPyShapePtr
|
||||
val = apply(oglcanvasc.wxDiagram_FindShape,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapePtr(val)
|
||||
return val
|
||||
|
||||
class wxDiagram(wxDiagramPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(oglcanvasc.new_wxDiagram,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
|
||||
class wxPyShapeCanvasPtr(wxScrolledWindowPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def _setSelf(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas__setSelf,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AddShape(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_AddShape,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def FindShape(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_FindShape,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def FindFirstSensitiveShape(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_FindFirstSensitiveShape,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetDiagram(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_GetDiagram,(self,) + _args, _kwargs)
|
||||
if val: val = wxDiagramPtr(val)
|
||||
return val
|
||||
def GetQuickEditMode(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_GetQuickEditMode,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def InsertShape(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_InsertShape,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnBeginDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnEndDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftClick(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnLeftClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnRightClick(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_base_OnRightClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Redraw(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_Redraw,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def RemoveShape(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_RemoveShape,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetDiagram(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_SetDiagram,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Snap(self, *_args, **_kwargs):
|
||||
val = apply(oglcanvasc.wxPyShapeCanvas_Snap,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPyShapeCanvas instance at %s>" % (self.this,)
|
||||
class wxPyShapeCanvas(wxPyShapeCanvasPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(oglcanvasc.new_wxPyShapeCanvas,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
self._setSelf(self, wxPyShapeCanvas)
|
||||
#wx._StdWindowCallbacks(self)
|
||||
#wx._StdOnScrollCallbacks(self)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#-------------- FUNCTION WRAPPERS ------------------
|
||||
|
||||
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
103
wxPython/contrib/ogl/oglhelpers.cpp
Normal file
103
wxPython/contrib/ogl/oglhelpers.cpp
Normal file
@@ -0,0 +1,103 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: oglhelpers.cpp
|
||||
// Purpose: Some Helper functions to help in data conversions in OGL
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 3-Sept-1999
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <Python.h>
|
||||
#include "helpers.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// 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, char* className) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
if (!PyList_Check(pyList)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
int count = PyList_Size(pyList);
|
||||
wxList* list = new wxList;
|
||||
if (! list) {
|
||||
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
for (int x=0; x<count; x++) {
|
||||
PyObject* pyo = PyList_GetItem(pyList, x);
|
||||
wxObject* wxo = NULL;
|
||||
|
||||
if (SWIG_GetPtrObj(pyo, (void **)&wxo, className)) {
|
||||
char errmsg[1024];
|
||||
sprintf(errmsg, "Type error, expected list of %s objects", className);
|
||||
PyErr_SetString(PyExc_TypeError, errmsg);
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
list->Append(wxo);
|
||||
}
|
||||
wxPySaveThread(doSave);
|
||||
return list;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
if (!PyList_Check(pyList)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
int count = PyList_Size(pyList);
|
||||
wxList* list = new wxList;
|
||||
if (! list) {
|
||||
PyErr_SetString(PyExc_MemoryError, "Unable to allocate wxList object");
|
||||
wxPySaveThread(doSave);
|
||||
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 (SWIG_GetPtrObj(pyo, (void **)&wxo, "_wxRealPoint_p")) {
|
||||
PyErr_SetString(PyExc_TypeError, "Type error, expected list of wxRealPoint objects or 2-tuples");
|
||||
wxPySaveThread(doSave);
|
||||
return NULL;
|
||||
}
|
||||
list->Append((wxObject*) new wxRealPoint(*wxo));
|
||||
}
|
||||
}
|
||||
wxPySaveThread(doSave);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
262
wxPython/contrib/ogl/oglhelpers.h
Normal file
262
wxPython/contrib/ogl/oglhelpers.h
Normal file
@@ -0,0 +1,262 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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 oglhelpers.cpp
|
||||
|
||||
wxList* wxPy_wxListHelper(PyObject* pyList, char* className);
|
||||
wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList);
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Classes that derive from the shapes and such, but which know how to turn
|
||||
// virtual callbacks into Python callbacks.
|
||||
|
||||
class wxPyShapeCanvas : public wxShapeCanvas {
|
||||
public:
|
||||
wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxBORDER)
|
||||
: wxShapeCanvas(parent, id, pos, size, style) {}
|
||||
|
||||
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 {
|
||||
public:
|
||||
wxPyShapeEvtHandler(wxShapeEvtHandler *prev = NULL, wxShape *shape = NULL)
|
||||
: wxShapeEvtHandler(prev, shape) {}
|
||||
|
||||
WXSHAPE_DEC_CALLBACKS();
|
||||
};
|
||||
|
||||
|
||||
class wxPyShape : public wxShape {
|
||||
public:
|
||||
wxPyShape(wxPyShapeCanvas *can = NULL)
|
||||
: wxShape(can) {}
|
||||
|
||||
WXSHAPE_DEC_CALLBACKS();
|
||||
|
||||
};
|
||||
|
||||
|
||||
class wxPyRectangleShape : public wxRectangleShape {
|
||||
public:
|
||||
wxPyRectangleShape(double width = 0.0, double height = 0.0)
|
||||
: wxRectangleShape(width, height) {}
|
||||
|
||||
WXSHAPE_DEC_CALLBACKS();
|
||||
};
|
||||
|
||||
class wxPyControlPoint : public wxControlPoint {
|
||||
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 {
|
||||
public:
|
||||
wxPyBitmapShape() : wxBitmapShape() {}
|
||||
|
||||
WXSHAPE_DEC_CALLBACKS();
|
||||
};
|
||||
|
||||
|
||||
|
||||
class wxPyDrawnShape : public wxDrawnShape {
|
||||
public:
|
||||
wxPyDrawnShape() : wxDrawnShape() {}
|
||||
|
||||
WXSHAPE_DEC_CALLBACKS();
|
||||
};
|
||||
|
||||
|
||||
class wxPyCompositeShape : public wxCompositeShape {
|
||||
public:
|
||||
wxPyCompositeShape() : wxCompositeShape() {}
|
||||
|
||||
WXSHAPE_DEC_CALLBACKS();
|
||||
};
|
||||
|
||||
|
||||
class wxPyDividedShape : public wxDividedShape {
|
||||
public:
|
||||
wxPyDividedShape(double width = 0.0, double height = 0.0)
|
||||
: wxDividedShape(width, height) {}
|
||||
|
||||
WXSHAPE_DEC_CALLBACKS();
|
||||
};
|
||||
|
||||
|
||||
class wxPyDivisionShape : public wxDivisionShape {
|
||||
public:
|
||||
wxPyDivisionShape() : wxDivisionShape() {}
|
||||
|
||||
WXSHAPE_DEC_CALLBACKS();
|
||||
};
|
||||
|
||||
|
||||
class wxPyEllipseShape : public wxEllipseShape {
|
||||
public:
|
||||
wxPyEllipseShape(double width = 0.0, double height = 0.0)
|
||||
: wxEllipseShape(width, height) {}
|
||||
|
||||
WXSHAPE_DEC_CALLBACKS();
|
||||
};
|
||||
|
||||
|
||||
class wxPyCircleShape : public wxCircleShape {
|
||||
public:
|
||||
wxPyCircleShape(double width = 0.0)
|
||||
: wxCircleShape(width) {}
|
||||
|
||||
WXSHAPE_DEC_CALLBACKS();
|
||||
};
|
||||
|
||||
|
||||
class wxPyLineShape : public wxLineShape {
|
||||
public:
|
||||
wxPyLineShape() : wxLineShape() {}
|
||||
|
||||
WXSHAPE_DEC_CALLBACKS();
|
||||
};
|
||||
|
||||
|
||||
class wxPyPolygonShape : public wxPolygonShape {
|
||||
public:
|
||||
wxPyPolygonShape() : wxPolygonShape() {}
|
||||
|
||||
WXSHAPE_DEC_CALLBACKS();
|
||||
};
|
||||
|
||||
|
||||
class wxPyTextShape : public wxTextShape {
|
||||
public:
|
||||
wxPyTextShape(double width = 0.0, double height = 0.0)
|
||||
: wxTextShape(width, height) {}
|
||||
|
||||
WXSHAPE_DEC_CALLBACKS();
|
||||
};
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
||||
|
12722
wxPython/contrib/ogl/oglshapes.cpp
Normal file
12722
wxPython/contrib/ogl/oglshapes.cpp
Normal file
File diff suppressed because it is too large
Load Diff
574
wxPython/contrib/ogl/oglshapes.i
Normal file
574
wxPython/contrib/ogl/oglshapes.i
Normal file
@@ -0,0 +1,574 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
%module oglshapes
|
||||
|
||||
%{
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%include typemaps.i
|
||||
%include my_typemaps.i
|
||||
|
||||
%extern wx.i
|
||||
%import windows.i
|
||||
%extern _defs.i
|
||||
%extern misc.i
|
||||
%extern gdi.i
|
||||
|
||||
%include _ogldefs.i
|
||||
|
||||
%import oglbasic.i
|
||||
|
||||
|
||||
%pragma(python) code = "import wx"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class wxPseudoMetaFile {
|
||||
public:
|
||||
wxPseudoMetaFile();
|
||||
~wxPseudoMetaFile();
|
||||
|
||||
void Draw(wxDC& dc, double xoffset, double yoffset);
|
||||
|
||||
void WriteAttributes(wxExpr *clause, int whichAngle);
|
||||
void ReadAttributes(wxExpr *clause, int whichAngle);
|
||||
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(char* filename, double *width, double *height);
|
||||
void GetBounds(double *minX, double *minY, double *maxX, double *maxY);
|
||||
void CalculateSize(wxDrawnShape* 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 PCOUNT, wxPoint* points);
|
||||
void DrawPolygon(int PCOUNT, wxPoint* points, int flags = 0);
|
||||
void DrawSpline(int PCOUNT, wxPoint* points);
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%{
|
||||
WXSHAPE_IMP_CALLBACKS(wxPyRectangleShape, wxRectangleShape);
|
||||
%}
|
||||
|
||||
class wxPyRectangleShape : public wxPyShape {
|
||||
public:
|
||||
wxPyRectangleShape(double width = 0.0, double height = 0.0);
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyRectangleShape)"
|
||||
|
||||
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(wxPyControlPoint, wxControlPoint);
|
||||
%}
|
||||
|
||||
class wxPyControlPoint : public wxPyRectangleShape {
|
||||
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);
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyControlPoint)"
|
||||
|
||||
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:
|
||||
wxPyBitmapShape();
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyBitmapShape)"
|
||||
|
||||
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:
|
||||
wxPyDrawnShape();
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyDrawnShape)"
|
||||
|
||||
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 PCOUNT, wxPoint* points);
|
||||
void DrawPoint(const wxPoint& point);
|
||||
void DrawPolygon(int PCOUNT, wxPoint* points, int flags = 0);
|
||||
void DrawRectangle(const wxRect& rect);
|
||||
void DrawRoundedRectangle(const wxRect& rect, double radius);
|
||||
void DrawSpline(int PCOUNT, wxPoint* points);
|
||||
void DrawText(const wxString& text, const wxPoint& point);
|
||||
int GetAngle();
|
||||
|
||||
wxPseudoMetaFile& GetMetaFile();
|
||||
|
||||
double GetRotation();
|
||||
bool LoadFromMetaFile(char * 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:
|
||||
//wxOGLConstraint(int type, wxPyShape *constraining, wxList& constrained);
|
||||
%addmethods {
|
||||
wxOGLConstraint(int type, wxPyShape *constraining, PyObject* constrained) {
|
||||
wxList* list = wxPy_wxListHelper(constrained, "_wxPyShape_p");
|
||||
wxOGLConstraint* rv = new wxOGLConstraint(type, constraining, *list);
|
||||
delete list;
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
~wxOGLConstraint();
|
||||
|
||||
bool Evaluate();
|
||||
void SetSpacing(double x, double y);
|
||||
bool Equals(double a, double b);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%{
|
||||
WXSHAPE_IMP_CALLBACKS(wxPyCompositeShape, wxCompositeShape);
|
||||
%}
|
||||
|
||||
class wxPyCompositeShape : public wxPyRectangleShape {
|
||||
public:
|
||||
wxPyCompositeShape();
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyCompositeShape)"
|
||||
|
||||
void AddChild(wxPyShape *child, wxPyShape *addAfter = NULL);
|
||||
|
||||
wxOGLConstraint * AddConstraint(wxOGLConstraint *constraint);
|
||||
|
||||
|
||||
//wxOGLConstraint * AddConstraint(int type,
|
||||
// wxPyShape *constraining,
|
||||
// wxList& constrained);
|
||||
%addmethods {
|
||||
wxOGLConstraint * AddConstrainedShapes(int type, wxPyShape *constraining,
|
||||
PyObject* constrained) {
|
||||
wxList* list = wxPy_wxListHelper(constrained, "_wxPyShape_p");
|
||||
wxOGLConstraint* rv = self->AddConstraint(type, constraining, *list);
|
||||
delete list;
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
%name(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();
|
||||
%addmethods {
|
||||
PyObject* GetConstraints() {
|
||||
wxList& list = self->GetConstraints();
|
||||
return wxPy_ConvertList(&list, "wxOGLConstraint");
|
||||
}
|
||||
|
||||
PyObject* GetDivisions() {
|
||||
wxList& list = self->GetDivisions();
|
||||
return wxPy_ConvertList(&list, "wxPyDivisionShape");
|
||||
}
|
||||
}
|
||||
|
||||
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:
|
||||
wxPyDividedShape(double width = 0.0, double height = 0.0);
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyDividedShape)"
|
||||
|
||||
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:
|
||||
wxPyDivisionShape();
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyDivisionShape)"
|
||||
|
||||
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);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
1193
wxPython/contrib/ogl/oglshapes.py
Normal file
1193
wxPython/contrib/ogl/oglshapes.py
Normal file
File diff suppressed because it is too large
Load Diff
8035
wxPython/contrib/ogl/oglshapes2.cpp
Normal file
8035
wxPython/contrib/ogl/oglshapes2.cpp
Normal file
File diff suppressed because it is too large
Load Diff
369
wxPython/contrib/ogl/oglshapes2.i
Normal file
369
wxPython/contrib/ogl/oglshapes2.i
Normal file
@@ -0,0 +1,369 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
%module oglshapes2
|
||||
|
||||
%{
|
||||
#include "export.h"
|
||||
#include "oglhelpers.h"
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%include typemaps.i
|
||||
%include my_typemaps.i
|
||||
|
||||
%extern wx.i
|
||||
%import windows.i
|
||||
%extern _defs.i
|
||||
%extern misc.i
|
||||
%extern gdi.i
|
||||
|
||||
%include _ogldefs.i
|
||||
|
||||
%import oglbasic.i
|
||||
%import oglshapes.i
|
||||
|
||||
|
||||
%pragma(python) code = "import wx"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
%{
|
||||
WXSHAPE_IMP_CALLBACKS(wxPyEllipseShape, wxEllipseShape);
|
||||
%}
|
||||
|
||||
class wxPyEllipseShape : public wxPyShape {
|
||||
public:
|
||||
wxPyEllipseShape(double width = 0.0, double height = 0.0);
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyEllipseShape)"
|
||||
|
||||
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:
|
||||
wxPyCircleShape(double width = 0.0);
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyCircleShape)"
|
||||
|
||||
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:
|
||||
wxArrowHead(int type = 0,
|
||||
int end = 0,
|
||||
double size = 0.0,
|
||||
double dist = 0.0,
|
||||
const char * name = "",
|
||||
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:
|
||||
wxPyLineShape();
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyLineShape)"
|
||||
|
||||
void AddArrow(int type, int end = ARROW_POSITION_END,
|
||||
double arrowSize = 10.0, double xOffset = 0.0,
|
||||
char* name = "", wxPseudoMetaFile *mf = NULL,
|
||||
long arrowId = -1);
|
||||
|
||||
//void AddArrowOrdered(wxArrowHead *arrow, wxList& referenceList, int end);
|
||||
%addmethods {
|
||||
void AddArrowOrdered(wxArrowHead *arrow, PyObject* referenceList, int end) {
|
||||
wxList* list = wxPy_wxListHelper(referenceList, "_wxArrowHead_p");
|
||||
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);
|
||||
%name(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);
|
||||
%name(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);
|
||||
wxPoint * GetNextControlPoint(wxPyShape *shape);
|
||||
wxPyShape * GetTo();
|
||||
void Initialise();
|
||||
void InsertLineControlPoint(wxDC* dc);
|
||||
bool IsEnd(wxPyShape *shape);
|
||||
bool IsSpline();
|
||||
void MakeLineControlPoints(int n);
|
||||
|
||||
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 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:
|
||||
wxPyPolygonShape();
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyPolygonShape)"
|
||||
|
||||
|
||||
// void Create(wxList* points);
|
||||
%addmethods {
|
||||
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();
|
||||
%addmethods {
|
||||
PyObject* GetPoints() {
|
||||
wxList* list = self->GetPoints();
|
||||
return wxPy_ConvertList(list, "wxRealPoint");
|
||||
}
|
||||
}
|
||||
|
||||
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:
|
||||
wxPyTextShape(double width = 0.0, double height = 0.0);
|
||||
|
||||
void _setSelf(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyTextShape)"
|
||||
|
||||
|
||||
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);
|
||||
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
774
wxPython/contrib/ogl/oglshapes2.py
Normal file
774
wxPython/contrib/ogl/oglshapes2.py
Normal file
@@ -0,0 +1,774 @@
|
||||
# This file was created automatically by SWIG.
|
||||
import oglshapes2c
|
||||
|
||||
from misc import *
|
||||
|
||||
from misc2 import *
|
||||
|
||||
from windows import *
|
||||
|
||||
from gdi import *
|
||||
|
||||
from clip_dnd import *
|
||||
|
||||
from events import *
|
||||
|
||||
from streams 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 *
|
||||
|
||||
from utils import *
|
||||
|
||||
from oglbasic import *
|
||||
|
||||
from oglshapes import *
|
||||
import wx
|
||||
class wxPyEllipseShapePtr(wxPyShapePtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def _setSelf(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape__setSelf,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDraw(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDraw,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawContents(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDrawContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawBranches(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDrawBranches,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLinks(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnMoveLinks,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnErase(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnErase,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseContents(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnEraseContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnHighlight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnHighlight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnLeftClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnRightClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnRightClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePre(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnMovePre,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePost(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnMovePost,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnBeginDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnEndDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawOutline(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDrawOutline,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnDrawControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnEraseControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLink(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnMoveLink,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnSizingDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnBeginSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyEllipseShape_base_OnEndSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPyEllipseShape instance at %s>" % (self.this,)
|
||||
class wxPyEllipseShape(wxPyEllipseShapePtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(oglshapes2c.new_wxPyEllipseShape,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
self._setSelf(self, wxPyEllipseShape)
|
||||
|
||||
|
||||
|
||||
|
||||
class wxPyCircleShapePtr(wxPyEllipseShapePtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def _setSelf(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape__setSelf,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDraw(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnDraw,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawContents(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnDrawContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawBranches(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnDrawBranches,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLinks(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnMoveLinks,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnErase(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnErase,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseContents(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnEraseContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnHighlight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnHighlight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnLeftClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnRightClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnRightClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePre(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnMovePre,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePost(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnMovePost,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnBeginDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnEndDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawOutline(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnDrawOutline,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnDrawControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnEraseControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLink(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnMoveLink,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnSizingDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnBeginSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyCircleShape_base_OnEndSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPyCircleShape instance at %s>" % (self.this,)
|
||||
class wxPyCircleShape(wxPyCircleShapePtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(oglshapes2c.new_wxPyCircleShape,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
self._setSelf(self, wxPyCircleShape)
|
||||
|
||||
|
||||
|
||||
|
||||
class wxArrowHeadPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self,oglshapes2c=oglshapes2c):
|
||||
if self.thisown == 1 :
|
||||
oglshapes2c.delete_wxArrowHead(self)
|
||||
def _GetType(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead__GetType,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetPosition(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_GetPosition,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetPosition(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_SetPosition,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetXOffset(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_GetXOffset,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetYOffset(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_GetYOffset,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSpacing(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_GetSpacing,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_GetSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetName(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_GetName,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetXOffset(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_SetXOffset,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetYOffset(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_SetYOffset,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetMetaFile(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_GetMetaFile,(self,) + _args, _kwargs)
|
||||
if val: val = wxPseudoMetaFilePtr(val)
|
||||
return val
|
||||
def GetId(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_GetId,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetArrowEnd(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_GetArrowEnd,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetArrowSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_GetArrowSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_SetSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetSpacing(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxArrowHead_SetSpacing,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxArrowHead instance at %s>" % (self.this,)
|
||||
class wxArrowHead(wxArrowHeadPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(oglshapes2c.new_wxArrowHead,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
|
||||
class wxPyLineShapePtr(wxPyShapePtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def _setSelf(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape__setSelf,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AddArrow(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_AddArrow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AddArrowOrdered(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_AddArrowOrdered,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ClearArrow(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_ClearArrow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ClearArrowsAtPosition(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_ClearArrowsAtPosition,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DrawArrow(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_DrawArrow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DeleteArrowHeadId(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_DeleteArrowHeadId,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DeleteArrowHead(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_DeleteArrowHead,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DeleteLineControlPoint(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_DeleteLineControlPoint,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DrawArrows(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_DrawArrows,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DrawRegion(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_DrawRegion,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def EraseRegion(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_EraseRegion,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def FindArrowHeadId(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_FindArrowHeadId,(self,) + _args, _kwargs)
|
||||
if val: val = wxArrowHeadPtr(val)
|
||||
return val
|
||||
def FindArrowHead(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_FindArrowHead,(self,) + _args, _kwargs)
|
||||
if val: val = wxArrowHeadPtr(val)
|
||||
return val
|
||||
def FindLineEndPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_FindLineEndPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def FindLinePosition(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_FindLinePosition,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def FindMinimumWidth(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_FindMinimumWidth,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def FindNth(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_FindNth,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetAttachmentFrom(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_GetAttachmentFrom,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetAttachmentTo(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_GetAttachmentTo,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetEnds(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_GetEnds,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetFrom(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_GetFrom,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapePtr(val)
|
||||
return val
|
||||
def GetLabelPosition(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_GetLabelPosition,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetNextControlPoint(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_GetNextControlPoint,(self,) + _args, _kwargs)
|
||||
if val: val = wxPointPtr(val)
|
||||
return val
|
||||
def GetTo(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_GetTo,(self,) + _args, _kwargs)
|
||||
if val: val = wxPyShapePtr(val)
|
||||
return val
|
||||
def Initialise(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_Initialise,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def InsertLineControlPoint(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_InsertLineControlPoint,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsEnd(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_IsEnd,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsSpline(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_IsSpline,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def MakeLineControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_MakeLineControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetAttachmentFrom(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_SetAttachmentFrom,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetAttachments(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_SetAttachments,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetAttachmentTo(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_SetAttachmentTo,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetEnds(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_SetEnds,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetFrom(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_SetFrom,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetIgnoreOffsets(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_SetIgnoreOffsets,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetSpline(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_SetSpline,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetTo(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_SetTo,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Straighten(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_Straighten,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Unlink(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_Unlink,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDraw(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnDraw,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawContents(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnDrawContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawBranches(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnDrawBranches,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLinks(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnMoveLinks,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnErase(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnErase,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseContents(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnEraseContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnHighlight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnHighlight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnLeftClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnRightClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnRightClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePre(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnMovePre,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePost(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnMovePost,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnBeginDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnEndDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawOutline(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnDrawOutline,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnDrawControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnEraseControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLink(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnMoveLink,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnSizingDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnBeginSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyLineShape_base_OnEndSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPyLineShape instance at %s>" % (self.this,)
|
||||
class wxPyLineShape(wxPyLineShapePtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(oglshapes2c.new_wxPyLineShape,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
self._setSelf(self, wxPyLineShape)
|
||||
|
||||
|
||||
|
||||
|
||||
class wxPyPolygonShapePtr(wxPyShapePtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def _setSelf(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape__setSelf,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Create(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_Create,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def AddPolygonPoint(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_AddPolygonPoint,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def CalculatePolygonCentre(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_CalculatePolygonCentre,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def DeletePolygonPoint(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_DeletePolygonPoint,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_GetPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def UpdateOriginalPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_UpdateOriginalPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDraw(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDraw,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawContents(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDrawContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawBranches(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDrawBranches,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLinks(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnMoveLinks,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnErase(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnErase,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseContents(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnEraseContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnHighlight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnHighlight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnLeftClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnRightClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnRightClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePre(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnMovePre,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePost(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnMovePost,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnBeginDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnEndDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawOutline(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDrawOutline,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnDrawControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnEraseControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLink(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnMoveLink,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnSizingDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnBeginSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyPolygonShape_base_OnEndSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPyPolygonShape instance at %s>" % (self.this,)
|
||||
class wxPyPolygonShape(wxPyPolygonShapePtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(oglshapes2c.new_wxPyPolygonShape,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
self._setSelf(self, wxPyPolygonShape)
|
||||
|
||||
|
||||
|
||||
|
||||
class wxPyTextShapePtr(wxPyRectangleShapePtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def _setSelf(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape__setSelf,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDelete(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnDelete,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDraw(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnDraw,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawContents(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnDrawContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawBranches(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnDrawBranches,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLinks(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnMoveLinks,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnErase(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnErase,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseContents(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnEraseContents,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnHighlight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnHighlight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnLeftClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnLeftDoubleClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnLeftDoubleClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnRightClick(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnRightClick,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePre(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnMovePre,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMovePost(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnMovePost,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnBeginDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndDragRight(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnEndDragRight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawOutline(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnDrawOutline,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnDrawControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnDrawControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEraseControlPoints(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnEraseControlPoints,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnMoveLink(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnMoveLink,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnSizingDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingBeginDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnSizingBeginDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnSizingEndDragLeft(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnSizingEndDragLeft,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnBeginSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnBeginSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def base_OnEndSize(self, *_args, **_kwargs):
|
||||
val = apply(oglshapes2c.wxPyTextShape_base_OnEndSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPyTextShape instance at %s>" % (self.this,)
|
||||
class wxPyTextShape(wxPyTextShapePtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(oglshapes2c.new_wxPyTextShape,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
self._setSelf(self, wxPyTextShape)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#-------------- FUNCTION WRAPPERS ------------------
|
||||
|
||||
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
6
wxPython/contrib/stc/.cvsignore
Normal file
6
wxPython/contrib/stc/.cvsignore
Normal file
@@ -0,0 +1,6 @@
|
||||
Makefile
|
||||
Makefile
|
||||
contrib
|
||||
stc_c.exp
|
||||
stc_c.ilk
|
||||
stc_c.pch
|
7
wxPython/contrib/stc/README.txt
Normal file
7
wxPython/contrib/stc/README.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Since STC is not always bundled with distributions of wxWindows, in
|
||||
order for it to be a standard part of wxPython I need to bundle it
|
||||
here. The contents of the contrib directory are copies of the
|
||||
relevant parts of the main contrib directory in wxWindows. The
|
||||
build.py script in this directory will also build the needed files
|
||||
from there, so you no longer have to worry about aquiring and building
|
||||
additional libraries beyond wxWindows itself.
|
4
wxPython/contrib/stc/_stcextras.py
Normal file
4
wxPython/contrib/stc/_stcextras.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# Stuff these names into the wx namespace so wxPyConstructObject can find them
|
||||
|
||||
wx.wxStyledTextEventPtr = wxStyledTextEventPtr
|
||||
wx.wxStyledTextCtrlPtr = wxStyledTextCtrlPtr
|
7
wxPython/contrib/stc/stc.py
Normal file
7
wxPython/contrib/stc/stc.py
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
# The name "stc.cpp" was causing the debugger to get confused with the
|
||||
# same module name in the stc library, so I changed the name of this
|
||||
# one to stc_.cpp and this little stub to make the "stc" Python module
|
||||
# name still usesable for everything that matters.
|
||||
|
||||
from stc_ import *
|
9007
wxPython/contrib/stc/stc_.cpp
Normal file
9007
wxPython/contrib/stc/stc_.cpp
Normal file
File diff suppressed because it is too large
Load Diff
104
wxPython/contrib/stc/stc_.i
Normal file
104
wxPython/contrib/stc/stc_.i
Normal file
@@ -0,0 +1,104 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: stc.i
|
||||
// Purpose: Wrappers for the wxStyledTextCtrl.
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 12-Oct-1999
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
%module stc_
|
||||
|
||||
|
||||
%{
|
||||
#include "export.h"
|
||||
#include "wx/stc/stc.h"
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%include typemaps.i
|
||||
%include my_typemaps.i
|
||||
|
||||
%extern wx.i
|
||||
%extern windows.i
|
||||
%extern _defs.i
|
||||
%extern events.i
|
||||
%extern controls.i
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Get all our defs from the REAL header file.
|
||||
|
||||
%include stc.h
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Python functions to act like the event macros
|
||||
|
||||
%pragma(python) code = "
|
||||
def EVT_STC_CHANGE(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_CHANGE, fn)
|
||||
|
||||
def EVT_STC_STYLENEEDED(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_STYLENEEDED, fn)
|
||||
|
||||
def EVT_STC_CHARADDED(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_CHARADDED, fn)
|
||||
|
||||
def EVT_STC_UPDATEUI(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_UPDATEUI, fn)
|
||||
|
||||
def EVT_STC_SAVEPOINTREACHED(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_SAVEPOINTREACHED, fn)
|
||||
|
||||
def EVT_STC_SAVEPOINTLEFT(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_SAVEPOINTLEFT, fn)
|
||||
|
||||
def EVT_STC_ROMODIFYATTEMPT(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_ROMODIFYATTEMPT, fn)
|
||||
|
||||
def EVT_STC_DOUBLECLICK(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_DOUBLECLICK, fn)
|
||||
|
||||
def EVT_STC_MODIFIED(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_MODIFIED, fn)
|
||||
|
||||
def EVT_STC_KEY(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_KEY, fn)
|
||||
|
||||
def EVT_STC_MACRORECORD(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_MACRORECORD, fn)
|
||||
|
||||
def EVT_STC_MARGINCLICK(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_MARGINCLICK, fn)
|
||||
|
||||
def EVT_STC_NEEDSHOWN(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_NEEDSHOWN, fn)
|
||||
|
||||
def EVT_STC_POSCHANGED(win, id, fn):
|
||||
win.Connect(id, -1, wxEVT_STC_POSCHANGED, fn)
|
||||
|
||||
|
||||
"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
%init %{
|
||||
|
||||
wxClassInfo::CleanUpClasses();
|
||||
wxClassInfo::InitializeClasses();
|
||||
|
||||
%}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
%pragma(python) include="_stcextras.py";
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
1279
wxPython/contrib/stc/stc_.py
Normal file
1279
wxPython/contrib/stc/stc_.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user