mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-23 14:45:04 +08:00
Some minor updates and fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11,6 +11,10 @@ flags that clairify where the click was in relation to the item.
|
||||
Fixed thread state problem in wxTreeCtrl.GetBoundingBox and
|
||||
GetSelections.
|
||||
|
||||
Fixed some problems in OGL. wxShape.SetClientData and .GetClientData
|
||||
can now deal with Python objects.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -106,8 +106,10 @@ class MyCanvas(wxScrolledWindow):
|
||||
if event.LeftDown():
|
||||
self.SetXY(event)
|
||||
self.curLine = []
|
||||
self.CaptureMouse()
|
||||
|
||||
elif event.Dragging():
|
||||
print event.GetPosition()
|
||||
dc = wxClientDC(self)
|
||||
self.PrepareDC(dc)
|
||||
dc.BeginDrawing()
|
||||
@@ -121,6 +123,7 @@ class MyCanvas(wxScrolledWindow):
|
||||
elif event.LeftUp():
|
||||
self.lines.append(self.curLine)
|
||||
self.curLine = []
|
||||
self.ReleaseMouse()
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ from ftplib import FTP
|
||||
|
||||
logfile = 'e:\\temp\\autobuild.log'
|
||||
WXDIR = os.environ['WXWIN']
|
||||
dllVer = '21_12'
|
||||
wxpVer = '2.1.12'
|
||||
dllVer = '21_13'
|
||||
wxpVer = '2.1.13'
|
||||
dateSt = time.strftime("%Y%m%d", time.localtime(time.time()))
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -135,7 +135,7 @@ FINAL=1
|
||||
pass
|
||||
|
||||
|
||||
logSeparator("Building source zip file...")
|
||||
logSeparator("Building source and docs zip files...")
|
||||
os.chdir(WXDIR+'\\utils')
|
||||
do("wxPython\\distrib\\zipit.bat %s" % wxpVer)
|
||||
srcZName = WXDIR+'\\utils\\wxPython\\distrib\\wxPython-src-'+wxpVer+'.zip'
|
||||
@@ -146,13 +146,22 @@ FINAL=1
|
||||
except:
|
||||
pass
|
||||
|
||||
srcDName = WXDIR+'\\utils\\wxPython\\distrib\\wxPython-docs-'+wxpVer+'.zip'
|
||||
destDName = WXDIR+'\\utils\\wxPython\\distrib\\wxPython-docs-'+wxpVer+'-'+dateSt+'.zip'
|
||||
validateFile(srcDName)
|
||||
try:
|
||||
os.rename(srcDName, destDName)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
return
|
||||
# #*#*#*#*#* Comment this out to allow upload...
|
||||
#return
|
||||
|
||||
logSeparator("Uploading to website...")
|
||||
do('python d:\util32\sendwxp.py %s' % destName)
|
||||
do('python d:\util32\sendwxp.py %s' % destZName)
|
||||
do('python d:\util32\sendwxp.py %s' % destDName)
|
||||
os.unlink(destName)
|
||||
os.unlink(destZName)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -233,8 +233,29 @@ public:
|
||||
long GetId();
|
||||
void SetPen(wxPen *pen);
|
||||
void SetBrush(wxBrush *brush);
|
||||
void SetClientData(wxObject *client_data);
|
||||
wxObject *GetClientData() ;
|
||||
|
||||
// void SetClientData(wxObject *client_data);
|
||||
// wxObject *GetClientData();
|
||||
%addmethods {
|
||||
void SetClientData(PyObject* userData) {
|
||||
wxPyUserData* data = NULL;
|
||||
if (userData)
|
||||
data = new wxPyUserData(userData);
|
||||
self->SetClientData(data);
|
||||
}
|
||||
|
||||
PyObject* GetClientData() {
|
||||
wxPyUserData* data = (wxPyUserData*)self->GetClientData();
|
||||
if (data) {
|
||||
Py_INCREF(data->m_obj);
|
||||
return data->m_obj;
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Show(bool show);
|
||||
bool IsShown();
|
||||
void Move(wxDC& dc, double x1, double y1, bool display = TRUE);
|
||||
@@ -294,11 +315,11 @@ public:
|
||||
void ReadRegions(wxExpr *clause);
|
||||
#endif
|
||||
|
||||
bool GetAttachmentPosition(int attachment, double *x, double *y,
|
||||
bool GetAttachmentPosition(int attachment, double *OUTPUT, double *OUTPUT,
|
||||
int nth = 0, int no_arcs = 1, wxPyLineShape *line = NULL);
|
||||
int GetNumberOfAttachments();
|
||||
bool AttachmentIsValid(int attachment);
|
||||
bool GetAttachmentPositionEdge(int attachment, double *x, double *y,
|
||||
bool GetAttachmentPositionEdge(int attachment, double *OUTPUT, double *OUTPUT,
|
||||
int nth = 0, int no_arcs = 1, wxPyLineShape *line = NULL);
|
||||
wxRealPoint CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2,
|
||||
int nth, int noArcs, wxPyLineShape* line);
|
||||
|
||||
@@ -9,6 +9,8 @@ from windows import *
|
||||
|
||||
from gdi import *
|
||||
|
||||
from clip_dnd import *
|
||||
|
||||
from events import *
|
||||
|
||||
from mdi import *
|
||||
|
||||
@@ -7577,6 +7577,60 @@ static PyObject *_wrap_wxPyCompositeShape_AddConstraint(PyObject *self, PyObject
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static wxOGLConstraint * wxPyCompositeShape_AddConstrainedShapes(wxPyCompositeShape *self,int type,wxPyShape * constraining,PyObject * constrained) {
|
||||
wxList* list = wxPy_wxListHelper(constrained, "wxPyShape");
|
||||
wxOGLConstraint* rv = self->AddConstraint(type, constraining, *list);
|
||||
delete list;
|
||||
return rv;
|
||||
}
|
||||
static PyObject *_wrap_wxPyCompositeShape_AddConstrainedShapes(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxOGLConstraint * _result;
|
||||
wxPyCompositeShape * _arg0;
|
||||
int _arg1;
|
||||
wxPyShape * _arg2;
|
||||
PyObject * _arg3;
|
||||
PyObject * _argo0 = 0;
|
||||
PyObject * _argo2 = 0;
|
||||
PyObject * _obj3 = 0;
|
||||
char *_kwnames[] = { "self","type","constraining","constrained", NULL };
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO:wxPyCompositeShape_AddConstrainedShapes",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyCompositeShape_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyCompositeShape_AddConstrainedShapes. Expected _wxPyCompositeShape_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argo2) {
|
||||
if (_argo2 == Py_None) { _arg2 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPyShape_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxPyCompositeShape_AddConstrainedShapes. Expected _wxPyShape_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
_arg3 = _obj3;
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxOGLConstraint *)wxPyCompositeShape_AddConstrainedShapes(_arg0,_arg1,_arg2,_arg3);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} if (_result) {
|
||||
SWIG_MakePtr(_ptemp, (char *) _result,"_wxOGLConstraint_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxPyCompositeShape_AddSimpleConstraint(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->AddConstraint(_swigarg0,_swigarg1,_swigarg2))
|
||||
static PyObject *_wrap_wxPyCompositeShape_AddSimpleConstraint(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@@ -12179,6 +12233,7 @@ static PyMethodDef oglshapescMethods[] = {
|
||||
{ "wxPyCompositeShape_ContainsDivision", (PyCFunction) _wrap_wxPyCompositeShape_ContainsDivision, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPyCompositeShape_CalculateSize", (PyCFunction) _wrap_wxPyCompositeShape_CalculateSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPyCompositeShape_AddSimpleConstraint", (PyCFunction) _wrap_wxPyCompositeShape_AddSimpleConstraint, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPyCompositeShape_AddConstrainedShapes", (PyCFunction) _wrap_wxPyCompositeShape_AddConstrainedShapes, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPyCompositeShape_AddConstraint", (PyCFunction) _wrap_wxPyCompositeShape_AddConstraint, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPyCompositeShape_AddChild", (PyCFunction) _wrap_wxPyCompositeShape_AddChild, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxPyCompositeShape__setSelf", (PyCFunction) _wrap_wxPyCompositeShape__setSelf, METH_VARARGS | METH_KEYWORDS },
|
||||
|
||||
@@ -364,10 +364,19 @@ public:
|
||||
|
||||
wxOGLConstraint * AddConstraint(wxOGLConstraint *constraint);
|
||||
|
||||
// **** Needs a typemap
|
||||
|
||||
//wxOGLConstraint * AddConstraint(int type,
|
||||
// wxPyShape *constraining,
|
||||
// wxList& constrained);
|
||||
%addmethods {
|
||||
wxOGLConstraint * AddConstrainedShapes(int type, wxPyShape *constraining,
|
||||
PyObject* constrained) {
|
||||
wxList* list = wxPy_wxListHelper(constrained, "wxPyShape");
|
||||
wxOGLConstraint* rv = self->AddConstraint(type, constraining, *list);
|
||||
delete list;
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
%name(AddSimpleConstraint)wxOGLConstraint* AddConstraint(int type,
|
||||
wxPyShape *constraining,
|
||||
|
||||
@@ -743,6 +743,10 @@ class wxPyCompositeShapePtr(wxPyRectangleShapePtr):
|
||||
val = apply(oglshapesc.wxPyCompositeShape_AddConstraint,(self,) + _args, _kwargs)
|
||||
if val: val = wxOGLConstraintPtr(val)
|
||||
return val
|
||||
def AddConstrainedShapes(self, *_args, **_kwargs):
|
||||
val = apply(oglshapesc.wxPyCompositeShape_AddConstrainedShapes,(self,) + _args, _kwargs)
|
||||
if val: val = wxOGLConstraintPtr(val)
|
||||
return val
|
||||
def AddSimpleConstraint(self, *_args, **_kwargs):
|
||||
val = apply(oglshapesc.wxPyCompositeShape_AddSimpleConstraint,(self,) + _args, _kwargs)
|
||||
if val: val = wxOGLConstraintPtr(val)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.ste import wxStyledTextEditorCtrl
|
||||
from wxPython.ste import wxStyledTextCtrl
|
||||
|
||||
|
||||
app = wxPySimpleApp()
|
||||
frame = wxFrame(None, -1, "Testing...", (0,0), (320,480))
|
||||
ed = wxStyledTextEditorCtrl(frame, -1)
|
||||
ed = wxStyledTextCtrl(frame, -1)
|
||||
ed.AddText(open('test7.py').read())
|
||||
|
||||
#ed.AddText("This is a test\nThis is only a test.\n\nHere we go cowboys, here we go!!!\nThe End")
|
||||
|
||||
Reference in New Issue
Block a user