Fixed a deadlock problem when using threads
Incremented version number Added some missing methods and such Minor updates to a couple demos git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -45,6 +45,28 @@ Or you can send mail directly to the list using this address:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
What's new in 2.1.6
|
||||
-------------------
|
||||
wxImage.SetData now makes a copy of the image data before giving it to
|
||||
wxImage. I mistakenly thought that wxImage would copy the data
|
||||
itself.
|
||||
|
||||
Fixed wxMSW's notebook so the pages get their size set as they are
|
||||
being added. This should remove the need for our
|
||||
wxNotebook.ResizeChildren hack.
|
||||
|
||||
wxPanels now support AutoLayout, and wxNotebooks and wxSplitterWindows
|
||||
no longer tell their children to Layout() themselves. This will
|
||||
probably only effect you if you have a wxWindow with AutoLayout inside
|
||||
a notebook or splitter. If so, either change it to a wxPanel or add
|
||||
an EVT_SIZE handler that calls Layout().
|
||||
|
||||
Fixed deadlock problem that happened when using threads.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
What's new in 2.1.5
|
||||
-------------------
|
||||
This is a quick bug-fix release to take care of a few nasties that
|
||||
|
@@ -243,9 +243,11 @@ class wxPythonDemo(wxFrame):
|
||||
|
||||
else:
|
||||
if os.path.exists(itemText + '.py'):
|
||||
wxBeginBusyCursor()
|
||||
self.GetDemoFile(itemText + '.py')
|
||||
module = __import__(itemText, globals())
|
||||
self.SetOverview(itemText, module.overview)
|
||||
wxEndBusyCursor()
|
||||
|
||||
# in case runTest is modal, make sure things look right...
|
||||
self.nb.Refresh();
|
||||
@@ -256,7 +258,7 @@ class wxPythonDemo(wxFrame):
|
||||
self.nb.AddPage(self.window, 'Demo')
|
||||
#self.nb.ResizeChildren()
|
||||
self.nb.SetSelection(2)
|
||||
self.nb.ResizeChildren()
|
||||
#self.nb.ResizeChildren()
|
||||
#if self.window.GetAutoLayout():
|
||||
# self.window.Layout()
|
||||
|
||||
|
@@ -87,6 +87,20 @@ def makeSimpleBox7(win):
|
||||
|
||||
return box
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def makeSimpleBox8(win):
|
||||
box = wxBoxSizer(wxVERTICAL)
|
||||
box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND)
|
||||
box.Add(0,0, 1)
|
||||
box.Add(wxButton(win, 1010, "two"), 0, wxCENTER)
|
||||
box.Add(0,0, 1)
|
||||
box.Add(wxButton(win, 1010, "three"), 0, wxEXPAND)
|
||||
box.Add(wxButton(win, 1010, "four"), 0, wxEXPAND)
|
||||
# box.Add(wxButton(win, 1010, "five"), 1, wxEXPAND)
|
||||
|
||||
return box
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
@@ -301,6 +315,11 @@ theTests = [
|
||||
"window or another Sizer."
|
||||
),
|
||||
|
||||
("Centering in available space", makeSimpleBox8,
|
||||
"This one shows an item that does not expand to fill it's space, but rather"
|
||||
"stays centered within it."
|
||||
),
|
||||
|
||||
# ("Percent Sizer", makeSimpleBox6,
|
||||
# "You can use the wxBoxSizer like a Percent Sizer. Just make sure that all "
|
||||
# "the weighting factors add up to 100!"
|
||||
|
@@ -26,7 +26,8 @@ else:
|
||||
|
||||
# Define a handler for start element events
|
||||
def StartElement(self, name, attrs ):
|
||||
self.nodeStack.append(self.AppendItem(self.nodeStack[-1], name))
|
||||
id = self.AppendItem(self.nodeStack[-1], name)
|
||||
self.nodeStack.append(id)
|
||||
|
||||
def EndElement(self, name ):
|
||||
self.nodeStack = self.nodeStack[:-1]
|
||||
|
@@ -3,9 +3,9 @@ from wxPython.wx import *
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class TestLayoutConstraints(wxWindow):
|
||||
class TestLayoutConstraints(wxPanel):
|
||||
def __init__(self, parent):
|
||||
wxWindow.__init__(self, parent, -1)
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
self.SetAutoLayout(true)
|
||||
EVT_BUTTON(self, 100, self.OnButton)
|
||||
|
||||
|
@@ -119,7 +119,7 @@ import sys, os, string, getopt
|
||||
# This is really the wxPython version number, and will be placed in the
|
||||
# Makefiles for use with the distribution related targets.
|
||||
|
||||
__version__ = '2.1.5'
|
||||
__version__ = '2.1.6'
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
@@ -10,7 +10,7 @@ SWIGFILES = ['glcanvas.i', ]
|
||||
# Unix make system isn't so advanced, so we'll go looking for the source
|
||||
# file ourselves...
|
||||
if sys.platform == 'win32':
|
||||
OTHERLIBS = '$(WXDIR)\lib\glcanvas.lib glu32.lib opengl32.lib'
|
||||
OTHERLIBS = '$(WXDIR)\lib\glcanvas$(LIBEXT).lib glu32.lib opengl32.lib'
|
||||
OTHERCFLAGS = '-DWITH_GLCANVAS -I$(WXDIR)/utils/glcanvas/win'
|
||||
|
||||
else:
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* FILE : html.cpp
|
||||
* FILE : ./html.cpp
|
||||
*
|
||||
* This file was automatically generated by :
|
||||
* Simplified Wrapper and Interface Generator (SWIG)
|
||||
@@ -2943,7 +2943,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetIndent(PyObject *self, PyObject *a
|
||||
wxHtmlContainerCell * _arg0;
|
||||
int _arg1;
|
||||
int _arg2;
|
||||
int _arg3 = (int ) (HTML_UNITS_PIXELS);
|
||||
int _arg3 = (int ) (wxHTML_UNITS_PIXELS);
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","i","what","units", NULL };
|
||||
|
||||
@@ -3129,7 +3129,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetMinHeight(PyObject *self, PyObject
|
||||
PyObject * _resultobj;
|
||||
wxHtmlContainerCell * _arg0;
|
||||
int _arg1;
|
||||
int _arg2 = (int ) (HTML_ALIGN_TOP);
|
||||
int _arg2 = (int ) (wxHTML_ALIGN_TOP);
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","h","align", NULL };
|
||||
|
||||
@@ -4366,6 +4366,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_size_t","_wxWindowID",0},
|
||||
{ "_size_t","_uint",0},
|
||||
{ "_class_wxRealPoint","_wxRealPoint",0},
|
||||
{ "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0},
|
||||
{ "_wxPNMHandler","_class_wxPNMHandler",0},
|
||||
{ "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0},
|
||||
{ "_class_wxMenuItem","_wxMenuItem",0},
|
||||
{ "_class_wxPaintEvent","_wxPaintEvent",0},
|
||||
{ "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0},
|
||||
@@ -4420,6 +4423,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxButton","_wxButton",0},
|
||||
{ "_wxRadioBox","_class_wxRadioBox",0},
|
||||
{ "_class_wxFontData","_wxFontData",0},
|
||||
{ "_class_wxPNMHandler","_wxPNMHandler",0},
|
||||
{ "_wxBoxSizer","_class_wxBoxSizer",0},
|
||||
{ "_class___wxPyCleanup","___wxPyCleanup",0},
|
||||
{ "_wxHtmlCell","_class_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxHtmlCell},
|
||||
@@ -4461,6 +4465,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_EBool","_wxWindowID",0},
|
||||
{ "_class_wxRegion","_wxRegion",0},
|
||||
{ "_class_wxDropFilesEvent","_wxDropFilesEvent",0},
|
||||
{ "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0},
|
||||
{ "_class_wxPreviewFrame","_wxPreviewFrame",0},
|
||||
{ "_wxHtmlContainerCell","_class_wxHtmlContainerCell",0},
|
||||
{ "_wxStaticText","_class_wxStaticText",0},
|
||||
@@ -4474,8 +4479,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxDC","_wxDC",0},
|
||||
{ "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
|
||||
{ "_class_wxProgressDialog","_wxProgressDialog",0},
|
||||
{ "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0},
|
||||
{ "_wxPyApp","_class_wxPyApp",0},
|
||||
{ "_wxHtmlWinParser","_class_wxHtmlWinParser",0},
|
||||
{ "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0},
|
||||
{ "_wxMDIParentFrame","_class_wxMDIParentFrame",0},
|
||||
{ "_class_wxTreeEvent","_wxTreeEvent",0},
|
||||
{ "_class_wxDirDialog","_wxDirDialog",0},
|
||||
@@ -4527,6 +4534,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxCloseEvent","_wxCloseEvent",0},
|
||||
{ "_wxSashEvent","_class_wxSashEvent",0},
|
||||
{ "_class_wxMenuEvent","_wxMenuEvent",0},
|
||||
{ "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
|
||||
{ "_wxClientDC","_class_wxClientDC",0},
|
||||
{ "_wxMouseEvent","_class_wxMouseEvent",0},
|
||||
{ "_wxListCtrl","_class_wxListCtrl",0},
|
||||
@@ -4590,6 +4598,8 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxBitmapButton","_wxBitmapButton",0},
|
||||
{ "_class_wxHtmlContainerCell","_wxHtmlContainerCell",0},
|
||||
{ "_wxFrame","_class_wxFrame",0},
|
||||
{ "_wxPCXHandler","_class_wxPCXHandler",0},
|
||||
{ "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0},
|
||||
{ "_class_wxNotebook","_wxNotebook",0},
|
||||
{ "_wxJPEGHandler","_class_wxJPEGHandler",0},
|
||||
{ "_wxWindowID","_wxPrintQuality",0},
|
||||
@@ -4613,7 +4623,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxListEvent","_wxListEvent",0},
|
||||
{ "_class_wxPrintPreview","_wxPrintPreview",0},
|
||||
{ "_class_wxSpinEvent","_wxSpinEvent",0},
|
||||
{ "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0},
|
||||
{ "_wxPyHtmlWinTagHandler","_class_wxPyHtmlWinTagHandler",0},
|
||||
{ "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0},
|
||||
{ "_wxButton","_class_wxButton",0},
|
||||
{ "_class_wxPyApp","_wxPyApp",0},
|
||||
{ "_wxSize","_class_wxSize",0},
|
||||
@@ -4648,6 +4660,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxPreviewFrame","_class_wxPreviewFrame",0},
|
||||
{ "_wxSizer","_class_wxSizer",0},
|
||||
{ "_class_wxShowEvent","_wxShowEvent",0},
|
||||
{ "_class_wxPCXHandler","_wxPCXHandler",0},
|
||||
{ "_wxActivateEvent","_class_wxActivateEvent",0},
|
||||
{ "_wxGauge","_class_wxGauge",0},
|
||||
{ "_class_wxCheckListBox","_wxCheckListBox",0},
|
||||
@@ -4695,6 +4708,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxWindow","_class_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow},
|
||||
{ "_wxWindow","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxWindow},
|
||||
{ "_wxWindow","_class_wxWindow",0},
|
||||
{ "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0},
|
||||
{ "_class_wxFrame","_wxFrame",0},
|
||||
{0,0,0}};
|
||||
|
||||
@@ -4707,25 +4721,25 @@ SWIGEXPORT(void) inithtmlc() {
|
||||
SWIG_globals = SWIG_newvarlink();
|
||||
m = Py_InitModule("htmlc", htmlcMethods);
|
||||
d = PyModule_GetDict(m);
|
||||
PyDict_SetItemString(d,"HTML_ALIGN_LEFT", PyInt_FromLong((long) HTML_ALIGN_LEFT));
|
||||
PyDict_SetItemString(d,"HTML_ALIGN_CENTER", PyInt_FromLong((long) HTML_ALIGN_CENTER));
|
||||
PyDict_SetItemString(d,"HTML_ALIGN_RIGHT", PyInt_FromLong((long) HTML_ALIGN_RIGHT));
|
||||
PyDict_SetItemString(d,"HTML_ALIGN_BOTTOM", PyInt_FromLong((long) HTML_ALIGN_BOTTOM));
|
||||
PyDict_SetItemString(d,"HTML_ALIGN_TOP", PyInt_FromLong((long) HTML_ALIGN_TOP));
|
||||
PyDict_SetItemString(d,"HTML_CLR_FOREGROUND", PyInt_FromLong((long) HTML_CLR_FOREGROUND));
|
||||
PyDict_SetItemString(d,"HTML_CLR_BACKGROUND", PyInt_FromLong((long) HTML_CLR_BACKGROUND));
|
||||
PyDict_SetItemString(d,"HTML_UNITS_PIXELS", PyInt_FromLong((long) HTML_UNITS_PIXELS));
|
||||
PyDict_SetItemString(d,"HTML_UNITS_PERCENT", PyInt_FromLong((long) HTML_UNITS_PERCENT));
|
||||
PyDict_SetItemString(d,"HTML_INDENT_LEFT", PyInt_FromLong((long) HTML_INDENT_LEFT));
|
||||
PyDict_SetItemString(d,"HTML_INDENT_RIGHT", PyInt_FromLong((long) HTML_INDENT_RIGHT));
|
||||
PyDict_SetItemString(d,"HTML_INDENT_TOP", PyInt_FromLong((long) HTML_INDENT_TOP));
|
||||
PyDict_SetItemString(d,"HTML_INDENT_BOTTOM", PyInt_FromLong((long) HTML_INDENT_BOTTOM));
|
||||
PyDict_SetItemString(d,"HTML_INDENT_HORIZONTAL", PyInt_FromLong((long) HTML_INDENT_HORIZONTAL));
|
||||
PyDict_SetItemString(d,"HTML_INDENT_VERTICAL", PyInt_FromLong((long) HTML_INDENT_VERTICAL));
|
||||
PyDict_SetItemString(d,"HTML_INDENT_ALL", PyInt_FromLong((long) HTML_INDENT_ALL));
|
||||
PyDict_SetItemString(d,"HTML_COND_ISANCHOR", PyInt_FromLong((long) HTML_COND_ISANCHOR));
|
||||
PyDict_SetItemString(d,"HTML_COND_ISIMAGEMAP", PyInt_FromLong((long) HTML_COND_ISIMAGEMAP));
|
||||
PyDict_SetItemString(d,"HTML_COND_USER", PyInt_FromLong((long) HTML_COND_USER));
|
||||
PyDict_SetItemString(d,"wxHTML_ALIGN_LEFT", PyInt_FromLong((long) wxHTML_ALIGN_LEFT));
|
||||
PyDict_SetItemString(d,"wxHTML_ALIGN_CENTER", PyInt_FromLong((long) wxHTML_ALIGN_CENTER));
|
||||
PyDict_SetItemString(d,"wxHTML_ALIGN_RIGHT", PyInt_FromLong((long) wxHTML_ALIGN_RIGHT));
|
||||
PyDict_SetItemString(d,"wxHTML_ALIGN_BOTTOM", PyInt_FromLong((long) wxHTML_ALIGN_BOTTOM));
|
||||
PyDict_SetItemString(d,"wxHTML_ALIGN_TOP", PyInt_FromLong((long) wxHTML_ALIGN_TOP));
|
||||
PyDict_SetItemString(d,"wxHTML_CLR_FOREGROUND", PyInt_FromLong((long) wxHTML_CLR_FOREGROUND));
|
||||
PyDict_SetItemString(d,"wxHTML_CLR_BACKGROUND", PyInt_FromLong((long) wxHTML_CLR_BACKGROUND));
|
||||
PyDict_SetItemString(d,"wxHTML_UNITS_PIXELS", PyInt_FromLong((long) wxHTML_UNITS_PIXELS));
|
||||
PyDict_SetItemString(d,"wxHTML_UNITS_PERCENT", PyInt_FromLong((long) wxHTML_UNITS_PERCENT));
|
||||
PyDict_SetItemString(d,"wxHTML_INDENT_LEFT", PyInt_FromLong((long) wxHTML_INDENT_LEFT));
|
||||
PyDict_SetItemString(d,"wxHTML_INDENT_RIGHT", PyInt_FromLong((long) wxHTML_INDENT_RIGHT));
|
||||
PyDict_SetItemString(d,"wxHTML_INDENT_TOP", PyInt_FromLong((long) wxHTML_INDENT_TOP));
|
||||
PyDict_SetItemString(d,"wxHTML_INDENT_BOTTOM", PyInt_FromLong((long) wxHTML_INDENT_BOTTOM));
|
||||
PyDict_SetItemString(d,"wxHTML_INDENT_HORIZONTAL", PyInt_FromLong((long) wxHTML_INDENT_HORIZONTAL));
|
||||
PyDict_SetItemString(d,"wxHTML_INDENT_VERTICAL", PyInt_FromLong((long) wxHTML_INDENT_VERTICAL));
|
||||
PyDict_SetItemString(d,"wxHTML_INDENT_ALL", PyInt_FromLong((long) wxHTML_INDENT_ALL));
|
||||
PyDict_SetItemString(d,"wxHTML_COND_ISANCHOR", PyInt_FromLong((long) wxHTML_COND_ISANCHOR));
|
||||
PyDict_SetItemString(d,"wxHTML_COND_ISIMAGEMAP", PyInt_FromLong((long) wxHTML_COND_ISIMAGEMAP));
|
||||
PyDict_SetItemString(d,"wxHTML_COND_USER", PyInt_FromLong((long) wxHTML_COND_USER));
|
||||
|
||||
|
||||
#if 0
|
||||
|
@@ -135,30 +135,30 @@ TAGS_MODULE_END(PythonTag)
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
enum {
|
||||
HTML_ALIGN_LEFT,
|
||||
HTML_ALIGN_CENTER,
|
||||
HTML_ALIGN_RIGHT,
|
||||
HTML_ALIGN_BOTTOM,
|
||||
HTML_ALIGN_TOP,
|
||||
wxHTML_ALIGN_LEFT,
|
||||
wxHTML_ALIGN_CENTER,
|
||||
wxHTML_ALIGN_RIGHT,
|
||||
wxHTML_ALIGN_BOTTOM,
|
||||
wxHTML_ALIGN_TOP,
|
||||
|
||||
HTML_CLR_FOREGROUND,
|
||||
HTML_CLR_BACKGROUND,
|
||||
wxHTML_CLR_FOREGROUND,
|
||||
wxHTML_CLR_BACKGROUND,
|
||||
|
||||
HTML_UNITS_PIXELS,
|
||||
HTML_UNITS_PERCENT,
|
||||
wxHTML_UNITS_PIXELS,
|
||||
wxHTML_UNITS_PERCENT,
|
||||
|
||||
HTML_INDENT_LEFT,
|
||||
HTML_INDENT_RIGHT,
|
||||
HTML_INDENT_TOP,
|
||||
HTML_INDENT_BOTTOM,
|
||||
wxHTML_INDENT_LEFT,
|
||||
wxHTML_INDENT_RIGHT,
|
||||
wxHTML_INDENT_TOP,
|
||||
wxHTML_INDENT_BOTTOM,
|
||||
|
||||
HTML_INDENT_HORIZONTAL,
|
||||
HTML_INDENT_VERTICAL,
|
||||
HTML_INDENT_ALL,
|
||||
wxHTML_INDENT_HORIZONTAL,
|
||||
wxHTML_INDENT_VERTICAL,
|
||||
wxHTML_INDENT_ALL,
|
||||
|
||||
HTML_COND_ISANCHOR,
|
||||
HTML_COND_ISIMAGEMAP,
|
||||
HTML_COND_USER,
|
||||
wxHTML_COND_ISANCHOR,
|
||||
wxHTML_COND_ISIMAGEMAP,
|
||||
wxHTML_COND_USER,
|
||||
};
|
||||
|
||||
|
||||
@@ -412,13 +412,13 @@ public:
|
||||
int GetAlignHor();
|
||||
void SetAlignVer(int al);
|
||||
int GetAlignVer();
|
||||
void SetIndent(int i, int what, int units = HTML_UNITS_PIXELS);
|
||||
void SetIndent(int i, int what, int units = wxHTML_UNITS_PIXELS);
|
||||
int GetIndent(int ind);
|
||||
int GetIndentUnits(int ind);
|
||||
void SetAlign(const wxHtmlTag& tag);
|
||||
void SetWidthFloat(int w, int units);
|
||||
%name(SetWidthFloatFromTag)void SetWidthFloat(const wxHtmlTag& tag);
|
||||
void SetMinHeight(int h, int align = HTML_ALIGN_TOP);
|
||||
void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP);
|
||||
int GetMaxLineWidth();
|
||||
void SetBackgroundColour(const wxColour& clr);
|
||||
void SetBorder(const wxColour& clr1, const wxColour& clr2);
|
||||
|
@@ -527,25 +527,25 @@ wxHtmlWindow_AddFilter = htmlc.wxHtmlWindow_AddFilter
|
||||
|
||||
#-------------- VARIABLE WRAPPERS ------------------
|
||||
|
||||
HTML_ALIGN_LEFT = htmlc.HTML_ALIGN_LEFT
|
||||
HTML_ALIGN_CENTER = htmlc.HTML_ALIGN_CENTER
|
||||
HTML_ALIGN_RIGHT = htmlc.HTML_ALIGN_RIGHT
|
||||
HTML_ALIGN_BOTTOM = htmlc.HTML_ALIGN_BOTTOM
|
||||
HTML_ALIGN_TOP = htmlc.HTML_ALIGN_TOP
|
||||
HTML_CLR_FOREGROUND = htmlc.HTML_CLR_FOREGROUND
|
||||
HTML_CLR_BACKGROUND = htmlc.HTML_CLR_BACKGROUND
|
||||
HTML_UNITS_PIXELS = htmlc.HTML_UNITS_PIXELS
|
||||
HTML_UNITS_PERCENT = htmlc.HTML_UNITS_PERCENT
|
||||
HTML_INDENT_LEFT = htmlc.HTML_INDENT_LEFT
|
||||
HTML_INDENT_RIGHT = htmlc.HTML_INDENT_RIGHT
|
||||
HTML_INDENT_TOP = htmlc.HTML_INDENT_TOP
|
||||
HTML_INDENT_BOTTOM = htmlc.HTML_INDENT_BOTTOM
|
||||
HTML_INDENT_HORIZONTAL = htmlc.HTML_INDENT_HORIZONTAL
|
||||
HTML_INDENT_VERTICAL = htmlc.HTML_INDENT_VERTICAL
|
||||
HTML_INDENT_ALL = htmlc.HTML_INDENT_ALL
|
||||
HTML_COND_ISANCHOR = htmlc.HTML_COND_ISANCHOR
|
||||
HTML_COND_ISIMAGEMAP = htmlc.HTML_COND_ISIMAGEMAP
|
||||
HTML_COND_USER = htmlc.HTML_COND_USER
|
||||
wxHTML_ALIGN_LEFT = htmlc.wxHTML_ALIGN_LEFT
|
||||
wxHTML_ALIGN_CENTER = htmlc.wxHTML_ALIGN_CENTER
|
||||
wxHTML_ALIGN_RIGHT = htmlc.wxHTML_ALIGN_RIGHT
|
||||
wxHTML_ALIGN_BOTTOM = htmlc.wxHTML_ALIGN_BOTTOM
|
||||
wxHTML_ALIGN_TOP = htmlc.wxHTML_ALIGN_TOP
|
||||
wxHTML_CLR_FOREGROUND = htmlc.wxHTML_CLR_FOREGROUND
|
||||
wxHTML_CLR_BACKGROUND = htmlc.wxHTML_CLR_BACKGROUND
|
||||
wxHTML_UNITS_PIXELS = htmlc.wxHTML_UNITS_PIXELS
|
||||
wxHTML_UNITS_PERCENT = htmlc.wxHTML_UNITS_PERCENT
|
||||
wxHTML_INDENT_LEFT = htmlc.wxHTML_INDENT_LEFT
|
||||
wxHTML_INDENT_RIGHT = htmlc.wxHTML_INDENT_RIGHT
|
||||
wxHTML_INDENT_TOP = htmlc.wxHTML_INDENT_TOP
|
||||
wxHTML_INDENT_BOTTOM = htmlc.wxHTML_INDENT_BOTTOM
|
||||
wxHTML_INDENT_HORIZONTAL = htmlc.wxHTML_INDENT_HORIZONTAL
|
||||
wxHTML_INDENT_VERTICAL = htmlc.wxHTML_INDENT_VERTICAL
|
||||
wxHTML_INDENT_ALL = htmlc.wxHTML_INDENT_ALL
|
||||
wxHTML_COND_ISANCHOR = htmlc.wxHTML_COND_ISANCHOR
|
||||
wxHTML_COND_ISIMAGEMAP = htmlc.wxHTML_COND_ISIMAGEMAP
|
||||
wxHTML_COND_USER = htmlc.wxHTML_COND_USER
|
||||
|
||||
|
||||
#-------------- USER INCLUDE -----------------------
|
||||
|
@@ -1 +1 @@
|
||||
ver = '2.1.5'
|
||||
ver = '2.1.6'
|
||||
|
@@ -89,32 +89,6 @@ public:
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.4 1998/12/16 22:10:53 RD
|
||||
// Tweaks needed to be able to build wxPython with wxGTK.
|
||||
//
|
||||
// Revision 1.3 1998/12/15 20:41:18 RD
|
||||
// Changed the import semantics from "from wxPython import *" to "from
|
||||
// wxPython.wx import *" This is for people who are worried about
|
||||
// namespace pollution, they can use "from wxPython import wx" and then
|
||||
// prefix all the wxPython identifiers with "wx."
|
||||
//
|
||||
// Added wxTaskbarIcon for wxMSW.
|
||||
//
|
||||
// Made the events work for wxGrid.
|
||||
//
|
||||
// Added wxConfig.
|
||||
//
|
||||
// Added wxMiniFrame for wxGTK, (untested.)
|
||||
//
|
||||
// Changed many of the args and return values that were pointers to gdi
|
||||
// objects to references to reflect changes in the wxWindows API.
|
||||
//
|
||||
// Other assorted fixes and additions.
|
||||
//
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -121,6 +121,10 @@ int wxPyApp::MainLoop(void) {
|
||||
// wxcmodule is imported. (Before there is a wxApp object.)
|
||||
void __wxPreStart()
|
||||
{
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_InitThreads();
|
||||
#endif
|
||||
|
||||
// Bail out if there is already windows created. This means that the
|
||||
// toolkit has already been initialized, as in embedding wxPython in
|
||||
// a C++ wxWindows app.
|
||||
@@ -279,7 +283,7 @@ PyObject* wxPyConstructObject(void* ptr, char* className) {
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
//static bool _wxPyInEvent = false;
|
||||
static unsigned int _wxPyNestCount = 0;
|
||||
//static unsigned int _wxPyNestCount = 0;
|
||||
|
||||
HELPEREXPORT bool wxPyRestoreThread() {
|
||||
// #ifdef WXP_WITH_THREAD
|
||||
@@ -305,10 +309,10 @@ HELPEREXPORT bool wxPyRestoreThread() {
|
||||
// until I know better, this is how I am doing it instead:
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_RestoreThread(wxPyEventThreadState);
|
||||
_wxPyNestCount += 1;
|
||||
if (_wxPyNestCount == 1)
|
||||
return TRUE;
|
||||
else
|
||||
// _wxPyNestCount += 1;
|
||||
// if (_wxPyNestCount == 1)
|
||||
// return TRUE;
|
||||
// else
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
@@ -316,11 +320,11 @@ HELPEREXPORT bool wxPyRestoreThread() {
|
||||
|
||||
HELPEREXPORT void wxPySaveThread(bool doSave) {
|
||||
#ifdef WXP_WITH_THREAD
|
||||
if (doSave) {
|
||||
PyEval_SaveThread();
|
||||
//_wxPyInEvent = false;
|
||||
}
|
||||
_wxPyNestCount -= 1;
|
||||
// if (doSave) {
|
||||
wxPyEventThreadState = PyEval_SaveThread();
|
||||
// _wxPyInEvent = false;
|
||||
// }
|
||||
// _wxPyNestCount -= 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -110,6 +110,8 @@ public:
|
||||
int GetWidth();
|
||||
int GetHeight();
|
||||
|
||||
wxImage GetSubImage(const wxRect& rect);
|
||||
|
||||
//unsigned char *GetData();
|
||||
//void SetData( unsigned char *data );
|
||||
|
||||
@@ -127,7 +129,10 @@ public:
|
||||
PyErr_SetString(PyExc_TypeError, "Expected string object");
|
||||
return /* NULL */ ;
|
||||
}
|
||||
dataPtr = (unsigned char*)PyString_AsString(data);
|
||||
|
||||
size_t len = self->GetWidth() * self->GetHeight() * 3;
|
||||
dataPtr = new unsigned char[len];
|
||||
memcpy(dataPtr, PyString_AsString(data), len);
|
||||
self->SetData(dataPtr);
|
||||
}
|
||||
}
|
||||
|
@@ -303,31 +303,6 @@ static PyObject *_wrap_wxInitAllImageHandlers(PyObject *self, PyObject *args, Py
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define new_wxImageHandler() (new wxImageHandler())
|
||||
static PyObject *_wrap_new_wxImageHandler(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxImageHandler * _result;
|
||||
char *_kwnames[] = { NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxImageHandler",_kwnames))
|
||||
return NULL;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxImageHandler *)new_wxImageHandler();
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageHandler_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxImageHandler_GetName(_swigobj) (_swigobj->GetName())
|
||||
static PyObject *_wrap_wxImageHandler_GetName(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -1396,6 +1371,43 @@ static PyObject *_wrap_wxImage_GetHeight(PyObject *self, PyObject *args, PyObjec
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxImage_GetSubImage(_swigobj,_swigarg0) (_swigobj->GetSubImage(_swigarg0))
|
||||
static PyObject *_wrap_wxImage_GetSubImage(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxImage * _result;
|
||||
wxImage * _arg0;
|
||||
wxRect * _arg1;
|
||||
PyObject * _argo0 = 0;
|
||||
wxRect temp;
|
||||
PyObject * _obj1 = 0;
|
||||
char *_kwnames[] = { "self","rect", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImage_GetSubImage",_kwnames,&_argo0,&_obj1))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetSubImage. Expected _wxImage_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg1 = &temp;
|
||||
if (! wxRect_helper(_obj1, &_arg1))
|
||||
return NULL;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = new wxImage (wxImage_GetSubImage(_arg0,*_arg1));
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxImage_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject * wxImage_GetData(wxImage *self) {
|
||||
unsigned char* data = self->GetData();
|
||||
int len = self->GetWidth() * self->GetHeight() * 3;
|
||||
@@ -1436,7 +1448,10 @@ static void wxImage_SetData(wxImage *self,PyObject * data) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected string object");
|
||||
return /* NULL */ ;
|
||||
}
|
||||
dataPtr = (unsigned char*)PyString_AsString(data);
|
||||
|
||||
size_t len = self->GetWidth() * self->GetHeight() * 3;
|
||||
dataPtr = new unsigned char[len];
|
||||
memcpy(dataPtr, PyString_AsString(data), len);
|
||||
self->SetData(dataPtr);
|
||||
}
|
||||
static PyObject *_wrap_wxImage_SetData(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
@@ -1647,6 +1662,7 @@ static PyMethodDef imagecMethods[] = {
|
||||
{ "wxImage_SetMaskColour", (PyCFunction) _wrap_wxImage_SetMaskColour, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_SetData", (PyCFunction) _wrap_wxImage_SetData, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_GetData", (PyCFunction) _wrap_wxImage_GetData, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_GetSubImage", (PyCFunction) _wrap_wxImage_GetSubImage, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_GetHeight", (PyCFunction) _wrap_wxImage_GetHeight, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_GetWidth", (PyCFunction) _wrap_wxImage_GetWidth, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_Ok", (PyCFunction) _wrap_wxImage_Ok, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -1679,7 +1695,6 @@ static PyMethodDef imagecMethods[] = {
|
||||
{ "wxImageHandler_GetType", (PyCFunction) _wrap_wxImageHandler_GetType, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImageHandler_GetExtension", (PyCFunction) _wrap_wxImageHandler_GetExtension, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImageHandler_GetName", (PyCFunction) _wrap_wxImageHandler_GetName, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxImageHandler", (PyCFunction) _wrap_new_wxImageHandler, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxInitAllImageHandlers", (PyCFunction) _wrap_wxInitAllImageHandlers, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImage_AddHandler", (PyCFunction) _wrap_wxImage_AddHandler, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxImageFromBitmap", (PyCFunction) _wrap_wxImageFromBitmap, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@@ -35,9 +35,8 @@ class wxImageHandlerPtr :
|
||||
def __repr__(self):
|
||||
return "<C wxImageHandler instance at %s>" % (self.this,)
|
||||
class wxImageHandler(wxImageHandlerPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
self.this = apply(imagec.new_wxImageHandler,_args,_kwargs)
|
||||
self.thisown = 1
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
|
||||
|
||||
|
||||
@@ -183,6 +182,10 @@ class wxImagePtr :
|
||||
def GetHeight(self, *_args, **_kwargs):
|
||||
val = apply(imagec.wxImage_GetHeight,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetSubImage(self, *_args, **_kwargs):
|
||||
val = apply(imagec.wxImage_GetSubImage,(self,) + _args, _kwargs)
|
||||
if val: val = wxImagePtr(val) ; val.thisown = 1
|
||||
return val
|
||||
def GetData(self, *_args, **_kwargs):
|
||||
val = apply(imagec.wxImage_GetData,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
@@ -3177,6 +3177,33 @@ static PyObject *_wrap_wxWindow_SetAutoLayout(PyObject *self, PyObject *args, Py
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxWindow_GetAutoLayout(_swigobj) (_swigobj->GetAutoLayout())
|
||||
static PyObject *_wrap_wxWindow_GetAutoLayout(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxWindow * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetAutoLayout",_kwnames,&_argo0))
|
||||
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 wxWindow_GetAutoLayout. Expected _wxWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (bool )wxWindow_GetAutoLayout(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxWindow_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0))
|
||||
static PyObject *_wrap_wxWindow_SetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -5356,6 +5383,104 @@ static PyObject *_wrap_wxScrolledWindow_ViewStart(PyObject *self, PyObject *args
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxScrolledWindow_CalcScrolledPosition(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->CalcScrolledPosition(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
|
||||
static PyObject *_wrap_wxScrolledWindow_CalcScrolledPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxScrolledWindow * _arg0;
|
||||
int _arg1;
|
||||
int _arg2;
|
||||
int * _arg3;
|
||||
int temp;
|
||||
int * _arg4;
|
||||
int temp0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","x","y", NULL };
|
||||
|
||||
self = self;
|
||||
{
|
||||
_arg3 = &temp;
|
||||
}
|
||||
{
|
||||
_arg4 = &temp0;
|
||||
}
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxScrolledWindow_CalcScrolledPosition",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrolledWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_CalcScrolledPosition. Expected _wxScrolledWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxScrolledWindow_CalcScrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
{
|
||||
PyObject *o;
|
||||
o = PyInt_FromLong((long) (*_arg3));
|
||||
_resultobj = t_output_helper(_resultobj, o);
|
||||
}
|
||||
{
|
||||
PyObject *o;
|
||||
o = PyInt_FromLong((long) (*_arg4));
|
||||
_resultobj = t_output_helper(_resultobj, o);
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxScrolledWindow_CalcUnscrolledPosition(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->CalcUnscrolledPosition(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
|
||||
static PyObject *_wrap_wxScrolledWindow_CalcUnscrolledPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxScrolledWindow * _arg0;
|
||||
int _arg1;
|
||||
int _arg2;
|
||||
int * _arg3;
|
||||
int temp;
|
||||
int * _arg4;
|
||||
int temp0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self","x","y", NULL };
|
||||
|
||||
self = self;
|
||||
{
|
||||
_arg3 = &temp;
|
||||
}
|
||||
{
|
||||
_arg4 = &temp0;
|
||||
}
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxScrolledWindow_CalcUnscrolledPosition",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrolledWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_CalcUnscrolledPosition. Expected _wxScrolledWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxScrolledWindow_CalcUnscrolledPosition(_arg0,_arg1,_arg2,_arg3,_arg4);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
{
|
||||
PyObject *o;
|
||||
o = PyInt_FromLong((long) (*_arg3));
|
||||
_resultobj = t_output_helper(_resultobj, o);
|
||||
}
|
||||
{
|
||||
PyObject *o;
|
||||
o = PyInt_FromLong((long) (*_arg4));
|
||||
_resultobj = t_output_helper(_resultobj, o);
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxMenuTowxEvtHandler(void *ptr) {
|
||||
wxMenu *src;
|
||||
wxEvtHandler *dest;
|
||||
@@ -7605,6 +7730,8 @@ static PyMethodDef windowscMethods[] = {
|
||||
{ "wxMenu_AppendMenu", (PyCFunction) _wrap_wxMenu_AppendMenu, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxMenu_Append", (PyCFunction) _wrap_wxMenu_Append, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxMenu", (PyCFunction) _wrap_new_wxMenu, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_CalcUnscrolledPosition", (PyCFunction) _wrap_wxScrolledWindow_CalcUnscrolledPosition, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_CalcScrolledPosition", (PyCFunction) _wrap_wxScrolledWindow_CalcScrolledPosition, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_ViewStart", (PyCFunction) _wrap_wxScrolledWindow_ViewStart, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_SetScrollbars", (PyCFunction) _wrap_wxScrolledWindow_SetScrollbars, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxScrolledWindow_Scroll", (PyCFunction) _wrap_wxScrolledWindow_Scroll, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -7668,6 +7795,7 @@ static PyMethodDef windowscMethods[] = {
|
||||
{ "wxWindow_UnsetConstraints", (PyCFunction) _wrap_wxWindow_UnsetConstraints, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxWindow_SetConstraints", (PyCFunction) _wrap_wxWindow_SetConstraints, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxWindow_SetBackgroundColour", (PyCFunction) _wrap_wxWindow_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxWindow_GetAutoLayout", (PyCFunction) _wrap_wxWindow_GetAutoLayout, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxWindow_SetAutoLayout", (PyCFunction) _wrap_wxWindow_SetAutoLayout, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxWindow_SetAcceleratorTable", (PyCFunction) _wrap_wxWindow_SetAcceleratorTable, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxWindow_ScrollWindow", (PyCFunction) _wrap_wxWindow_ScrollWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@@ -331,6 +331,9 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
||||
def SetAutoLayout(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_SetAutoLayout,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetAutoLayout(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_GetAutoLayout,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetBackgroundColour(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxWindow_SetBackgroundColour,(self,) + _args, _kwargs)
|
||||
return val
|
||||
@@ -572,6 +575,12 @@ class wxScrolledWindowPtr(wxPanelPtr):
|
||||
def ViewStart(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxScrolledWindow_ViewStart,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def CalcScrolledPosition(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxScrolledWindow_CalcScrolledPosition,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def CalcUnscrolledPosition(self, *_args, **_kwargs):
|
||||
val = apply(windowsc.wxScrolledWindow_CalcUnscrolledPosition,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxScrolledWindow instance at %s>" % (self.this,)
|
||||
class wxScrolledWindow(wxScrolledWindowPtr):
|
||||
|
@@ -4738,6 +4738,51 @@ static PyObject *_wrap_wxSplitterWindow_IsSplit(PyObject *self, PyObject *args,
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxSplitterWindow_ReplaceWindow(_swigobj,_swigarg0,_swigarg1) (_swigobj->ReplaceWindow(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxSplitterWindow_ReplaceWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxSplitterWindow * _arg0;
|
||||
wxWindow * _arg1;
|
||||
wxWindow * _arg2;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo1 = 0;
|
||||
PyObject * _argo2 = 0;
|
||||
char *_kwnames[] = { "self","winOld","winNew", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxSplitterWindow_ReplaceWindow",_kwnames,&_argo0,&_argo1,&_argo2))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_ReplaceWindow. Expected _wxSplitterWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo1) {
|
||||
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplitterWindow_ReplaceWindow. Expected _wxWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo2) {
|
||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxSplitterWindow_ReplaceWindow. Expected _wxWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (bool )wxSplitterWindow_ReplaceWindow(_arg0,_arg1,_arg2);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxSplitterWindow_SetBorderSize(_swigobj,_swigarg0) (_swigobj->SetBorderSize(_swigarg0))
|
||||
static PyObject *_wrap_wxSplitterWindow_SetBorderSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -5181,6 +5226,7 @@ static PyMethodDef windows2cMethods[] = {
|
||||
{ "wxSplitterWindow_SetSashSize", (PyCFunction) _wrap_wxSplitterWindow_SetSashSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSplitterWindow_SetSashPosition", (PyCFunction) _wrap_wxSplitterWindow_SetSashPosition, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSplitterWindow_SetBorderSize", (PyCFunction) _wrap_wxSplitterWindow_SetBorderSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSplitterWindow_ReplaceWindow", (PyCFunction) _wrap_wxSplitterWindow_ReplaceWindow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSplitterWindow_IsSplit", (PyCFunction) _wrap_wxSplitterWindow_IsSplit, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSplitterWindow_Initialize", (PyCFunction) _wrap_wxSplitterWindow_Initialize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSplitterWindow_GetWindow2", (PyCFunction) _wrap_wxSplitterWindow_GetWindow2, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@@ -541,6 +541,9 @@ class wxSplitterWindowPtr(wxWindowPtr):
|
||||
def IsSplit(self, *_args, **_kwargs):
|
||||
val = apply(windows2c.wxSplitterWindow_IsSplit,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def ReplaceWindow(self, *_args, **_kwargs):
|
||||
val = apply(windows2c.wxSplitterWindow_ReplaceWindow,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def SetBorderSize(self, *_args, **_kwargs):
|
||||
val = apply(windows2c.wxSplitterWindow_SetBorderSize,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
@@ -2197,6 +2197,8 @@ SWIGEXPORT(void) initwxc() {
|
||||
PyDict_SetItemString(d,"wxSP_NOBORDER", PyInt_FromLong((long) wxSP_NOBORDER));
|
||||
PyDict_SetItemString(d,"wxSP_3D", PyInt_FromLong((long) wxSP_3D));
|
||||
PyDict_SetItemString(d,"wxSP_BORDER", PyInt_FromLong((long) wxSP_BORDER));
|
||||
PyDict_SetItemString(d,"wxSP_LIVE_UPDATE", PyInt_FromLong((long) wxSP_LIVE_UPDATE));
|
||||
PyDict_SetItemString(d,"wxSP_PERMIT_UNSPLIT", PyInt_FromLong((long) wxSP_PERMIT_UNSPLIT));
|
||||
PyDict_SetItemString(d,"wxFLOOD_SURFACE", PyInt_FromLong((long) wxFLOOD_SURFACE));
|
||||
PyDict_SetItemString(d,"wxFLOOD_BORDER", PyInt_FromLong((long) wxFLOOD_BORDER));
|
||||
PyDict_SetItemString(d,"wxODDEVEN_RULE", PyInt_FromLong((long) wxODDEVEN_RULE));
|
||||
|
@@ -296,6 +296,8 @@ wxSP_WRAP = wxc.wxSP_WRAP
|
||||
wxSP_NOBORDER = wxc.wxSP_NOBORDER
|
||||
wxSP_3D = wxc.wxSP_3D
|
||||
wxSP_BORDER = wxc.wxSP_BORDER
|
||||
wxSP_LIVE_UPDATE = wxc.wxSP_LIVE_UPDATE
|
||||
wxSP_PERMIT_UNSPLIT = wxc.wxSP_PERMIT_UNSPLIT
|
||||
wxFLOOD_SURFACE = wxc.wxFLOOD_SURFACE
|
||||
wxFLOOD_BORDER = wxc.wxFLOOD_BORDER
|
||||
wxODDEVEN_RULE = wxc.wxODDEVEN_RULE
|
||||
|
@@ -426,6 +426,10 @@ public:
|
||||
int noUnitsX, int noUnitsY,
|
||||
int xPos = 0, int yPos = 0);
|
||||
void ViewStart(int* OUTPUT, int* OUTPUT);
|
||||
|
||||
void CalcScrolledPosition( int x, int y, int *OUTPUT, int *OUTPUT);
|
||||
void CalcUnscrolledPosition( int x, int y, int *OUTPUT, int *OUTPUT);
|
||||
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@@ -333,7 +333,7 @@ public:
|
||||
void Initialize(wxWindow* window);
|
||||
bool IsSplit();
|
||||
|
||||
|
||||
bool ReplaceWindow(wxWindow * winOld, wxWindow * winNew);
|
||||
void SetBorderSize(int width);
|
||||
void SetSashPosition(int position, int redraw = TRUE);
|
||||
void SetSashSize(int width);
|
||||
|
39
utils/wxPython/tests/thrtest.py
Normal file
39
utils/wxPython/tests/thrtest.py
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.grids import wxFlexGridSizer
|
||||
|
||||
import time
|
||||
from threading import Thread
|
||||
def foo():
|
||||
for x in range(20):
|
||||
print x, "Fooing!"
|
||||
time.sleep(0.5)
|
||||
Thread(target=foo).start()
|
||||
|
||||
class MyFrame(wxFrame):
|
||||
def __init__(self, parent, ID, title, pos, size):
|
||||
wxFrame.__init__(self, parent, ID, title, pos, size)
|
||||
panel = wxPanel(self, -1)
|
||||
self.panel=panel
|
||||
box = wxFlexGridSizer(1, 2, 10, 10)
|
||||
box.Add(wxButton(panel, 11211, "Foo"), 0, wxCENTER)
|
||||
box.Add(wxButton(panel, 11211, "Bar"), 0, wxCENTER)
|
||||
box.AddGrowableCol(1)
|
||||
panel.SetSizer(box)
|
||||
panel.SetAutoLayout(true)
|
||||
#EVT_SIZE(panel, lambda e, p=panel: p.Layout())
|
||||
EVT_BUTTON(self, 11211, self.Click)
|
||||
|
||||
def Click(self, event):
|
||||
print "Click"
|
||||
|
||||
|
||||
class MyApp(wxApp):
|
||||
def OnInit(self):
|
||||
win = MyFrame(None, -1, "Bummer", wxDefaultPosition, (200, 100))
|
||||
win.Show(true)
|
||||
self.SetTopWindow(win)
|
||||
return true
|
||||
|
||||
MyApp(0).MainLoop()
|
||||
|
Reference in New Issue
Block a user