merge from 2.8 branch

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-02-07 16:24:56 +00:00
parent 9c49977bd6
commit 3c69a2ec86
21 changed files with 169 additions and 816 deletions

View File

@@ -81,7 +81,7 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyComboBoxNameStr),
"__init__(Window parent, int id, String value=EmptyString,
"__init__(Window parent, int id=-1, String value=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
List choices=EmptyList, long style=0, Validator validator=DefaultValidator,
String name=ComboBoxNameStr) -> ComboBox",
@@ -102,7 +102,7 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyChoiceNameStr),
"Create(Window parent, int id, String value=EmptyString,
"Create(Window parent, int id=-1, String value=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
List choices=EmptyList, long style=0, Validator validator=DefaultValidator,
String name=ChoiceNameStr) -> bool",

View File

@@ -37,6 +37,7 @@ enum Propagation_state
wxEventType wxNewEventType();
%constant wxEventType wxEVT_ANY;
%constant wxEventType wxEVT_NULL;
%constant wxEventType wxEVT_FIRST;
@@ -1086,6 +1087,12 @@ have been accumulated before scrolling.", "");
taken, and one such action (for example, scrolling one increment)
should occur for each delta.", "");
DocDeclStr(
int , GetWheelAxis() const,
"Gets the axis the wheel operation concerns, 0 being the y axis as on
most mouse wheels, 1 is the x axis for things like MightyMouse scrolls
or horizontal trackpad scrolling.", "");
DocDeclStr(
int , GetLinesPerAction() const,
@@ -2675,5 +2682,20 @@ internally.", "");
}
//---------------------------------------------------------------------------
DocStr(wxEventBlocker,
"Helper class to temporarily disable event handling for a window.", "");
class wxEventBlocker : public wxEvtHandler
{
public:
wxEventBlocker(wxWindow *win, wxEventType type = wxEVT_ANY);
virtual ~wxEventBlocker();
void Block(wxEventType type);
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------

View File

@@ -572,7 +572,7 @@ public:
DocDeclStr(
wxRect&, Inflate(wxCoord dx, wxCoord dy),
wxRect, Inflate(wxCoord dx, wxCoord dy),
"Increases the size of the rectangle.
The left border is moved farther left and the right border is moved

View File

@@ -422,27 +422,19 @@ public :
DocStr(wxGraphicsMatrix,
"A wx.GraphicsMatrix is a native representation of an affine
matrix. The contents are specific an private to the respective
matrix. The contents are specific and private to the respective
renderer. The only way to get a valid instance is via a CreateMatrix
call on the graphics context or the renderer instance.", "");
class wxGraphicsMatrix : public wxGraphicsObject
{
public :
wxGraphicsMatrix();
// wxGraphicsMatrix();
virtual ~wxGraphicsMatrix();
DocDeclStr(
virtual void , Concat( const wxGraphicsMatrix& t ),
"Concatenates the passed in matrix to the current matrix.", "");
// %extend {
// DocStr(Copy,
// "Copy the passed in matrix to this one.", "");
// void Copy( const wxGraphicsMatrix& t ) {
// *self = t;
// }
// }
DocDeclStr(
virtual void , Set(wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0,
@@ -515,7 +507,7 @@ way to make this value usable.", "");
class wxGraphicsPath : public wxGraphicsObject
{
public :
wxGraphicsPath();
// wxGraphicsPath();
virtual ~wxGraphicsPath();

View File

@@ -442,6 +442,10 @@ public:
long style = wxNO_BORDER | wxTB_HORIZONTAL,
const wxString& name = wxPyToolBarNameStr);
// TODO: In 2.9 move these to the base class...
void SetToolNormalBitmap(int id, const wxBitmap& bitmap);
void SetToolDisabledBitmap(int id, const wxBitmap& bitmap);
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};

View File

@@ -2072,9 +2072,15 @@ opaque.", "");
self.thisown = pre.thisown
pre.thisown = 0
if hasattr(self, '_setOORInfo'):
self._setOORInfo(self)
try:
self._setOORInfo(self)
except TypeError:
pass
if hasattr(self, '_setCallbackInfo'):
self._setCallbackInfo(self, pre.__class__)
try:
self._setCallbackInfo(self, pre.__class__)
except TypeError:
pass
}
%pythoncode {

View File

@@ -306,6 +306,7 @@ The following example shows a simple implementation that utilizes
// A wxDocArt class that knows how to forward virtuals to Python methods
class wxPyAuiDockArt : public wxAuiDefaultDockArt
{
public:
wxPyAuiDockArt() : wxAuiDefaultDockArt() {}
DEC_PYCALLBACK_INT_INT(GetMetric);
@@ -479,6 +480,7 @@ methods to the Python methods implemented in the derived class.", "");
class wxPyAuiDockArt : public wxAuiDefaultDockArt
{
public:
%pythonAppend wxPyAuiDockArt setCallbackInfo(PyAuiDockArt)
wxPyAuiDocArt();
@@ -527,6 +529,7 @@ class wxPyAuiDockArt : public wxAuiDefaultDockArt
// A wxTabArt class that knows how to forward virtuals to Python methods
class wxPyAuiTabArt : public wxAuiDefaultTabArt
{
public:
wxPyAuiTabArt() : wxAuiDefaultTabArt() {}
@@ -734,6 +737,7 @@ methods to the Python methods implemented in the derived class.", "");
class wxPyAuiTabArt : public wxAuiDefaultTabArt
{
public:
%pythonAppend wxPyAuiTabArt setCallbackInfo(PyAuiTabArt)
wxPyAuiTabArt();

View File

@@ -1606,7 +1606,7 @@ public:
def __str__(self): return str(self.Get())
def __repr__(self): return 'wxGridCellCoords'+str(self.Get())
def __len__(self): return len(self.Get())
def __getitem__(self, index): return self.asTuple()[index]
def __getitem__(self, index): return self.Get()[index]
def __setitem__(self, index, val):
if index == 0: self.SetRow(val)
elif index == 1: self.SetCol(val)