Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.

Various cleanup, tweaks, minor additions, etc. to maintain
compatibility with the current wxWindows.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
1999-01-30 07:31:33 +00:00
parent f37615d789
commit 0812732316
28 changed files with 2704 additions and 123 deletions

View File

@@ -334,7 +334,7 @@ PYMODULES = $(GENCODEDIR)/wx.py $(GENCODEDIR)/events.py \
$(GENCODEDIR)/controls.py $(GENCODEDIR)/controls2.py \
$(GENCODEDIR)/windows2.py $(GENCODEDIR)/cmndlgs.py \
$(GENCODEDIR)/frames.py $(GENCODEDIR)/stattool.py \
$(GENCODEDIR)/utils.py \
$(GENCODEDIR)/utils.py $(GENCODEDIR)/windows3.py \
__init__.py
@@ -354,6 +354,7 @@ $(GENCODEDIR)/wx.cpp $(GENCODEDIR)/wx.py : wx.i my_typemaps.i _defs.i _extras.py
# define some dependencies
$(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i
$(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i
$(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.i my_typemaps.i _defs.i
$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i
$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i
$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i
@@ -373,7 +374,7 @@ wxInstall : sharedmods $(PYMODULES)
if test ! -d $(TARGETDIR) ; then \
mkdir $(TARGETDIR) ; else true ; fi
if [ "$(SHAREDMODS)" != "" ]; then \
-chmod 755 $(SHAREDMODS); \
chmod 755 $(SHAREDMODS); \
cp $(SHAREDMODS) $(TARGETDIR); fi
-for i in $(PYMODULES); do \
cp $$i $(TARGETDIR); \

View File

@@ -1,42 +0,0 @@
# This file gives the details of what is needed to build this extension
# module so the Makefile can be created.
###
### This file should be created by configure. Currently it is tweaked by hand.
###
*shared*
CCC=g++
WXWIN=~/wxWindows
GENCODEDIR=gtk
srcdir=$(GENCODEDIR)
WX_CONFIG_CFLAGS=`wx-config --cflags`
WX_CONFIG_LIBS=`wx-config --libs`
# Depending on how your Python was built, you may have to set this
# value to use the C++ driver to link with instead of the default
# C driver. For example:
MY_LDSHARED=$(CCC) -shared $(WX_CONFIG_LIBS)
# Same as above, but for statically linking Python and wxPython together,
# in other words, if you comment out the *shared* above. If this is the
# case then you should ensure that the main() function is Python's, not
# wxWindows'. You can rebuild $(WXWIN)/src/gtk/app.cpp with NOMAIN defined
# to force this...
MY_LINKCC=$(CCC)
## Pick one of these, or set your own. This is where the
## wxPython module should be installed. It should be a
## subdirectory named wxPython.
#TARGETDIR=..
#TARGETDIR=$(BINLIBDEST)/site-packages/wxPython
TARGETDIR=$(BINLIBDEST)/wxPython
wxc wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
frames.cpp stattool.cpp utils.cpp \
-I. $(WX_CONFIG_CFLAGS) -DSWIG_GLOBAL

View File

@@ -5,7 +5,7 @@
### This file should be created by configure. Currently it is tweaked by hand.
###
#*shared*
*shared*
CCC=c++
WXWIN=../../..
@@ -15,7 +15,7 @@ srcdir=$(GENCODEDIR)
# Depending on how your Python was built, you may have to set this
# value to use the C++ driver to link with instead of the default
# C driver. For example:
#MY_LDSHARED=$(CCC) -shared
MY_LDSHARED=$(CCC) -shared
# Same as above, but for statically linking Python and wxPython together,
# in other words, if you comment out the *shared* above. If this is the
@@ -32,14 +32,13 @@ TARGETDIR=..
#TARGETDIR=$(BINLIBDEST)/site-packages/wxPython
wxc wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
wxc wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
frames.cpp stattool.cpp utils.cpp \
frames.cpp stattool.cpp utils.cpp windows3.cpp \
# CFLAGS
-I. -I$(WXWIN)/include -I/usr/local/lib/glib/include -I$(WXWIN)/src \
-I/usr/X/include -DSWIG_GLOBAL -D__WXGTK__ \
-I. -I$(WXWIN)/include -I/usr/lib/glib/include -I$(WXWIN)/src \
-I/usr/X11R6/include -DSWIG_GLOBAL -D__WXGTK__ \
#-D__WXDEBUG__ \
# LFLAGS
-L$(WXWIN)/lib/solaris2.6 -L/usr/X/lib \
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1 \
-lwx_gtk -lgtk -lgdk -lglib -lXext -lX11 -lstdc++ -lgcc
-L$(WXWIN)/lib/Linux -L/usr/X11R6/lib \
-lwx_gtk2 -lgtk -lgdk -lglib -lXext -lX11

View File

@@ -34,11 +34,11 @@ TARGETDIR=..
wxc wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
frames.cpp stattool.cpp utils.cpp \
frames.cpp stattool.cpp utils.cpp windows3.cpp \
# CFLAGS
-I. -I$(WXWIN)/include -I/usr/lib/glib/include -I$(WXWIN)/src \
-I/usr/X11R6/include -DSWIG_GLOBAL -D__WXGTK__ \
#-D__WXDEBUG__ \
# LFLAGS
-L$(WXWIN)/lib/Linux -L/usr/X11R6/lib \
-lwx_gtk -lgtk -lgdk -lglib -lXext -lX11
-lwx_gtk2 -lgtk -lgdk -lglib -lXext -lX11

View File

@@ -34,7 +34,7 @@ TARGETDIR=..
wxc wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
frames.cpp stattool.cpp utils.cpp \
frames.cpp stattool.cpp utils.cpp windows3.cpp \
# CFLAGS
-I. -I$(WXWIN)/include -I/usr/local/lib/glib/include -I$(WXWIN)/src \
-I/usr/X/include -DSWIG_GLOBAL -D__WXGTK__ \
@@ -42,4 +42,4 @@ wxc wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
# LFLAGS
-L$(WXWIN)/lib/solaris2.6 -L/usr/X/lib \
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1 \
-lwx_gtk -lgtk -lgdk -lglib -lXext -lX11 -lstdc++ -lgcc
-lwx_gtk2 -lgtk -lgdk -lglib -lXext -lX11 -lstdc++ -lgcc

View File

@@ -115,7 +115,7 @@ enum {
wxMINOR_VERSION,
wxRELEASE_NUMBER,
NOT_FOUND,
wxNOT_FOUND,
wxVSCROLL,
wxHSCROLL,
@@ -154,6 +154,7 @@ enum {
wxDEFAULT_DIALOG_STYLE,
wxFRAME_TOOL_WINDOW,
wxCLIP_CHILDREN,
wxRETAINED,
wxBACKINGSTORE,
@@ -264,12 +265,14 @@ enum {
wxSIZE_AUTO,
wxSIZE_USE_EXISTING,
wxSIZE_ALLOW_MINUS_ONE,
#ifndef __WXGTK__
wxDF_TEXT,
wxDF_BITMAP,
wxDF_METAFILE,
wxDF_DIB,
wxDF_OEMTEXT,
wxDF_FILENAME,
#endif
wxPORTRAIT,
wxLANDSCAPE,
wxID_OPEN,
@@ -693,6 +696,7 @@ enum wxEventType {
wxEVT_COMMAND_TAB_SEL_CHANGING,
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
};
@@ -701,6 +705,12 @@ enum wxEventType {
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.10 1999/01/30 07:30:08 RD
// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
//
// Various cleanup, tweaks, minor additions, etc. to maintain
// compatibility with the current wxWindows.
//
// Revision 1.9 1998/12/15 20:41:13 RD
// Changed the import semantics from "from wxPython import *" to "from
// wxPython.wx import *" This is for people who are worried about

View File

@@ -462,6 +462,20 @@ def EVT_GRID_LABEL_RCLICK(win, fn):
win.Connect(-1, -1, wxEVT_GRID_LABEL_RCLICK, fn)
# wxSashWindow
def EVT_SASH_DRAGGED(win, id, func):
win.Connect(id, -1, wxEVT_SASH_DRAGGED, func)
def EVT_SASH_DRAGGED_RANGE(win, id1, id2, func):
win.Connect(id1, id2, wxEVT_SASH_DRAGGED, func)
def EVT_QUERY_LAYOUT_INFO(win, func):
win.Connect(-1, -1, wxEVT_EVT_QUERY_LAYOUT_INFO, func)
def EVT_CALCULATE_LAYOUT(win, func):
win.Connect(-1, -1, wxEVT_EVT_CALCULATE_LAYOUT, func)
#----------------------------------------------------------------------
@@ -490,9 +504,11 @@ wxNamedColor = wxNamedColour
wxPyDefaultPosition.Set(-1,-1)
wxPyDefaultSize.Set(-1,-1)
# aliases so that C++ documentation applies:
wxDefaultPosition = wxPyDefaultPosition
wxDefaultSize = wxPyDefaultSize
wxDefaultSize = wxPyDefaultSize
#----------------------------------------------------------------------
## class wxPyStdOutWindow(wxFrame):
@@ -560,6 +576,12 @@ class wxApp(wxPyApp):
#----------------------------------------------------------------------------
#
# $Log$
# Revision 1.9 1999/01/30 07:30:09 RD
# Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
#
# Various cleanup, tweaks, minor additions, etc. to maintain
# compatibility with the current wxWindows.
#
# Revision 1.8 1999/01/29 21:13:42 HH
# Added aliases for wxDefaultPosition and wxDefaultSize (from wxPy..) in _extras,
# so that C++ documentation applies.

View File

@@ -244,6 +244,7 @@ public:
void SetItemImage(const wxTreeItemId& item, int image);
void SetItemSelectedImage(const wxTreeItemId& item, int image);
void SetItemData(const wxTreeItemId& item, wxTreeItemData *data);
void SetItemHasChildren(const wxTreeItemId& item, bool hasChildren = TRUE);
bool IsVisible(const wxTreeItemId& item);
bool ItemHasChildren(const wxTreeItemId& item);
@@ -281,6 +282,7 @@ public:
wxTreeItemData *data = NULL);
void Delete(const wxTreeItemId& item);
void DeleteChildren(const wxTreeItemId& item);
void DeleteAllItems();
void Expand(const wxTreeItemId& item);
@@ -369,7 +371,14 @@ public:
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.14 1999/01/30 07:30:10 RD
// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
//
// Various cleanup, tweaks, minor additions, etc. to maintain
// compatibility with the current wxWindows.
//
// Revision 1.13 1998/12/17 14:07:34 RR
//
// Removed minor differences between wxMSW and wxGTK
//
// Revision 1.12 1998/12/16 22:10:52 RD

View File

@@ -17,7 +17,7 @@
#include "helpers.h"
#include <wx/metafile.h>
#ifndef __WXMSW__
#include <wx/postscrp.h>
#include <wx/dcps.h>
#endif
%}
@@ -147,7 +147,9 @@ public:
wxString GetFaceName();
int GetFamily();
#ifdef __WXMSW__
int GetFontId();
#endif
int GetPointSize();
int GetStyle();
bool GetUnderlined();
@@ -217,7 +219,7 @@ public:
void SetJoin(int join_style);
void SetStyle(int style);
void SetWidth(int width);
#ifdef __WXMSW__
// **** This one needs to return a list of ints (wxDash)
int GetDashes(wxDash **dashes);
@@ -502,7 +504,14 @@ public:
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.12 1999/01/30 07:30:11 RD
// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
//
// Various cleanup, tweaks, minor additions, etc. to maintain
// compatibility with the current wxWindows.
//
// Revision 1.11 1998/12/18 15:49:05 RR
//
// wxClipboard now serves the primary selection as well
// wxPython fixes
// warning mesages

View File

@@ -17,6 +17,10 @@
#undef LoadAccelerators
#endif
#ifdef __WXGTK__
#include "gtk/gtk.h"
#endif
#undef DEBUG
#include <Python.h>
#include "helpers.h"
@@ -71,7 +75,6 @@ int wxPyApp::MainLoop(void) {
void wxPyApp::AfterMainLoop(void) {
// more stuff from wxEntry...
#ifdef __WXMSW__
if (wxPythonApp->GetTopWindow()) {
// Forcibly delete the window.
if (wxPythonApp->GetTopWindow()->IsKindOf(CLASSINFO(wxFrame)) ||
@@ -85,18 +88,12 @@ void wxPyApp::AfterMainLoop(void) {
wxPythonApp->SetTopWindow(NULL);
}
}
#endif
#ifdef __WXGTK__
wxPythonApp->DeletePendingObjects();
#endif
wxPythonApp->OnExit();
#ifdef __WXMSW__
wxApp::CleanUp();
#endif
#ifdef __WXGTK__
wxApp::CommonCleanUp();
#endif
// delete wxPythonApp;
}
@@ -120,9 +117,8 @@ void __wxPreStart()
#ifdef __WXMSW__
wxApp::Initialize();
#endif
#ifdef __WXGTK__
wxClassInfo::InitializeClasses();
#ifdef __WXGTK__
PyObject* sysargv = PySys_GetObject("argv");
int argc = PyList_Size(sysargv);
char** argv = new char*[argc+1];
@@ -131,10 +127,11 @@ void __wxPreStart()
argv[x] = PyString_AsString(PyList_GetItem(sysargv, x));
argv[argc] = NULL;
gtk_set_locale();
gtk_init( &argc, &argv );
delete [] argv;
wxApp::CommonInit();
wxApp::Initialize(); // may return FALSE. Should we check?
#endif
}
@@ -183,12 +180,7 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args)
if (! bResult) {
wxPythonApp->DeletePendingObjects();
wxPythonApp->OnExit();
#ifdef __WXMSW__
wxApp::CleanUp();
#endif
#ifdef __WXGTK__
wxApp::CommonCleanUp();
#endif
PyErr_SetString(PyExc_SystemExit, "OnInit returned false, exiting...");
return NULL;
}
@@ -590,7 +582,14 @@ wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) {
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.17 1999/01/30 07:30:12 RD
// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
//
// Various cleanup, tweaks, minor additions, etc. to maintain
// compatibility with the current wxWindows.
//
// Revision 1.16 1998/12/17 14:07:39 RR
//
// Removed minor differences between wxMSW and wxGTK
//
// Revision 1.15 1998/12/15 20:41:19 RD

View File

@@ -56,7 +56,7 @@ TARGET = wxc
OBJECTS = wx.obj helpers.obj windows.obj events.obj \
misc.obj gdi.obj mdi.obj controls.obj \
controls2.obj windows2.obj cmndlgs.obj stattool.obj \
frames.obj \
frames.obj windows3.obj \
!if "$(SEPARATE)" == "0"
utils.obj
!else
@@ -72,7 +72,8 @@ PYMODULES = $(TARGETDIR)\wx.py $(TARGETDIR)\events.py \
$(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \
$(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \
$(TARGETDIR)\stattool.py $(TARGETDIR)\frames.py \
$(TARGETDIR)\utils.py $(TARGETDIR)\__init__.py
$(TARGETDIR)\utils.py $(TARGETDIR)\windows3.py \
$(TARGETDIR)\__init__.py
#----------------------------------------------------------------------
@@ -204,6 +205,7 @@ $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py : wx.i my_typemaps.i _defs.i _extras.py
# will write the shadow file to the right directory.
$(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i
$(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i
$(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.i my_typemaps.i _defs.i
$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i
$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i
$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i
@@ -225,6 +227,7 @@ $(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i
$(TARGETDIR)\wx.py : $(GENCODEDIR)\wx.py
$(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py
$(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py
$(TARGETDIR)\windows3.py : $(GENCODEDIR)\windows3.py
$(TARGETDIR)\events.py : $(GENCODEDIR)\events.py
$(TARGETDIR)\misc.py : $(GENCODEDIR)\misc.py
$(TARGETDIR)\gdi.py : $(GENCODEDIR)\gdi.py
@@ -238,10 +241,35 @@ $(TARGETDIR)\utils.py : $(GENCODEDIR)\utils.py
$(TARGETDIR)\__init__.py : __init__.py
SOURCES = $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py \
$(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py \
$(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py \
$(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py \
$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py \
$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py \
$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py \
$(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py \
$(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py \
$(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py\
$(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py \
$(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py \
$(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py \
$(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py \
sources : $(SOURCES)
#------------------------------------------------------------------------
#
# $Log$
# Revision 1.9 1999/01/30 07:30:13 RD
# Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
#
# Various cleanup, tweaks, minor additions, etc. to maintain
# compatibility with the current wxWindows.
#
# Revision 1.8 1998/12/21 19:58:06 RD
#
# Now compiles with /GX- on MSW.
#
# Revision 1.7 1998/12/15 20:41:20 RD

View File

@@ -115,7 +115,7 @@ public:
//---------------------------------------------------------------------------
// Dialog Functions
char* wxFileSelector(char* message,
wxString wxFileSelector(char* message,
char* default_path = NULL,
char* default_filename = NULL,
char* default_extension = NULL,
@@ -251,9 +251,9 @@ public:
void Above(wxWindow *otherWin, int margin=0);
void Absolute(int value);
void AsIs(void);
void AsIs();
void Below(wxWindow *otherWin, int margin=0);
void Unconstrained(void);
void Unconstrained();
void LeftOf(wxWindow *otherWin, int margin=0);
void PercentOf(wxWindow *otherWin, wxEdge edge, int percent);
void RightOf(wxWindow *otherWin, int margin=0);
@@ -360,7 +360,14 @@ public:
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.10 1999/01/30 07:30:14 RD
// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
//
// Various cleanup, tweaks, minor additions, etc. to maintain
// compatibility with the current wxWindows.
//
// Revision 1.9 1998/12/16 22:10:55 RD
//
// Tweaks needed to be able to build wxPython with wxGTK.
//
// Revision 1.8 1998/12/15 20:41:22 RD

View File

@@ -2728,6 +2728,38 @@ static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxTreeCtrl_SetItemHasChildren(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemHasChildren(_swigarg0,_swigarg1))
static PyObject *_wrap_wxTreeCtrl_SetItemHasChildren(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxTreeCtrl * _arg0;
wxTreeItemId * _arg1;
bool _arg2 = (1);
char * _argc0 = 0;
char * _argc1 = 0;
int tempbool2;
self = self;
if(!PyArg_ParseTuple(args,"ss|i:wxTreeCtrl_SetItemHasChildren",&_argc0,&_argc1,&tempbool2))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_SetItemHasChildren. Expected _wxTreeCtrl_p.");
return NULL;
}
}
if (_argc1) {
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxTreeItemId_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItemHasChildren. Expected _wxTreeItemId_p.");
return NULL;
}
}
_arg2 = (bool ) tempbool2;
wxTreeCtrl_SetItemHasChildren(_arg0,*_arg1,_arg2);
Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxTreeCtrl_IsVisible(_swigobj,_swigarg0) (_swigobj->IsVisible(_swigarg0))
static PyObject *_wrap_wxTreeCtrl_IsVisible(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -3399,6 +3431,35 @@ static PyObject *_wrap_wxTreeCtrl_Delete(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxTreeCtrl_DeleteChildren(_swigobj,_swigarg0) (_swigobj->DeleteChildren(_swigarg0))
static PyObject *_wrap_wxTreeCtrl_DeleteChildren(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxTreeCtrl * _arg0;
wxTreeItemId * _arg1;
char * _argc0 = 0;
char * _argc1 = 0;
self = self;
if(!PyArg_ParseTuple(args,"ss:wxTreeCtrl_DeleteChildren",&_argc0,&_argc1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_DeleteChildren. Expected _wxTreeCtrl_p.");
return NULL;
}
}
if (_argc1) {
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxTreeItemId_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_DeleteChildren. Expected _wxTreeItemId_p.");
return NULL;
}
}
wxTreeCtrl_DeleteChildren(_arg0,*_arg1);
Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxTreeCtrl_DeleteAllItems(_swigobj) (_swigobj->DeleteAllItems())
static PyObject *_wrap_wxTreeCtrl_DeleteAllItems(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -3838,6 +3899,7 @@ static PyMethodDef controls2cMethods[] = {
{ "wxTreeCtrl_Collapse", _wrap_wxTreeCtrl_Collapse, 1 },
{ "wxTreeCtrl_Expand", _wrap_wxTreeCtrl_Expand, 1 },
{ "wxTreeCtrl_DeleteAllItems", _wrap_wxTreeCtrl_DeleteAllItems, 1 },
{ "wxTreeCtrl_DeleteChildren", _wrap_wxTreeCtrl_DeleteChildren, 1 },
{ "wxTreeCtrl_Delete", _wrap_wxTreeCtrl_Delete, 1 },
{ "wxTreeCtrl_AppendItem", _wrap_wxTreeCtrl_AppendItem, 1 },
{ "wxTreeCtrl_InsertItem", _wrap_wxTreeCtrl_InsertItem, 1 },
@@ -3857,6 +3919,7 @@ static PyMethodDef controls2cMethods[] = {
{ "wxTreeCtrl_IsExpanded", _wrap_wxTreeCtrl_IsExpanded, 1 },
{ "wxTreeCtrl_ItemHasChildren", _wrap_wxTreeCtrl_ItemHasChildren, 1 },
{ "wxTreeCtrl_IsVisible", _wrap_wxTreeCtrl_IsVisible, 1 },
{ "wxTreeCtrl_SetItemHasChildren", _wrap_wxTreeCtrl_SetItemHasChildren, 1 },
{ "wxTreeCtrl_SetItemData", _wrap_wxTreeCtrl_SetItemData, 1 },
{ "wxTreeCtrl_SetItemSelectedImage", _wrap_wxTreeCtrl_SetItemSelectedImage, 1 },
{ "wxTreeCtrl_SetItemImage", _wrap_wxTreeCtrl_SetItemImage, 1 },

View File

@@ -446,6 +446,9 @@ class wxTreeCtrlPtr(wxControlPtr):
def SetItemData(self,arg0,arg1):
val = controls2c.wxTreeCtrl_SetItemData(self.this,arg0.this,arg1.this)
return val
def SetItemHasChildren(self,arg0,*args):
val = apply(controls2c.wxTreeCtrl_SetItemHasChildren,(self.this,arg0.this,)+args)
return val
def IsVisible(self,arg0):
val = controls2c.wxTreeCtrl_IsVisible(self.this,arg0.this)
return val
@@ -543,6 +546,9 @@ class wxTreeCtrlPtr(wxControlPtr):
def Delete(self,arg0):
val = controls2c.wxTreeCtrl_Delete(self.this,arg0.this)
return val
def DeleteChildren(self,arg0):
val = controls2c.wxTreeCtrl_DeleteChildren(self.this,arg0.this)
return val
def DeleteAllItems(self):
val = controls2c.wxTreeCtrl_DeleteAllItems(self.this)
return val

View File

@@ -56,7 +56,7 @@ extern PyObject *SWIG_newvarlink(void);
#include "helpers.h"
#include <wx/metafile.h>
#ifndef __WXMSW__
#include <wx/postscrp.h>
#include <wx/dcps.h>
#endif
static PyObject* l_output_helper(PyObject* target, PyObject* o) {

View File

@@ -122,7 +122,7 @@ static char* wxStringErrorMsg = "string type is required for parameter";
}
static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args) {
PyObject * _resultobj;
char * _result;
wxString * _result;
char * _arg0;
char * _arg1 = NULL;
char * _arg2 = NULL;
@@ -143,8 +143,13 @@ static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args) {
return NULL;
}
}
_result = (char *)wxFileSelector(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8);
_resultobj = Py_BuildValue("s", _result);
_result = new wxString (wxFileSelector(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8));
{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
}
{
delete _result;
}
return _resultobj;
}

View File

@@ -1033,6 +1033,70 @@ static PyObject *_wrap_wxToolBar_AddTool(PyObject *self, PyObject *args) {
return _resultobj;
}
static wxToolBarTool * wxToolBar_AddSimpleTool(wxToolBar *self,int toolIndex,const wxBitmap & bitmap,const wxString & shortHelpString,const wxString & longHelpString) {
return self->AddTool(toolIndex, bitmap, wxNullBitmap,
FALSE, -1, -1, NULL,
shortHelpString, longHelpString);
}
static PyObject *_wrap_wxToolBar_AddSimpleTool(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxToolBarTool * _result;
wxToolBar * _arg0;
int _arg1;
wxBitmap * _arg2;
wxString * _arg3 = &wxPyEmptyStr;
wxString * _arg4 = &wxPyEmptyStr;
char * _argc0 = 0;
char * _argc2 = 0;
PyObject * _obj3 = 0;
PyObject * _obj4 = 0;
char _ptemp[128];
self = self;
if(!PyArg_ParseTuple(args,"sis|OO:wxToolBar_AddSimpleTool",&_argc0,&_arg1,&_argc2,&_obj3,&_obj4))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxToolBar_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_AddSimpleTool. Expected _wxToolBar_p.");
return NULL;
}
}
if (_argc2) {
if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_wxBitmap_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxToolBar_AddSimpleTool. Expected _wxBitmap_p.");
return NULL;
}
}
if (_obj3)
{
if (!PyString_Check(_obj3)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg3 = new wxString(PyString_AsString(_obj3));
}
if (_obj4)
{
if (!PyString_Check(_obj4)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg4 = new wxString(PyString_AsString(_obj4));
}
_result = (wxToolBarTool *)wxToolBar_AddSimpleTool(_arg0,_arg1,*_arg2,*_arg3,*_arg4);
SWIG_MakePtr(_ptemp, (char *) _result,"_wxToolBarTool_p");
_resultobj = Py_BuildValue("s",_ptemp);
{
if (_obj3)
delete _arg3;
}
{
if (_obj4)
delete _arg4;
}
return _resultobj;
}
#define wxToolBar_EnableTool(_swigobj,_swigarg0,_swigarg1) (_swigobj->EnableTool(_swigarg0,_swigarg1))
static PyObject *_wrap_wxToolBar_EnableTool(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -1530,6 +1594,7 @@ static PyMethodDef stattoolcMethods[] = {
{ "wxToolBar_GetToolSize", _wrap_wxToolBar_GetToolSize, 1 },
{ "wxToolBar_FindToolForPosition", _wrap_wxToolBar_FindToolForPosition, 1 },
{ "wxToolBar_EnableTool", _wrap_wxToolBar_EnableTool, 1 },
{ "wxToolBar_AddSimpleTool", _wrap_wxToolBar_AddSimpleTool, 1 },
{ "wxToolBar_AddTool", _wrap_wxToolBar_AddTool, 1 },
{ "wxToolBar_AddSeparator", _wrap_wxToolBar_AddSeparator, 1 },
{ "new_wxToolBar", _wrap_new_wxToolBar, 1 },

View File

@@ -186,6 +186,10 @@ class wxToolBarPtr(wxControlPtr):
val = apply(stattoolc.wxToolBar_AddTool,(self.this,arg0,arg1.this,)+args)
val = wxToolBarToolPtr(val)
return val
def AddSimpleTool(self,arg0,arg1,*args):
val = apply(stattoolc.wxToolBar_AddSimpleTool,(self.this,arg0,arg1.this,)+args)
val = wxToolBarToolPtr(val)
return val
def EnableTool(self,arg0,arg1):
val = stattoolc.wxToolBar_EnableTool(self.this,arg0,arg1)
return val

View File

@@ -2889,7 +2889,7 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args) {
wxWindowID _arg1;
wxPoint * _arg2 = &wxPyDefaultPosition;
wxSize * _arg3 = &wxPyDefaultSize;
long _arg4 = (wxSP_3D)|wxCLIP_CHILDREN;
long _arg4 = (wxSP_3D)|(wxCLIP_CHILDREN);
char * _arg5 = "splitterWindow";
char * _argc0 = 0;
char * _argc2 = 0;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,293 @@
# This file was created automatically by SWIG.
import windows3c
from misc import *
from gdi import *
from windows import *
from windows2 import *
from controls import *
from events import *
from mdi import *
from frames import *
from stattool import *
import wx
class wxSashEventPtr(wxCommandEventPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def SetEdge(self,arg0):
val = windows3c.wxSashEvent_SetEdge(self.this,arg0)
return val
def GetEdge(self):
val = windows3c.wxSashEvent_GetEdge(self.this)
return val
def SetDragRect(self,arg0):
val = windows3c.wxSashEvent_SetDragRect(self.this,arg0.this)
return val
def GetDragRect(self):
val = windows3c.wxSashEvent_GetDragRect(self.this)
val = wxRectPtr(val)
val.thisown = 1
return val
def SetDragStatus(self,arg0):
val = windows3c.wxSashEvent_SetDragStatus(self.this,arg0)
return val
def GetDragStatus(self):
val = windows3c.wxSashEvent_GetDragStatus(self.this)
return val
def __repr__(self):
return "<C wxSashEvent instance>"
class wxSashEvent(wxSashEventPtr):
def __init__(self,this):
self.this = this
class wxSashWindowPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def GetSashVisible(self,arg0):
val = windows3c.wxSashWindow_GetSashVisible(self.this,arg0)
return val
def GetDefaultBorderSize(self):
val = windows3c.wxSashWindow_GetDefaultBorderSize(self.this)
return val
def GetEdgeMargin(self,arg0):
val = windows3c.wxSashWindow_GetEdgeMargin(self.this,arg0)
return val
def GetExtraBorderSize(self):
val = windows3c.wxSashWindow_GetExtraBorderSize(self.this)
return val
def GetMaximumSizeX(self):
val = windows3c.wxSashWindow_GetMaximumSizeX(self.this)
return val
def GetMaximumSizeY(self):
val = windows3c.wxSashWindow_GetMaximumSizeY(self.this)
return val
def GetMinimumSizeX(self):
val = windows3c.wxSashWindow_GetMinimumSizeX(self.this)
return val
def GetMinimumSizeY(self):
val = windows3c.wxSashWindow_GetMinimumSizeY(self.this)
return val
def HasBorder(self,arg0):
val = windows3c.wxSashWindow_HasBorder(self.this,arg0)
return val
def SetDefaultBorderSize(self,arg0):
val = windows3c.wxSashWindow_SetDefaultBorderSize(self.this,arg0)
return val
def SetExtraBorderSize(self,arg0):
val = windows3c.wxSashWindow_SetExtraBorderSize(self.this,arg0)
return val
def SetMaximumSizeX(self,arg0):
val = windows3c.wxSashWindow_SetMaximumSizeX(self.this,arg0)
return val
def SetMaximumSizeY(self,arg0):
val = windows3c.wxSashWindow_SetMaximumSizeY(self.this,arg0)
return val
def SetMinimumSizeX(self,arg0):
val = windows3c.wxSashWindow_SetMinimumSizeX(self.this,arg0)
return val
def SetMinimumSizeY(self,arg0):
val = windows3c.wxSashWindow_SetMinimumSizeY(self.this,arg0)
return val
def SetSashVisible(self,arg0,arg1):
val = windows3c.wxSashWindow_SetSashVisible(self.this,arg0,arg1)
return val
def SetSashBorder(self,arg0,arg1):
val = windows3c.wxSashWindow_SetSashBorder(self.this,arg0,arg1)
return val
def __repr__(self):
return "<C wxSashWindow instance>"
class wxSashWindow(wxSashWindowPtr):
def __init__(self,arg0,arg1,*args) :
argl = map(None,args)
try: argl[0] = argl[0].this
except: pass
try: argl[1] = argl[1].this
except: pass
args = tuple(argl)
self.this = apply(windows3c.new_wxSashWindow,(arg0.this,arg1,)+args)
self.thisown = 1
wx._StdWindowCallbacks(self)
class wxQueryLayoutInfoEventPtr(wxEventPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def SetRequestedLength(self,arg0):
val = windows3c.wxQueryLayoutInfoEvent_SetRequestedLength(self.this,arg0)
return val
def GetRequestedLength(self):
val = windows3c.wxQueryLayoutInfoEvent_GetRequestedLength(self.this)
return val
def SetFlags(self,arg0):
val = windows3c.wxQueryLayoutInfoEvent_SetFlags(self.this,arg0)
return val
def GetFlags(self):
val = windows3c.wxQueryLayoutInfoEvent_GetFlags(self.this)
return val
def SetSize(self,arg0):
val = windows3c.wxQueryLayoutInfoEvent_SetSize(self.this,arg0.this)
return val
def GetSize(self):
val = windows3c.wxQueryLayoutInfoEvent_GetSize(self.this)
val = wxSizePtr(val)
val.thisown = 1
return val
def SetOrientation(self,arg0):
val = windows3c.wxQueryLayoutInfoEvent_SetOrientation(self.this,arg0)
return val
def GetOrientation(self):
val = windows3c.wxQueryLayoutInfoEvent_GetOrientation(self.this)
return val
def SetAlignment(self,arg0):
val = windows3c.wxQueryLayoutInfoEvent_SetAlignment(self.this,arg0)
return val
def GetAlignment(self):
val = windows3c.wxQueryLayoutInfoEvent_GetAlignment(self.this)
return val
def __repr__(self):
return "<C wxQueryLayoutInfoEvent instance>"
class wxQueryLayoutInfoEvent(wxQueryLayoutInfoEventPtr):
def __init__(self,this):
self.this = this
class wxCalculateLayoutEventPtr(wxEventPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def SetFlags(self,arg0):
val = windows3c.wxCalculateLayoutEvent_SetFlags(self.this,arg0)
return val
def GetFlags(self):
val = windows3c.wxCalculateLayoutEvent_GetFlags(self.this)
return val
def SetRect(self,arg0):
val = windows3c.wxCalculateLayoutEvent_SetRect(self.this,arg0.this)
return val
def GetRect(self):
val = windows3c.wxCalculateLayoutEvent_GetRect(self.this)
val = wxRectPtr(val)
val.thisown = 1
return val
def __repr__(self):
return "<C wxCalculateLayoutEvent instance>"
class wxCalculateLayoutEvent(wxCalculateLayoutEventPtr):
def __init__(self,this):
self.this = this
class wxSashLayoutWindowPtr(wxSashWindowPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def GetAlignment(self):
val = windows3c.wxSashLayoutWindow_GetAlignment(self.this)
return val
def GetOrientation(self):
val = windows3c.wxSashLayoutWindow_GetOrientation(self.this)
return val
def SetAlignment(self,arg0):
val = windows3c.wxSashLayoutWindow_SetAlignment(self.this,arg0)
return val
def SetDefaultSize(self,arg0):
val = windows3c.wxSashLayoutWindow_SetDefaultSize(self.this,arg0.this)
return val
def SetOrientation(self,arg0):
val = windows3c.wxSashLayoutWindow_SetOrientation(self.this,arg0)
return val
def __repr__(self):
return "<C wxSashLayoutWindow instance>"
class wxSashLayoutWindow(wxSashLayoutWindowPtr):
def __init__(self,arg0,arg1,*args) :
argl = map(None,args)
try: argl[0] = argl[0].this
except: pass
try: argl[1] = argl[1].this
except: pass
args = tuple(argl)
self.this = apply(windows3c.new_wxSashLayoutWindow,(arg0.this,arg1,)+args)
self.thisown = 1
wx._StdWindowCallbacks(self)
wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT)
wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO)
class wxLayoutAlgorithmPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
if self.thisown == 1 :
windows3c.delete_wxLayoutAlgorithm(self.this)
def LayoutMDIFrame(self,arg0,*args):
argl = map(None,args)
try: argl[0] = argl[0].this
except: pass
args = tuple(argl)
val = apply(windows3c.wxLayoutAlgorithm_LayoutMDIFrame,(self.this,arg0.this,)+args)
return val
def LayoutFrame(self,arg0,*args):
argl = map(None,args)
try: argl[0] = argl[0].this
except: pass
args = tuple(argl)
val = apply(windows3c.wxLayoutAlgorithm_LayoutFrame,(self.this,arg0.this,)+args)
return val
def __repr__(self):
return "<C wxLayoutAlgorithm instance>"
class wxLayoutAlgorithm(wxLayoutAlgorithmPtr):
def __init__(self) :
self.this = windows3c.new_wxLayoutAlgorithm()
self.thisown = 1
#-------------- FUNCTION WRAPPERS ------------------
#-------------- VARIABLE WRAPPERS ------------------
wxSASH_TOP = windows3c.wxSASH_TOP
wxSASH_RIGHT = windows3c.wxSASH_RIGHT
wxSASH_BOTTOM = windows3c.wxSASH_BOTTOM
wxSASH_LEFT = windows3c.wxSASH_LEFT
wxSASH_NONE = windows3c.wxSASH_NONE
wxEVT_SASH_DRAGGED = windows3c.wxEVT_SASH_DRAGGED
wxSW_3D = windows3c.wxSW_3D
wxSASH_STATUS_OK = windows3c.wxSASH_STATUS_OK
wxSASH_STATUS_OUT_OF_RANGE = windows3c.wxSASH_STATUS_OUT_OF_RANGE
wxLAYOUT_HORIZONTAL = windows3c.wxLAYOUT_HORIZONTAL
wxLAYOUT_VERTICAL = windows3c.wxLAYOUT_VERTICAL
wxLAYOUT_NONE = windows3c.wxLAYOUT_NONE
wxLAYOUT_TOP = windows3c.wxLAYOUT_TOP
wxLAYOUT_LEFT = windows3c.wxLAYOUT_LEFT
wxLAYOUT_RIGHT = windows3c.wxLAYOUT_RIGHT
wxLAYOUT_BOTTOM = windows3c.wxLAYOUT_BOTTOM
wxEVT_QUERY_LAYOUT_INFO = windows3c.wxEVT_QUERY_LAYOUT_INFO
wxEVT_CALCULATE_LAYOUT = windows3c.wxEVT_CALCULATE_LAYOUT

View File

@@ -33,14 +33,11 @@
* and things like that.
*
* $Log$
* Revision 1.4 1999/01/14 14:33:56 VZ
* 1. NOT_FOUND -> wxNOT_FOUND
* 2. wxString::Left(), Right(), Before(), After() clean up
* 3. wxLocale updates
* Revision 1.5 1999/01/30 07:31:09 RD
* Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
*
* Revision 1.3 1998/12/21 19:59:01 RD
*
* Now compiles with /GX- on MSW.
* Various cleanup, tweaks, minor additions, etc. to maintain
* compatibility with the current wxWindows.
*
************************************************************************/
@@ -635,6 +632,8 @@ extern "C" SWIGEXPORT(void,initcmndlgsc)();
extern "C" SWIGEXPORT(void,initstattoolc)();
extern "C" SWIGEXPORT(void,initframesc)();
extern "C" SWIGEXPORT(void,initutilsc)();
extern "C" SWIGEXPORT(void,initwindows3c)();
static int _wrap_wxPyDefaultPosition_set(PyObject *val) {
@@ -1222,7 +1221,7 @@ SWIGEXPORT(void,initwxc)() {
PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long) wxMAJOR_VERSION));
PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long) wxMINOR_VERSION));
PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long) wxRELEASE_NUMBER));
PyDict_SetItemString(d,"wxNOT_FOUND", PyInt_FromLong((long) NOT_FOUND));
PyDict_SetItemString(d,"wxNOT_FOUND", PyInt_FromLong((long) wxNOT_FOUND));
PyDict_SetItemString(d,"wxVSCROLL", PyInt_FromLong((long) wxVSCROLL));
PyDict_SetItemString(d,"wxHSCROLL", PyInt_FromLong((long) wxHSCROLL));
PyDict_SetItemString(d,"wxCAPTION", PyInt_FromLong((long) wxCAPTION));
@@ -1258,6 +1257,7 @@ SWIGEXPORT(void,initwxc)() {
PyDict_SetItemString(d,"wxDEFAULT_FRAME_STYLE", PyInt_FromLong((long) wxDEFAULT_FRAME_STYLE));
PyDict_SetItemString(d,"wxDEFAULT_DIALOG_STYLE", PyInt_FromLong((long) wxDEFAULT_DIALOG_STYLE));
PyDict_SetItemString(d,"wxFRAME_TOOL_WINDOW", PyInt_FromLong((long) wxFRAME_TOOL_WINDOW));
PyDict_SetItemString(d,"wxCLIP_CHILDREN", PyInt_FromLong((long) wxCLIP_CHILDREN));
PyDict_SetItemString(d,"wxRETAINED", PyInt_FromLong((long) wxRETAINED));
PyDict_SetItemString(d,"wxBACKINGSTORE", PyInt_FromLong((long) wxBACKINGSTORE));
PyDict_SetItemString(d,"wxTB_3DBUTTONS", PyInt_FromLong((long) wxTB_3DBUTTONS));
@@ -1729,7 +1729,7 @@ SWIGEXPORT(void,initwxc)() {
PyDict_SetItemString(d,"wxEVT_COMMAND_TAB_SEL_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_TAB_SEL_CHANGING));
PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED));
PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING));
PyDict_SetItemString(d,"__version__", PyString_FromString("0.5.2"));
PyDict_SetItemString(d,"__version__", PyString_FromString("0.5.3"));
PyDict_SetItemString(d,"cvar", SWIG_globals);
SWIG_addvarlink(SWIG_globals,"wxPyDefaultPosition",_wrap_wxPyDefaultPosition_get, _wrap_wxPyDefaultPosition_set);
SWIG_addvarlink(SWIG_globals,"wxPyDefaultSize",_wrap_wxPyDefaultSize_get, _wrap_wxPyDefaultSize_set);
@@ -1753,6 +1753,7 @@ SWIGEXPORT(void,initwxc)() {
initcmndlgsc();
initstattoolc();
initframesc();
initwindows3c();
#ifndef SEPARATE
initutilsc();
#endif
@@ -1792,12 +1793,15 @@ SWIGEXPORT(void,initwxc)() {
SWIG_RegisterMapping("_long","_signed_long",0);
SWIG_RegisterMapping("_wxDropFilesEvent","_class_wxDropFilesEvent",0);
SWIG_RegisterMapping("_wxBitmapButton","_class_wxBitmapButton",0);
SWIG_RegisterMapping("_wxSashWindow","_class_wxSashWindow",0);
SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0);
SWIG_RegisterMapping("_class_wxGauge","_wxGauge",0);
SWIG_RegisterMapping("_class_wxSashEvent","_wxSashEvent",0);
SWIG_RegisterMapping("_wxDC","_class_wxDC",0);
SWIG_RegisterMapping("_wxListEvent","_class_wxListEvent",0);
SWIG_RegisterMapping("_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0);
SWIG_RegisterMapping("_wxSpinEvent","_class_wxSpinEvent",0);
SWIG_RegisterMapping("_wxSashLayoutWindow","_class_wxSashLayoutWindow",0);
SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0);
SWIG_RegisterMapping("_wxPrinterDC","_class_wxPrinterDC",0);
SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0);
@@ -1818,9 +1822,11 @@ SWIGEXPORT(void,initwxc)() {
SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0);
SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0);
SWIG_RegisterMapping("_wxToolBar","_class_wxToolBar",0);
SWIG_RegisterMapping("_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0);
SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0);
SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0);
SWIG_RegisterMapping("_class_wxNotebookEvent","_wxNotebookEvent",0);
SWIG_RegisterMapping("_class_wxSashWindow","_wxSashWindow",0);
SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0);
SWIG_RegisterMapping("_uint","_unsigned_int",0);
SWIG_RegisterMapping("_uint","_int",0);
@@ -1832,6 +1838,7 @@ SWIGEXPORT(void,initwxc)() {
SWIG_RegisterMapping("_wxCommandEvent","_class_wxCommandEvent",0);
SWIG_RegisterMapping("_wxSizeEvent","_class_wxSizeEvent",0);
SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0);
SWIG_RegisterMapping("_class_wxSashLayoutWindow","_wxSashLayoutWindow",0);
SWIG_RegisterMapping("_class_wxButton","_wxButton",0);
SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0);
SWIG_RegisterMapping("_wxTreeItemData","_class_wxTreeItemData",0);
@@ -1856,6 +1863,7 @@ SWIGEXPORT(void,initwxc)() {
SWIG_RegisterMapping("_wxListItem","_class_wxListItem",0);
SWIG_RegisterMapping("_class_wxToolBar","_wxToolBar",0);
SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0);
SWIG_RegisterMapping("_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0);
SWIG_RegisterMapping("_EBool","_signed_int",0);
SWIG_RegisterMapping("_EBool","_int",0);
SWIG_RegisterMapping("_EBool","_wxWindowID",0);
@@ -1907,6 +1915,7 @@ SWIGEXPORT(void,initwxc)() {
SWIG_RegisterMapping("_class_wxStaticText","_wxStaticText",0);
SWIG_RegisterMapping("_class_wxFont","_wxFont",0);
SWIG_RegisterMapping("_class_wxCloseEvent","_wxCloseEvent",0);
SWIG_RegisterMapping("_wxSashEvent","_class_wxSashEvent",0);
SWIG_RegisterMapping("_class_wxMenuEvent","_wxMenuEvent",0);
SWIG_RegisterMapping("_wxClientDC","_class_wxClientDC",0);
SWIG_RegisterMapping("_wxMouseEvent","_class_wxMouseEvent",0);
@@ -1945,14 +1954,17 @@ SWIGEXPORT(void,initwxc)() {
SWIG_RegisterMapping("_class_wxListItem","_wxListItem",0);
SWIG_RegisterMapping("_class_wxPen","_wxPen",0);
SWIG_RegisterMapping("_class_wxFileDialog","_wxFileDialog",0);
SWIG_RegisterMapping("_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0);
SWIG_RegisterMapping("_short","_WXTYPE",0);
SWIG_RegisterMapping("_short","_unsigned_short",0);
SWIG_RegisterMapping("_short","_signed_short",0);
SWIG_RegisterMapping("_class_wxStaticBox","_wxStaticBox",0);
SWIG_RegisterMapping("_wxLayoutAlgorithm","_class_wxLayoutAlgorithm",0);
SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0);
SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0);
SWIG_RegisterMapping("_class_wxChoice","_wxChoice",0);
SWIG_RegisterMapping("_class_wxSlider","_wxSlider",0);
SWIG_RegisterMapping("_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0);
SWIG_RegisterMapping("_class_wxBitmapButton","_wxBitmapButton",0);
SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0);
SWIG_RegisterMapping("_class_wxNotebook","_wxNotebook",0);
@@ -2031,6 +2043,7 @@ SWIGEXPORT(void,initwxc)() {
SWIG_RegisterMapping("_wxMoveEvent","_class_wxMoveEvent",0);
SWIG_RegisterMapping("_wxColourData","_class_wxColourData",0);
SWIG_RegisterMapping("_class_wxPalette","_wxPalette",0);
SWIG_RegisterMapping("_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0);
SWIG_RegisterMapping("_class_wxEraseEvent","_wxEraseEvent",0);
SWIG_RegisterMapping("_wxMDIClientWindow","_class_wxMDIClientWindow",0);
SWIG_RegisterMapping("_class_wxFontDialog","_wxFontDialog",0);

View File

@@ -23,6 +23,8 @@ from windows2 import *
from cmndlgs import *
from windows3 import *
from utils import *
class wxPyAppPtr(wxEvtHandlerPtr):
def __init__(self,this):
@@ -114,7 +116,7 @@ _wxSetDictionary = wxc._wxSetDictionary
wxMAJOR_VERSION = wxc.wxMAJOR_VERSION
wxMINOR_VERSION = wxc.wxMINOR_VERSION
wxRELEASE_NUMBER = wxc.wxRELEASE_NUMBER
NOT_FOUND = wxc.NOT_FOUND
wxNOT_FOUND = wxc.wxNOT_FOUND
wxVSCROLL = wxc.wxVSCROLL
wxHSCROLL = wxc.wxHSCROLL
wxCAPTION = wxc.wxCAPTION
@@ -150,6 +152,7 @@ wxDIALOG_MODELESS = wxc.wxDIALOG_MODELESS
wxDEFAULT_FRAME_STYLE = wxc.wxDEFAULT_FRAME_STYLE
wxDEFAULT_DIALOG_STYLE = wxc.wxDEFAULT_DIALOG_STYLE
wxFRAME_TOOL_WINDOW = wxc.wxFRAME_TOOL_WINDOW
wxCLIP_CHILDREN = wxc.wxCLIP_CHILDREN
wxRETAINED = wxc.wxRETAINED
wxBACKINGSTORE = wxc.wxBACKINGSTORE
wxTB_3DBUTTONS = wxc.wxTB_3DBUTTONS
@@ -1093,6 +1096,20 @@ def EVT_GRID_LABEL_RCLICK(win, fn):
win.Connect(-1, -1, wxEVT_GRID_LABEL_RCLICK, fn)
# wxSashWindow
def EVT_SASH_DRAGGED(win, id, func):
win.Connect(id, -1, wxEVT_SASH_DRAGGED, func)
def EVT_SASH_DRAGGED_RANGE(win, id1, id2, func):
win.Connect(id1, id2, wxEVT_SASH_DRAGGED, func)
def EVT_QUERY_LAYOUT_INFO(win, func):
win.Connect(-1, -1, wxEVT_EVT_QUERY_LAYOUT_INFO, func)
def EVT_CALCULATE_LAYOUT(win, func):
win.Connect(-1, -1, wxEVT_EVT_CALCULATE_LAYOUT, func)
#----------------------------------------------------------------------
@@ -1122,6 +1139,10 @@ wxNamedColor = wxNamedColour
wxPyDefaultPosition.Set(-1,-1)
wxPyDefaultSize.Set(-1,-1)
# aliases so that C++ documentation applies:
wxDefaultPosition = wxPyDefaultPosition
wxDefaultSize = wxPyDefaultSize
#----------------------------------------------------------------------
## class wxPyStdOutWindow(wxFrame):
@@ -1189,8 +1210,15 @@ class wxApp(wxPyApp):
#----------------------------------------------------------------------------
#
# $Log$
# Revision 1.3 1998/12/21 19:59:03 RD
# Now compiles with /GX- on MSW.
# Revision 1.4 1999/01/30 07:31:12 RD
# Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
#
# Various cleanup, tweaks, minor additions, etc. to maintain
# compatibility with the current wxWindows.
#
# Revision 1.8 1999/01/29 21:13:42 HH
# Added aliases for wxDefaultPosition and wxDefaultSize (from wxPy..) in _extras,
# so that C++ documentation applies.
#
# Revision 1.7 1998/11/25 08:45:21 RD
#

View File

@@ -114,7 +114,7 @@ public:
%pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
void AddSeparator(void);
void AddSeparator();
// Ignoge the clientData for now...
%addmethods {
@@ -131,8 +131,18 @@ public:
isToggle, xPos, yPos, NULL,
shortHelpString, longHelpString);
}
wxToolBarTool* AddSimpleTool(int toolIndex,
const wxBitmap& bitmap,
const wxString& shortHelpString = wxPyEmptyStr,
const wxString& longHelpString = wxPyEmptyStr) {
return self->AddTool(toolIndex, bitmap, wxNullBitmap,
FALSE, -1, -1, NULL,
shortHelpString, longHelpString);
}
}
// void DrawTool(wxMemoryDC& memDC, wxToolBarTool* tool);
void EnableTool(int toolIndex, const bool enable);
#ifdef __WXMSW__
@@ -157,7 +167,7 @@ public:
//void OnRightClick(int toolIndex, float x, float y);
bool Realize();
void SetToolLongHelp(int toolIndex, const wxString& helpString);
void SetToolShortHelp(int toolIndex, const wxString& helpString);
void SetMargins(const wxSize& size);
@@ -201,7 +211,14 @@ public:
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.5 1999/01/30 07:30:15 RD
// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
//
// Various cleanup, tweaks, minor additions, etc. to maintain
// compatibility with the current wxWindows.
//
// Revision 1.4 1998/12/17 14:07:43 RR
//
// Removed minor differences between wxMSW and wxGTK
//
// Revision 1.3 1998/12/15 20:41:23 RD

View File

@@ -0,0 +1,193 @@
/////////////////////////////////////////////////////////////////////////////
// Name: windows3.i
// Purpose: SWIG definitions of MORE window classes
//
// Author: Robin Dunn
//
// Created: 22-Dec-1998
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
%module windows3
%{
#include "helpers.h"
#include <wx/sashwin.h>
#include <wx/laywin.h>
%}
//----------------------------------------------------------------------
%include typemaps.i
%include my_typemaps.i
// Import some definitions of other classes, etc.
%import _defs.i
%import misc.i
%import gdi.i
%import windows.i
%import windows2.i
%import mdi.i
%import events.i
%pragma(python) code = "import wx"
//---------------------------------------------------------------------------
enum wxSashEdgePosition {
wxSASH_TOP = 0,
wxSASH_RIGHT,
wxSASH_BOTTOM,
wxSASH_LEFT,
wxSASH_NONE = 100
};
enum {
wxEVT_SASH_DRAGGED,
wxSW_3D,
};
enum wxSashDragStatus
{
wxSASH_STATUS_OK,
wxSASH_STATUS_OUT_OF_RANGE
};
class wxSashEvent : public wxCommandEvent {
public:
void SetEdge(wxSashEdgePosition edge);
wxSashEdgePosition GetEdge();
void SetDragRect(const wxRect& rect);
wxRect GetDragRect();
void SetDragStatus(wxSashDragStatus status);
wxSashDragStatus GetDragStatus();
};
class wxSashWindow: public wxWindow {
public:
wxSashWindow(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxPyDefaultPosition,
const wxSize& size = wxPyDefaultSize,
long style = wxCLIP_CHILDREN | wxSW_3D,
const char* name = "sashWindow");
%pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
bool GetSashVisible(wxSashEdgePosition edge);
int GetDefaultBorderSize();
int GetEdgeMargin(wxSashEdgePosition edge);
int GetExtraBorderSize();
int GetMaximumSizeX();
int GetMaximumSizeY();
int GetMinimumSizeX();
int GetMinimumSizeY();
bool HasBorder(wxSashEdgePosition edge);
void SetDefaultBorderSize(int width);
void SetExtraBorderSize(int width);
void SetMaximumSizeX(int min);
void SetMaximumSizeY(int min);
void SetMinimumSizeX(int min);
void SetMinimumSizeY(int min);
void SetSashVisible(wxSashEdgePosition edge, bool visible);
void SetSashBorder(wxSashEdgePosition edge, bool hasBorder);
};
//---------------------------------------------------------------------------
enum wxLayoutOrientation {
wxLAYOUT_HORIZONTAL,
wxLAYOUT_VERTICAL
};
enum wxLayoutAlignment {
wxLAYOUT_NONE,
wxLAYOUT_TOP,
wxLAYOUT_LEFT,
wxLAYOUT_RIGHT,
wxLAYOUT_BOTTOM,
};
enum {
wxEVT_QUERY_LAYOUT_INFO,
wxEVT_CALCULATE_LAYOUT,
};
class wxQueryLayoutInfoEvent: public wxEvent {
public:
void SetRequestedLength(int length);
int GetRequestedLength();
void SetFlags(int flags);
int GetFlags();
void SetSize(const wxSize& size);
wxSize GetSize();
void SetOrientation(wxLayoutOrientation orient);
wxLayoutOrientation GetOrientation();
void SetAlignment(wxLayoutAlignment align);
wxLayoutAlignment GetAlignment();
};
class wxCalculateLayoutEvent: public wxEvent {
public:
void SetFlags(int flags);
int GetFlags();
void SetRect(const wxRect& rect);
wxRect GetRect();
};
class wxSashLayoutWindow: public wxSashWindow {
public:
wxSashLayoutWindow(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxPyDefaultPosition,
const wxSize& size = wxPyDefaultSize,
long style = wxCLIP_CHILDREN | wxSW_3D,
const char* name = "layoutWindow");
%pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
%pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnCalculateLayout', wxEVT_CALCULATE_LAYOUT)"
%pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnQueryLayoutInfo', wxEVT_QUERY_LAYOUT_INFO)"
wxLayoutAlignment GetAlignment();
wxLayoutOrientation GetOrientation();
void SetAlignment(wxLayoutAlignment alignment);
void SetDefaultSize(const wxSize& size);
void SetOrientation(wxLayoutOrientation orientation);
};
//---------------------------------------------------------------------------
class wxLayoutAlgorithm {
public:
wxLayoutAlgorithm();
~wxLayoutAlgorithm();
bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = NULL);
bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = NULL);
};
//---------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.1 1999/01/30 07:30:16 RD
// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
//
// Various cleanup, tweaks, minor additions, etc. to maintain
// compatibility with the current wxWindows.
//
//
//

View File

@@ -36,6 +36,7 @@
%import cmndlgs.i
%import stattool.i
%import frames.i
%import windows3.i
#ifndef SEPARATE
%import utils.i
#endif
@@ -46,7 +47,7 @@
//---------------------------------------------------------------------------
#define __version__ "0.5.2"
#define __version__ "0.5.3"
wxPoint wxPyDefaultPosition;
wxSize wxPyDefaultSize;
@@ -114,6 +115,8 @@ extern "C" SWIGEXPORT(void,initcmndlgsc)();
extern "C" SWIGEXPORT(void,initstattoolc)();
extern "C" SWIGEXPORT(void,initframesc)();
extern "C" SWIGEXPORT(void,initutilsc)();
extern "C" SWIGEXPORT(void,initwindows3c)();
%}
@@ -137,6 +140,7 @@ extern "C" SWIGEXPORT(void,initutilsc)();
initcmndlgsc();
initstattoolc();
initframesc();
initwindows3c();
#ifndef SEPARATE
initutilsc();
#endif
@@ -152,7 +156,14 @@ extern "C" SWIGEXPORT(void,initutilsc)();
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.4 1999/01/30 07:30:16 RD
// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
//
// Various cleanup, tweaks, minor additions, etc. to maintain
// compatibility with the current wxWindows.
//
// Revision 1.3 1998/12/17 17:52:21 RD
//
// wxPython 0.5.2
// Minor fixes and SWIG code generation for RR's changes. MSW and GTK
// versions are much closer now!