Changed all TRUE/true --> True and all FALSE/false --> False so the
Python docstrings will have the correct case. Started adding extra docstrings where needed. Some other little tweaks and fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
cd303fbbc1
commit
dd9f7fea29
@ -272,8 +272,8 @@ public:
|
|||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
|
if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
|
||||||
PyObject* dcobj = wxPyMake_wxObject(&dc);
|
PyObject* dcobj = wxPyMake_wxObject(&dc);
|
||||||
PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), FALSE);
|
PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), False);
|
||||||
PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), FALSE);
|
PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), False);
|
||||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj));
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj));
|
||||||
Py_DECREF(dcobj);
|
Py_DECREF(dcobj);
|
||||||
Py_DECREF(idobj);
|
Py_DECREF(idobj);
|
||||||
@ -661,10 +661,10 @@ public:
|
|||||||
// allow the user to expand the items which don't have any children now
|
// allow the user to expand the items which don't have any children now
|
||||||
// - but instead add them only when needed, thus minimizing memory
|
// - but instead add them only when needed, thus minimizing memory
|
||||||
// usage and loading time.
|
// usage and loading time.
|
||||||
void SetItemHasChildren(const wxTreeItemId& item, bool has = TRUE);
|
void SetItemHasChildren(const wxTreeItemId& item, bool has = True);
|
||||||
|
|
||||||
// the item will be shown in bold
|
// the item will be shown in bold
|
||||||
void SetItemBold(const wxTreeItemId& item, bool bold = TRUE);
|
void SetItemBold(const wxTreeItemId& item, bool bold = True);
|
||||||
|
|
||||||
// set the item's text colour
|
// set the item's text colour
|
||||||
void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
|
void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
|
||||||
@ -697,12 +697,12 @@ public:
|
|||||||
// is item text in bold font?
|
// is item text in bold font?
|
||||||
bool IsBold(const wxTreeItemId& item) const;
|
bool IsBold(const wxTreeItemId& item) const;
|
||||||
|
|
||||||
// if 'recursively' is FALSE, only immediate children count, otherwise
|
// if 'recursively' is False, only immediate children count, otherwise
|
||||||
// the returned number is the number of all items in this branch
|
// the returned number is the number of all items in this branch
|
||||||
size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = TRUE);
|
size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = True);
|
||||||
|
|
||||||
|
|
||||||
// wxTreeItemId.IsOk() will return FALSE if there is no such item
|
// wxTreeItemId.IsOk() will return False if there is no such item
|
||||||
|
|
||||||
// get the root tree item
|
// get the root tree item
|
||||||
wxTreeItemId GetRootItem() const;
|
wxTreeItemId GetRootItem() const;
|
||||||
@ -721,7 +721,7 @@ public:
|
|||||||
num = self->GetSelections(array);
|
num = self->GetSelections(array);
|
||||||
for (x=0; x < num; x++) {
|
for (x=0; x < num; x++) {
|
||||||
wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
|
wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
|
||||||
PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), TRUE);
|
PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), True);
|
||||||
PyList_Append(rval, item);
|
PyList_Append(rval, item);
|
||||||
}
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
@ -858,8 +858,8 @@ public:
|
|||||||
void UnselectAll();
|
void UnselectAll();
|
||||||
|
|
||||||
// select this item
|
// select this item
|
||||||
void SelectItem(const wxTreeItemId& item, bool unselect_others=TRUE,
|
void SelectItem(const wxTreeItemId& item, bool unselect_others=True,
|
||||||
bool extended_select=FALSE);
|
bool extended_select=False);
|
||||||
|
|
||||||
// make sure this item is visible (expanding the parent item and/or
|
// make sure this item is visible (expanding the parent item and/or
|
||||||
// scrolling to this item if necessary)
|
// scrolling to this item if necessary)
|
||||||
@ -873,7 +873,7 @@ public:
|
|||||||
|
|
||||||
%extend {
|
%extend {
|
||||||
// get the bounding rectangle of the item (or of its label only)
|
// get the bounding rectangle of the item (or of its label only)
|
||||||
PyObject* GetBoundingRect(const wxTreeItemId& item, bool textOnly = FALSE) {
|
PyObject* GetBoundingRect(const wxTreeItemId& item, bool textOnly = False) {
|
||||||
wxRect rect;
|
wxRect rect;
|
||||||
if (self->GetBoundingRect(item, rect, textOnly)) {
|
if (self->GetBoundingRect(item, rect, textOnly)) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
|
@ -92,7 +92,7 @@ public:
|
|||||||
void base_OnDelete();
|
void base_OnDelete();
|
||||||
void base_OnDraw(wxDC& dc);
|
void base_OnDraw(wxDC& dc);
|
||||||
void base_OnDrawContents(wxDC& dc);
|
void base_OnDrawContents(wxDC& dc);
|
||||||
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
|
void base_OnDrawBranches(wxDC& dc, bool erase = False);
|
||||||
void base_OnMoveLinks(wxDC& dc);
|
void base_OnMoveLinks(wxDC& dc);
|
||||||
void base_OnErase(wxDC& dc);
|
void base_OnErase(wxDC& dc);
|
||||||
void base_OnEraseContents(wxDC& dc);
|
void base_OnEraseContents(wxDC& dc);
|
||||||
@ -101,8 +101,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -112,7 +112,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -175,21 +175,21 @@ public:
|
|||||||
void ResetMandatoryControlPoints();
|
void ResetMandatoryControlPoints();
|
||||||
bool Recompute();
|
bool Recompute();
|
||||||
void CalculateSize();
|
void CalculateSize();
|
||||||
void Select(bool select = TRUE, wxDC* dc = NULL);
|
void Select(bool select = True, wxDC* dc = NULL);
|
||||||
void SetHighlight(bool hi = TRUE, bool recurse = FALSE);
|
void SetHighlight(bool hi = True, bool recurse = False);
|
||||||
bool IsHighlighted() ;
|
bool IsHighlighted() ;
|
||||||
bool Selected();
|
bool Selected();
|
||||||
bool AncestorSelected();
|
bool AncestorSelected();
|
||||||
void SetSensitivityFilter(int sens = OP_ALL, bool recursive = FALSE);
|
void SetSensitivityFilter(int sens = OP_ALL, bool recursive = False);
|
||||||
int GetSensitivityFilter();
|
int GetSensitivityFilter();
|
||||||
void SetDraggable(bool drag, bool recursive = FALSE);
|
void SetDraggable(bool drag, bool recursive = False);
|
||||||
void SetFixedSize(bool x, bool y);
|
void SetFixedSize(bool x, bool y);
|
||||||
void GetFixedSize(bool *OUTPUT, bool *OUTPUT) ;
|
void GetFixedSize(bool *OUTPUT, bool *OUTPUT) ;
|
||||||
bool GetFixedWidth();
|
bool GetFixedWidth();
|
||||||
bool GetFixedHeight();
|
bool GetFixedHeight();
|
||||||
void SetSpaceAttachments(bool sp);
|
void SetSpaceAttachments(bool sp);
|
||||||
bool GetSpaceAttachments() ;
|
bool GetSpaceAttachments() ;
|
||||||
void SetShadowMode(int mode, bool redraw = FALSE);
|
void SetShadowMode(int mode, bool redraw = False);
|
||||||
int GetShadowMode();
|
int GetShadowMode();
|
||||||
bool HitTest(double x, double y, int *OUTPUT, double *OUTPUT);
|
bool HitTest(double x, double y, int *OUTPUT, double *OUTPUT);
|
||||||
void SetCentreResize(bool cr);
|
void SetCentreResize(bool cr);
|
||||||
@ -233,14 +233,14 @@ public:
|
|||||||
|
|
||||||
void Show(bool show);
|
void Show(bool show);
|
||||||
bool IsShown();
|
bool IsShown();
|
||||||
void Move(wxDC& dc, double x1, double y1, bool display = TRUE);
|
void Move(wxDC& dc, double x1, double y1, bool display = True);
|
||||||
void Erase(wxDC& dc);
|
void Erase(wxDC& dc);
|
||||||
void EraseContents(wxDC& dc);
|
void EraseContents(wxDC& dc);
|
||||||
void Draw(wxDC& dc);
|
void Draw(wxDC& dc);
|
||||||
void Flash();
|
void Flash();
|
||||||
void MoveLinks(wxDC& dc);
|
void MoveLinks(wxDC& dc);
|
||||||
void DrawContents(wxDC& dc);
|
void DrawContents(wxDC& dc);
|
||||||
void SetSize(double x, double y, bool recursive = TRUE);
|
void SetSize(double x, double y, bool recursive = True);
|
||||||
void SetAttachmentSize(double x, double y);
|
void SetAttachmentSize(double x, double y);
|
||||||
void Attach(wxPyShapeCanvas *can);
|
void Attach(wxPyShapeCanvas *can);
|
||||||
void Detach();
|
void Detach();
|
||||||
@ -299,8 +299,8 @@ public:
|
|||||||
wxRealPoint CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2,
|
wxRealPoint CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2,
|
||||||
int nth, int noArcs, wxPyLineShape* line);
|
int nth, int noArcs, wxPyLineShape* line);
|
||||||
bool AttachmentSortTest(int attachmentPoint, const wxRealPoint& pt1, const wxRealPoint& pt2);
|
bool AttachmentSortTest(int attachmentPoint, const wxRealPoint& pt1, const wxRealPoint& pt2);
|
||||||
void EraseLinks(wxDC& dc, int attachment = -1, bool recurse = FALSE);
|
void EraseLinks(wxDC& dc, int attachment = -1, bool recurse = False);
|
||||||
void DrawLinks(wxDC& dc, int attachment = -1, bool recurse = FALSE);
|
void DrawLinks(wxDC& dc, int attachment = -1, bool recurse = False);
|
||||||
bool MoveLineToNewAttachment(wxDC& dc, wxPyLineShape *to_move,
|
bool MoveLineToNewAttachment(wxDC& dc, wxPyLineShape *to_move,
|
||||||
double x, double y);
|
double x, double y);
|
||||||
|
|
||||||
@ -331,7 +331,7 @@ public:
|
|||||||
int LogicalToPhysicalAttachment(int logicalAttachment);
|
int LogicalToPhysicalAttachment(int logicalAttachment);
|
||||||
bool Draggable();
|
bool Draggable();
|
||||||
bool HasDescendant(wxPyShape *image);
|
bool HasDescendant(wxPyShape *image);
|
||||||
wxPyShape *CreateNewCopy(bool resetMapping = TRUE, bool recompute = TRUE);
|
wxPyShape *CreateNewCopy(bool resetMapping = True, bool recompute = True);
|
||||||
void Copy(wxPyShape& copy);
|
void Copy(wxPyShape& copy);
|
||||||
void CopyWithHandler(wxPyShape& copy);
|
void CopyWithHandler(wxPyShape& copy);
|
||||||
void Rotate(double x, double y, double theta);
|
void Rotate(double x, double y, double theta);
|
||||||
@ -345,7 +345,7 @@ public:
|
|||||||
void base_OnDelete();
|
void base_OnDelete();
|
||||||
void base_OnDraw(wxDC& dc);
|
void base_OnDraw(wxDC& dc);
|
||||||
void base_OnDrawContents(wxDC& dc);
|
void base_OnDrawContents(wxDC& dc);
|
||||||
void base_OnDrawBranches(wxDC& dc, bool erase = FALSE);
|
void base_OnDrawBranches(wxDC& dc, bool erase = False);
|
||||||
void base_OnMoveLinks(wxDC& dc);
|
void base_OnMoveLinks(wxDC& dc);
|
||||||
void base_OnErase(wxDC& dc);
|
void base_OnErase(wxDC& dc);
|
||||||
void base_OnEraseContents(wxDC& dc);
|
void base_OnEraseContents(wxDC& dc);
|
||||||
@ -354,8 +354,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -365,7 +365,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
|
@ -143,8 +143,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -154,7 +154,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -194,8 +194,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -205,7 +205,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -245,8 +245,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -256,7 +256,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -323,8 +323,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -334,7 +334,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -445,8 +445,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -456,7 +456,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -496,8 +496,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -507,7 +507,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -571,8 +571,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -582,7 +582,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
|
@ -39,8 +39,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -50,7 +50,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -83,8 +83,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -94,7 +94,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -220,8 +220,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -231,7 +231,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -306,8 +306,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -317,7 +317,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -350,8 +350,8 @@ public:
|
|||||||
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnLeftDoubleClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
void base_OnRightClick(double x, double y, int keys = 0, int attachment = 0);
|
||||||
void base_OnSize(double x, double y);
|
void base_OnSize(double x, double y);
|
||||||
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
bool base_OnMovePre(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = TRUE);
|
void base_OnMovePost(wxDC& dc, double x, double y, double old_x, double old_y, bool display = True);
|
||||||
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnDragLeft(bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnBeginDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
void base_OnEndDragLeft(double x, double y, int keys=0, int attachment = 0);
|
||||||
@ -361,7 +361,7 @@ public:
|
|||||||
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
void base_OnDrawOutline(wxDC& dc, double x, double y, double w, double h);
|
||||||
void base_OnDrawControlPoints(wxDC& dc);
|
void base_OnDrawControlPoints(wxDC& dc);
|
||||||
void base_OnEraseControlPoints(wxDC& dc);
|
void base_OnEraseControlPoints(wxDC& dc);
|
||||||
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = TRUE);
|
void base_OnMoveLink(wxDC& dc, bool moveControlPoints = True);
|
||||||
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingDragLeft(wxPyControlPoint* pt, bool draw, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingBeginDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
void base_OnSizingEndDragLeft(wxPyControlPoint* pt, double x, double y, int keys=0, int attachment = 0);
|
||||||
|
@ -135,7 +135,7 @@ public:
|
|||||||
~wxXmlDocument();
|
~wxXmlDocument();
|
||||||
|
|
||||||
|
|
||||||
// Parses .xml file and loads data. Returns TRUE on success, FALSE
|
// Parses .xml file and loads data. Returns True on success, False
|
||||||
// otherwise.
|
// otherwise.
|
||||||
bool Load(const wxString& filename,
|
bool Load(const wxString& filename,
|
||||||
const wxString& encoding = wxPyUTF8String);
|
const wxString& encoding = wxPyUTF8String);
|
||||||
|
@ -69,7 +69,7 @@ public:
|
|||||||
int GetStyle(const wxString& param = wxT("style"), int defaults = 0)
|
int GetStyle(const wxString& param = wxT("style"), int defaults = 0)
|
||||||
{ return wxXmlResourceHandler::GetStyle(param, defaults); }
|
{ return wxXmlResourceHandler::GetStyle(param, defaults); }
|
||||||
|
|
||||||
wxString GetText(const wxString& param, bool translate = TRUE)
|
wxString GetText(const wxString& param, bool translate = True)
|
||||||
{ return wxXmlResourceHandler::GetText(param, translate); }
|
{ return wxXmlResourceHandler::GetText(param, translate); }
|
||||||
|
|
||||||
int GetID()
|
int GetID()
|
||||||
@ -78,7 +78,7 @@ public:
|
|||||||
wxString GetName()
|
wxString GetName()
|
||||||
{ return wxXmlResourceHandler::GetName(); }
|
{ return wxXmlResourceHandler::GetName(); }
|
||||||
|
|
||||||
bool GetBool(const wxString& param, bool defaultv = FALSE)
|
bool GetBool(const wxString& param, bool defaultv = False)
|
||||||
{ return wxXmlResourceHandler::GetBool(param, defaultv); }
|
{ return wxXmlResourceHandler::GetBool(param, defaultv); }
|
||||||
|
|
||||||
long GetLong( const wxString& param, long defaultv = 0 )
|
long GetLong( const wxString& param, long defaultv = 0 )
|
||||||
@ -112,7 +112,7 @@ public:
|
|||||||
void SetupWindow(wxWindow *wnd)
|
void SetupWindow(wxWindow *wnd)
|
||||||
{ wxXmlResourceHandler::SetupWindow(wnd); }
|
{ wxXmlResourceHandler::SetupWindow(wnd); }
|
||||||
|
|
||||||
void CreateChildren(wxObject *parent, bool this_hnd_only = FALSE)
|
void CreateChildren(wxObject *parent, bool this_hnd_only = False)
|
||||||
{ wxXmlResourceHandler::CreateChildren(parent, this_hnd_only); }
|
{ wxXmlResourceHandler::CreateChildren(parent, this_hnd_only); }
|
||||||
|
|
||||||
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL)
|
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL)
|
||||||
@ -204,7 +204,7 @@ public:
|
|||||||
// - replaces \n, \r, \t by respective chars (according to C syntax)
|
// - replaces \n, \r, \t by respective chars (according to C syntax)
|
||||||
// - replaces _ by & and __ by _ (needed for _File => &File because of XML)
|
// - replaces _ by & and __ by _ (needed for _File => &File because of XML)
|
||||||
// - calls wxGetTranslations (unless disabled in wxXmlResource)
|
// - calls wxGetTranslations (unless disabled in wxXmlResource)
|
||||||
wxString GetText(const wxString& param, bool translate = TRUE);
|
wxString GetText(const wxString& param, bool translate = True);
|
||||||
|
|
||||||
// Returns the XRCID.
|
// Returns the XRCID.
|
||||||
int GetID();
|
int GetID();
|
||||||
@ -212,8 +212,8 @@ public:
|
|||||||
// Returns the resource name.
|
// Returns the resource name.
|
||||||
wxString GetName();
|
wxString GetName();
|
||||||
|
|
||||||
// Gets a bool flag (1, t, yes, on, true are TRUE, everything else is FALSE).
|
// Gets a bool flag (1, t, yes, on, true are True, everything else is False).
|
||||||
bool GetBool(const wxString& param, bool defaultv = FALSE);
|
bool GetBool(const wxString& param, bool defaultv = False);
|
||||||
|
|
||||||
// Gets the integer value from the parameter.
|
// Gets the integer value from the parameter.
|
||||||
long GetLong( const wxString& param, long defaultv = 0 );
|
long GetLong( const wxString& param, long defaultv = 0 );
|
||||||
@ -247,7 +247,7 @@ public:
|
|||||||
void SetupWindow(wxWindow *wnd);
|
void SetupWindow(wxWindow *wnd);
|
||||||
|
|
||||||
// Creates children.
|
// Creates children.
|
||||||
void CreateChildren(wxObject *parent, bool this_hnd_only = FALSE);
|
void CreateChildren(wxObject *parent, bool this_hnd_only = False);
|
||||||
|
|
||||||
// Helper function.
|
// Helper function.
|
||||||
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL);
|
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL);
|
||||||
|
@ -195,7 +195,7 @@ public:
|
|||||||
|
|
||||||
%pythoncode {
|
%pythoncode {
|
||||||
def XRCID(str_id):
|
def XRCID(str_id):
|
||||||
return wxXmlResource_GetXRCID(str_id)
|
return XmlResource_GetXRCID(str_id)
|
||||||
|
|
||||||
def XRCCTRL(window, str_id, *ignoreargs):
|
def XRCCTRL(window, str_id, *ignoreargs):
|
||||||
return window.FindWindowById(XRCID(str_id))
|
return window.FindWindowById(XRCID(str_id))
|
||||||
|
@ -53,9 +53,9 @@ public:
|
|||||||
char Peek() { if (m_wxis) return m_wxis->Peek(); else return -1; }
|
char Peek() { if (m_wxis) return m_wxis->Peek(); else return -1; }
|
||||||
char GetC() { if (m_wxis) return m_wxis->GetC(); else return -1; }
|
char GetC() { if (m_wxis) return m_wxis->GetC(); else return -1; }
|
||||||
size_t LastRead() { if (m_wxis) return m_wxis->LastRead(); else return 0; }
|
size_t LastRead() { if (m_wxis) return m_wxis->LastRead(); else return 0; }
|
||||||
bool CanRead() { if (m_wxis) return m_wxis->CanRead(); else return FALSE; }
|
bool CanRead() { if (m_wxis) return m_wxis->CanRead(); else return False; }
|
||||||
bool Eof() { if (m_wxis) return m_wxis->Eof(); else return FALSE; }
|
bool Eof() { if (m_wxis) return m_wxis->Eof(); else return False; }
|
||||||
bool Ungetch(char c) { if (m_wxis) return m_wxis->Ungetch(c); else return FALSE; }
|
bool Ungetch(char c) { if (m_wxis) return m_wxis->Ungetch(c); else return False; }
|
||||||
|
|
||||||
unsigned long SeekI(unsigned long pos, wxSeekMode mode)
|
unsigned long SeekI(unsigned long pos, wxSeekMode mode)
|
||||||
{ if (m_wxis) return m_wxis->SeekI(pos, mode); else return 0; }
|
{ if (m_wxis) return m_wxis->SeekI(pos, mode); else return 0; }
|
||||||
@ -72,7 +72,7 @@ public:
|
|||||||
virtual size_t GetSize() const;
|
virtual size_t GetSize() const;
|
||||||
|
|
||||||
// factory function
|
// factory function
|
||||||
static wxPyCBInputStream* create(PyObject *py, bool block=TRUE);
|
static wxPyCBInputStream* create(PyObject *py, bool block=True);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// can only be created via the factory
|
// can only be created via the factory
|
||||||
|
@ -97,7 +97,7 @@ static void wxPyCoreAPI_IMPORT() {
|
|||||||
#define wxPyCBH_callCallbackObj(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_callCallbackObj(a, b))
|
#define wxPyCBH_callCallbackObj(a, b) (wxPyCoreAPIPtr->p_wxPyCBH_callCallbackObj(a, b))
|
||||||
#define wxPyCBH_delete(a) (wxPyCoreAPIPtr->p_wxPyCBH_delete(a))
|
#define wxPyCBH_delete(a) (wxPyCoreAPIPtr->p_wxPyCBH_delete(a))
|
||||||
|
|
||||||
#define wxPyMake_wxObject(a) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,TRUE))
|
#define wxPyMake_wxObject(a) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,True))
|
||||||
#define wxPyMake_wxObject2(a,b) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,b))
|
#define wxPyMake_wxObject2(a,b) (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,b))
|
||||||
#define wxPyMake_wxSizer(a) (wxPyCoreAPIPtr->p_wxPyMake_wxSizer(a))
|
#define wxPyMake_wxSizer(a) (wxPyCoreAPIPtr->p_wxPyMake_wxSizer(a))
|
||||||
#define wxPyPtrTypeMap_Add(a, b) (wxPyCoreAPIPtr->p_wxPyPtrTypeMap_Add(a, b))
|
#define wxPyPtrTypeMap_Add(a, b) (wxPyCoreAPIPtr->p_wxPyPtrTypeMap_Add(a, b))
|
||||||
|
@ -82,6 +82,9 @@
|
|||||||
typedef unsigned char byte;
|
typedef unsigned char byte;
|
||||||
typedef wxPoint2DDouble wxPoint2D;
|
typedef wxPoint2DDouble wxPoint2D;
|
||||||
|
|
||||||
|
const bool True = true;
|
||||||
|
const bool False = false;
|
||||||
|
|
||||||
|
|
||||||
#ifndef wxPyUSE_EXPORTED_API
|
#ifndef wxPyUSE_EXPORTED_API
|
||||||
|
|
||||||
@ -105,7 +108,7 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const char* classname);
|
|||||||
PyObject* wx2PyString(const wxString& src);
|
PyObject* wx2PyString(const wxString& src);
|
||||||
wxString Py2wxString(PyObject* source);
|
wxString Py2wxString(PyObject* source);
|
||||||
|
|
||||||
PyObject* wxPyMake_wxObject(wxObject* source, bool checkEvtHandler=TRUE);
|
PyObject* wxPyMake_wxObject(wxObject* source, bool checkEvtHandler=True);
|
||||||
PyObject* wxPyMake_wxSizer(wxSizer* source);
|
PyObject* wxPyMake_wxSizer(wxSizer* source);
|
||||||
void wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName);
|
void wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName);
|
||||||
|
|
||||||
@ -180,7 +183,7 @@ bool wxPyTwoIntItem_helper(PyObject* source, T** obj, const wxChar* name)
|
|||||||
if (! wxPyConvertSwigPtr(source, (void **)&ptr, name))
|
if (! wxPyConvertSwigPtr(source, (void **)&ptr, name))
|
||||||
goto error;
|
goto error;
|
||||||
*obj = ptr;
|
*obj = ptr;
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
// otherwise a 2-tuple of integers is expected
|
// otherwise a 2-tuple of integers is expected
|
||||||
else if (PySequence_Check(source) && PyObject_Length(source) == 2) {
|
else if (PySequence_Check(source) && PyObject_Length(source) == 2) {
|
||||||
@ -194,14 +197,14 @@ bool wxPyTwoIntItem_helper(PyObject* source, T** obj, const wxChar* name)
|
|||||||
**obj = T(PyInt_AsLong(o1), PyInt_AsLong(o2));
|
**obj = T(PyInt_AsLong(o1), PyInt_AsLong(o2));
|
||||||
Py_DECREF(o1);
|
Py_DECREF(o1);
|
||||||
Py_DECREF(o2);
|
Py_DECREF(o2);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf(wxT("Expected a 2-tuple of integers or a %s object."), name);
|
msg.Printf(wxT("Expected a 2-tuple of integers or a %s object."), name);
|
||||||
PyErr_SetString(PyExc_TypeError, msg.mb_str());
|
PyErr_SetString(PyExc_TypeError, msg.mb_str());
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -256,7 +259,7 @@ public:
|
|||||||
wxPyEvtSelfRef();
|
wxPyEvtSelfRef();
|
||||||
~wxPyEvtSelfRef();
|
~wxPyEvtSelfRef();
|
||||||
|
|
||||||
void SetSelf(PyObject* self, bool clone=FALSE);
|
void SetSelf(PyObject* self, bool clone=False);
|
||||||
PyObject* GetSelf() const;
|
PyObject* GetSelf() const;
|
||||||
bool GetCloned() const { return m_cloned; }
|
bool GetCloned() const { return m_cloned; }
|
||||||
|
|
||||||
@ -493,7 +496,7 @@ public:
|
|||||||
m_class = NULL;
|
m_class = NULL;
|
||||||
m_self = NULL;
|
m_self = NULL;
|
||||||
m_lastFound = NULL;
|
m_lastFound = NULL;
|
||||||
m_incRef = FALSE;
|
m_incRef = False;
|
||||||
}
|
}
|
||||||
|
|
||||||
~wxPyCallbackHelper() {
|
~wxPyCallbackHelper() {
|
||||||
@ -504,7 +507,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void setSelf(PyObject* self, PyObject* klass, int incref=TRUE);
|
void setSelf(PyObject* self, PyObject* klass, int incref=True);
|
||||||
bool findCallback(const char* name) const;
|
bool findCallback(const char* name) const;
|
||||||
int callCallback(PyObject* argTuple) const;
|
int callCallback(PyObject* argTuple) const;
|
||||||
PyObject* callCallbackObj(PyObject* argTuple) const;
|
PyObject* callCallbackObj(PyObject* argTuple) const;
|
||||||
@ -634,7 +637,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_INTINT(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_INTINT(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(int a, int b) { \
|
bool CLASS::CBNAME(int a, int b) { \
|
||||||
bool rval=FALSE, found; \
|
bool rval=False, found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
||||||
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \
|
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \
|
||||||
@ -846,7 +849,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_BOOL(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_BOOL(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(bool a) { \
|
bool CLASS::CBNAME(bool a) { \
|
||||||
bool rval=FALSE, found; \
|
bool rval=False, found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
||||||
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a));\
|
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a));\
|
||||||
@ -868,7 +871,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_INT(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_INT(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(int a) { \
|
bool CLASS::CBNAME(int a) { \
|
||||||
bool rval=FALSE, found; \
|
bool rval=False, found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
||||||
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a));\
|
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a));\
|
||||||
@ -889,11 +892,11 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_INT_pure(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_INT_pure(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(int a) { \
|
bool CLASS::CBNAME(int a) { \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
|
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \
|
||||||
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a)); \
|
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)",a)); \
|
||||||
else rval = FALSE; \
|
else rval = False; \
|
||||||
wxPyEndBlockThreads(); \
|
wxPyEndBlockThreads(); \
|
||||||
return rval; \
|
return rval; \
|
||||||
}
|
}
|
||||||
@ -1051,7 +1054,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
bool CLASS::CBNAME(wxDC& a, double b, double c, double d, double e, bool f) { \
|
bool CLASS::CBNAME(wxDC& a, double b, double c, double d, double e, bool f) { \
|
||||||
bool found; \
|
bool found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
||||||
PyObject* obj = wxPyMake_wxObject(&a); \
|
PyObject* obj = wxPyMake_wxObject(&a); \
|
||||||
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddddi)", obj, b, c, d, e, (int)f));\
|
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddddi)", obj, b, c, d, e, (int)f));\
|
||||||
@ -1261,7 +1264,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_STRING(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_STRING(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(const wxString& a) { \
|
bool CLASS::CBNAME(const wxString& a) { \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
bool found; \
|
bool found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
||||||
@ -1285,7 +1288,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_STRING_pure(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_STRING_pure(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(const wxString& a) { \
|
bool CLASS::CBNAME(const wxString& a) { \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
|
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
|
||||||
PyObject* s = wx2PyString(a); \
|
PyObject* s = wx2PyString(a); \
|
||||||
@ -1377,7 +1380,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_STRINGSTRING(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_STRINGSTRING(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(const wxString& a, const wxString& b) { \
|
bool CLASS::CBNAME(const wxString& a, const wxString& b) { \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
bool found; \
|
bool found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
||||||
@ -1502,7 +1505,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_TAG_pure(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_TAG_pure(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(const wxHtmlTag& a) { \
|
bool CLASS::CBNAME(const wxHtmlTag& a) { \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
|
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
|
||||||
PyObject* obj = wxPyConstructObject((void*)&a, wxT("wxHtmlTag"), 0); \
|
PyObject* obj = wxPyConstructObject((void*)&a, wxT("wxHtmlTag"), 0); \
|
||||||
@ -1625,7 +1628,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_WXWIN(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_WXWIN(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(wxWindow* a) { \
|
bool CLASS::CBNAME(wxWindow* a) { \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
bool found; \
|
bool found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
||||||
@ -1651,7 +1654,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_WXWINDC(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_WXWINDC(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(wxWindow* a, wxDC& b) { \
|
bool CLASS::CBNAME(wxWindow* a, wxDC& b) { \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
bool found; \
|
bool found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
||||||
@ -1703,7 +1706,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME() { \
|
bool CLASS::CBNAME() { \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
bool found; \
|
bool found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
||||||
@ -1726,7 +1729,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_const(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_const(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME() const { \
|
bool CLASS::CBNAME() const { \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
bool found; \
|
bool found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
||||||
@ -1798,7 +1801,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_DR(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_DR(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(wxDragResult a) { \
|
bool CLASS::CBNAME(wxDragResult a) { \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
bool found; \
|
bool found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \
|
||||||
@ -1835,7 +1838,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_INTINTSTR_pure(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_INTINTSTR_pure(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(int a, int b, const wxString& c) { \
|
bool CLASS::CBNAME(int a, int b, const wxString& c) { \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
|
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
|
||||||
PyObject* s = wx2PyString(c); \
|
PyObject* s = wx2PyString(c); \
|
||||||
@ -1981,7 +1984,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_bool_any(CLASS, PCLASS, CBNAME, Type) \
|
#define IMP_PYCALLBACK_bool_any(CLASS, PCLASS, CBNAME, Type) \
|
||||||
bool CLASS::CBNAME(Type& a) { \
|
bool CLASS::CBNAME(Type& a) { \
|
||||||
bool rv=FALSE; \
|
bool rv=False; \
|
||||||
bool found; \
|
bool found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
||||||
@ -2006,7 +2009,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_bool_anypure(CLASS, PCLASS, CBNAME, Type) \
|
#define IMP_PYCALLBACK_bool_anypure(CLASS, PCLASS, CBNAME, Type) \
|
||||||
bool CLASS::CBNAME(Type& a) { \
|
bool CLASS::CBNAME(Type& a) { \
|
||||||
bool rv=FALSE; \
|
bool rv=False; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
|
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
|
||||||
PyObject* obj = wxPyConstructObject((void*)&a, wxT(#Type), 0); \
|
PyObject* obj = wxPyConstructObject((void*)&a, wxT(#Type), 0); \
|
||||||
@ -2114,7 +2117,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_ME(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_ME(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(wxMouseEvent& e) { \
|
bool CLASS::CBNAME(wxMouseEvent& e) { \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
bool found; \
|
bool found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
||||||
@ -2233,7 +2236,7 @@ extern wxPyApp *wxPythonApp;
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_NODE_pure(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_NODE_pure(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(wxXmlNode* a) { \
|
bool CLASS::CBNAME(wxXmlNode* a) { \
|
||||||
bool rv=FALSE; \
|
bool rv=False; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
|
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
|
||||||
PyObject* obj = wxPyConstructObject((void*)a, wxT("wxXmlNode"), 0); \
|
PyObject* obj = wxPyConstructObject((void*)a, wxT("wxXmlNode"), 0); \
|
||||||
|
@ -717,7 +717,7 @@ swig_sources = run_swig(['gdi.i'], 'src', GENDIR, PKGDIR,
|
|||||||
'src/_gdiobj.i', 'src/_icon.i',
|
'src/_gdiobj.i', 'src/_icon.i',
|
||||||
'src/_imaglist.i', 'src/_pen.i',
|
'src/_imaglist.i', 'src/_pen.i',
|
||||||
'src/_region.i', 'src/_palette.i',
|
'src/_region.i', 'src/_palette.i',
|
||||||
'src/_stockobjs.i', 'src/_dragimg.i',
|
'src/_stockobjs.i',
|
||||||
'src/_effects.i',
|
'src/_effects.i',
|
||||||
'src/_intl.i',
|
'src/_intl.i',
|
||||||
'src/_intl_ex.py',
|
'src/_intl_ex.py',
|
||||||
@ -779,7 +779,7 @@ swig_sources = run_swig(['controls.i'], 'src', GENDIR, PKGDIR,
|
|||||||
'src/_tglbtn.i', 'src/_notebook.i',
|
'src/_tglbtn.i', 'src/_notebook.i',
|
||||||
'src/_listctrl.i', 'src/_treectrl.i',
|
'src/_listctrl.i', 'src/_treectrl.i',
|
||||||
'src/_dirctrl.i', 'src/_pycontrol.i',
|
'src/_dirctrl.i', 'src/_pycontrol.i',
|
||||||
'src/_cshelp.i',
|
'src/_cshelp.i', 'src/_dragimg.i',
|
||||||
])
|
])
|
||||||
ext = Extension('_controls', swig_sources,
|
ext = Extension('_controls', swig_sources,
|
||||||
include_dirs = includes,
|
include_dirs = includes,
|
||||||
|
@ -86,13 +86,13 @@ public:
|
|||||||
// process all currently pending events right now
|
// process all currently pending events right now
|
||||||
//
|
//
|
||||||
// it is an error to call Yield() recursively unless the value of
|
// it is an error to call Yield() recursively unless the value of
|
||||||
// onlyIfNeeded is TRUE
|
// onlyIfNeeded is True
|
||||||
//
|
//
|
||||||
// WARNING: this function is dangerous as it can lead to unexpected
|
// WARNING: this function is dangerous as it can lead to unexpected
|
||||||
// reentrancies (i.e. when called from an event handler it
|
// reentrancies (i.e. when called from an event handler it
|
||||||
// may result in calling the same event handler again), use
|
// may result in calling the same event handler again), use
|
||||||
// with _extreme_ care or, better, don't use at all!
|
// with _extreme_ care or, better, don't use at all!
|
||||||
virtual bool Yield(bool onlyIfNeeded = false);
|
virtual bool Yield(bool onlyIfNeeded = False);
|
||||||
|
|
||||||
// make sure that idle events are sent again
|
// make sure that idle events are sent again
|
||||||
virtual void WakeUpIdle();
|
virtual void WakeUpIdle();
|
||||||
@ -108,7 +108,7 @@ public:
|
|||||||
// stop the program immediately!)
|
// stop the program immediately!)
|
||||||
virtual void ExitMainLoop();
|
virtual void ExitMainLoop();
|
||||||
|
|
||||||
// returns TRUE if there are unprocessed events in the event queue
|
// returns True if there are unprocessed events in the event queue
|
||||||
virtual bool Pending();
|
virtual bool Pending();
|
||||||
|
|
||||||
// process the first event in the event queue (blocks until an event
|
// process the first event in the event queue (blocks until an event
|
||||||
@ -120,18 +120,18 @@ public:
|
|||||||
// becomes idle and normally just sends wxIdleEvent to all interested
|
// becomes idle and normally just sends wxIdleEvent to all interested
|
||||||
// parties
|
// parties
|
||||||
//
|
//
|
||||||
// it should return TRUE if more idle events are needed, FALSE if not
|
// it should return True if more idle events are needed, False if not
|
||||||
virtual bool ProcessIdle() ;
|
virtual bool ProcessIdle() ;
|
||||||
|
|
||||||
// Send idle event to window and all subwindows
|
// Send idle event to window and all subwindows
|
||||||
// Returns TRUE if more idle time is requested.
|
// Returns True if more idle time is requested.
|
||||||
virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event);
|
virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event);
|
||||||
|
|
||||||
// Perform standard OnIdle behaviour: call from port's OnIdle
|
// Perform standard OnIdle behaviour: call from port's OnIdle
|
||||||
void OnIdle(wxIdleEvent& event);
|
void OnIdle(wxIdleEvent& event);
|
||||||
|
|
||||||
|
|
||||||
// return TRUE if our app has focus
|
// return True if our app has focus
|
||||||
virtual bool IsActive() const;
|
virtual bool IsActive() const;
|
||||||
|
|
||||||
// set the "main" top level window
|
// set the "main" top level window
|
||||||
@ -145,7 +145,7 @@ public:
|
|||||||
// control the exit behaviour: by default, the program will exit the
|
// control the exit behaviour: by default, the program will exit the
|
||||||
// main loop (and so, usually, terminate) when the last top-level
|
// main loop (and so, usually, terminate) when the last top-level
|
||||||
// program window is deleted. Beware that if you disable this behaviour
|
// program window is deleted. Beware that if you disable this behaviour
|
||||||
// (with SetExitOnFrameDelete(FALSE)), you'll have to call
|
// (with SetExitOnFrameDelete(False)), you'll have to call
|
||||||
// ExitMainLoop() explicitly from somewhere.
|
// ExitMainLoop() explicitly from somewhere.
|
||||||
void SetExitOnFrameDelete(bool flag);
|
void SetExitOnFrameDelete(bool flag);
|
||||||
bool GetExitOnFrameDelete() const;
|
bool GetExitOnFrameDelete() const;
|
||||||
@ -220,7 +220,7 @@ void wxExit();
|
|||||||
// Yield to other apps/messages
|
// Yield to other apps/messages
|
||||||
bool wxYield();
|
bool wxYield();
|
||||||
bool wxYieldIfNeeded();
|
bool wxYieldIfNeeded();
|
||||||
bool wxSafeYield(wxWindow* win=NULL, bool onlyIfNeeded=FALSE);
|
bool wxSafeYield(wxWindow* win=NULL, bool onlyIfNeeded=False);
|
||||||
|
|
||||||
// Cause the message queue to become empty again
|
// Cause the message queue to become empty again
|
||||||
void wxWakeUpIdle();
|
void wxWakeUpIdle();
|
||||||
|
@ -65,7 +65,7 @@ public:
|
|||||||
virtual bool Flush();
|
virtual bool Flush();
|
||||||
|
|
||||||
// X11 has two clipboards which get selected by this call. Empty on MSW.
|
// X11 has two clipboards which get selected by this call. Empty on MSW.
|
||||||
virtual void UsePrimarySelection( bool primary = FALSE );
|
virtual void UsePrimarySelection( bool primary = False );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,17 +54,17 @@ public:
|
|||||||
// bool __eq__(PyObject* obj) {
|
// bool __eq__(PyObject* obj) {
|
||||||
// wxColour tmp;
|
// wxColour tmp;
|
||||||
// wxColour* ptr = &tmp;
|
// wxColour* ptr = &tmp;
|
||||||
// if (obj == Py_None) return FALSE;
|
// if (obj == Py_None) return False;
|
||||||
// wxPyBLOCK_THREADS(bool success = wxColour_helper(obj, &ptr); PyErr_Clear());
|
// wxPyBLOCK_THREADS(bool success = wxColour_helper(obj, &ptr); PyErr_Clear());
|
||||||
// if (! success) return FALSE;
|
// if (! success) return False;
|
||||||
// return *self == *ptr;
|
// return *self == *ptr;
|
||||||
// }
|
// }
|
||||||
// bool __ne__(PyObject* obj) {
|
// bool __ne__(PyObject* obj) {
|
||||||
// wxColour tmp;
|
// wxColour tmp;
|
||||||
// wxColour* ptr = &tmp;
|
// wxColour* ptr = &tmp;
|
||||||
// if (obj == Py_None) return TRUE;
|
// if (obj == Py_None) return True;
|
||||||
// wxPyBLOCK_THREADS(bool success = wxColour_helper(obj, &ptr); PyErr_Clear());
|
// wxPyBLOCK_THREADS(bool success = wxColour_helper(obj, &ptr); PyErr_Clear());
|
||||||
// if (! success) return TRUE;
|
// if (! success) return True;
|
||||||
// return *self != *ptr;
|
// return *self != *ptr;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ public:
|
|||||||
|
|
||||||
// get the config object, creates it on demand unless DontCreateOnDemand
|
// get the config object, creates it on demand unless DontCreateOnDemand
|
||||||
// was called
|
// was called
|
||||||
static wxConfigBase *Get(bool createOnDemand = TRUE);
|
static wxConfigBase *Get(bool createOnDemand = True);
|
||||||
|
|
||||||
// create a new config object: this function will create the "best"
|
// create a new config object: this function will create the "best"
|
||||||
// implementation of wxConfig available for the current platform, see
|
// implementation of wxConfig available for the current platform, see
|
||||||
@ -144,16 +144,16 @@ public:
|
|||||||
|
|
||||||
// get number of entries/subgroups in the current group, with or without
|
// get number of entries/subgroups in the current group, with or without
|
||||||
// it's subgroups
|
// it's subgroups
|
||||||
virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const;
|
virtual size_t GetNumberOfEntries(bool bRecursive = False) const;
|
||||||
virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const;
|
virtual size_t GetNumberOfGroups(bool bRecursive = False) const;
|
||||||
|
|
||||||
// returns TRUE if the group by this name exists
|
// returns True if the group by this name exists
|
||||||
virtual bool HasGroup(const wxString& strName) const;
|
virtual bool HasGroup(const wxString& strName) const;
|
||||||
|
|
||||||
// same as above, but for an entry
|
// same as above, but for an entry
|
||||||
virtual bool HasEntry(const wxString& strName) const;
|
virtual bool HasEntry(const wxString& strName) const;
|
||||||
|
|
||||||
// returns TRUE if either a group or an entry with a given name exist
|
// returns True if either a group or an entry with a given name exist
|
||||||
bool Exists(const wxString& strName) const;
|
bool Exists(const wxString& strName) const;
|
||||||
|
|
||||||
// get the entry type
|
// get the entry type
|
||||||
@ -174,7 +174,7 @@ public:
|
|||||||
self->Read(key, &rv, defaultVal);
|
self->Read(key, &rv, defaultVal);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
bool ReadBool(const wxString& key, bool defaultVal = FALSE) {
|
bool ReadBool(const wxString& key, bool defaultVal = False) {
|
||||||
bool rv;
|
bool rv;
|
||||||
self->Read(key, &rv, defaultVal);
|
self->Read(key, &rv, defaultVal);
|
||||||
return rv;
|
return rv;
|
||||||
@ -182,7 +182,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// write the value (return true on success)
|
// write the value (return True on success)
|
||||||
bool Write(const wxString& key, const wxString& value);
|
bool Write(const wxString& key, const wxString& value);
|
||||||
%name(WriteInt)bool Write(const wxString& key, long value);
|
%name(WriteInt)bool Write(const wxString& key, long value);
|
||||||
%name(WriteFloat)bool Write(const wxString& key, double value);
|
%name(WriteFloat)bool Write(const wxString& key, double value);
|
||||||
@ -190,9 +190,9 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// permanently writes all changes
|
// permanently writes all changes
|
||||||
virtual bool Flush(bool bCurrentOnly = FALSE);
|
virtual bool Flush(bool bCurrentOnly = False);
|
||||||
|
|
||||||
// renaming, all functions return FALSE on failure (probably because the new
|
// renaming, all functions return False on failure (probably because the new
|
||||||
// name is already taken by an existing entry)
|
// name is already taken by an existing entry)
|
||||||
// rename an entry
|
// rename an entry
|
||||||
virtual bool RenameEntry(const wxString& oldName,
|
virtual bool RenameEntry(const wxString& oldName,
|
||||||
@ -202,9 +202,9 @@ public:
|
|||||||
const wxString& newName);
|
const wxString& newName);
|
||||||
|
|
||||||
// deletes the specified entry and the group it belongs to if
|
// deletes the specified entry and the group it belongs to if
|
||||||
// it was the last key in it and the second parameter is true
|
// it was the last key in it and the second parameter is True
|
||||||
virtual bool DeleteEntry(const wxString& key,
|
virtual bool DeleteEntry(const wxString& key,
|
||||||
bool bDeleteGroupIfEmpty = TRUE);
|
bool bDeleteGroupIfEmpty = True);
|
||||||
|
|
||||||
// delete the group (with all subgroups)
|
// delete the group (with all subgroups)
|
||||||
virtual bool DeleteGroup(const wxString& key);
|
virtual bool DeleteGroup(const wxString& key);
|
||||||
@ -217,10 +217,10 @@ public:
|
|||||||
// we can automatically expand environment variables in the config entries
|
// we can automatically expand environment variables in the config entries
|
||||||
// (this option is on by default, you can turn it on/off at any time)
|
// (this option is on by default, you can turn it on/off at any time)
|
||||||
bool IsExpandingEnvVars() const;
|
bool IsExpandingEnvVars() const;
|
||||||
void SetExpandEnvVars(bool bDoIt = TRUE);
|
void SetExpandEnvVars(bool bDoIt = True);
|
||||||
|
|
||||||
// recording of default values
|
// recording of default values
|
||||||
void SetRecordDefaults(bool bDoIt = TRUE);
|
void SetRecordDefaults(bool bDoIt = True);
|
||||||
bool IsRecordingDefaults() const;
|
bool IsRecordingDefaults() const;
|
||||||
|
|
||||||
// does expansion only if needed
|
// does expansion only if needed
|
||||||
|
@ -89,12 +89,12 @@ PyObject* wxPyConstructObject(void* ptr,
|
|||||||
// Extract a pointer to the wrapped C++ object from a Python proxy object.
|
// Extract a pointer to the wrapped C++ object from a Python proxy object.
|
||||||
// Ensures that the proxy object is of the specified (or derived) type. If
|
// Ensures that the proxy object is of the specified (or derived) type. If
|
||||||
// not able to perform the conversion then a Python exception is set and the
|
// not able to perform the conversion then a Python exception is set and the
|
||||||
// error should be handled properly in the caller. Returns true on success.
|
// error should be handled properly in the caller. Returns True on success.
|
||||||
bool wxPyConvertSwigPtr(PyObject* obj, void **ptr,
|
bool wxPyConvertSwigPtr(PyObject* obj, void **ptr,
|
||||||
const wxChar* className) {
|
const wxChar* className) {
|
||||||
|
|
||||||
swig_type_info* swigType = wxPyFindSwigType(className);
|
swig_type_info* swigType = wxPyFindSwigType(className);
|
||||||
wxCHECK_MSG(swigType != NULL, false, wxT("Unknown type in wxPyConvertSwigPtr"));
|
wxCHECK_MSG(swigType != NULL, False, wxT("Unknown type in wxPyConvertSwigPtr"));
|
||||||
|
|
||||||
return SWIG_Python_ConvertPtr(obj, ptr, swigType, SWIG_POINTER_EXCEPTION) != -1;
|
return SWIG_Python_ConvertPtr(obj, ptr, swigType, SWIG_POINTER_EXCEPTION) != -1;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ public:
|
|||||||
|
|
||||||
class wxContextHelp : public wxObject {
|
class wxContextHelp : public wxObject {
|
||||||
public:
|
public:
|
||||||
wxContextHelp(wxWindow* window = NULL, bool doNow = TRUE);
|
wxContextHelp(wxWindow* window = NULL, bool doNow = True);
|
||||||
~wxContextHelp();
|
~wxContextHelp();
|
||||||
|
|
||||||
bool BeginContextHelp(wxWindow* window = NULL);
|
bool BeginContextHelp(wxWindow* window = NULL);
|
||||||
|
@ -21,7 +21,7 @@ public:
|
|||||||
%extend {
|
%extend {
|
||||||
wxCursor(const wxString* cursorName, long flags, int hotSpotX=0, int hotSpotY=0) {
|
wxCursor(const wxString* cursorName, long flags, int hotSpotX=0, int hotSpotY=0) {
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
wxCHECK_MSG(FALSE, NULL,
|
wxCHECK_MSG(False, NULL,
|
||||||
wxT("wxCursor constructor not implemented for wxGTK, use wxStockCursor, wxCursorFromImage, or wxCursorFromBits instead."));
|
wxT("wxCursor constructor not implemented for wxGTK, use wxStockCursor, wxCursorFromImage, or wxCursorFromBits instead."));
|
||||||
#else
|
#else
|
||||||
return new wxCursor(*cursorName, flags, hotSpotX, hotSpotY);
|
return new wxCursor(*cursorName, flags, hotSpotX, hotSpotY);
|
||||||
|
@ -112,7 +112,7 @@ public:
|
|||||||
// get the number of formats we support
|
// get the number of formats we support
|
||||||
virtual size_t GetFormatCount(Direction dir = Get) const;
|
virtual size_t GetFormatCount(Direction dir = Get) const;
|
||||||
|
|
||||||
// returns TRUE if this format is supported
|
// returns True if this format is supported
|
||||||
bool IsSupported(const wxDataFormat& format, Direction dir = Get) const;
|
bool IsSupported(const wxDataFormat& format, Direction dir = Get) const;
|
||||||
|
|
||||||
// get the (total) size of data for the given format
|
// get the (total) size of data for the given format
|
||||||
@ -128,11 +128,11 @@ public:
|
|||||||
Direction dir = Get) const;
|
Direction dir = Get) const;
|
||||||
|
|
||||||
// copy raw data (in the specified format) to the provided buffer, return
|
// copy raw data (in the specified format) to the provided buffer, return
|
||||||
// TRUE if data copied successfully, FALSE otherwise
|
// True if data copied successfully, False otherwise
|
||||||
virtual bool GetDataHere(const wxDataFormat& format, void *buf) const;
|
virtual bool GetDataHere(const wxDataFormat& format, void *buf) const;
|
||||||
|
|
||||||
// get data from the buffer of specified length (in the given format),
|
// get data from the buffer of specified length (in the given format),
|
||||||
// return TRUE if the data was read successfully, FALSE otherwise
|
// return True if the data was read successfully, False otherwise
|
||||||
virtual bool SetData(const wxDataFormat& format,
|
virtual bool SetData(const wxDataFormat& format,
|
||||||
size_t len, const void * buf);
|
size_t len, const void * buf);
|
||||||
};
|
};
|
||||||
@ -143,7 +143,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// wxDataObjectSimple is a wxDataObject which only supports one format (in
|
// wxDataObjectSimple is a wxDataObject which only supports one format (in
|
||||||
// both Get and Set directions, but you may return FALSE from GetDataHere() or
|
// both Get and Set directions, but you may return False from GetDataHere() or
|
||||||
// SetData() if one of them is not supported). This is the simplest possible
|
// SetData() if one of them is not supported). This is the simplest possible
|
||||||
// wxDataObject implementation.
|
// wxDataObject implementation.
|
||||||
//
|
//
|
||||||
@ -186,7 +186,7 @@ bool wxPyDataObjectSimple::GetDataHere(void *buf) const {
|
|||||||
// return either a string or None and then act appropriately with the
|
// return either a string or None and then act appropriately with the
|
||||||
// C++ version.
|
// C++ version.
|
||||||
|
|
||||||
bool rval = FALSE;
|
bool rval = False;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if (wxPyCBH_findCallback(m_myInst, "GetDataHere")) {
|
if (wxPyCBH_findCallback(m_myInst, "GetDataHere")) {
|
||||||
PyObject* ro;
|
PyObject* ro;
|
||||||
@ -205,7 +205,7 @@ bool wxPyDataObjectSimple::GetDataHere(void *buf) const {
|
|||||||
bool wxPyDataObjectSimple::SetData(size_t len, const void *buf) const{
|
bool wxPyDataObjectSimple::SetData(size_t len, const void *buf) const{
|
||||||
// For this one we simply need to make a string from buf and len
|
// For this one we simply need to make a string from buf and len
|
||||||
// and send it to the Python method.
|
// and send it to the Python method.
|
||||||
bool rval = FALSE;
|
bool rval = False;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if (wxPyCBH_findCallback(m_myInst, "SetData")) {
|
if (wxPyCBH_findCallback(m_myInst, "SetData")) {
|
||||||
PyObject* data = PyString_FromStringAndSize((char*)buf, len);
|
PyObject* data = PyString_FromStringAndSize((char*)buf, len);
|
||||||
@ -241,7 +241,7 @@ public:
|
|||||||
wxDataObjectComposite();
|
wxDataObjectComposite();
|
||||||
|
|
||||||
%addtofunc Add "args[1].thisown = 0"
|
%addtofunc Add "args[1].thisown = 0"
|
||||||
void Add(wxDataObjectSimple *dataObject, int preferred = FALSE);
|
void Add(wxDataObjectSimple *dataObject, int preferred = False);
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@ -330,7 +330,7 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() const {
|
|||||||
void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
|
void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if (wxPyCBH_findCallback(m_myInst, "SetBitmap")) {
|
if (wxPyCBH_findCallback(m_myInst, "SetBitmap")) {
|
||||||
PyObject* bo = wxPyConstructObject((void*)&bitmap, wxT("wxBitmap"), false);
|
PyObject* bo = wxPyConstructObject((void*)&bitmap, wxT("wxBitmap"), False);
|
||||||
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", bo));
|
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", bo));
|
||||||
Py_DECREF(bo);
|
Py_DECREF(bo);
|
||||||
}
|
}
|
||||||
@ -393,7 +393,7 @@ public:
|
|||||||
else {
|
else {
|
||||||
// raise a TypeError if not a string
|
// raise a TypeError if not a string
|
||||||
PyErr_SetString(PyExc_TypeError, "String expected.");
|
PyErr_SetString(PyExc_TypeError, "String expected.");
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -257,7 +257,7 @@ public:
|
|||||||
// or use the default country with any other
|
// or use the default country with any other
|
||||||
|
|
||||||
// Western European countries: we assume that they all follow the same
|
// Western European countries: we assume that they all follow the same
|
||||||
// DST rules (true or false?)
|
// DST rules (True or False?)
|
||||||
Country_WesternEurope_Start,
|
Country_WesternEurope_Start,
|
||||||
Country_EEC = Country_WesternEurope_Start,
|
Country_EEC = Country_WesternEurope_Start,
|
||||||
France,
|
France,
|
||||||
@ -318,7 +318,7 @@ public:
|
|||||||
// get the current country
|
// get the current country
|
||||||
static Country GetCountry();
|
static Country GetCountry();
|
||||||
|
|
||||||
// return TRUE if the country is a West European one (in practice,
|
// return True if the country is a West European one (in practice,
|
||||||
// this means that the same DST rules as for EEC apply)
|
// this means that the same DST rules as for EEC apply)
|
||||||
static bool IsWestEuropeanCountry(Country country = Country_Default);
|
static bool IsWestEuropeanCountry(Country country = Country_Default);
|
||||||
|
|
||||||
@ -334,7 +334,7 @@ public:
|
|||||||
// return the current month
|
// return the current month
|
||||||
static Month GetCurrentMonth(Calendar cal = Gregorian);
|
static Month GetCurrentMonth(Calendar cal = Gregorian);
|
||||||
|
|
||||||
// returns TRUE if the given year is a leap year in the given calendar
|
// returns True if the given year is a leap year in the given calendar
|
||||||
static bool IsLeapYear(int year = Inv_Year, Calendar cal = Gregorian);
|
static bool IsLeapYear(int year = Inv_Year, Calendar cal = Gregorian);
|
||||||
|
|
||||||
// get the century (19 for 1999, 20 for 2000 and -5 for 492 BC)
|
// get the century (19 for 1999, 20 for 2000 and -5 for 492 BC)
|
||||||
@ -365,7 +365,7 @@ public:
|
|||||||
// get the AM and PM strings in the current locale (may be empty)
|
// get the AM and PM strings in the current locale (may be empty)
|
||||||
static void GetAmPmStrings(wxString *OUTPUT, wxString *OUTPUT);
|
static void GetAmPmStrings(wxString *OUTPUT, wxString *OUTPUT);
|
||||||
|
|
||||||
// return TRUE if the given country uses DST for this year
|
// return True if the given country uses DST for this year
|
||||||
static bool IsDSTApplicable(int year = Inv_Year,
|
static bool IsDSTApplicable(int year = Inv_Year,
|
||||||
Country country = Country_Default);
|
Country country = Country_Default);
|
||||||
|
|
||||||
@ -478,7 +478,7 @@ public:
|
|||||||
wxDateTime GetPrevWeekDay(WeekDay weekday);
|
wxDateTime GetPrevWeekDay(WeekDay weekday);
|
||||||
|
|
||||||
// set to Nth occurence of given weekday in the given month of the
|
// set to Nth occurence of given weekday in the given month of the
|
||||||
// given year (time is set to 0), return TRUE on success and FALSE on
|
// given year (time is set to 0), return True on success and False on
|
||||||
// failure. n may be positive (1..5) or negative to count from the end
|
// failure. n may be positive (1..5) or negative to count from the end
|
||||||
// of the month (see helper function SetToLastWeekDay())
|
// of the month (see helper function SetToLastWeekDay())
|
||||||
bool SetToWeekDay(WeekDay weekday,
|
bool SetToWeekDay(WeekDay weekday,
|
||||||
@ -499,7 +499,7 @@ public:
|
|||||||
int year = Inv_Year);
|
int year = Inv_Year);
|
||||||
|
|
||||||
// sets the date to the given day of the given week in the year,
|
// sets the date to the given day of the given week in the year,
|
||||||
// returns TRUE on success and FALSE if given date doesn't exist (e.g.
|
// returns True on success and False if given date doesn't exist (e.g.
|
||||||
// numWeek is > 53)
|
// numWeek is > 53)
|
||||||
bool SetToTheWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First);
|
bool SetToTheWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First);
|
||||||
wxDateTime GetWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First);
|
wxDateTime GetWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First);
|
||||||
@ -556,12 +556,12 @@ public:
|
|||||||
// timezone stuff
|
// timezone stuff
|
||||||
|
|
||||||
// transform to any given timezone
|
// transform to any given timezone
|
||||||
wxDateTime ToTimezone(const wxDateTime::TimeZone& tz, bool noDST = FALSE);
|
wxDateTime ToTimezone(const wxDateTime::TimeZone& tz, bool noDST = False);
|
||||||
wxDateTime& MakeTimezone(const wxDateTime::TimeZone& tz, bool noDST = FALSE);
|
wxDateTime& MakeTimezone(const wxDateTime::TimeZone& tz, bool noDST = False);
|
||||||
|
|
||||||
// transform to GMT/UTC
|
// transform to GMT/UTC
|
||||||
wxDateTime ToGMT(bool noDST = FALSE);
|
wxDateTime ToGMT(bool noDST = False);
|
||||||
wxDateTime& MakeGMT(bool noDST = FALSE);
|
wxDateTime& MakeGMT(bool noDST = False);
|
||||||
|
|
||||||
// is daylight savings time in effect at this moment according to the
|
// is daylight savings time in effect at this moment according to the
|
||||||
// rules of the specified country?
|
// rules of the specified country?
|
||||||
@ -575,7 +575,7 @@ public:
|
|||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// accessors
|
// accessors
|
||||||
|
|
||||||
// is the date valid (TRUE even for non initialized objects)?
|
// is the date valid (True even for non initialized objects)?
|
||||||
inline bool IsValid() const;
|
inline bool IsValid() const;
|
||||||
|
|
||||||
// get the number of seconds since the Unix epoch - returns (time_t)-1
|
// get the number of seconds since the Unix epoch - returns (time_t)-1
|
||||||
@ -634,20 +634,20 @@ public:
|
|||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// comparison (see also functions below for operator versions)
|
// comparison (see also functions below for operator versions)
|
||||||
|
|
||||||
// returns TRUE if the two moments are strictly identical
|
// returns True if the two moments are strictly identical
|
||||||
inline bool IsEqualTo(const wxDateTime& datetime) const;
|
inline bool IsEqualTo(const wxDateTime& datetime) const;
|
||||||
|
|
||||||
// returns TRUE if the date is strictly earlier than the given one
|
// returns True if the date is strictly earlier than the given one
|
||||||
inline bool IsEarlierThan(const wxDateTime& datetime) const;
|
inline bool IsEarlierThan(const wxDateTime& datetime) const;
|
||||||
|
|
||||||
// returns TRUE if the date is strictly later than the given one
|
// returns True if the date is strictly later than the given one
|
||||||
inline bool IsLaterThan(const wxDateTime& datetime) const;
|
inline bool IsLaterThan(const wxDateTime& datetime) const;
|
||||||
|
|
||||||
// returns TRUE if the date is strictly in the given range
|
// returns True if the date is strictly in the given range
|
||||||
inline bool IsStrictlyBetween(const wxDateTime& t1,
|
inline bool IsStrictlyBetween(const wxDateTime& t1,
|
||||||
const wxDateTime& t2) const;
|
const wxDateTime& t2) const;
|
||||||
|
|
||||||
// returns TRUE if the date is in the given range
|
// returns True if the date is in the given range
|
||||||
inline bool IsBetween(const wxDateTime& t1, const wxDateTime& t2) const;
|
inline bool IsBetween(const wxDateTime& t1, const wxDateTime& t2) const;
|
||||||
|
|
||||||
// do these two objects refer to the same date?
|
// do these two objects refer to the same date?
|
||||||
@ -908,12 +908,12 @@ public:
|
|||||||
inline bool IsEqualTo(const wxTimeSpan& ts) const;
|
inline bool IsEqualTo(const wxTimeSpan& ts) const;
|
||||||
|
|
||||||
// compare two timestamps: works with the absolute values, i.e. -2
|
// compare two timestamps: works with the absolute values, i.e. -2
|
||||||
// hours is longer than 1 hour. Also, it will return FALSE if the
|
// hours is longer than 1 hour. Also, it will return False if the
|
||||||
// timespans are equal in absolute value.
|
// timespans are equal in absolute value.
|
||||||
inline bool IsLongerThan(const wxTimeSpan& ts) const;
|
inline bool IsLongerThan(const wxTimeSpan& ts) const;
|
||||||
|
|
||||||
// compare two timestamps: works with the absolute values, i.e. 1
|
// compare two timestamps: works with the absolute values, i.e. 1
|
||||||
// hour is shorter than -2 hours. Also, it will return FALSE if the
|
// hour is shorter than -2 hours. Also, it will return False if the
|
||||||
// timespans are equal in absolute value.
|
// timespans are equal in absolute value.
|
||||||
bool IsShorterThan(const wxTimeSpan& t) const;
|
bool IsShorterThan(const wxTimeSpan& t) const;
|
||||||
|
|
||||||
|
@ -75,12 +75,12 @@ public:
|
|||||||
void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
|
void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
|
||||||
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||||
void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
|
void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
|
||||||
void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = FALSE);
|
void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = False);
|
||||||
void DrawText(const wxString& text, wxCoord x, wxCoord y);
|
void DrawText(const wxString& text, wxCoord x, wxCoord y);
|
||||||
void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
|
void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
|
||||||
bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||||
int rop = wxCOPY, bool useMask = FALSE,
|
int rop = wxCOPY, bool useMask = False,
|
||||||
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
|
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
|
||||||
|
|
||||||
|
|
||||||
@ -140,8 +140,8 @@ public:
|
|||||||
%name(DrawIconXY) void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
|
%name(DrawIconXY) void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
|
||||||
void DrawIcon(const wxIcon& icon, const wxPoint& pt);
|
void DrawIcon(const wxIcon& icon, const wxPoint& pt);
|
||||||
|
|
||||||
%name(DrawBitmapXY) void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = FALSE);
|
%name(DrawBitmapXY) void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask = False);
|
||||||
void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, bool useMask = FALSE);
|
void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, bool useMask = False);
|
||||||
|
|
||||||
%name(DrawTextXY) void DrawText(const wxString& text, wxCoord x, wxCoord y);
|
%name(DrawTextXY) void DrawText(const wxString& text, wxCoord x, wxCoord y);
|
||||||
void DrawText(const wxString& text, const wxPoint& pt);
|
void DrawText(const wxString& text, const wxPoint& pt);
|
||||||
@ -152,11 +152,11 @@ public:
|
|||||||
|
|
||||||
%name(BlitXY) bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
%name(BlitXY) bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||||
int rop = wxCOPY, bool useMask = FALSE,
|
int rop = wxCOPY, bool useMask = False,
|
||||||
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
|
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
|
||||||
bool Blit(const wxPoint& destPt, const wxSize& sz,
|
bool Blit(const wxPoint& destPt, const wxSize& sz,
|
||||||
wxDC *source, const wxPoint& srcPt,
|
wxDC *source, const wxPoint& srcPt,
|
||||||
int rop = wxCOPY, bool useMask = FALSE,
|
int rop = wxCOPY, bool useMask = False,
|
||||||
const wxPoint& srcPtMask = wxDefaultPosition);
|
const wxPoint& srcPtMask = wxDefaultPosition);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -585,7 +585,7 @@ class wxMirrorDC : public wxDC
|
|||||||
public:
|
public:
|
||||||
// constructs a mirror DC associated with the given real DC
|
// constructs a mirror DC associated with the given real DC
|
||||||
//
|
//
|
||||||
// if mirror parameter is true, all vertical and horizontal coordinates are
|
// if mirror parameter is True, all vertical and horizontal coordinates are
|
||||||
// exchanged, otherwise this class behaves in exactly the same way as a
|
// exchanged, otherwise this class behaves in exactly the same way as a
|
||||||
// plain DC
|
// plain DC
|
||||||
//
|
//
|
||||||
@ -603,7 +603,7 @@ class wxPostScriptDC : public wxDC {
|
|||||||
public:
|
public:
|
||||||
wxPostScriptDC(const wxPrintData& printData);
|
wxPostScriptDC(const wxPrintData& printData);
|
||||||
// %name(PostScriptDC2)wxPostScriptDC(const wxString& output,
|
// %name(PostScriptDC2)wxPostScriptDC(const wxString& output,
|
||||||
// bool interactive = TRUE,
|
// bool interactive = True,
|
||||||
// wxWindow* parent = NULL);
|
// wxWindow* parent = NULL);
|
||||||
|
|
||||||
wxPrintData& GetPrintData();
|
wxPrintData& GetPrintData();
|
||||||
@ -697,7 +697,7 @@ public:
|
|||||||
// %name(PrinterDC2) wxPrinterDC(const wxString& driver,
|
// %name(PrinterDC2) wxPrinterDC(const wxString& driver,
|
||||||
// const wxString& device,
|
// const wxString& device,
|
||||||
// const wxString& output,
|
// const wxString& output,
|
||||||
// bool interactive = TRUE,
|
// bool interactive = True,
|
||||||
// int orientation = wxPORTRAIT);
|
// int orientation = wxPORTRAIT);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -719,7 +719,7 @@ public:
|
|||||||
// %name(PrinterDC2) wxPrinterDC(const wxString& driver,
|
// %name(PrinterDC2) wxPrinterDC(const wxString& driver,
|
||||||
// const wxString& device,
|
// const wxString& device,
|
||||||
// const wxString& output,
|
// const wxString& output,
|
||||||
// bool interactive = TRUE,
|
// bool interactive = True,
|
||||||
// int orientation = wxPORTRAIT);
|
// int orientation = wxPORTRAIT);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -11,19 +11,31 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
// Globally turn on the autodoc feature
|
||||||
|
%feature("autodoc", "1"); // 0 == no param types, 1 == show param types
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// some type definitions to simplify things for SWIG
|
// some type definitions to simplify things for SWIG
|
||||||
|
|
||||||
typedef int wxWindowID;
|
// typedef int wxWindowID;
|
||||||
typedef int wxCoord;
|
// typedef int wxCoord;
|
||||||
typedef int wxInt32;
|
// typedef int wxInt32;
|
||||||
typedef unsigned int wxUint32;
|
// typedef unsigned int wxUint32;
|
||||||
typedef int wxEventType;
|
typedef int wxEventType;
|
||||||
typedef unsigned int size_t;
|
typedef unsigned int size_t;
|
||||||
typedef unsigned int time_t;
|
typedef unsigned int time_t;
|
||||||
typedef unsigned char byte;
|
typedef unsigned char byte;
|
||||||
|
|
||||||
|
#define wxWindowID int
|
||||||
|
#define wxCoord int
|
||||||
|
#define wxInt32 int
|
||||||
|
#define wxUint32 unsigned int
|
||||||
|
//#define wxEventType int
|
||||||
|
//#define size_t unsigned int
|
||||||
|
//#define time_t unsigned int
|
||||||
|
//#define byte unsigned char
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Various SWIG macros and such
|
// Various SWIG macros and such
|
||||||
@ -38,7 +50,7 @@ typedef unsigned char byte;
|
|||||||
|
|
||||||
#ifndef %pythoncode
|
#ifndef %pythoncode
|
||||||
#define %pythoncode %insert("python")
|
#define %pythoncode %insert("python")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WXUNUSED(x) x
|
#define WXUNUSED(x) x
|
||||||
|
|
||||||
@ -59,10 +71,124 @@ typedef unsigned char byte;
|
|||||||
%typemap(constcode) wxEventType "PyDict_SetItemString(d, \"$symname\", PyInt_FromLong($value));";
|
%typemap(constcode) wxEventType "PyDict_SetItemString(d, \"$symname\", PyInt_FromLong($value));";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Macros for the docstring and autodoc features of SWIG.
|
||||||
|
|
||||||
|
// Set the docsring for the given full or partial declaration
|
||||||
|
#define DocStr(decl, docstr) %feature("docstring") decl docstr
|
||||||
|
|
||||||
|
// Set the autodoc string for a full or partial declaration
|
||||||
|
#define DocA(decl, astr) %feature("autodoc") decl astr
|
||||||
|
|
||||||
|
// Set both the autodoc and docstring for a full or partial declaration
|
||||||
|
%define DocAStr(decl, astr, docstr)
|
||||||
|
%feature("autodoc") decl astr;
|
||||||
|
%feature("docstring") decl docstr
|
||||||
|
%enddef
|
||||||
|
|
||||||
|
// Set the detailed reference docs for full or partial declaration
|
||||||
|
#define DocRef(decl, str) %feature("docref") decl str
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Set the docstring for a decl and then define the decl too. Must use the
|
||||||
|
// full declaration of the item.
|
||||||
|
%define DocDeclStr(type, decl, docstr)
|
||||||
|
%feature("docstring") decl docstr;
|
||||||
|
type decl
|
||||||
|
%enddef
|
||||||
|
|
||||||
|
// As above, but also give the decl a new %name
|
||||||
|
%define DocDeclStrName(type, decl, docstr, newname)
|
||||||
|
%feature("docstring") decl docstr;
|
||||||
|
%name(newname) type decl
|
||||||
|
%enddef
|
||||||
|
|
||||||
|
|
||||||
|
// Set the autodoc string for a decl and then define the decl too. Must use the
|
||||||
|
// full declaration of the item.
|
||||||
|
%define DocDeclA(type, decl, astr)
|
||||||
|
%feature("autodoc") decl astr;
|
||||||
|
type decl
|
||||||
|
%enddef
|
||||||
|
|
||||||
|
// As above, but also give the decl a new %name
|
||||||
|
%define DocDeclAName(type, decl, astr, newname)
|
||||||
|
%feature("autodoc") decl astr;
|
||||||
|
%name(newname) type decl
|
||||||
|
%enddef
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Set the autodoc and the docstring for a decl and then define the decl too.
|
||||||
|
// Must use the full declaration of the item.
|
||||||
|
%define DocDeclAStr(type, decl, astr, docstr)
|
||||||
|
%feature("autodoc") decl astr;
|
||||||
|
%feature("docstring") decl docstr;
|
||||||
|
type decl
|
||||||
|
%enddef
|
||||||
|
|
||||||
|
// As above, but also give the decl a new %name
|
||||||
|
%define DocDeclAStrName(type, decl, astr, docstr, newname)
|
||||||
|
%feature("autodoc") decl astr;
|
||||||
|
%feature("docstring") decl docstr;
|
||||||
|
%name(newname) type decl
|
||||||
|
%enddef
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Set the docstring for a constructor decl and then define the decl too.
|
||||||
|
// Must use the full declaration of the item.
|
||||||
|
%define DocCtorStr(decl, docstr)
|
||||||
|
%feature("docstring") decl docstr;
|
||||||
|
decl
|
||||||
|
%enddef
|
||||||
|
|
||||||
|
// As above, but also give the decl a new %name
|
||||||
|
%define DocCtorStrName(decl, docstr, newname)
|
||||||
|
%feature("docstring") decl docstr;
|
||||||
|
%name(newname) decl
|
||||||
|
%enddef
|
||||||
|
|
||||||
|
|
||||||
|
// Set the autodoc string for a decl and then define the decl too. Must use the
|
||||||
|
// full declaration of the item.
|
||||||
|
%define DocCtorA(decl, astr)
|
||||||
|
%feature("autodoc") decl astr;
|
||||||
|
decl
|
||||||
|
%enddef
|
||||||
|
|
||||||
|
// As above, but also give the decl a new %name
|
||||||
|
%define DocCtorAname(decl, astr, newname)
|
||||||
|
%feature("autodoc") decl astr;
|
||||||
|
%name(newname) decl
|
||||||
|
%enddef
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Set the autodoc and the docstring for a decl and then define the decl too.
|
||||||
|
// Must use the full declaration of the item.
|
||||||
|
%define DocCtorAStr(decl, astr, docstr)
|
||||||
|
%feature("autodoc") decl astr;
|
||||||
|
%feature("docstring") decl docstr;
|
||||||
|
decl
|
||||||
|
%enddef
|
||||||
|
|
||||||
|
// As above, but also give the decl a new %name
|
||||||
|
%define DocCtorAStrName(decl, astr, docstr, newname)
|
||||||
|
%feature("autodoc") decl astr;
|
||||||
|
%feature("docstring") decl docstr;
|
||||||
|
%name(newname) decl
|
||||||
|
%enddef
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%define %newgroup
|
%define %newgroup
|
||||||
%pythoncode {
|
%pythoncode {
|
||||||
%#---------------------------------------------------------------------------
|
%#---------------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
%enddef
|
%enddef
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@ -296,7 +422,7 @@ enum {
|
|||||||
wxID_IGNORE,
|
wxID_IGNORE,
|
||||||
|
|
||||||
wxID_HIGHEST,
|
wxID_HIGHEST,
|
||||||
|
|
||||||
wxOPEN,
|
wxOPEN,
|
||||||
wxSAVE,
|
wxSAVE,
|
||||||
wxHIDE_READONLY,
|
wxHIDE_READONLY,
|
||||||
|
@ -120,7 +120,7 @@ public:
|
|||||||
// Find the child that matches the first part of 'path'.
|
// Find the child that matches the first part of 'path'.
|
||||||
// E.g. if a child path is "/usr" and 'path' is "/usr/include"
|
// E.g. if a child path is "/usr" and 'path' is "/usr/include"
|
||||||
// then the child for /usr is returned.
|
// then the child for /usr is returned.
|
||||||
// If the path string has been used (we're at the leaf), done is set to TRUE
|
// If the path string has been used (we're at the leaf), done is set to True
|
||||||
virtual wxTreeItemId FindChild(wxTreeItemId parentId, const wxString& path, bool& OUTPUT);
|
virtual wxTreeItemId FindChild(wxTreeItemId parentId, const wxString& path, bool& OUTPUT);
|
||||||
|
|
||||||
// Resize the components of the control
|
// Resize the components of the control
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
// flags for wxDropSource::DoDragDrop()
|
// flags for wxDropSource::DoDragDrop()
|
||||||
//
|
//
|
||||||
// NB: wxDrag_CopyOnly must be 0 (== FALSE) and wxDrag_AllowMove must be 1
|
// NB: wxDrag_CopyOnly must be 0 (== False) and wxDrag_AllowMove must be 1
|
||||||
// (== TRUE) for compatibility with the old DoDragDrop(bool) method!
|
// (== True) for compatibility with the old DoDragDrop(bool) method!
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
wxDrag_CopyOnly = 0, // allow only copying
|
wxDrag_CopyOnly = 0, // allow only copying
|
||||||
@ -149,7 +149,7 @@ public:
|
|||||||
// execute or otherwise mouse movement would be too slow
|
// execute or otherwise mouse movement would be too slow
|
||||||
DEC_PYCALLBACK_DR_2WXCDR(OnDragOver);
|
DEC_PYCALLBACK_DR_2WXCDR(OnDragOver);
|
||||||
|
|
||||||
// called after OnDrop() returns TRUE: you will usually just call
|
// called after OnDrop() returns True: you will usually just call
|
||||||
// GetData() from here and, probably, also refresh something to update the
|
// GetData() from here and, probably, also refresh something to update the
|
||||||
// new data and, finally, return the code indicating how did the operation
|
// new data and, finally, return the code indicating how did the operation
|
||||||
// complete (returning default value in case of success and wxDragError on
|
// complete (returning default value in case of success and wxDragError on
|
||||||
@ -157,7 +157,7 @@ public:
|
|||||||
DEC_PYCALLBACK_DR_2WXCDR_pure(OnData);
|
DEC_PYCALLBACK_DR_2WXCDR_pure(OnData);
|
||||||
|
|
||||||
// this function is called when data is dropped at position (x, y) - if it
|
// this function is called when data is dropped at position (x, y) - if it
|
||||||
// returns TRUE, OnData() will be called immediately afterwards which will
|
// returns True, OnData() will be called immediately afterwards which will
|
||||||
// allow to retrieve the data dropped.
|
// allow to retrieve the data dropped.
|
||||||
DEC_PYCALLBACK_BOOL_INTINT(OnDrop);
|
DEC_PYCALLBACK_BOOL_INTINT(OnDrop);
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ public:
|
|||||||
bool base_OnDrop(wxCoord x, wxCoord y);
|
bool base_OnDrop(wxCoord x, wxCoord y);
|
||||||
|
|
||||||
// may be called *only* from inside OnData() and will fill m_dataObject
|
// may be called *only* from inside OnData() and will fill m_dataObject
|
||||||
// with the data from the drop source if it returns TRUE
|
// with the data from the drop source if it returns True
|
||||||
bool GetData();
|
bool GetData();
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -271,7 +271,7 @@ public:
|
|||||||
|
|
||||||
bool wxPyFileDropTarget::OnDropFiles(wxCoord x, wxCoord y,
|
bool wxPyFileDropTarget::OnDropFiles(wxCoord x, wxCoord y,
|
||||||
const wxArrayString& filenames) {
|
const wxArrayString& filenames) {
|
||||||
bool rval = FALSE;
|
bool rval = False;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if (wxPyCBH_findCallback(m_myInst, "OnDropFiles")) {
|
if (wxPyCBH_findCallback(m_myInst, "OnDropFiles")) {
|
||||||
PyObject* list = wxArrayString2PyList_helper(filenames);
|
PyObject* list = wxArrayString2PyList_helper(filenames);
|
||||||
|
@ -37,9 +37,9 @@ public:
|
|||||||
%name(DragString)wxGenericDragImage(const wxString& str,
|
%name(DragString)wxGenericDragImage(const wxString& str,
|
||||||
const wxCursor& cursor = wxNullCursor);
|
const wxCursor& cursor = wxNullCursor);
|
||||||
|
|
||||||
%name(DragTreeItem)wxGenericDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id);
|
%name(DragTreeItem)wxGenericDragImage(const wxPyTreeCtrl& treeCtrl, wxTreeItemId& id);
|
||||||
|
|
||||||
%name(DragListItem)wxGenericDragImage(const wxListCtrl& listCtrl, long id);
|
%name(DragListItem)wxGenericDragImage(const wxPyListCtrl& listCtrl, long id);
|
||||||
|
|
||||||
~wxGenericDragImage();
|
~wxGenericDragImage();
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ public:
|
|||||||
// Begin drag. hotspot is the location of the drag position relative to the upper-left
|
// Begin drag. hotspot is the location of the drag position relative to the upper-left
|
||||||
// corner of the image.
|
// corner of the image.
|
||||||
bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
|
bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
|
||||||
bool fullScreen = FALSE, wxRect* rect = NULL);
|
bool fullScreen = False, wxRect* rect = NULL);
|
||||||
|
|
||||||
// Begin drag. hotspot is the location of the drag position relative to the upper-left
|
// Begin drag. hotspot is the location of the drag position relative to the upper-left
|
||||||
// corner of the image. This is full screen only. fullScreenRect gives the
|
// corner of the image. This is full screen only. fullScreenRect gives the
|
||||||
|
@ -382,7 +382,7 @@ public:
|
|||||||
// (treat as if the event table entry had not been found): this must be done
|
// (treat as if the event table entry had not been found): this must be done
|
||||||
// to allow the event processing by the base classes (calling event.Skip()
|
// to allow the event processing by the base classes (calling event.Skip()
|
||||||
// is the analog of calling the base class verstion of a virtual function)
|
// is the analog of calling the base class verstion of a virtual function)
|
||||||
void Skip(bool skip = TRUE);
|
void Skip(bool skip = True);
|
||||||
bool GetSkipped() const;
|
bool GetSkipped() const;
|
||||||
|
|
||||||
// Determine if this event should be propagating to the parent window.
|
// Determine if this event should be propagating to the parent window.
|
||||||
@ -451,7 +451,7 @@ public:
|
|||||||
// Get checkbox value
|
// Get checkbox value
|
||||||
bool IsChecked() const;
|
bool IsChecked() const;
|
||||||
|
|
||||||
// TRUE if the listbox event was a selection.
|
// True if the listbox event was a selection.
|
||||||
bool IsSelection() const;
|
bool IsSelection() const;
|
||||||
|
|
||||||
void SetExtraLong(long extraLong);
|
void SetExtraLong(long extraLong);
|
||||||
@ -598,10 +598,16 @@ public:
|
|||||||
// True if the mouse is just leaving the window
|
// True if the mouse is just leaving the window
|
||||||
bool Leaving() const;
|
bool Leaving() const;
|
||||||
|
|
||||||
// Find the position of the event
|
|
||||||
wxPoint GetPosition();
|
|
||||||
%name(GetPositionTuple)void GetPosition(long *OUTPUT, long *OUTPUT);
|
|
||||||
|
|
||||||
|
DocStr(GetPosition, // sets the docstring for both
|
||||||
|
"Returns the position of the mouse in window coordinates when the event happened.");
|
||||||
|
wxPoint GetPosition();
|
||||||
|
|
||||||
|
DocDeclAName(
|
||||||
|
void, GetPosition(long *OUTPUT, long *OUTPUT),
|
||||||
|
"GetPositionTuple() -> (x,y)",
|
||||||
|
GetPositionTuple);
|
||||||
|
|
||||||
// Find the logical position of the event given the DC
|
// Find the logical position of the event given the DC
|
||||||
wxPoint GetLogicalPosition(const wxDC& dc) const;
|
wxPoint GetLogicalPosition(const wxDC& dc) const;
|
||||||
|
|
||||||
@ -707,9 +713,15 @@ public:
|
|||||||
// get the raw key flags (platform-dependent)
|
// get the raw key flags (platform-dependent)
|
||||||
wxUint32 GetRawKeyFlags() const;
|
wxUint32 GetRawKeyFlags() const;
|
||||||
|
|
||||||
// Find the position of the event
|
|
||||||
|
DocStr(GetPosition, // sets the docstring for both
|
||||||
|
"Find the position of the event.");
|
||||||
wxPoint GetPosition();
|
wxPoint GetPosition();
|
||||||
%name(GetPositionTuple) void GetPosition(long* OUTPUT, long* OUTPUT);
|
|
||||||
|
DocDeclAName(
|
||||||
|
void, GetPosition(long *OUTPUT, long *OUTPUT),
|
||||||
|
"GetPositionTuple() -> (x,y)",
|
||||||
|
GetPositionTuple);
|
||||||
|
|
||||||
// Get X position
|
// Get X position
|
||||||
wxCoord GetX() const;
|
wxCoord GetX() const;
|
||||||
@ -843,7 +855,7 @@ public:
|
|||||||
class wxActivateEvent : public wxEvent
|
class wxActivateEvent : public wxEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = TRUE, int Id = 0);
|
wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = True, int Id = 0);
|
||||||
bool GetActive() const;
|
bool GetActive() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -888,7 +900,7 @@ public:
|
|||||||
void SetLoggingOff(bool logOff);
|
void SetLoggingOff(bool logOff);
|
||||||
bool GetLoggingOff() const;
|
bool GetLoggingOff() const;
|
||||||
|
|
||||||
void Veto(bool veto = TRUE);
|
void Veto(bool veto = True);
|
||||||
void SetCanVeto(bool canVeto);
|
void SetCanVeto(bool canVeto);
|
||||||
|
|
||||||
bool CanVeto() const;
|
bool CanVeto() const;
|
||||||
@ -902,7 +914,7 @@ public:
|
|||||||
class wxShowEvent : public wxEvent
|
class wxShowEvent : public wxEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxShowEvent(int winid = 0, bool show = FALSE);
|
wxShowEvent(int winid = 0, bool show = False);
|
||||||
|
|
||||||
void SetShow(bool show);
|
void SetShow(bool show);
|
||||||
bool GetShow() const;
|
bool GetShow() const;
|
||||||
@ -916,7 +928,7 @@ public:
|
|||||||
class wxIconizeEvent: public wxEvent
|
class wxIconizeEvent: public wxEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxIconizeEvent(int id = 0, bool iconized = TRUE);
|
wxIconizeEvent(int id = 0, bool iconized = True);
|
||||||
bool Iconized();
|
bool Iconized();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1095,7 +1107,7 @@ class wxNavigationKeyEvent : public wxEvent
|
|||||||
public:
|
public:
|
||||||
wxNavigationKeyEvent();
|
wxNavigationKeyEvent();
|
||||||
|
|
||||||
// direction: forward (true) or backward (false)
|
// direction: forward (True) or backward (False)
|
||||||
bool GetDirection() const;
|
bool GetDirection() const;
|
||||||
void SetDirection(bool bForward);
|
void SetDirection(bool bForward);
|
||||||
|
|
||||||
@ -1180,7 +1192,7 @@ class wxIdleEvent : public wxEvent
|
|||||||
public:
|
public:
|
||||||
wxIdleEvent();
|
wxIdleEvent();
|
||||||
|
|
||||||
void RequestMore(bool needMore = TRUE);
|
void RequestMore(bool needMore = True);
|
||||||
bool MoreRequested() const;
|
bool MoreRequested() const;
|
||||||
|
|
||||||
// Specify how wxWindows will send idle events: to
|
// Specify how wxWindows will send idle events: to
|
||||||
|
@ -122,7 +122,7 @@ public:
|
|||||||
wxFileSystem();
|
wxFileSystem();
|
||||||
~wxFileSystem();
|
~wxFileSystem();
|
||||||
|
|
||||||
void ChangePathTo(const wxString& location, bool is_dir = FALSE);
|
void ChangePathTo(const wxString& location, bool is_dir = False);
|
||||||
wxString GetPath();
|
wxString GetPath();
|
||||||
|
|
||||||
wxFSFile* OpenFile(const wxString& location);
|
wxFSFile* OpenFile(const wxString& location);
|
||||||
|
@ -261,7 +261,7 @@ struct wxNativeEncodingInfo
|
|||||||
%}
|
%}
|
||||||
|
|
||||||
// test for the existence of the font described by this facename/encoding,
|
// test for the existence of the font described by this facename/encoding,
|
||||||
// return TRUE if such font(s) exist, FALSE otherwise
|
// return True if such font(s) exist, False otherwise
|
||||||
bool wxTestFontEncoding(const wxNativeEncodingInfo& info);
|
bool wxTestFontEncoding(const wxNativeEncodingInfo& info);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@ -271,7 +271,7 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info);
|
|||||||
{ PyErr_SetNone(PyExc_NotImplementedError); return NULL; }
|
{ PyErr_SetNone(PyExc_NotImplementedError); return NULL; }
|
||||||
|
|
||||||
bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
|
bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
|
||||||
{ PyErr_SetNone(PyExc_NotImplementedError); return false; }
|
{ PyErr_SetNone(PyExc_NotImplementedError); return False; }
|
||||||
%}
|
%}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -284,11 +284,11 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info);
|
|||||||
// The default implementations of all functions will ask the user if they are
|
// The default implementations of all functions will ask the user if they are
|
||||||
// not capable of finding the answer themselves and store the answer in a
|
// not capable of finding the answer themselves and store the answer in a
|
||||||
// config file (configurable via SetConfigXXX functions). This behaviour may
|
// config file (configurable via SetConfigXXX functions). This behaviour may
|
||||||
// be disabled by giving the value of FALSE to "interactive" parameter.
|
// be disabled by giving the value of False to "interactive" parameter.
|
||||||
// However, the functions will always consult the config file to allow the
|
// However, the functions will always consult the config file to allow the
|
||||||
// user-defined values override the default logic and there is no way to
|
// user-defined values override the default logic and there is no way to
|
||||||
// disable this - which shouldn't be ever needed because if "interactive" was
|
// disable this - which shouldn't be ever needed because if "interactive" was
|
||||||
// never TRUE, the config file is never created anyhow.
|
// never True, the config file is never created anyhow.
|
||||||
//
|
//
|
||||||
// This is a singleton class, font mapper objects can only be accessed using
|
// This is a singleton class, font mapper objects can only be accessed using
|
||||||
// wxFontMapper::Get().
|
// wxFontMapper::Get().
|
||||||
@ -309,9 +309,9 @@ public:
|
|||||||
// wxFONTENCODING_SYSTEM if couldn't decode it
|
// wxFONTENCODING_SYSTEM if couldn't decode it
|
||||||
//
|
//
|
||||||
// interactive parameter is ignored in the base class, we behave as if it
|
// interactive parameter is ignored in the base class, we behave as if it
|
||||||
// were always false
|
// were always False
|
||||||
virtual wxFontEncoding CharsetToEncoding(const wxString& charset,
|
virtual wxFontEncoding CharsetToEncoding(const wxString& charset,
|
||||||
bool interactive = true);
|
bool interactive = True);
|
||||||
|
|
||||||
|
|
||||||
// get the number of font encodings we know about
|
// get the number of font encodings we know about
|
||||||
@ -347,7 +347,7 @@ public:
|
|||||||
%extend {
|
%extend {
|
||||||
PyObject* GetAltForEncoding(wxFontEncoding encoding,
|
PyObject* GetAltForEncoding(wxFontEncoding encoding,
|
||||||
const wxString& facename = wxPyEmptyString,
|
const wxString& facename = wxPyEmptyString,
|
||||||
bool interactive = TRUE) {
|
bool interactive = True) {
|
||||||
wxFontEncoding alt_enc;
|
wxFontEncoding alt_enc;
|
||||||
if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive))
|
if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive))
|
||||||
return PyInt_FromLong(alt_enc);
|
return PyInt_FromLong(alt_enc);
|
||||||
@ -381,7 +381,7 @@ public:
|
|||||||
class wxFont : public wxGDIObject {
|
class wxFont : public wxGDIObject {
|
||||||
public:
|
public:
|
||||||
wxFont( int pointSize, int family, int style, int weight,
|
wxFont( int pointSize, int family, int style, int weight,
|
||||||
bool underline=FALSE, const wxString& face = wxPyEmptyString,
|
bool underline=False, const wxString& face = wxPyEmptyString,
|
||||||
wxFontEncoding encoding=wxFONTENCODING_DEFAULT);
|
wxFontEncoding encoding=wxFONTENCODING_DEFAULT);
|
||||||
~wxFont();
|
~wxFont();
|
||||||
|
|
||||||
@ -445,7 +445,7 @@ public:
|
|||||||
wxString GetWeightString() const;
|
wxString GetWeightString() const;
|
||||||
|
|
||||||
// Unofficial API, don't use
|
// Unofficial API, don't use
|
||||||
virtual void SetNoAntiAliasing( bool no = TRUE );
|
virtual void SetNoAntiAliasing( bool no = True );
|
||||||
virtual bool GetNoAntiAliasing();
|
virtual bool GetNoAntiAliasing();
|
||||||
|
|
||||||
// the default encoding is used for creating all fonts with default
|
// the default encoding is used for creating all fonts with default
|
||||||
@ -487,7 +487,7 @@ public:
|
|||||||
|
|
||||||
bool EnumerateFacenames(
|
bool EnumerateFacenames(
|
||||||
wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all
|
wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all
|
||||||
bool fixedWidthOnly = FALSE);
|
bool fixedWidthOnly = False);
|
||||||
|
|
||||||
bool EnumerateEncodings(const wxString& facename = wxPyEmptyString);
|
bool EnumerateEncodings(const wxString& facename = wxPyEmptyString);
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ long wxGetCurrentId();
|
|||||||
void wxBell();
|
void wxBell();
|
||||||
void wxEndBusyCursor();
|
void wxEndBusyCursor();
|
||||||
|
|
||||||
long wxGetElapsedTime(bool resetTimer = TRUE);
|
long wxGetElapsedTime(bool resetTimer = True);
|
||||||
void wxGetMousePosition(int* OUTPUT, int* OUTPUT);
|
void wxGetMousePosition(int* OUTPUT, int* OUTPUT);
|
||||||
bool wxIsBusy();
|
bool wxIsBusy();
|
||||||
wxString wxNow();
|
wxString wxNow();
|
||||||
@ -118,7 +118,7 @@ wxString wxGetTextFromUser(const wxString& message,
|
|||||||
const wxString& default_value = wxPyEmptyString,
|
const wxString& default_value = wxPyEmptyString,
|
||||||
wxWindow *parent = NULL,
|
wxWindow *parent = NULL,
|
||||||
int x = -1, int y = -1,
|
int x = -1, int y = -1,
|
||||||
bool centre = TRUE);
|
bool centre = True);
|
||||||
|
|
||||||
wxString wxGetPasswordFromUser(const wxString& message,
|
wxString wxGetPasswordFromUser(const wxString& message,
|
||||||
const wxString& caption = wxPyEmptyString,
|
const wxString& caption = wxPyEmptyString,
|
||||||
@ -131,21 +131,21 @@ wxString wxGetPasswordFromUser(const wxString& message,
|
|||||||
// int LCOUNT, char** choices,
|
// int LCOUNT, char** choices,
|
||||||
// int nsel, int *selection,
|
// int nsel, int *selection,
|
||||||
// wxWindow *parent = NULL, int x = -1, int y = -1,
|
// wxWindow *parent = NULL, int x = -1, int y = -1,
|
||||||
// bool centre = TRUE, int width=150, int height=200);
|
// bool centre = True, int width=150, int height=200);
|
||||||
|
|
||||||
|
|
||||||
wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
|
wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
|
||||||
int choices, wxString* choices_array,
|
int choices, wxString* choices_array,
|
||||||
wxWindow *parent = NULL,
|
wxWindow *parent = NULL,
|
||||||
int x = -1, int y = -1,
|
int x = -1, int y = -1,
|
||||||
bool centre = TRUE,
|
bool centre = True,
|
||||||
int width=150, int height=200);
|
int width=150, int height=200);
|
||||||
|
|
||||||
int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
|
int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
|
||||||
int choices, wxString* choices_array,
|
int choices, wxString* choices_array,
|
||||||
wxWindow *parent = NULL,
|
wxWindow *parent = NULL,
|
||||||
int x = -1, int y = -1,
|
int x = -1, int y = -1,
|
||||||
bool centre = TRUE,
|
bool centre = True,
|
||||||
int width=150, int height=200);
|
int width=150, int height=200);
|
||||||
|
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ public:
|
|||||||
#ifdef WXP_WITH_THREAD
|
#ifdef WXP_WITH_THREAD
|
||||||
return wxThread::IsMain();
|
return wxThread::IsMain();
|
||||||
#else
|
#else
|
||||||
return TRUE;
|
return True;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
@ -69,7 +69,12 @@ public:
|
|||||||
bool operator!=(const wxGBPosition& p) const;
|
bool operator!=(const wxGBPosition& p) const;
|
||||||
|
|
||||||
%extend {
|
%extend {
|
||||||
PyObject* asTuple() {
|
void Set(int row=0, int col=0) {
|
||||||
|
self->SetRow(row);
|
||||||
|
self->SetCol(col);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* Get() {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyObject* tup = PyTuple_New(2);
|
PyObject* tup = PyTuple_New(2);
|
||||||
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow()));
|
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow()));
|
||||||
@ -79,17 +84,18 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
%pythoncode {
|
%pythoncode {
|
||||||
def __str__(self): return str(self.asTuple())
|
asTuple = Get
|
||||||
def __repr__(self): return 'wxGBPosition'+str(self.asTuple())
|
def __str__(self): return str(self.Get())
|
||||||
def __len__(self): return len(self.asTuple())
|
def __repr__(self): return 'wx.GBPosition'+str(self.Get())
|
||||||
def __getitem__(self, index): return self.asTuple()[index]
|
def __len__(self): return len(self.Get())
|
||||||
|
def __getitem__(self, index): return self.Get()[index]
|
||||||
def __setitem__(self, index, val):
|
def __setitem__(self, index, val):
|
||||||
if index == 0: self.SetRow(val)
|
if index == 0: self.SetRow(val)
|
||||||
elif index == 1: self.SetCol(val)
|
elif index == 1: self.SetCol(val)
|
||||||
else: raise IndexError
|
else: raise IndexError
|
||||||
def __nonzero__(self): return self.asTuple() != (0,0)
|
def __nonzero__(self): return self.Get() != (0,0)
|
||||||
def __getinitargs__(self): return ()
|
def __getinitargs__(self): return ()
|
||||||
def __getstate__(self): return self.asTuple()
|
def __getstate__(self): return self.Get()
|
||||||
def __setstate__(self, state): self.Set(*state)
|
def __setstate__(self, state): self.Set(*state)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +122,12 @@ public:
|
|||||||
bool operator!=(const wxGBSpan& o) const;
|
bool operator!=(const wxGBSpan& o) const;
|
||||||
|
|
||||||
%extend {
|
%extend {
|
||||||
PyObject* asTuple() {
|
void Set(int rowspan=1, int colspan=1) {
|
||||||
|
self->SetRowspan(rowspan);
|
||||||
|
self->SetColspan(colspan);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* Get() {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyObject* tup = PyTuple_New(2);
|
PyObject* tup = PyTuple_New(2);
|
||||||
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRowspan()));
|
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRowspan()));
|
||||||
@ -126,17 +137,18 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
%pythoncode {
|
%pythoncode {
|
||||||
def __str__(self): return str(self.asTuple())
|
asTuple = Get
|
||||||
def __repr__(self): return 'wxGBSpan'+str(self.asTuple())
|
def __str__(self): return str(self.Get())
|
||||||
def __len__(self): return len(self.asTuple())
|
def __repr__(self): return 'wx.GBSpan'+str(self.Get())
|
||||||
def __getitem__(self, index): return self.asTuple()[index]
|
def __len__(self): return len(self.Get())
|
||||||
|
def __getitem__(self, index): return self.Get()[index]
|
||||||
def __setitem__(self, index, val):
|
def __setitem__(self, index, val):
|
||||||
if index == 0: self.SetRowspan(val)
|
if index == 0: self.SetRowspan(val)
|
||||||
elif index == 1: self.SetColspan(val)
|
elif index == 1: self.SetColspan(val)
|
||||||
else: raise IndexError
|
else: raise IndexError
|
||||||
def __nonzero__(self): return self.asTuple() != (0,0)
|
def __nonzero__(self): return self.Get() != (0,0)
|
||||||
def __getinitargs__(self): return ()
|
def __getinitargs__(self): return ()
|
||||||
def __getstate__(self): return self.asTuple()
|
def __getstate__(self): return self.Get()
|
||||||
def __setstate__(self, state): self.Set(*state)
|
def __setstate__(self, state): self.Set(*state)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -185,30 +197,30 @@ public:
|
|||||||
|
|
||||||
// Get the grid position of the item
|
// Get the grid position of the item
|
||||||
wxGBPosition GetPos() const;
|
wxGBPosition GetPos() const;
|
||||||
%pythoncode { def GetPosTuple(self): return self.GetPos().asTuple() }
|
%pythoncode { def GetPosTuple(self): return self.GetPos().Get() }
|
||||||
|
|
||||||
// Get the row and column spanning of the item
|
// Get the row and column spanning of the item
|
||||||
wxGBSpan GetSpan() const;
|
wxGBSpan GetSpan() const;
|
||||||
%pythoncode { def GetSpanTuple(self): return self.GetSpan().asTuple() }
|
%pythoncode { def GetSpanTuple(self): return self.GetSpan().Get() }
|
||||||
|
|
||||||
// If the item is already a member of a sizer then first ensure that there
|
// If the item is already a member of a sizer then first ensure that there
|
||||||
// is no other item that would intersect with this one at the new
|
// is no other item that would intersect with this one at the new
|
||||||
// position, then set the new position. Returns true if the change is
|
// position, then set the new position. Returns True if the change is
|
||||||
// successful and after the next Layout the item will be moved.
|
// successful and after the next Layout the item will be moved.
|
||||||
bool SetPos( const wxGBPosition& pos );
|
bool SetPos( const wxGBPosition& pos );
|
||||||
|
|
||||||
// If the item is already a member of a sizer then first ensure that there
|
// If the item is already a member of a sizer then first ensure that there
|
||||||
// is no other item that would intersect with this one with its new
|
// is no other item that would intersect with this one with its new
|
||||||
// spanning size, then set the new spanning. Returns true if the change
|
// spanning size, then set the new spanning. Returns True if the change
|
||||||
// is successful and after the next Layout the item will be resized.
|
// is successful and after the next Layout the item will be resized.
|
||||||
bool SetSpan( const wxGBSpan& span );
|
bool SetSpan( const wxGBSpan& span );
|
||||||
|
|
||||||
%nokwargs Intersects;
|
%nokwargs Intersects;
|
||||||
|
|
||||||
// Returns true if this item and the other item instersect
|
// Returns True if this item and the other item instersect
|
||||||
bool Intersects(const wxGBSizerItem& other);
|
bool Intersects(const wxGBSizerItem& other);
|
||||||
|
|
||||||
// Returns true if the given pos/span would intersect with this item.
|
// Returns True if the given pos/span would intersect with this item.
|
||||||
bool Intersects(const wxGBPosition& pos, const wxGBSpan& span);
|
bool Intersects(const wxGBPosition& pos, const wxGBSpan& span);
|
||||||
|
|
||||||
// Get the row and column of the endpoint of this item
|
// Get the row and column of the endpoint of this item
|
||||||
@ -229,8 +241,8 @@ class wxGridBagSizer : public wxFlexGridSizer
|
|||||||
public:
|
public:
|
||||||
wxGridBagSizer(int vgap = 0, int hgap = 0 );
|
wxGridBagSizer(int vgap = 0, int hgap = 0 );
|
||||||
|
|
||||||
// The Add method returns true if the item was successfully placed at the
|
// The Add method returns True if the item was successfully placed at the
|
||||||
// given cell position, false if something was already there.
|
// given cell position, False if something was already there.
|
||||||
%extend {
|
%extend {
|
||||||
bool Add( PyObject* item,
|
bool Add( PyObject* item,
|
||||||
const wxGBPosition& pos,
|
const wxGBPosition& pos,
|
||||||
@ -241,7 +253,7 @@ public:
|
|||||||
|
|
||||||
wxPyUserData* data = NULL;
|
wxPyUserData* data = NULL;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
|
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, True, False);
|
||||||
if ( userData && (info.window || info.sizer || info.gotSize) )
|
if ( userData && (info.window || info.sizer || info.gotSize) )
|
||||||
data = new wxPyUserData(userData);
|
data = new wxPyUserData(userData);
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
@ -254,7 +266,7 @@ public:
|
|||||||
else if (info.gotSize)
|
else if (info.gotSize)
|
||||||
return self->Add(info.size.GetWidth(), info.size.GetHeight(),
|
return self->Add(info.size.GetWidth(), info.size.GetHeight(),
|
||||||
pos, span, flag, border, data);
|
pos, span, flag, border, data);
|
||||||
return false;
|
return False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,9 +283,9 @@ public:
|
|||||||
wxGBPosition GetItemPosition(wxSizer *sizer);
|
wxGBPosition GetItemPosition(wxSizer *sizer);
|
||||||
wxGBPosition GetItemPosition(size_t index);
|
wxGBPosition GetItemPosition(size_t index);
|
||||||
|
|
||||||
// Set the grid position of the specified item. Returns true on success.
|
// Set the grid position of the specified item. Returns True on success.
|
||||||
// If the move is not allowed (because an item is already there) then
|
// If the move is not allowed (because an item is already there) then
|
||||||
// false is returned.
|
// False is returned.
|
||||||
%nokwargs SetItemPosition;
|
%nokwargs SetItemPosition;
|
||||||
bool SetItemPosition(wxWindow *window, const wxGBPosition& pos);
|
bool SetItemPosition(wxWindow *window, const wxGBPosition& pos);
|
||||||
bool SetItemPosition(wxSizer *sizer, const wxGBPosition& pos);
|
bool SetItemPosition(wxSizer *sizer, const wxGBPosition& pos);
|
||||||
@ -285,9 +297,9 @@ public:
|
|||||||
wxGBSpan GetItemSpan(wxSizer *sizer);
|
wxGBSpan GetItemSpan(wxSizer *sizer);
|
||||||
wxGBSpan GetItemSpan(size_t index);
|
wxGBSpan GetItemSpan(size_t index);
|
||||||
|
|
||||||
// Set the row/col spanning of the specified item. Returns true on
|
// Set the row/col spanning of the specified item. Returns True on
|
||||||
// success. If the move is not allowed (because an item is already there)
|
// success. If the move is not allowed (because an item is already there)
|
||||||
// then false is returned.
|
// then False is returned.
|
||||||
%nokwargs SetItemSpan;
|
%nokwargs SetItemSpan;
|
||||||
bool SetItemSpan(wxWindow *window, const wxGBSpan& span);
|
bool SetItemSpan(wxWindow *window, const wxGBSpan& span);
|
||||||
bool SetItemSpan(wxSizer *sizer, const wxGBSpan& span);
|
bool SetItemSpan(wxSizer *sizer, const wxGBSpan& span);
|
||||||
@ -306,6 +318,13 @@ public:
|
|||||||
wxGBSizerItem* FindItemAtPosition(const wxGBPosition& pos);
|
wxGBSizerItem* FindItemAtPosition(const wxGBPosition& pos);
|
||||||
|
|
||||||
|
|
||||||
|
// Return the sizer item located at the point given in pt, or NULL if
|
||||||
|
// there is no item at that point. The (x,y) coordinates in pt correspond
|
||||||
|
// to the client coordinates of the window using the sizer for
|
||||||
|
// layout. (non-recursive)
|
||||||
|
wxGBSizerItem* FindItemAtPoint(const wxPoint& pt);
|
||||||
|
|
||||||
|
|
||||||
// Return the sizer item that has a matching user data (it only compares
|
// Return the sizer item that has a matching user data (it only compares
|
||||||
// pointer values) or NULL if not found. (non-recursive)
|
// pointer values) or NULL if not found. (non-recursive)
|
||||||
wxGBSizerItem* FindItemWithData(const wxObject* userData);
|
wxGBSizerItem* FindItemWithData(const wxObject* userData);
|
||||||
@ -317,7 +336,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// Look at all items and see if any intersect (or would overlap) the given
|
// Look at all items and see if any intersect (or would overlap) the given
|
||||||
// item. Returns true if so, false if there would be no overlap. If an
|
// item. Returns True if so, False if there would be no overlap. If an
|
||||||
// excludeItem is given then it will not be checked for intersection, for
|
// excludeItem is given then it will not be checked for intersection, for
|
||||||
// example it may be the item we are checking the position of.
|
// example it may be the item we are checking the position of.
|
||||||
%nokwargs CheckForIntersection;
|
%nokwargs CheckForIntersection;
|
||||||
|
@ -109,37 +109,67 @@ enum wxStockCursor
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
%newgroup
|
%newgroup
|
||||||
|
|
||||||
|
DocStr( wxSize,
|
||||||
|
"wx.Size is a useful data structure used to represent the size of something.
|
||||||
|
It simply contians integer width and height proprtites. In most places in
|
||||||
|
wxPython where a wx.Size is expected a (width,height) tuple can be used
|
||||||
|
instead.");
|
||||||
|
|
||||||
class wxSize
|
class wxSize
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//int x; // TODO: Can these be removed and just use width and height?
|
|
||||||
//int y;
|
|
||||||
%name(width) int x;
|
%name(width) int x;
|
||||||
%name(height)int y;
|
%name(height)int y;
|
||||||
|
|
||||||
wxSize(int w=0, int h=0);
|
DocCtorStr(
|
||||||
|
wxSize(int w=0, int h=0),
|
||||||
|
"Creates a size object.");
|
||||||
|
|
||||||
~wxSize();
|
~wxSize();
|
||||||
|
|
||||||
bool operator==(const wxSize& sz) const;
|
DocDeclStr(
|
||||||
bool operator!=(const wxSize& sz) const;
|
bool, operator==(const wxSize& sz),
|
||||||
|
"Test for equality of wx.Size objects.");
|
||||||
|
|
||||||
wxSize operator+(const wxSize& sz);
|
DocDeclStr(
|
||||||
wxSize operator-(const wxSize& sz);
|
bool, operator!=(const wxSize& sz),
|
||||||
|
"Test for inequality.");
|
||||||
|
|
||||||
void IncTo(const wxSize& sz);
|
DocDeclStr(
|
||||||
void DecTo(const wxSize& sz);
|
wxSize, operator+(const wxSize& sz),
|
||||||
|
"Add sz's proprties to this and return the result.");
|
||||||
|
|
||||||
void Set(int xx, int yy);
|
DocDeclStr(
|
||||||
|
wxSize, operator-(const wxSize& sz),
|
||||||
|
"Subtract sz's properties from this and return the result.");
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
void, IncTo(const wxSize& sz),
|
||||||
|
"Increments this object so that both of its dimensions are not less\n"
|
||||||
|
"than the corresponding dimensions of the size.");
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
void, DecTo(const wxSize& sz),
|
||||||
|
"Decrements this object so that both of its dimensions are not greater\n"
|
||||||
|
"than the corresponding dimensions of the size.");
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
void, Set(int w, int h),
|
||||||
|
"Set both width and height.");
|
||||||
|
|
||||||
void SetWidth(int w);
|
void SetWidth(int w);
|
||||||
void SetHeight(int h);
|
void SetHeight(int h);
|
||||||
int GetWidth() const;
|
int GetWidth() const;
|
||||||
int GetHeight() const;
|
int GetHeight() const;
|
||||||
|
|
||||||
int GetX() const;
|
//int GetX() const;
|
||||||
int GetY() const;
|
//int GetY() const;
|
||||||
|
|
||||||
%extend {
|
%extend {
|
||||||
PyObject* asTuple() {
|
DocAStr(Get,
|
||||||
|
"Get() -> (width,height)",
|
||||||
|
"Returns the width and height properties as a tuple.");
|
||||||
|
PyObject* Get() {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyObject* tup = PyTuple_New(2);
|
PyObject* tup = PyTuple_New(2);
|
||||||
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
|
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
|
||||||
@ -149,17 +179,18 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
%pythoncode {
|
%pythoncode {
|
||||||
def __str__(self): return str(self.asTuple())
|
asTuple = Get
|
||||||
def __repr__(self): return 'wxSize'+str(self.asTuple())
|
def __str__(self): return str(self.Get())
|
||||||
def __len__(self): return len(self.asTuple())
|
def __repr__(self): return 'wx.Size'+str(self.Get())
|
||||||
def __getitem__(self, index): return self.asTuple()[index]
|
def __len__(self): return len(self.Get())
|
||||||
|
def __getitem__(self, index): return self.Get()[index]
|
||||||
def __setitem__(self, index, val):
|
def __setitem__(self, index, val):
|
||||||
if index == 0: self.width = val
|
if index == 0: self.width = val
|
||||||
elif index == 1: self.height = val
|
elif index == 1: self.height = val
|
||||||
else: raise IndexError
|
else: raise IndexError
|
||||||
def __nonzero__(self): return self.asTuple() != (0,0)
|
def __nonzero__(self): return self.Get() != (0,0)
|
||||||
def __getinitargs__(self): return ()
|
def __getinitargs__(self): return ()
|
||||||
def __getstate__(self): return self.asTuple()
|
def __getstate__(self): return self.Get()
|
||||||
def __setstate__(self, state): self.Set(*state)
|
def __setstate__(self, state): self.Set(*state)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,28 +199,51 @@ public:
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
%newgroup
|
%newgroup
|
||||||
|
|
||||||
|
DocStr( wxRealPoint,
|
||||||
|
"A data structure for representing a point or position with floating point x
|
||||||
|
and y properties. In wxPython most places that expect a wx.RealPoint can also
|
||||||
|
accept a (x,y) tuple.");
|
||||||
class wxRealPoint
|
class wxRealPoint
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
double x;
|
double x;
|
||||||
double y;
|
double y;
|
||||||
|
|
||||||
wxRealPoint(double x=0.0, double y=0.0);
|
DocCtorStr(
|
||||||
|
wxRealPoint(double x=0.0, double y=0.0),
|
||||||
|
"Create a wx.RealPoint object");
|
||||||
|
|
||||||
~wxRealPoint();
|
~wxRealPoint();
|
||||||
|
|
||||||
wxRealPoint operator+(const wxRealPoint& pt) const;
|
DocDeclStr(
|
||||||
wxRealPoint operator-(const wxRealPoint& pt) const;
|
bool, operator==(const wxRealPoint& pt),
|
||||||
|
"Test for equality of wx.RealPoint objects.");
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
bool, operator!=(const wxRealPoint& pt),
|
||||||
|
"Test for inequality of wx.RealPoint objects.");
|
||||||
|
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
wxRealPoint, operator+(const wxRealPoint& pt),
|
||||||
|
"Add pt's proprties to this and return the result.");
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
wxRealPoint, operator-(const wxRealPoint& pt),
|
||||||
|
"Subtract pt's proprties from this and return the result");
|
||||||
|
|
||||||
bool operator==(const wxRealPoint& pt) const;
|
|
||||||
bool operator!=(const wxRealPoint& pt) const;
|
|
||||||
|
|
||||||
%extend {
|
%extend {
|
||||||
|
DocStr(Set, "Set both the x and y properties");
|
||||||
void Set(double x, double y) {
|
void Set(double x, double y) {
|
||||||
self->x = x;
|
self->x = x;
|
||||||
self->y = y;
|
self->y = y;
|
||||||
}
|
}
|
||||||
PyObject* asTuple() {
|
|
||||||
|
DocAStr(Get,
|
||||||
|
"Get() -> (x,y)",
|
||||||
|
"Return the x and y properties as a tuple. ");
|
||||||
|
PyObject* Get() {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyObject* tup = PyTuple_New(2);
|
PyObject* tup = PyTuple_New(2);
|
||||||
PyTuple_SET_ITEM(tup, 0, PyFloat_FromDouble(self->x));
|
PyTuple_SET_ITEM(tup, 0, PyFloat_FromDouble(self->x));
|
||||||
@ -200,48 +254,82 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
%pythoncode {
|
%pythoncode {
|
||||||
def __str__(self): return str(self.asTuple())
|
asTuple = Get
|
||||||
def __repr__(self): return 'wxRealPoint'+str(self.asTuple())
|
def __str__(self): return str(self.Get())
|
||||||
def __len__(self): return len(self.asTuple())
|
def __repr__(self): return 'wx.RealPoint'+str(self.Get())
|
||||||
def __getitem__(self, index): return self.asTuple()[index]
|
def __len__(self): return len(self.Get())
|
||||||
|
def __getitem__(self, index): return self.Get()[index]
|
||||||
def __setitem__(self, index, val):
|
def __setitem__(self, index, val):
|
||||||
if index == 0: self.width = val
|
if index == 0: self.x = val
|
||||||
elif index == 1: self.height = val
|
elif index == 1: self.y = val
|
||||||
else: raise IndexError
|
else: raise IndexError
|
||||||
def __nonzero__(self): return self.asTuple() != (0.0, 0.0)
|
def __nonzero__(self): return self.Get() != (0.0, 0.0)
|
||||||
def __getinitargs__(self): return ()
|
def __getinitargs__(self): return ()
|
||||||
def __getstate__(self): return self.asTuple()
|
def __getstate__(self): return self.Get()
|
||||||
def __setstate__(self, state): self.Set(*state)
|
def __setstate__(self, state): self.Set(*state)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
%newgroup
|
%newgroup
|
||||||
|
|
||||||
|
|
||||||
|
DocStr(wxPoint,
|
||||||
|
"A data structure for representing a point or position with integer x and y
|
||||||
|
properties. Most places in wxPython that expect a wx.Point can also accept a
|
||||||
|
(x,y) tuple.");
|
||||||
|
|
||||||
class wxPoint
|
class wxPoint
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
wxPoint(int x=0, int y=0);
|
DocCtorStr(
|
||||||
|
wxPoint(int x=0, int y=0),
|
||||||
|
"Create a wx.Point object");
|
||||||
|
|
||||||
~wxPoint();
|
~wxPoint();
|
||||||
|
|
||||||
bool operator==(const wxPoint& p) const;
|
|
||||||
bool operator!=(const wxPoint& p) const;
|
DocDeclStr(
|
||||||
|
bool, operator==(const wxPoint& pt),
|
||||||
|
"Test for equality of wx.Point objects.");
|
||||||
|
|
||||||
wxPoint operator+(const wxPoint& p) const;
|
DocDeclStr(
|
||||||
wxPoint operator-(const wxPoint& p) const;
|
bool, operator!=(const wxPoint& pt),
|
||||||
|
"Test for inequality of wx.Point objects.");
|
||||||
|
|
||||||
wxPoint& operator+=(const wxPoint& p);
|
|
||||||
wxPoint& operator-=(const wxPoint& p);
|
DocDeclStr(
|
||||||
|
wxPoint, operator+(const wxPoint& pt),
|
||||||
|
"Add pt's proprties to this and return the result.");
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
wxPoint, operator-(const wxPoint& pt),
|
||||||
|
"Subtract pt's proprties from this and return the result");
|
||||||
|
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
wxPoint&, operator+=(const wxPoint& pt),
|
||||||
|
"Add pt to this object.");
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
wxPoint&, operator-=(const wxPoint& pt),
|
||||||
|
"Subtract pt from this object.");
|
||||||
|
|
||||||
|
|
||||||
%extend {
|
%extend {
|
||||||
|
DocStr(Set, "Set both the x and y properties");
|
||||||
void Set(long x, long y) {
|
void Set(long x, long y) {
|
||||||
self->x = x;
|
self->x = x;
|
||||||
self->y = y;
|
self->y = y;
|
||||||
}
|
}
|
||||||
PyObject* asTuple() {
|
|
||||||
|
DocAStr(Get,
|
||||||
|
"Get() -> (x,y)",
|
||||||
|
"Return the x and y properties as a tuple. ");
|
||||||
|
PyObject* Get() {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyObject* tup = PyTuple_New(2);
|
PyObject* tup = PyTuple_New(2);
|
||||||
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
|
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
|
||||||
@ -252,17 +340,18 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
%pythoncode {
|
%pythoncode {
|
||||||
def __str__(self): return str(self.asTuple())
|
asTuple = Get
|
||||||
def __repr__(self): return 'wxPoint'+str(self.asTuple())
|
def __str__(self): return str(self.Get())
|
||||||
def __len__(self): return len(self.asTuple())
|
def __repr__(self): return 'wx.Point'+str(self.Get())
|
||||||
def __getitem__(self, index): return self.asTuple()[index]
|
def __len__(self): return len(self.Get())
|
||||||
|
def __getitem__(self, index): return self.Get()[index]
|
||||||
def __setitem__(self, index, val):
|
def __setitem__(self, index, val):
|
||||||
if index == 0: self.x = val
|
if index == 0: self.x = val
|
||||||
elif index == 1: self.y = val
|
elif index == 1: self.y = val
|
||||||
else: raise IndexError
|
else: raise IndexError
|
||||||
def __nonzero__(self): return self.asTuple() != (0,0)
|
def __nonzero__(self): return self.Get() != (0,0)
|
||||||
def __getinitargs__(self): return ()
|
def __getinitargs__(self): return ()
|
||||||
def __getstate__(self): return self.asTuple()
|
def __getstate__(self): return self.Get()
|
||||||
def __setstate__(self, state): self.Set(*state)
|
def __setstate__(self, state): self.Set(*state)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -271,12 +360,28 @@ public:
|
|||||||
%newgroup
|
%newgroup
|
||||||
|
|
||||||
|
|
||||||
|
DocStr(wxRect,
|
||||||
|
"A class for representing and manipulating rectangles. It has x, y, width and
|
||||||
|
height properties. In wxPython most palces that expect a wx.Rect can also
|
||||||
|
accept a (x,y,width,height) tuple.");
|
||||||
|
|
||||||
class wxRect
|
class wxRect
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxRect(int x=0, int y=0, int width=0, int height=0);
|
DocCtorStr(
|
||||||
%name(RectPP) wxRect(const wxPoint& topLeft, const wxPoint& bottomRight);
|
wxRect(int x=0, int y=0, int width=0, int height=0),
|
||||||
%name(RectPS) wxRect(const wxPoint& pos, const wxSize& size);
|
"Create a new Rect object.");
|
||||||
|
|
||||||
|
DocCtorStrName(
|
||||||
|
wxRect(const wxPoint& topLeft, const wxPoint& bottomRight),
|
||||||
|
"Create a new Rect object from Points representing two corners.",
|
||||||
|
RectPP);
|
||||||
|
|
||||||
|
DocCtorStrName(
|
||||||
|
wxRect(const wxPoint& pos, const wxSize& size),
|
||||||
|
"Create a new Rect from a position and size.",
|
||||||
|
RectPS);
|
||||||
|
|
||||||
~wxRect();
|
~wxRect();
|
||||||
|
|
||||||
int GetX() const;
|
int GetX() const;
|
||||||
@ -307,39 +412,83 @@ public:
|
|||||||
void SetTop(int top);
|
void SetTop(int top);
|
||||||
void SetBottom(int bottom);
|
void SetBottom(int bottom);
|
||||||
|
|
||||||
wxRect& Inflate(wxCoord dx, wxCoord dy);
|
%pythoncode {
|
||||||
wxRect& Deflate(wxCoord dx, wxCoord dy);
|
position = property(GetPosition, SetPosition)
|
||||||
|
size = property(GetSize, SetSize)
|
||||||
|
left = property(GetLeft, SetLeft)
|
||||||
|
right = property(GetRight, SetRight)
|
||||||
|
top = property(GetTop, SetTop)
|
||||||
|
bottom = property(GetBottom, SetBottom)
|
||||||
|
}
|
||||||
|
|
||||||
%name(OffsetXY)void Offset(wxCoord dx, wxCoord dy);
|
DocDeclStr(
|
||||||
void Offset(const wxPoint& pt);
|
wxRect&, Inflate(wxCoord dx, wxCoord dy),
|
||||||
|
"Increase the rectangle size by dx in x direction and dy in y direction. Both\n"
|
||||||
|
"(or one of) parameters may be negative to decrease the rectangle size.");
|
||||||
|
|
||||||
wxRect& Intersect(const wxRect& rect);
|
DocDeclStr(
|
||||||
|
wxRect&, Deflate(wxCoord dx, wxCoord dy),
|
||||||
|
"Decrease the rectangle size by dx in x direction and dy in y direction. Both\n"
|
||||||
|
"(or one of) parameters may be negative to increase the rectngle size. This\n"
|
||||||
|
"method is the opposite of Inflate.");
|
||||||
|
|
||||||
wxRect operator+(const wxRect& rect) const;
|
DocDeclStrName(
|
||||||
wxRect& operator+=(const wxRect& rect);
|
void, Offset(wxCoord dx, wxCoord dy),
|
||||||
|
"Moves the rectangle by the specified offset. If dx is positive, the rectangle\n"
|
||||||
|
"is moved to the right, if dy is positive, it is moved to the bottom, otherwise\n"
|
||||||
|
"it is moved to the left or top respectively.",
|
||||||
|
OffsetXY);
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
void, Offset(const wxPoint& pt),
|
||||||
|
"Same as OffsetXY but uses dx,dy from Point");
|
||||||
|
|
||||||
bool operator==(const wxRect& rect) const;
|
DocDeclStr(
|
||||||
bool operator!=(const wxRect& rect) const { return !(*this == rect); }
|
wxRect&, Intersect(const wxRect& rect),
|
||||||
|
"Return the intersectsion of this rectangle and rect.");
|
||||||
|
|
||||||
// return TRUE if the point is (not strcitly) inside the rect
|
DocDeclStr(
|
||||||
|
wxRect, operator+(const wxRect& rect) const,
|
||||||
|
"Add the properties of rect to this rectangle and return the result.");
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
wxRect&, operator+=(const wxRect& rect),
|
||||||
|
"Add the properties of rect to this rectangle, updating this rectangle.");
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
bool, operator==(const wxRect& rect) const,
|
||||||
|
"Test for equality.");
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
bool, operator!=(const wxRect& rect) const,
|
||||||
|
"Test for inequality.");
|
||||||
|
|
||||||
|
|
||||||
|
DocStr( Inside, "Return True if the point is (not strcitly) inside the rect.");
|
||||||
%name(InsideXY)bool Inside(int x, int y) const;
|
%name(InsideXY)bool Inside(int x, int y) const;
|
||||||
bool Inside(const wxPoint& pt) const;
|
bool Inside(const wxPoint& pt) const;
|
||||||
|
|
||||||
// return TRUE if the rectangles have a non empty intersection
|
DocDeclStr(
|
||||||
bool Intersects(const wxRect& rect) const;
|
bool, Intersects(const wxRect& rect) const,
|
||||||
|
"Returns True if the rectangles have a non empty intersection.");
|
||||||
|
|
||||||
|
|
||||||
int x, y, width, height;
|
int x, y, width, height;
|
||||||
|
|
||||||
|
|
||||||
%extend {
|
%extend {
|
||||||
void Set(int x=0, int y=0, int width=0, int height=0) {
|
DocStr(Set, "Set all rectangle properties.");
|
||||||
|
void Set(int x=0, int y=0, int width=0, int height=0) {
|
||||||
self->x = x;
|
self->x = x;
|
||||||
self->y = y;
|
self->y = y;
|
||||||
self->width = width;
|
self->width = width;
|
||||||
self->height = height;
|
self->height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject* asTuple() {
|
DocAStr(Get,
|
||||||
|
"Get() -> (x,y,width,height)",
|
||||||
|
"Return the rectangle properties as a tuple.");
|
||||||
|
PyObject* Get() {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyObject* tup = PyTuple_New(4);
|
PyObject* tup = PyTuple_New(4);
|
||||||
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
|
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
|
||||||
@ -352,24 +501,28 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
%pythoncode {
|
%pythoncode {
|
||||||
def __str__(self): return str(self.asTuple())
|
asTuple = Get
|
||||||
def __repr__(self): return 'wxRect'+str(self.asTuple())
|
def __str__(self): return str(self.Get())
|
||||||
def __len__(self): return len(self.asTuple())
|
def __repr__(self): return 'wx.Rect'+str(self.Get())
|
||||||
def __getitem__(self, index): return self.asTuple()[index]
|
def __len__(self): return len(self.Get())
|
||||||
|
def __getitem__(self, index): return self.Get()[index]
|
||||||
def __setitem__(self, index, val):
|
def __setitem__(self, index, val):
|
||||||
if index == 0: self.x = val
|
if index == 0: self.x = val
|
||||||
elif index == 1: self.y = val
|
elif index == 1: self.y = val
|
||||||
elif index == 2: self.width = val
|
elif index == 2: self.width = val
|
||||||
elif index == 3: self.height = val
|
elif index == 3: self.height = val
|
||||||
else: raise IndexError
|
else: raise IndexError
|
||||||
def __nonzero__(self): return self.asTuple() != (0,0,0,0)
|
def __nonzero__(self): return self.Get() != (0,0,0,0)
|
||||||
def __getinitargs__(self): return ()
|
def __getinitargs__(self): return ()
|
||||||
def __getstate__(self): return self.asTuple()
|
def __getstate__(self): return self.Get()
|
||||||
def __setstate__(self, state): self.Set(*state)
|
def __setstate__(self, state): self.Set(*state)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
DocAStr(wxIntersectRect,
|
||||||
|
"IntersectRect(Rect r1, Rect r2) -> Rect",
|
||||||
|
"Calculate and return the intersection of r1 and r2.");
|
||||||
%inline %{
|
%inline %{
|
||||||
PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) {
|
PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) {
|
||||||
wxRegion reg1(*r1);
|
wxRegion reg1(*r1);
|
||||||
@ -383,7 +536,7 @@ public:
|
|||||||
if (dest != wxRect(0,0,0,0)) {
|
if (dest != wxRect(0,0,0,0)) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
wxRect* newRect = new wxRect(dest);
|
wxRect* newRect = new wxRect(dest);
|
||||||
obj = wxPyConstructObject((void*)newRect, wxT("wxRect"), true);
|
obj = wxPyConstructObject((void*)newRect, wxT("wxRect"), True);
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
@ -396,23 +549,32 @@ public:
|
|||||||
%newgroup
|
%newgroup
|
||||||
|
|
||||||
|
|
||||||
// wxPoint2Ds represent a point or a vector in a 2d coordinate system
|
DocStr(wxPoint2D,
|
||||||
|
"wx.Point2Ds represent a point or a vector in a 2d coordinate system with floating point values.");
|
||||||
|
|
||||||
class wxPoint2D
|
class wxPoint2D
|
||||||
{
|
{
|
||||||
public :
|
public:
|
||||||
|
DocStr(wxPoint2D, "Create a w.Point2D object.");
|
||||||
wxPoint2D( double x=0.0 , double y=0.0 );
|
wxPoint2D( double x=0.0 , double y=0.0 );
|
||||||
%name(Point2DCopy) wxPoint2D( const wxPoint2D &pt );
|
%name(Point2DCopy) wxPoint2D( const wxPoint2D &pt );
|
||||||
%name(Point2DFromPoint) wxPoint2D( const wxPoint &pt );
|
%name(Point2DFromPoint) wxPoint2D( const wxPoint &pt );
|
||||||
|
|
||||||
// two different conversions to integers, floor and rounding
|
DocDeclAStr(
|
||||||
void GetFloor( int *OUTPUT , int *OUTPUT ) const;
|
void, GetFloor( int *OUTPUT , int *OUTPUT ) const,
|
||||||
void GetRounded( int *OUTPUT , int *OUTPUT ) const;
|
"GetFloor() -> (x,y)",
|
||||||
|
"Convert to integer");
|
||||||
|
|
||||||
|
DocDeclAStr(
|
||||||
|
void, GetRounded( int *OUTPUT , int *OUTPUT ) const,
|
||||||
|
"GetRounded() -> (x,y)",
|
||||||
|
"Convert to integer");
|
||||||
|
|
||||||
double GetVectorLength() const;
|
double GetVectorLength() const;
|
||||||
double GetVectorAngle() const ;
|
double GetVectorAngle() const ;
|
||||||
void SetVectorLength( double length );
|
void SetVectorLength( double length );
|
||||||
void SetVectorAngle( double degrees );
|
void SetVectorAngle( double degrees );
|
||||||
|
|
||||||
// LinkError: void SetPolarCoordinates( double angle , double length );
|
// LinkError: void SetPolarCoordinates( double angle , double length );
|
||||||
// LinkError: void Normalize();
|
// LinkError: void Normalize();
|
||||||
%pythoncode {
|
%pythoncode {
|
||||||
@ -428,8 +590,9 @@ public :
|
|||||||
double GetDotProduct( const wxPoint2D &vec ) const;
|
double GetDotProduct( const wxPoint2D &vec ) const;
|
||||||
double GetCrossProduct( const wxPoint2D &vec ) const;
|
double GetCrossProduct( const wxPoint2D &vec ) const;
|
||||||
|
|
||||||
// the reflection of this point
|
DocDeclStr(
|
||||||
wxPoint2D operator-();
|
wxPoint2D, operator-(),
|
||||||
|
"the reflection of this point");
|
||||||
|
|
||||||
wxPoint2D& operator+=(const wxPoint2D& pt);
|
wxPoint2D& operator+=(const wxPoint2D& pt);
|
||||||
wxPoint2D& operator-=(const wxPoint2D& pt);
|
wxPoint2D& operator-=(const wxPoint2D& pt);
|
||||||
@ -437,11 +600,14 @@ public :
|
|||||||
wxPoint2D& operator*=(const wxPoint2D& pt);
|
wxPoint2D& operator*=(const wxPoint2D& pt);
|
||||||
wxPoint2D& operator/=(const wxPoint2D& pt);
|
wxPoint2D& operator/=(const wxPoint2D& pt);
|
||||||
|
|
||||||
bool operator==(const wxPoint2D& pt) const;
|
DocDeclStr(
|
||||||
bool operator!=(const wxPoint2D& pt) const;
|
bool, operator==(const wxPoint2D& pt) const,
|
||||||
|
"Test for equality");
|
||||||
|
|
||||||
|
DocDeclStr(
|
||||||
|
bool, operator!=(const wxPoint2D& pt) const,
|
||||||
|
"Test for inequality");
|
||||||
|
|
||||||
double m_x;
|
|
||||||
double m_y;
|
|
||||||
%name(x)double m_x;
|
%name(x)double m_x;
|
||||||
%name(y)double m_y;
|
%name(y)double m_y;
|
||||||
|
|
||||||
@ -450,7 +616,11 @@ public :
|
|||||||
self->m_x = x;
|
self->m_x = x;
|
||||||
self->m_y = y;
|
self->m_y = y;
|
||||||
}
|
}
|
||||||
PyObject* asTuple() {
|
|
||||||
|
DocAStr(Get,
|
||||||
|
"Get() -> (x,y)",
|
||||||
|
"Return x and y properties as a tuple.");
|
||||||
|
PyObject* Get() {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyObject* tup = PyTuple_New(2);
|
PyObject* tup = PyTuple_New(2);
|
||||||
PyTuple_SET_ITEM(tup, 0, PyFloat_FromDouble(self->m_x));
|
PyTuple_SET_ITEM(tup, 0, PyFloat_FromDouble(self->m_x));
|
||||||
@ -461,17 +631,18 @@ public :
|
|||||||
}
|
}
|
||||||
|
|
||||||
%pythoncode {
|
%pythoncode {
|
||||||
def __str__(self): return str(self.asTuple())
|
asTuple = Get
|
||||||
def __repr__(self): return 'wxPoint2D'+str(self.asTuple())
|
def __str__(self): return str(self.Get())
|
||||||
def __len__(self): return len(self.asTuple())
|
def __repr__(self): return 'wx.Point2D'+str(self.Get())
|
||||||
def __getitem__(self, index): return self.asTuple()[index]
|
def __len__(self): return len(self.Get())
|
||||||
|
def __getitem__(self, index): return self.Get()[index]
|
||||||
def __setitem__(self, index, val):
|
def __setitem__(self, index, val):
|
||||||
if index == 0: self.m_x = val
|
if index == 0: self.x = val
|
||||||
elif index == 1: self.m_yt = val
|
elif index == 1: self.y = val
|
||||||
else: raise IndexError
|
else: raise IndexError
|
||||||
def __nonzero__(self): return self.asTuple() != (0.0, 0.0)
|
def __nonzero__(self): return self.Get() != (0.0, 0.0)
|
||||||
def __getinitargs__(self): return ()
|
def __getinitargs__(self): return ()
|
||||||
def __getstate__(self): return self.asTuple()
|
def __getstate__(self): return self.Get()
|
||||||
def __setstate__(self, state): self.Set(*state)
|
def __setstate__(self, state): self.Set(*state)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ public:
|
|||||||
~wxIconLocation();
|
~wxIconLocation();
|
||||||
|
|
||||||
|
|
||||||
// returns true if this object is valid/initialized
|
// returns True if this object is valid/initialized
|
||||||
bool IsOk() const;
|
bool IsOk() const;
|
||||||
%pythoncode { def __nonzero__(self): return self.Ok() }
|
%pythoncode { def __nonzero__(self): return self.Ok() }
|
||||||
|
|
||||||
|
@ -52,22 +52,22 @@ class wxImageHistogram /* : public wxImageHistogramBase */
|
|||||||
public:
|
public:
|
||||||
wxImageHistogram();
|
wxImageHistogram();
|
||||||
|
|
||||||
// get the key in the histogram for the given RGB values
|
DocStr(MakeKey, "Get the key in the histogram for the given RGB values");
|
||||||
static unsigned long MakeKey(unsigned char r,
|
static unsigned long MakeKey(unsigned char r,
|
||||||
unsigned char g,
|
unsigned char g,
|
||||||
unsigned char b);
|
unsigned char b);
|
||||||
|
|
||||||
// find first colour that is not used in the image and has higher
|
DocDeclAStr(
|
||||||
// RGB values than RGB(startR, startG, startB)
|
bool, FindFirstUnusedColour(unsigned char *OUTPUT,
|
||||||
//
|
unsigned char *OUTPUT,
|
||||||
// returns true and puts this colour in r, g, b (each of which may be NULL)
|
unsigned char *OUTPUT,
|
||||||
// on success or returns false if there are no more free colours
|
unsigned char startR = 1,
|
||||||
bool FindFirstUnusedColour(unsigned char *OUTPUT,
|
unsigned char startG = 0,
|
||||||
unsigned char *OUTPUT,
|
unsigned char startB = 0 ) const,
|
||||||
unsigned char *OUTPUT,
|
"FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)",
|
||||||
unsigned char startR = 1,
|
"Find first colour that is not used in the image and has higher RGB values than\n"
|
||||||
unsigned char startG = 0,
|
"startR, startG, startB. Returns a tuple consisting of a success flag and rgb\n"
|
||||||
unsigned char startB = 0 ) const;
|
"values.");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ public:
|
|||||||
%name(ImageFromStream) wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1);
|
%name(ImageFromStream) wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1);
|
||||||
%name(ImageFromStreamMime) wxImage(wxInputStream& stream, const wxString& mimetype, int index = -1 );
|
%name(ImageFromStreamMime) wxImage(wxInputStream& stream, const wxString& mimetype, int index = -1 );
|
||||||
%extend {
|
%extend {
|
||||||
%name(EmptyImage) wxImage(int width=0, int height=0, bool clear = TRUE) {
|
%name(EmptyImage) wxImage(int width=0, int height=0, bool clear = True) {
|
||||||
if (width > 0 && height > 0)
|
if (width > 0 && height > 0)
|
||||||
return new wxImage(width, height, clear);
|
return new wxImage(width, height, clear);
|
||||||
else
|
else
|
||||||
@ -103,7 +103,7 @@ public:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
memcpy(copy, data, width*height*3);
|
memcpy(copy, data, width*height*3);
|
||||||
return new wxImage(width, height, copy, FALSE);
|
return new wxImage(width, height, copy, False);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,8 +125,14 @@ public:
|
|||||||
|
|
||||||
// find first colour that is not used in the image and has higher
|
// find first colour that is not used in the image and has higher
|
||||||
// RGB values than <startR,startG,startB>
|
// RGB values than <startR,startG,startB>
|
||||||
bool FindFirstUnusedColour( byte *OUTPUT, byte *OUTPUT, byte *OUTPUT,
|
DocDeclAStr(
|
||||||
byte startR = 0, byte startG = 0, byte startB = 0 ) const;
|
bool, FindFirstUnusedColour( byte *OUTPUT, byte *OUTPUT, byte *OUTPUT,
|
||||||
|
byte startR = 0, byte startG = 0, byte startB = 0 ) const,
|
||||||
|
"FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)",
|
||||||
|
"Find first colour that is not used in the image and has higher RGB values than\n"
|
||||||
|
"startR, startG, startB. Returns a tuple consisting of a success flag and rgb\n"
|
||||||
|
"values.");
|
||||||
|
|
||||||
|
|
||||||
// Set image's mask to the area of 'mask' that has <mr,mg,mb> colour
|
// Set image's mask to the area of 'mask' that has <mr,mg,mb> colour
|
||||||
bool SetMaskFromImage(const wxImage & mask,
|
bool SetMaskFromImage(const wxImage & mask,
|
||||||
@ -270,13 +276,13 @@ public:
|
|||||||
unsigned char GetMaskRed();
|
unsigned char GetMaskRed();
|
||||||
unsigned char GetMaskGreen();
|
unsigned char GetMaskGreen();
|
||||||
unsigned char GetMaskBlue();
|
unsigned char GetMaskBlue();
|
||||||
void SetMask( bool mask = TRUE );
|
void SetMask( bool mask = True );
|
||||||
bool HasMask();
|
bool HasMask();
|
||||||
|
|
||||||
wxImage Rotate(double angle, const wxPoint & centre_of_rotation,
|
wxImage Rotate(double angle, const wxPoint & centre_of_rotation,
|
||||||
bool interpolating = TRUE, wxPoint * offset_after_rotation = NULL) const ;
|
bool interpolating = True, wxPoint * offset_after_rotation = NULL) const ;
|
||||||
wxImage Rotate90( bool clockwise = TRUE ) ;
|
wxImage Rotate90( bool clockwise = True ) ;
|
||||||
wxImage Mirror( bool horizontally = TRUE ) ;
|
wxImage Mirror( bool horizontally = True ) ;
|
||||||
|
|
||||||
void Replace( unsigned char r1, unsigned char g1, unsigned char b1,
|
void Replace( unsigned char r1, unsigned char g1, unsigned char b1,
|
||||||
unsigned char r2, unsigned char g2, unsigned char b2 );
|
unsigned char r2, unsigned char g2, unsigned char b2 );
|
||||||
|
@ -41,7 +41,7 @@ enum {
|
|||||||
// two bitmaps, or an icon.
|
// two bitmaps, or an icon.
|
||||||
class wxImageList : public wxObject {
|
class wxImageList : public wxObject {
|
||||||
public:
|
public:
|
||||||
wxImageList(int width, int height, int mask=TRUE, int initialCount=1);
|
wxImageList(int width, int height, int mask=True, int initialCount=1);
|
||||||
~wxImageList();
|
~wxImageList();
|
||||||
|
|
||||||
int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
|
int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
|
||||||
@ -56,7 +56,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool Draw(int index, wxDC& dc, int x, int x, int flags = wxIMAGELIST_DRAW_NORMAL,
|
bool Draw(int index, wxDC& dc, int x, int x, int flags = wxIMAGELIST_DRAW_NORMAL,
|
||||||
const bool solidBackground = FALSE);
|
const bool solidBackground = False);
|
||||||
|
|
||||||
int GetImageCount();
|
int GetImageCount();
|
||||||
bool Remove(int index);
|
bool Remove(int index);
|
||||||
|
@ -317,8 +317,8 @@ public:
|
|||||||
%name(Init1)bool Init(const wxString& szName,
|
%name(Init1)bool Init(const wxString& szName,
|
||||||
const wxString& szShort = wxPyEmptyString,
|
const wxString& szShort = wxPyEmptyString,
|
||||||
const wxString& szLocale = wxPyEmptyString,
|
const wxString& szLocale = wxPyEmptyString,
|
||||||
bool bLoadDefault = TRUE,
|
bool bLoadDefault = True,
|
||||||
bool bConvertEncoding = FALSE);
|
bool bConvertEncoding = False);
|
||||||
|
|
||||||
%name(Init2) bool Init(int language = wxLANGUAGE_DEFAULT,
|
%name(Init2) bool Init(int language = wxLANGUAGE_DEFAULT,
|
||||||
int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
|
int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
|
||||||
@ -350,7 +350,7 @@ public:
|
|||||||
// is used, the US default value is returned if everything else fails
|
// is used, the US default value is returned if everything else fails
|
||||||
// static wxString GetInfo(wxLocaleInfo index, wxLocaleCategory cat);
|
// static wxString GetInfo(wxLocaleInfo index, wxLocaleCategory cat);
|
||||||
|
|
||||||
// return TRUE if the locale was set successfully
|
// return True if the locale was set successfully
|
||||||
bool IsOk() const;
|
bool IsOk() const;
|
||||||
%pythoncode { def __nonzero__(self): return self.IsOk() };
|
%pythoncode { def __nonzero__(self): return self.IsOk() };
|
||||||
|
|
||||||
@ -381,7 +381,7 @@ public:
|
|||||||
//
|
//
|
||||||
// The loaded catalog will be used for message lookup by GetString().
|
// The loaded catalog will be used for message lookup by GetString().
|
||||||
//
|
//
|
||||||
// Returns 'true' if it was successfully loaded
|
// Returns 'True' if it was successfully loaded
|
||||||
bool AddCatalog(const wxString& szDomain);
|
bool AddCatalog(const wxString& szDomain);
|
||||||
|
|
||||||
// check if the given catalog is loaded
|
// check if the given catalog is loaded
|
||||||
@ -504,7 +504,7 @@ public:
|
|||||||
// both modes gurantee that output string will have same length
|
// both modes gurantee that output string will have same length
|
||||||
// as input string
|
// as input string
|
||||||
//
|
//
|
||||||
// Returns FALSE if given conversion is impossible, TRUE otherwise
|
// Returns False if given conversion is impossible, True otherwise
|
||||||
// (conversion may be impossible either if you try to convert
|
// (conversion may be impossible either if you try to convert
|
||||||
// to Unicode with non-Unicode build of wxWindows or if input
|
// to Unicode with non-Unicode build of wxWindows or if input
|
||||||
// or output encoding is not supported.)
|
// or output encoding is not supported.)
|
||||||
@ -564,7 +564,7 @@ public:
|
|||||||
// equivalent encodings, regardless the platform, including itself.
|
// equivalent encodings, regardless the platform, including itself.
|
||||||
static wxFontEncodingArray GetAllEquivalents(wxFontEncoding enc);
|
static wxFontEncodingArray GetAllEquivalents(wxFontEncoding enc);
|
||||||
|
|
||||||
// Return true if [any text in] one multibyte encoding can be
|
// Return True if [any text in] one multibyte encoding can be
|
||||||
// converted to another one losslessly.
|
// converted to another one losslessly.
|
||||||
//
|
//
|
||||||
// Do not call this with wxFONTENCODING_UNICODE, it doesn't make
|
// Do not call this with wxFONTENCODING_UNICODE, it doesn't make
|
||||||
|
@ -63,7 +63,7 @@ public:
|
|||||||
int GetMovementThreshold() { return -1; }
|
int GetMovementThreshold() { return -1; }
|
||||||
void SetMovementThreshold(int threshold) {}
|
void SetMovementThreshold(int threshold) {}
|
||||||
|
|
||||||
bool IsOk(void) { return FALSE; }
|
bool IsOk(void) { return False; }
|
||||||
int GetNumberJoysticks() { return -1; }
|
int GetNumberJoysticks() { return -1; }
|
||||||
int GetManufacturerId() { return -1; }
|
int GetManufacturerId() { return -1; }
|
||||||
int GetProductId() { return -1; }
|
int GetProductId() { return -1; }
|
||||||
@ -87,16 +87,16 @@ public:
|
|||||||
int GetVMin() { return -1; }
|
int GetVMin() { return -1; }
|
||||||
int GetVMax() { return -1; }
|
int GetVMax() { return -1; }
|
||||||
|
|
||||||
bool HasRudder() { return FALSE; }
|
bool HasRudder() { return False; }
|
||||||
bool HasZ() { return FALSE; }
|
bool HasZ() { return False; }
|
||||||
bool HasU() { return FALSE; }
|
bool HasU() { return False; }
|
||||||
bool HasV() { return FALSE; }
|
bool HasV() { return False; }
|
||||||
bool HasPOV() { return FALSE; }
|
bool HasPOV() { return False; }
|
||||||
bool HasPOV4Dir() { return FALSE; }
|
bool HasPOV4Dir() { return False; }
|
||||||
bool HasPOVCTS() { return FALSE; }
|
bool HasPOVCTS() { return False; }
|
||||||
|
|
||||||
bool SetCapture(wxWindow* win, int pollingFreq = 0) { return FALSE; }
|
bool SetCapture(wxWindow* win, int pollingFreq = 0) { return False; }
|
||||||
bool ReleaseCapture() { return FALSE; }
|
bool ReleaseCapture() { return False; }
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
%}
|
%}
|
||||||
|
@ -64,12 +64,12 @@ public:
|
|||||||
|
|
||||||
// multiple selection logic
|
// multiple selection logic
|
||||||
virtual bool IsSelected(int n) const;
|
virtual bool IsSelected(int n) const;
|
||||||
virtual void SetSelection(int n, bool select = TRUE);
|
virtual void SetSelection(int n, bool select = True);
|
||||||
virtual void Select(int n);
|
virtual void Select(int n);
|
||||||
void Deselect(int n);
|
void Deselect(int n);
|
||||||
void DeselectAll(int itemToLeaveSelected = -1);
|
void DeselectAll(int itemToLeaveSelected = -1);
|
||||||
|
|
||||||
virtual bool SetStringSelection(const wxString& s, bool select = TRUE);
|
virtual bool SetStringSelection(const wxString& s, bool select = True);
|
||||||
|
|
||||||
// works for single as well as multiple selection listboxes (unlike
|
// works for single as well as multiple selection listboxes (unlike
|
||||||
// GetSelection which only works for listboxes with single selection)
|
// GetSelection which only works for listboxes with single selection)
|
||||||
@ -99,7 +99,7 @@ public:
|
|||||||
// listbox and ensures that it is visible i.e. not scrolled out of view
|
// listbox and ensures that it is visible i.e. not scrolled out of view
|
||||||
void AppendAndEnsureVisible(const wxString& s);
|
void AppendAndEnsureVisible(const wxString& s);
|
||||||
|
|
||||||
// return TRUE if this listbox is sorted
|
// return True if this listbox is sorted
|
||||||
bool IsSorted() const;
|
bool IsSorted() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ public:
|
|||||||
const wxString& name = wxPyListBoxNameStr);
|
const wxString& name = wxPyListBoxNameStr);
|
||||||
|
|
||||||
bool IsChecked(int index);
|
bool IsChecked(int index);
|
||||||
void Check(int index, int check = TRUE);
|
void Check(int index, int check = True);
|
||||||
|
|
||||||
#ifndef __WXMAC__
|
#ifndef __WXMAC__
|
||||||
int GetItemHeight();
|
int GetItemHeight();
|
||||||
|
@ -179,6 +179,7 @@ public:
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
%newgroup
|
%newgroup
|
||||||
|
|
||||||
|
|
||||||
// wxListItem: the item or column info, used to exchange data with wxListCtrl
|
// wxListItem: the item or column info, used to exchange data with wxListCtrl
|
||||||
class wxListItem : public wxObject {
|
class wxListItem : public wxObject {
|
||||||
public:
|
public:
|
||||||
@ -542,7 +543,7 @@ public:
|
|||||||
wxSize GetItemSpacing() const;
|
wxSize GetItemSpacing() const;
|
||||||
|
|
||||||
#ifndef __WXMSW__
|
#ifndef __WXMSW__
|
||||||
void SetItemSpacing( int spacing, bool isSmall = FALSE );
|
void SetItemSpacing( int spacing, bool isSmall = False );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Gets the number of selected items in the list control
|
// Gets the number of selected items in the list control
|
||||||
@ -559,7 +560,7 @@ public:
|
|||||||
long GetTopItem() const ;
|
long GetTopItem() const ;
|
||||||
|
|
||||||
// Add or remove a single window style
|
// Add or remove a single window style
|
||||||
void SetSingleStyle(long style, bool add = TRUE) ;
|
void SetSingleStyle(long style, bool add = True) ;
|
||||||
|
|
||||||
// Set the whole window style
|
// Set the whole window style
|
||||||
void SetWindowStyleFlag(long style) ;
|
void SetWindowStyleFlag(long style) ;
|
||||||
@ -581,7 +582,7 @@ public:
|
|||||||
%addtofunc AssignImageList "args[1].thisown = 0";
|
%addtofunc AssignImageList "args[1].thisown = 0";
|
||||||
void AssignImageList(wxImageList *imageList, int which);
|
void AssignImageList(wxImageList *imageList, int which);
|
||||||
|
|
||||||
// returns true if it is a virtual list control
|
// returns True if it is a virtual list control
|
||||||
bool IsVirtual() const;
|
bool IsVirtual() const;
|
||||||
|
|
||||||
// refresh items selectively (only useful for virtual list controls)
|
// refresh items selectively (only useful for virtual list controls)
|
||||||
@ -621,7 +622,7 @@ public:
|
|||||||
|
|
||||||
// Find an item whose label matches this string, starting from the item after 'start'
|
// Find an item whose label matches this string, starting from the item after 'start'
|
||||||
// or the beginning if 'start' is -1.
|
// or the beginning if 'start' is -1.
|
||||||
long FindItem(long start, const wxString& str, bool partial = FALSE);
|
long FindItem(long start, const wxString& str, bool partial = False);
|
||||||
|
|
||||||
// Find an item whose data matches this data, starting from the item after 'start'
|
// Find an item whose data matches this data, starting from the item after 'start'
|
||||||
// or the beginning if 'start' is -1.
|
// or the beginning if 'start' is -1.
|
||||||
@ -677,18 +678,18 @@ public:
|
|||||||
%# Some helpers...
|
%# Some helpers...
|
||||||
def Select(self, idx, on=1):
|
def Select(self, idx, on=1):
|
||||||
'''[de]select an item'''
|
'''[de]select an item'''
|
||||||
if on: state = wxLIST_STATE_SELECTED
|
if on: state = wx.LIST_STATE_SELECTED
|
||||||
else: state = 0
|
else: state = 0
|
||||||
self.SetItemState(idx, state, wxLIST_STATE_SELECTED)
|
self.SetItemState(idx, state, wx.LIST_STATE_SELECTED)
|
||||||
|
|
||||||
def Focus(self, idx):
|
def Focus(self, idx):
|
||||||
'''Focus and show the given item'''
|
'''Focus and show the given item'''
|
||||||
self.SetItemState(idx, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED)
|
self.SetItemState(idx, wx.LIST_STATE_FOCUSED, wx.LIST_STATE_FOCUSED)
|
||||||
self.EnsureVisible(idx)
|
self.EnsureVisible(idx)
|
||||||
|
|
||||||
def GetFocusedItem(self):
|
def GetFocusedItem(self):
|
||||||
'''get the currently focused item or -1 if none'''
|
'''get the currently focused item or -1 if none'''
|
||||||
return self.GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED)
|
return self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_FOCUSED)
|
||||||
|
|
||||||
def GetFirstSelected(self, *args):
|
def GetFirstSelected(self, *args):
|
||||||
'''return first selected item, or -1 when none'''
|
'''return first selected item, or -1 when none'''
|
||||||
@ -696,22 +697,22 @@ public:
|
|||||||
|
|
||||||
def GetNextSelected(self, item):
|
def GetNextSelected(self, item):
|
||||||
'''return subsequent selected items, or -1 when no more'''
|
'''return subsequent selected items, or -1 when no more'''
|
||||||
return self.GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED)
|
return self.GetNextItem(item, wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED)
|
||||||
|
|
||||||
def IsSelected(self, idx):
|
def IsSelected(self, idx):
|
||||||
'''return TRUE if the item is selected'''
|
'''return True if the item is selected'''
|
||||||
return self.GetItemState(idx, wxLIST_STATE_SELECTED) != 0
|
return self.GetItemState(idx, wx.LIST_STATE_SELECTED) != 0
|
||||||
|
|
||||||
def SetColumnImage(self, col, image):
|
def SetColumnImage(self, col, image):
|
||||||
item = self.GetColumn(col)
|
item = self.GetColumn(col)
|
||||||
# preserve all other attributes too
|
%# preserve all other attributes too
|
||||||
item.SetMask( wxLIST_MASK_STATE |
|
item.SetMask( wx.LIST_MASK_STATE |
|
||||||
wxLIST_MASK_TEXT |
|
wx.LIST_MASK_TEXT |
|
||||||
wxLIST_MASK_IMAGE |
|
wx.LIST_MASK_IMAGE |
|
||||||
wxLIST_MASK_DATA |
|
wx.LIST_MASK_DATA |
|
||||||
wxLIST_SET_ITEM |
|
wx.LIST_SET_ITEM |
|
||||||
wxLIST_MASK_WIDTH |
|
wx.LIST_MASK_WIDTH |
|
||||||
wxLIST_MASK_FORMAT )
|
wx.LIST_MASK_FORMAT )
|
||||||
item.SetImage(image)
|
item.SetImage(image)
|
||||||
self.SetColumn(col, item)
|
self.SetColumn(col, item)
|
||||||
|
|
||||||
@ -722,7 +723,7 @@ public:
|
|||||||
'''Append an item to the list control. The entry parameter should be a
|
'''Append an item to the list control. The entry parameter should be a
|
||||||
sequence with an item for each column'''
|
sequence with an item for each column'''
|
||||||
if len(entry):
|
if len(entry):
|
||||||
if wx.wxUSE_UNICODE:
|
if wx.USE_UNICODE:
|
||||||
cvtfunc = unicode
|
cvtfunc = unicode
|
||||||
else:
|
else:
|
||||||
cvtfunc = str
|
cvtfunc = str
|
||||||
@ -745,7 +746,7 @@ public:
|
|||||||
// or zero if the two items are equivalent.
|
// or zero if the two items are equivalent.
|
||||||
bool SortItems(PyObject* func) {
|
bool SortItems(PyObject* func) {
|
||||||
if (!PyCallable_Check(func))
|
if (!PyCallable_Check(func))
|
||||||
return FALSE;
|
return False;
|
||||||
return self->SortItems((wxListCtrlCompare)wxPyListCtrl_SortItems, (long)func);
|
return self->SortItems((wxListCtrlCompare)wxPyListCtrl_SortItems, (long)func);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -793,7 +794,7 @@ public:
|
|||||||
const wxString& name = wxPyListCtrlNameStr);
|
const wxString& name = wxPyListCtrlNameStr);
|
||||||
|
|
||||||
// [de]select an item
|
// [de]select an item
|
||||||
void Select(long n, bool on = TRUE);
|
void Select(long n, bool on = True);
|
||||||
|
|
||||||
// focus and show the given item
|
// focus and show the given item
|
||||||
void Focus(long index);
|
void Focus(long index);
|
||||||
@ -805,7 +806,7 @@ public:
|
|||||||
long GetNextSelected(long item) const;
|
long GetNextSelected(long item) const;
|
||||||
long GetFirstSelected() const;
|
long GetFirstSelected() const;
|
||||||
|
|
||||||
// return TRUE if the item is selected
|
// return True if the item is selected
|
||||||
bool IsSelected(long index);
|
bool IsSelected(long index);
|
||||||
|
|
||||||
void SetColumnImage(int col, int image);
|
void SetColumnImage(int col, int image);
|
||||||
|
@ -61,7 +61,7 @@ public:
|
|||||||
static bool IsEnabled();
|
static bool IsEnabled();
|
||||||
|
|
||||||
// change the flag state, return the previous one
|
// change the flag state, return the previous one
|
||||||
static bool EnableLogging(bool doIt = TRUE);
|
static bool EnableLogging(bool doIt = True);
|
||||||
|
|
||||||
// static sink function
|
// static sink function
|
||||||
static void OnLog(wxLogLevel level, const wxChar *szString, time_t t);
|
static void OnLog(wxLogLevel level, const wxChar *szString, time_t t);
|
||||||
@ -94,7 +94,7 @@ public:
|
|||||||
|
|
||||||
// verbose mode is activated by standard command-line '-verbose'
|
// verbose mode is activated by standard command-line '-verbose'
|
||||||
// option
|
// option
|
||||||
static void SetVerbose(bool bVerbose = TRUE);
|
static void SetVerbose(bool bVerbose = True);
|
||||||
|
|
||||||
// Set log level. Log messages with level > logLevel will not be logged.
|
// Set log level. Log messages with level > logLevel will not be logged.
|
||||||
static void SetLogLevel(wxLogLevel logLevel);
|
static void SetLogLevel(wxLogLevel logLevel);
|
||||||
@ -181,10 +181,10 @@ class wxLogWindow : public wxLog
|
|||||||
public:
|
public:
|
||||||
wxLogWindow(wxFrame *pParent, // the parent frame (can be NULL)
|
wxLogWindow(wxFrame *pParent, // the parent frame (can be NULL)
|
||||||
const wxString& szTitle, // the title of the frame
|
const wxString& szTitle, // the title of the frame
|
||||||
bool bShow = TRUE, // show window immediately?
|
bool bShow = True, // show window immediately?
|
||||||
bool bPassToOld = TRUE); // pass log messages to the old target?
|
bool bPassToOld = True); // pass log messages to the old target?
|
||||||
|
|
||||||
void Show(bool bShow = TRUE);
|
void Show(bool bShow = True);
|
||||||
wxFrame *GetFrame() const;
|
wxFrame *GetFrame() const;
|
||||||
wxLog *GetOldLog() const;
|
wxLog *GetOldLog() const;
|
||||||
bool IsPassingMessages() const;
|
bool IsPassingMessages() const;
|
||||||
|
@ -210,10 +210,10 @@ public:
|
|||||||
wxMenuBar(long style = 0);
|
wxMenuBar(long style = 0);
|
||||||
|
|
||||||
|
|
||||||
// append a menu to the end of menubar, return TRUE if ok
|
// append a menu to the end of menubar, return True if ok
|
||||||
virtual bool Append(wxMenu *menu, const wxString& title);
|
virtual bool Append(wxMenu *menu, const wxString& title);
|
||||||
|
|
||||||
// insert a menu before the given position into the menubar, return TRUE
|
// insert a menu before the given position into the menubar, return True
|
||||||
// if inserted ok
|
// if inserted ok
|
||||||
virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title);
|
virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title);
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ public:
|
|||||||
virtual void EnableTop(size_t pos, bool enable);
|
virtual void EnableTop(size_t pos, bool enable);
|
||||||
|
|
||||||
// is the menu enabled?
|
// is the menu enabled?
|
||||||
virtual bool IsEnabledTop(size_t WXUNUSED(pos)) const { return TRUE; }
|
virtual bool IsEnabledTop(size_t WXUNUSED(pos)) const { return True; }
|
||||||
|
|
||||||
// get or change the label of the menu at given position
|
// get or change the label of the menu at given position
|
||||||
virtual void SetLabelTop(size_t pos, const wxString& label);
|
virtual void SetLabelTop(size_t pos, const wxString& label);
|
||||||
@ -277,7 +277,7 @@ public:
|
|||||||
// get the frame we are attached to (may return NULL)
|
// get the frame we are attached to (may return NULL)
|
||||||
wxFrame *GetFrame() const;
|
wxFrame *GetFrame() const;
|
||||||
|
|
||||||
// returns TRUE if we're attached to a frame
|
// returns True if we're attached to a frame
|
||||||
bool IsAttached() const;
|
bool IsAttached() const;
|
||||||
|
|
||||||
// associate the menubar with the frame
|
// associate the menubar with the frame
|
||||||
@ -331,10 +331,10 @@ public:
|
|||||||
wxMenu *GetSubMenu() const;
|
wxMenu *GetSubMenu() const;
|
||||||
|
|
||||||
// state
|
// state
|
||||||
virtual void Enable(bool enable = TRUE);
|
virtual void Enable(bool enable = True);
|
||||||
virtual bool IsEnabled() const;
|
virtual bool IsEnabled() const;
|
||||||
|
|
||||||
virtual void Check(bool check = TRUE);
|
virtual void Check(bool check = True);
|
||||||
virtual bool IsChecked() const;
|
virtual bool IsChecked() const;
|
||||||
void Toggle();
|
void Toggle();
|
||||||
|
|
||||||
@ -370,7 +370,7 @@ public:
|
|||||||
bool IsOwnerDrawn();
|
bool IsOwnerDrawn();
|
||||||
|
|
||||||
// switch on/off owner-drawing the item
|
// switch on/off owner-drawing the item
|
||||||
void SetOwnerDrawn(bool ownerDrawn = TRUE);
|
void SetOwnerDrawn(bool ownerDrawn = True);
|
||||||
void ResetOwnerDrawn();
|
void ResetOwnerDrawn();
|
||||||
#else
|
#else
|
||||||
// just to keep the global renamers in sync
|
// just to keep the global renamers in sync
|
||||||
|
@ -193,7 +193,7 @@ public:
|
|||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyObject* tuple = PyTuple_New(3);
|
PyObject* tuple = PyTuple_New(3);
|
||||||
PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(loc),
|
PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(loc),
|
||||||
wxT("wxIcon"), TRUE));
|
wxT("wxIcon"), True));
|
||||||
PyTuple_SetItem(tuple, 1, wx2PyString(iconFile));
|
PyTuple_SetItem(tuple, 1, wx2PyString(iconFile));
|
||||||
PyTuple_SetItem(tuple, 2, PyInt_FromLong(iconIndex));
|
PyTuple_SetItem(tuple, 2, PyInt_FromLong(iconIndex));
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
@ -264,9 +264,9 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// set an arbitrary command, ask confirmation if it already exists and
|
// set an arbitrary command, ask confirmation if it already exists and
|
||||||
// overwriteprompt is TRUE
|
// overwriteprompt is True
|
||||||
bool SetCommand(const wxString& cmd, const wxString& verb,
|
bool SetCommand(const wxString& cmd, const wxString& verb,
|
||||||
bool overwriteprompt = TRUE);
|
bool overwriteprompt = True);
|
||||||
|
|
||||||
bool SetDefaultIcon(const wxString& cmd = wxPyEmptyString, int index = 0);
|
bool SetDefaultIcon(const wxString& cmd = wxPyEmptyString, int index = 0);
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ public:
|
|||||||
// check if the given MIME type is the same as the other one: the
|
// check if the given MIME type is the same as the other one: the
|
||||||
// second argument may contain wildcards ('*'), but not the first. If
|
// second argument may contain wildcards ('*'), but not the first. If
|
||||||
// the types are equal or if the mimeType matches wildcard the function
|
// the types are equal or if the mimeType matches wildcard the function
|
||||||
// returns TRUE, otherwise it returns FALSE
|
// returns True, otherwise it returns False
|
||||||
static bool IsOfType(const wxString& mimeType, const wxString& wildcard);
|
static bool IsOfType(const wxString& mimeType, const wxString& wildcard);
|
||||||
|
|
||||||
// ctor
|
// ctor
|
||||||
@ -342,18 +342,18 @@ public:
|
|||||||
%newobject GetFileTypeFromMimeType;
|
%newobject GetFileTypeFromMimeType;
|
||||||
wxFileType *GetFileTypeFromMimeType(const wxString& mimeType);
|
wxFileType *GetFileTypeFromMimeType(const wxString& mimeType);
|
||||||
|
|
||||||
// other operations: return TRUE if there were no errors or FALSE if there
|
// other operations: return True if there were no errors or False if there
|
||||||
// were some unreckognized entries (the good entries are always read anyhow)
|
// were some unreckognized entries (the good entries are always read anyhow)
|
||||||
//
|
//
|
||||||
|
|
||||||
// read in additional file (the standard ones are read automatically)
|
// read in additional file (the standard ones are read automatically)
|
||||||
// in mailcap format (see mimetype.cpp for description)
|
// in mailcap format (see mimetype.cpp for description)
|
||||||
//
|
//
|
||||||
// 'fallback' parameter may be set to TRUE to avoid overriding the
|
// 'fallback' parameter may be set to True to avoid overriding the
|
||||||
// settings from other, previously parsed, files by this one: normally,
|
// settings from other, previously parsed, files by this one: normally,
|
||||||
// the files read most recently would override the older files, but with
|
// the files read most recently would override the older files, but with
|
||||||
// fallback == TRUE this won't happen
|
// fallback == True this won't happen
|
||||||
bool ReadMailcap(const wxString& filename, bool fallback = FALSE);
|
bool ReadMailcap(const wxString& filename, bool fallback = False);
|
||||||
|
|
||||||
// read in additional file in mime.types format
|
// read in additional file in mime.types format
|
||||||
bool ReadMimeTypes(const wxString& filename);
|
bool ReadMimeTypes(const wxString& filename);
|
||||||
@ -369,7 +369,7 @@ public:
|
|||||||
|
|
||||||
// these functions can be used to provide default values for some of the
|
// these functions can be used to provide default values for some of the
|
||||||
// MIME types inside the program itself (you may also use
|
// MIME types inside the program itself (you may also use
|
||||||
// ReadMailcap(filenameWithDefaultTypes, TRUE /* use as fallback */) to
|
// ReadMailcap(filenameWithDefaultTypes, True /* use as fallback */) to
|
||||||
// achieve the same goal, but this requires having this info in a file).
|
// achieve the same goal, but this requires having this info in a file).
|
||||||
//
|
//
|
||||||
void AddFallback(const wxFileTypeInfo& ft);
|
void AddFallback(const wxFileTypeInfo& ft);
|
||||||
|
@ -49,7 +49,7 @@ public:
|
|||||||
void Move(const wxPoint& pt);
|
void Move(const wxPoint& pt);
|
||||||
%name(SetSizeWH) void SetSize(int width, int height);
|
%name(SetSizeWH) void SetSize(int width, int height);
|
||||||
void SetSize(const wxSize& size);
|
void SetSize(const wxSize& size);
|
||||||
void Show(int show = TRUE);
|
void Show(int show = True);
|
||||||
void Hide();
|
void Hide();
|
||||||
|
|
||||||
%pragma(python) addtoclass = "def __nonzero__(self): return self.IsOk()"
|
%pragma(python) addtoclass = "def __nonzero__(self): return self.IsOk()"
|
||||||
@ -173,7 +173,7 @@ public:
|
|||||||
// path is optional and is ignored under Win32 and used as the directory to
|
// path is optional and is ignored under Win32 and used as the directory to
|
||||||
// create the lock file in under Unix (default is wxGetHomeDir())
|
// create the lock file in under Unix (default is wxGetHomeDir())
|
||||||
//
|
//
|
||||||
// returns FALSE if initialization failed, it doesn't mean that another
|
// returns False if initialization failed, it doesn't mean that another
|
||||||
// instance is running - use IsAnotherRunning() to check it
|
// instance is running - use IsAnotherRunning() to check it
|
||||||
bool Create(const wxString& name, const wxString& path = wxPyEmptyString);
|
bool Create(const wxString& name, const wxString& path = wxPyEmptyString);
|
||||||
|
|
||||||
@ -241,12 +241,12 @@ void wxDrawWindowOnDC(wxWindow* window, const wxDC& dc, int method)
|
|||||||
// WM_PRINT. For most native widgets nothing is drawn to the dc
|
// WM_PRINT. For most native widgets nothing is drawn to the dc
|
||||||
// at all, with or without Themes.
|
// at all, with or without Themes.
|
||||||
typedef BOOL (WINAPI *PrintWindow_t)(HWND, HDC, UINT);
|
typedef BOOL (WINAPI *PrintWindow_t)(HWND, HDC, UINT);
|
||||||
static bool s_triedToLoad = false;
|
static bool s_triedToLoad = False;
|
||||||
static PrintWindow_t pfnPrintWindow = NULL;
|
static PrintWindow_t pfnPrintWindow = NULL;
|
||||||
if ( !s_triedToLoad )
|
if ( !s_triedToLoad )
|
||||||
{
|
{
|
||||||
|
|
||||||
s_triedToLoad = true;
|
s_triedToLoad = True;
|
||||||
wxDynamicLibrary dllUser32(_T("user32.dll"));
|
wxDynamicLibrary dllUser32(_T("user32.dll"));
|
||||||
if ( dllUser32.IsLoaded() )
|
if ( dllUser32.IsLoaded() )
|
||||||
{
|
{
|
||||||
|
@ -97,14 +97,14 @@ public:
|
|||||||
// adds a new page to the control
|
// adds a new page to the control
|
||||||
virtual bool AddPage(wxWindow *page,
|
virtual bool AddPage(wxWindow *page,
|
||||||
const wxString& text,
|
const wxString& text,
|
||||||
bool select = false,
|
bool select = False,
|
||||||
int imageId = -1);
|
int imageId = -1);
|
||||||
|
|
||||||
// the same as AddPage(), but adds the page at the specified position
|
// the same as AddPage(), but adds the page at the specified position
|
||||||
virtual bool InsertPage(size_t n,
|
virtual bool InsertPage(size_t n,
|
||||||
wxWindow *page,
|
wxWindow *page,
|
||||||
const wxString& text,
|
const wxString& text,
|
||||||
bool select = false,
|
bool select = False,
|
||||||
int imageId = -1)/* = 0*/;
|
int imageId = -1)/* = 0*/;
|
||||||
|
|
||||||
// set the currently selected page, return the index of the previously
|
// set the currently selected page, return the index of the previously
|
||||||
@ -115,7 +115,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// cycle thru the pages
|
// cycle thru the pages
|
||||||
void AdvanceSelection(bool forward = true);
|
void AdvanceSelection(bool forward = True);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -299,7 +299,7 @@ public:
|
|||||||
long style = 0,
|
long style = 0,
|
||||||
const wxString& name = wxPyEmptyString);
|
const wxString& name = wxPyEmptyString);
|
||||||
|
|
||||||
// returns true if we have wxLB_TOP or wxLB_BOTTOM style
|
// returns True if we have wxLB_TOP or wxLB_BOTTOM style
|
||||||
bool IsVertical() const;
|
bool IsVertical() const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -16,14 +16,22 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
%newgroup
|
%newgroup
|
||||||
|
|
||||||
|
DocStr(wxObject,
|
||||||
|
"The base class for most wx objects, although in wxPython not
|
||||||
|
much functionality is needed nor exposed.");
|
||||||
|
|
||||||
class wxObject {
|
class wxObject {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
%extend {
|
%extend {
|
||||||
|
DocStr(GetClassName,
|
||||||
|
"Returns the class name of the C++ object using wxRTTI.");
|
||||||
wxString GetClassName() {
|
wxString GetClassName() {
|
||||||
return self->GetClassInfo()->GetClassName();
|
return self->GetClassInfo()->GetClassName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DocStr(Destroy,
|
||||||
|
"Deletes the C++ object this Python object is a proxy for.");
|
||||||
void Destroy() {
|
void Destroy() {
|
||||||
delete self;
|
delete self;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
%{
|
%{
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
%newgroup
|
%newgroup
|
||||||
|
|
||||||
@ -30,7 +29,7 @@ public:
|
|||||||
%addtofunc wxPanel() ""
|
%addtofunc wxPanel() ""
|
||||||
|
|
||||||
wxPanel(wxWindow* parent,
|
wxPanel(wxWindow* parent,
|
||||||
const wxWindowID id,
|
const wxWindowID id=-1,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
||||||
@ -54,7 +53,7 @@ public:
|
|||||||
|
|
||||||
// TODO: Add wrappers for the wxScrollHelper class, make wxScrolledWindow
|
// TODO: Add wrappers for the wxScrollHelper class, make wxScrolledWindow
|
||||||
// derive from it and wxPanel. But what to do about wxGTK where this
|
// derive from it and wxPanel. But what to do about wxGTK where this
|
||||||
// is not true?
|
// is not True?
|
||||||
|
|
||||||
class wxScrolledWindow : public wxPanel
|
class wxScrolledWindow : public wxPanel
|
||||||
{
|
{
|
||||||
@ -82,7 +81,7 @@ public:
|
|||||||
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
|
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
|
||||||
int noUnitsX, int noUnitsY,
|
int noUnitsX, int noUnitsY,
|
||||||
int xPos = 0, int yPos = 0,
|
int xPos = 0, int yPos = 0,
|
||||||
bool noRefresh = FALSE );
|
bool noRefresh = False );
|
||||||
|
|
||||||
// scroll to the given (in logical coords) position
|
// scroll to the given (in logical coords) position
|
||||||
virtual void Scroll(int x, int y);
|
virtual void Scroll(int x, int y);
|
||||||
@ -94,13 +93,17 @@ public:
|
|||||||
// Set the x, y scrolling increments.
|
// Set the x, y scrolling increments.
|
||||||
void SetScrollRate( int xstep, int ystep );
|
void SetScrollRate( int xstep, int ystep );
|
||||||
|
|
||||||
// get the size of one logical unit in physical ones
|
%feature("autodoc") GetScrollPixelsPerUnit
|
||||||
|
"GetScrollPixelsPerUnit() -> (xUnit, yUnit)";
|
||||||
|
%feature("docstring") GetScrollPixelsPerUnit "
|
||||||
|
get the size of one logical unit in physical ones
|
||||||
|
"
|
||||||
virtual void GetScrollPixelsPerUnit(int *OUTPUT,
|
virtual void GetScrollPixelsPerUnit(int *OUTPUT,
|
||||||
int *OUTPUT) const;
|
int *OUTPUT) const;
|
||||||
|
|
||||||
// Enable/disable Windows scrolling in either direction. If TRUE, wxWindows
|
// Enable/disable Windows scrolling in either direction. If True, wxWindows
|
||||||
// scrolls the canvas and only a bit of the canvas is invalidated; no
|
// scrolls the canvas and only a bit of the canvas is invalidated; no
|
||||||
// Clear() is necessary. If FALSE, the whole canvas is invalidated and a
|
// Clear() is necessary. If False, the whole canvas is invalidated and a
|
||||||
// Clear() is necessary. Disable for when the scroll increment is used to
|
// Clear() is necessary. Disable for when the scroll increment is used to
|
||||||
// actually scroll a non-constant distance
|
// actually scroll a non-constant distance
|
||||||
virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
|
virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
|
||||||
|
@ -246,7 +246,7 @@ public:
|
|||||||
|
|
||||||
void CreateAbortWindow(wxWindow* parent, wxPyPrintout* printout);
|
void CreateAbortWindow(wxWindow* parent, wxPyPrintout* printout);
|
||||||
wxPrintDialogData& GetPrintDialogData();
|
wxPrintDialogData& GetPrintDialogData();
|
||||||
bool Print(wxWindow *parent, wxPyPrintout *printout, int prompt=TRUE);
|
bool Print(wxWindow *parent, wxPyPrintout *printout, int prompt=True);
|
||||||
wxDC* PrintDialog(wxWindow *parent);
|
wxDC* PrintDialog(wxWindow *parent);
|
||||||
void ReportError(wxWindow *parent, wxPyPrintout *printout, const wxString& message);
|
void ReportError(wxWindow *parent, wxPyPrintout *printout, const wxString& message);
|
||||||
bool Setup(wxWindow *parent);
|
bool Setup(wxWindow *parent);
|
||||||
@ -263,7 +263,7 @@ public:
|
|||||||
|
|
||||||
// Since this one would be tough and ugly to do with the Macros...
|
// Since this one would be tough and ugly to do with the Macros...
|
||||||
void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
|
void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
|
||||||
bool hadErr = FALSE;
|
bool hadErr = False;
|
||||||
bool found;
|
bool found;
|
||||||
|
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
@ -274,22 +274,22 @@ void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *p
|
|||||||
|
|
||||||
val = PyTuple_GetItem(result, 0);
|
val = PyTuple_GetItem(result, 0);
|
||||||
if (PyInt_Check(val)) *minPage = PyInt_AsLong(val);
|
if (PyInt_Check(val)) *minPage = PyInt_AsLong(val);
|
||||||
else hadErr = TRUE;
|
else hadErr = True;
|
||||||
|
|
||||||
val = PyTuple_GetItem(result, 1);
|
val = PyTuple_GetItem(result, 1);
|
||||||
if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val);
|
if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val);
|
||||||
else hadErr = TRUE;
|
else hadErr = True;
|
||||||
|
|
||||||
val = PyTuple_GetItem(result, 2);
|
val = PyTuple_GetItem(result, 2);
|
||||||
if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val);
|
if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val);
|
||||||
else hadErr = TRUE;
|
else hadErr = True;
|
||||||
|
|
||||||
val = PyTuple_GetItem(result, 3);
|
val = PyTuple_GetItem(result, 3);
|
||||||
if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val);
|
if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val);
|
||||||
else hadErr = TRUE;
|
else hadErr = True;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
hadErr = TRUE;
|
hadErr = True;
|
||||||
|
|
||||||
if (hadErr) {
|
if (hadErr) {
|
||||||
PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers.");
|
PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers.");
|
||||||
@ -507,7 +507,7 @@ public:
|
|||||||
|
|
||||||
#define IMP_PYCALLBACK_BOOL_PREWINDC(CLASS, PCLASS, CBNAME) \
|
#define IMP_PYCALLBACK_BOOL_PREWINDC(CLASS, PCLASS, CBNAME) \
|
||||||
bool CLASS::CBNAME(wxPreviewCanvas* a, wxDC& b) { \
|
bool CLASS::CBNAME(wxPreviewCanvas* a, wxDC& b) { \
|
||||||
bool rval=FALSE; \
|
bool rval=False; \
|
||||||
bool found; \
|
bool found; \
|
||||||
wxPyBeginBlockThreads(); \
|
wxPyBeginBlockThreads(); \
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
|
||||||
|
@ -113,10 +113,10 @@ public:
|
|||||||
|
|
||||||
void CloseOutput();
|
void CloseOutput();
|
||||||
|
|
||||||
// return TRUE if the child process stdout is not closed
|
// return True if the child process stdout is not closed
|
||||||
bool IsInputOpened() const;
|
bool IsInputOpened() const;
|
||||||
|
|
||||||
// return TRUE if any input is available on the child process stdout/err
|
// return True if any input is available on the child process stdout/err
|
||||||
bool IsInputAvailable() const;
|
bool IsInputAvailable() const;
|
||||||
bool IsErrorAvailable() const;
|
bool IsErrorAvailable() const;
|
||||||
};
|
};
|
||||||
|
@ -66,8 +66,8 @@ public:
|
|||||||
%pythoncode { SetItemLabel = SetString };
|
%pythoncode { SetItemLabel = SetString };
|
||||||
|
|
||||||
// change the individual radio button state
|
// change the individual radio button state
|
||||||
%name(EnableItem) virtual void Enable(int n, bool enable = TRUE);
|
%name(EnableItem) virtual void Enable(int n, bool enable = True);
|
||||||
%name(ShowItem) virtual void Show(int n, bool show = TRUE);
|
%name(ShowItem) virtual void Show(int n, bool show = True);
|
||||||
|
|
||||||
#ifndef __WXGTK__
|
#ifndef __WXGTK__
|
||||||
// layout parameters
|
// layout parameters
|
||||||
|
@ -53,7 +53,7 @@ public:
|
|||||||
virtual void SetThumbPosition(int viewStart);
|
virtual void SetThumbPosition(int viewStart);
|
||||||
virtual void SetScrollbar(int position, int thumbSize,
|
virtual void SetScrollbar(int position, int thumbSize,
|
||||||
int range, int pageSize,
|
int range, int pageSize,
|
||||||
bool refresh = TRUE);
|
bool refresh = True);
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -161,7 +161,7 @@ public:
|
|||||||
// get a system-dependent metric
|
// get a system-dependent metric
|
||||||
static int GetMetric(wxSystemMetric index);
|
static int GetMetric(wxSystemMetric index);
|
||||||
|
|
||||||
// return true if the port has certain feature
|
// return True if the port has certain feature
|
||||||
static bool HasFeature(wxSystemFeature index);
|
static bool HasFeature(wxSystemFeature index);
|
||||||
|
|
||||||
|
|
||||||
|
@ -96,8 +96,8 @@ public:
|
|||||||
|
|
||||||
struct wxPySizerItemInfo {
|
struct wxPySizerItemInfo {
|
||||||
wxPySizerItemInfo()
|
wxPySizerItemInfo()
|
||||||
: window(NULL), sizer(NULL), gotSize(false),
|
: window(NULL), sizer(NULL), gotSize(False),
|
||||||
size(wxDefaultSize), gotPos(false), pos(-1)
|
size(wxDefaultSize), gotPos(False), pos(-1)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
wxWindow* window;
|
wxWindow* window;
|
||||||
@ -128,13 +128,13 @@ static wxPySizerItemInfo wxPySizerItemTypeHelper(PyObject* item, bool checkSize,
|
|||||||
// try wxSize or (w,h)
|
// try wxSize or (w,h)
|
||||||
if ( checkSize && wxSize_helper(item, &sizePtr)) {
|
if ( checkSize && wxSize_helper(item, &sizePtr)) {
|
||||||
info.size = *sizePtr;
|
info.size = *sizePtr;
|
||||||
info.gotSize = true;
|
info.gotSize = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
// or a single int
|
// or a single int
|
||||||
if (checkIdx && PyInt_Check(item)) {
|
if (checkIdx && PyInt_Check(item)) {
|
||||||
info.pos = PyInt_AsLong(item);
|
info.pos = PyInt_AsLong(item);
|
||||||
info.gotPos = true;
|
info.gotPos = True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -175,7 +175,7 @@ public:
|
|||||||
|
|
||||||
wxPyUserData* data = NULL;
|
wxPyUserData* data = NULL;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
|
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, True, False);
|
||||||
if ( userData && (info.window || info.sizer || info.gotSize) )
|
if ( userData && (info.window || info.sizer || info.gotSize) )
|
||||||
data = new wxPyUserData(userData);
|
data = new wxPyUserData(userData);
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
@ -196,7 +196,7 @@ public:
|
|||||||
|
|
||||||
wxPyUserData* data = NULL;
|
wxPyUserData* data = NULL;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
|
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, True, False);
|
||||||
if ( userData && (info.window || info.sizer || info.gotSize) )
|
if ( userData && (info.window || info.sizer || info.gotSize) )
|
||||||
data = new wxPyUserData(userData);
|
data = new wxPyUserData(userData);
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
@ -218,7 +218,7 @@ public:
|
|||||||
|
|
||||||
wxPyUserData* data = NULL;
|
wxPyUserData* data = NULL;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
|
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, True, False);
|
||||||
if ( userData && (info.window || info.sizer || info.gotSize) )
|
if ( userData && (info.window || info.sizer || info.gotSize) )
|
||||||
data = new wxPyUserData(userData);
|
data = new wxPyUserData(userData);
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
@ -236,7 +236,7 @@ public:
|
|||||||
|
|
||||||
bool Remove(PyObject* item) {
|
bool Remove(PyObject* item) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true);
|
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True);
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
if ( info.window )
|
if ( info.window )
|
||||||
return self->Remove(info.window);
|
return self->Remove(info.window);
|
||||||
@ -245,13 +245,13 @@ public:
|
|||||||
else if ( info.gotPos )
|
else if ( info.gotPos )
|
||||||
return self->Remove(info.pos);
|
return self->Remove(info.pos);
|
||||||
else
|
else
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void _SetItemMinSize(PyObject* item, wxSize size) {
|
void _SetItemMinSize(PyObject* item, const wxSize& size) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true);
|
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True);
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
if ( info.window )
|
if ( info.window )
|
||||||
self->SetItemMinSize(info.window, size);
|
self->SetItemMinSize(info.window, size);
|
||||||
@ -270,7 +270,7 @@ public:
|
|||||||
%pythoncode {
|
%pythoncode {
|
||||||
def AddMany(self, widgets):
|
def AddMany(self, widgets):
|
||||||
for childinfo in widgets:
|
for childinfo in widgets:
|
||||||
if type(childinfo) != type(()):
|
if type(childinfo) != type(()) or (len(childinfo) == 2 and type(childinfo[0]) == type(1)):
|
||||||
childinfo = (childinfo, )
|
childinfo = (childinfo, )
|
||||||
self.Add(*childinfo)
|
self.Add(*childinfo)
|
||||||
|
|
||||||
@ -316,7 +316,7 @@ public:
|
|||||||
void SetSizeHints( wxWindow *window );
|
void SetSizeHints( wxWindow *window );
|
||||||
void SetVirtualSizeHints( wxWindow *window );
|
void SetVirtualSizeHints( wxWindow *window );
|
||||||
|
|
||||||
void Clear( bool delete_windows=FALSE );
|
void Clear( bool delete_windows=False );
|
||||||
void DeleteWindows();
|
void DeleteWindows();
|
||||||
|
|
||||||
|
|
||||||
@ -333,8 +333,8 @@ public:
|
|||||||
// in the layout calculations or not.
|
// in the layout calculations or not.
|
||||||
|
|
||||||
%extend {
|
%extend {
|
||||||
void Show(PyObject* item, bool show = TRUE) {
|
void Show(PyObject* item, bool show = True) {
|
||||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, false);
|
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False);
|
||||||
if ( info.window )
|
if ( info.window )
|
||||||
self->Show(info.window, show);
|
self->Show(info.window, show);
|
||||||
else if ( info.sizer )
|
else if ( info.sizer )
|
||||||
@ -343,7 +343,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
void Hide(PyObject* item) {
|
void Hide(PyObject* item) {
|
||||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, false);
|
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False);
|
||||||
if ( info.window )
|
if ( info.window )
|
||||||
self->Hide(info.window);
|
self->Hide(info.window);
|
||||||
else if ( info.sizer )
|
else if ( info.sizer )
|
||||||
@ -352,13 +352,13 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
bool IsShown(PyObject* item) {
|
bool IsShown(PyObject* item) {
|
||||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, false);
|
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False);
|
||||||
if ( info.window )
|
if ( info.window )
|
||||||
return self->IsShown(info.window);
|
return self->IsShown(info.window);
|
||||||
else if ( info.sizer )
|
else if ( info.sizer )
|
||||||
return self->IsShown(info.sizer);
|
return self->IsShown(info.sizer);
|
||||||
else
|
else
|
||||||
return false;
|
return False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -483,6 +483,10 @@ public:
|
|||||||
// flexible
|
// flexible
|
||||||
void SetNonFlexibleGrowMode(wxFlexSizerGrowMode mode);
|
void SetNonFlexibleGrowMode(wxFlexSizerGrowMode mode);
|
||||||
wxFlexSizerGrowMode GetNonFlexibleGrowMode();
|
wxFlexSizerGrowMode GetNonFlexibleGrowMode();
|
||||||
|
|
||||||
|
// Read-only access to the row heights and col widths arrays
|
||||||
|
const wxArrayInt& GetRowHeights() const;
|
||||||
|
const wxArrayInt& GetColWidths() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -90,7 +90,7 @@ public:
|
|||||||
|
|
||||||
// Associates the given window with window 2, drawing the appropriate sash
|
// Associates the given window with window 2, drawing the appropriate sash
|
||||||
// and changing the split mode.
|
// and changing the split mode.
|
||||||
// Does nothing and returns FALSE if the window is already split.
|
// Does nothing and returns False if the window is already split.
|
||||||
// A sashPosition of 0 means choose a default sash position,
|
// A sashPosition of 0 means choose a default sash position,
|
||||||
// negative sashPosition specifies the size of right/lower pane as it's
|
// negative sashPosition specifies the size of right/lower pane as it's
|
||||||
// absolute value rather than the size of left/upper pane.
|
// absolute value rather than the size of left/upper pane.
|
||||||
@ -126,7 +126,7 @@ public:
|
|||||||
int GetBorderSize() const;
|
int GetBorderSize() const;
|
||||||
|
|
||||||
// Set the sash position
|
// Set the sash position
|
||||||
void SetSashPosition(int position, bool redraw = TRUE);
|
void SetSashPosition(int position, bool redraw = True);
|
||||||
|
|
||||||
// Gets the sash position
|
// Gets the sash position
|
||||||
int GetSashPosition() const;
|
int GetSashPosition() const;
|
||||||
|
@ -69,7 +69,7 @@ public:
|
|||||||
|
|
||||||
void AddFont(wxFont* font);
|
void AddFont(wxFont* font);
|
||||||
wxFont * FindOrCreateFont(int point_size, int family, int style, int weight,
|
wxFont * FindOrCreateFont(int point_size, int family, int style, int weight,
|
||||||
bool underline = FALSE, const wxString& facename = wxPyEmptyString,
|
bool underline = False, const wxString& facename = wxPyEmptyString,
|
||||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
||||||
void RemoveFont(wxFont *font);
|
void RemoveFont(wxFont *font);
|
||||||
|
|
||||||
|
@ -27,15 +27,15 @@
|
|||||||
%typemap(in) wxInputStream* (wxPyInputStream* temp, bool created) {
|
%typemap(in) wxInputStream* (wxPyInputStream* temp, bool created) {
|
||||||
if (wxPyConvertSwigPtr($input, (void **)&temp, wxT("wxPyInputStream"))) {
|
if (wxPyConvertSwigPtr($input, (void **)&temp, wxT("wxPyInputStream"))) {
|
||||||
$1 = temp->m_wxis;
|
$1 = temp->m_wxis;
|
||||||
created = false;
|
created = False;
|
||||||
} else {
|
} else {
|
||||||
PyErr_Clear(); // clear the failure of the wxPyConvert above
|
PyErr_Clear(); // clear the failure of the wxPyConvert above
|
||||||
$1 = wxPyCBInputStream_create($input, false);
|
$1 = wxPyCBInputStream_create($input, False);
|
||||||
if ($1 == NULL) {
|
if ($1 == NULL) {
|
||||||
PyErr_SetString(PyExc_TypeError, "Expected wxInputStream or Python file-like object.");
|
PyErr_SetString(PyExc_TypeError, "Expected wxInputStream or Python file-like object.");
|
||||||
SWIG_fail;
|
SWIG_fail;
|
||||||
}
|
}
|
||||||
created = true;
|
created = True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
%typemap(freearg) wxInputStream* {
|
%typemap(freearg) wxInputStream* {
|
||||||
@ -54,7 +54,7 @@
|
|||||||
if ($1) {
|
if ($1) {
|
||||||
_ptr = new wxPyInputStream($1);
|
_ptr = new wxPyInputStream($1);
|
||||||
}
|
}
|
||||||
$result = wxPyConstructObject(_ptr, wxT("wxPyInputStream"), true);
|
$result = wxPyConstructObject(_ptr, wxT("wxPyInputStream"), True);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ public:
|
|||||||
long GetRightIndent() const;
|
long GetRightIndent() const;
|
||||||
long GetFlags() const;
|
long GetFlags() const;
|
||||||
|
|
||||||
// returns false if we have any attributes set, true otherwise
|
// returns False if we have any attributes set, True otherwise
|
||||||
bool IsDefault() const;
|
bool IsDefault() const;
|
||||||
|
|
||||||
// return the attribute having the valid font and colours: it uses the
|
// return the attribute having the valid font and colours: it uses the
|
||||||
@ -221,7 +221,7 @@ public:
|
|||||||
virtual void AppendText(const wxString& text);
|
virtual void AppendText(const wxString& text);
|
||||||
|
|
||||||
// insert the character which would have resulted from this key event,
|
// insert the character which would have resulted from this key event,
|
||||||
// return TRUE if anything has been inserted
|
// return True if anything has been inserted
|
||||||
virtual bool EmulateKeyPress(const wxKeyEvent& event);
|
virtual bool EmulateKeyPress(const wxKeyEvent& event);
|
||||||
|
|
||||||
// text control under some platforms supports the text styles: these
|
// text control under some platforms supports the text styles: these
|
||||||
@ -268,7 +268,7 @@ public:
|
|||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
// Caret handling (Windows only)
|
// Caret handling (Windows only)
|
||||||
bool ShowNativeCaret(bool show = true);
|
bool ShowNativeCaret(bool show = True);
|
||||||
bool HideNativeCaret();
|
bool HideNativeCaret();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
//
|
//
|
||||||
// it is now valid to call Start() multiple times: this just restarts the
|
// it is now valid to call Start() multiple times: this just restarts the
|
||||||
// timer if it is already running
|
// timer if it is already running
|
||||||
virtual bool Start(int milliseconds = -1, bool oneShot = FALSE);
|
virtual bool Start(int milliseconds = -1, bool oneShot = False);
|
||||||
|
|
||||||
// stop the timer
|
// stop the timer
|
||||||
virtual void Stop();
|
virtual void Stop();
|
||||||
@ -67,13 +67,13 @@ public:
|
|||||||
// messages in it, use non default ctor or SetOwner() otherwise
|
// messages in it, use non default ctor or SetOwner() otherwise
|
||||||
virtual void Notify();
|
virtual void Notify();
|
||||||
|
|
||||||
// return TRUE if the timer is running
|
// return True if the timer is running
|
||||||
virtual bool IsRunning() const;
|
virtual bool IsRunning() const;
|
||||||
|
|
||||||
// get the (last) timer interval in the milliseconds
|
// get the (last) timer interval in the milliseconds
|
||||||
int GetInterval() const;
|
int GetInterval() const;
|
||||||
|
|
||||||
// return TRUE if the timer is one shot
|
// return True if the timer is one shot
|
||||||
bool IsOneShot() const;
|
bool IsOneShot() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -111,10 +111,10 @@ class wxTimerRunner
|
|||||||
public:
|
public:
|
||||||
%nokwargs wxTimerRunner;
|
%nokwargs wxTimerRunner;
|
||||||
wxTimerRunner(wxTimer& timer);
|
wxTimerRunner(wxTimer& timer);
|
||||||
wxTimerRunner(wxTimer& timer, int milli, bool oneShot = FALSE);
|
wxTimerRunner(wxTimer& timer, int milli, bool oneShot = False);
|
||||||
~wxTimerRunner();
|
~wxTimerRunner();
|
||||||
|
|
||||||
void Start(int milli, bool oneShot = FALSE);
|
void Start(int milli, bool oneShot = False);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,8 +80,8 @@ public:
|
|||||||
// the user to disable this (however, it's the program which should show, or
|
// the user to disable this (however, it's the program which should show, or
|
||||||
// not, the dialog on startup depending on its value, not this class).
|
// not, the dialog on startup depending on its value, not this class).
|
||||||
//
|
//
|
||||||
// The function returns TRUE if this checkbox is checked, FALSE otherwise.
|
// The function returns True if this checkbox is checked, False otherwise.
|
||||||
bool wxShowTip(wxWindow *parent, wxTipProvider *tipProvider, bool showAtStartup = TRUE);
|
bool wxShowTip(wxWindow *parent, wxTipProvider *tipProvider, bool showAtStartup = True);
|
||||||
|
|
||||||
// a function which returns an implementation of wxTipProvider using the
|
// a function which returns an implementation of wxTipProvider using the
|
||||||
// specified text file as the source of tips (each line is a tip).
|
// specified text file as the source of tips (each line is a tip).
|
||||||
|
@ -376,7 +376,7 @@ public:
|
|||||||
// there is no tool at this point (corrdinates are client)
|
// there is no tool at this point (corrdinates are client)
|
||||||
wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y);
|
wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y);
|
||||||
|
|
||||||
// return TRUE if this is a vertical toolbar, otherwise FALSE
|
// return True if this is a vertical toolbar, otherwise False
|
||||||
bool IsVertical();
|
bool IsVertical();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -59,19 +59,19 @@ public:
|
|||||||
|
|
||||||
// No constructor as it can not be used directly from Python
|
// No constructor as it can not be used directly from Python
|
||||||
|
|
||||||
// maximize = TRUE => maximize, otherwise - restore
|
// maximize = True => maximize, otherwise - restore
|
||||||
virtual void Maximize(bool maximize = TRUE);
|
virtual void Maximize(bool maximize = True);
|
||||||
|
|
||||||
// undo Maximize() or Iconize()
|
// undo Maximize() or Iconize()
|
||||||
virtual void Restore();
|
virtual void Restore();
|
||||||
|
|
||||||
// iconize = TRUE => iconize, otherwise - restore
|
// iconize = True => iconize, otherwise - restore
|
||||||
virtual void Iconize(bool iconize = TRUE);
|
virtual void Iconize(bool iconize = True);
|
||||||
|
|
||||||
// return TRUE if the frame is maximized
|
// return True if the frame is maximized
|
||||||
virtual bool IsMaximized() const;
|
virtual bool IsMaximized() const;
|
||||||
|
|
||||||
// return TRUE if the frame is iconized
|
// return True if the frame is iconized
|
||||||
virtual bool IsIconized() const;
|
virtual bool IsIconized() const;
|
||||||
|
|
||||||
// get the frame icon
|
// get the frame icon
|
||||||
@ -86,14 +86,14 @@ public:
|
|||||||
// maximize the window to cover entire screen
|
// maximize the window to cover entire screen
|
||||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||||
|
|
||||||
// return TRUE if the frame is in fullscreen mode
|
// return True if the frame is in fullscreen mode
|
||||||
virtual bool IsFullScreen() const;
|
virtual bool IsFullScreen() const;
|
||||||
|
|
||||||
virtual void SetTitle(const wxString& title);
|
virtual void SetTitle(const wxString& title);
|
||||||
virtual wxString GetTitle() const;
|
virtual wxString GetTitle() const;
|
||||||
|
|
||||||
// Set the shape of the window to the given region.
|
// Set the shape of the window to the given region.
|
||||||
// Returns TRUE if the platform supports this feature (and the operation
|
// Returns True if the platform supports this feature (and the operation
|
||||||
// is successful.)
|
// is successful.)
|
||||||
virtual bool SetShape(const wxRegion& region);
|
virtual bool SetShape(const wxRegion& region);
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ public:
|
|||||||
virtual wxMenuBar *GetMenuBar() const;
|
virtual wxMenuBar *GetMenuBar() const;
|
||||||
|
|
||||||
|
|
||||||
// process menu command: returns TRUE if processed
|
// process menu command: returns True if processed
|
||||||
bool ProcessCommand(int winid);
|
bool ProcessCommand(int winid);
|
||||||
%pythoncode { Command = ProcessCommand }
|
%pythoncode { Command = ProcessCommand }
|
||||||
|
|
||||||
@ -204,8 +204,8 @@ public:
|
|||||||
virtual void SetToolBar(wxToolBar *toolbar);
|
virtual void SetToolBar(wxToolBar *toolbar);
|
||||||
|
|
||||||
|
|
||||||
// show help text (typically in the statusbar); show is FALSE
|
// show help text (typically in the statusbar); show is False
|
||||||
// if you are hiding the help, TRUE otherwise
|
// if you are hiding the help, True otherwise
|
||||||
virtual void DoGiveHelp(const wxString& text, bool show);
|
virtual void DoGiveHelp(const wxString& text, bool show);
|
||||||
|
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ public:
|
|||||||
// may be called to terminate the dialog with the given return code
|
// may be called to terminate the dialog with the given return code
|
||||||
virtual void EndModal(int retCode);
|
virtual void EndModal(int retCode);
|
||||||
|
|
||||||
// returns TRUE if we're in a modal loop
|
// returns True if we're in a modal loop
|
||||||
%extend {
|
%extend {
|
||||||
bool IsModalShowing() {
|
bool IsModalShowing() {
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
|
@ -99,12 +99,12 @@ public:
|
|||||||
|
|
||||||
%extend {
|
%extend {
|
||||||
bool operator==(const wxTreeItemId* other) {
|
bool operator==(const wxTreeItemId* other) {
|
||||||
if (!other) return false;
|
if (!other) return False;
|
||||||
return *self == *other;
|
return *self == *other;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator!=(const wxTreeItemId* other) {
|
bool operator!=(const wxTreeItemId* other) {
|
||||||
if (!other) return true;
|
if (!other) return True;
|
||||||
return *self != *other;
|
return *self != *other;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -295,8 +295,8 @@ public:
|
|||||||
bool found;
|
bool found;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, "OnCompareItems"))) {
|
if ((found = wxPyCBH_findCallback(m_myInst, "OnCompareItems"))) {
|
||||||
PyObject *o1 = wxPyConstructObject((void*)&item1, wxT("wxTreeItemId"), false);
|
PyObject *o1 = wxPyConstructObject((void*)&item1, wxT("wxTreeItemId"), False);
|
||||||
PyObject *o2 = wxPyConstructObject((void*)&item2, wxT("wxTreeItemId"), false);
|
PyObject *o2 = wxPyConstructObject((void*)&item2, wxT("wxTreeItemId"), False);
|
||||||
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)",o1,o2));
|
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)",o1,o2));
|
||||||
Py_DECREF(o1);
|
Py_DECREF(o1);
|
||||||
Py_DECREF(o2);
|
Py_DECREF(o2);
|
||||||
@ -451,14 +451,14 @@ public:
|
|||||||
// allow the user to expand the items which don't have any children now
|
// allow the user to expand the items which don't have any children now
|
||||||
// - but instead add them only when needed, thus minimizing memory
|
// - but instead add them only when needed, thus minimizing memory
|
||||||
// usage and loading time.
|
// usage and loading time.
|
||||||
void SetItemHasChildren(const wxTreeItemId& item, bool has = TRUE);
|
void SetItemHasChildren(const wxTreeItemId& item, bool has = True);
|
||||||
|
|
||||||
// the item will be shown in bold
|
// the item will be shown in bold
|
||||||
void SetItemBold(const wxTreeItemId& item, bool bold = TRUE);
|
void SetItemBold(const wxTreeItemId& item, bool bold = True);
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
// the item will be shown with a drop highlight
|
// the item will be shown with a drop highlight
|
||||||
void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = TRUE);
|
void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = True);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// set the items text colour
|
// set the items text colour
|
||||||
@ -487,19 +487,19 @@ public:
|
|||||||
bool IsBold(const wxTreeItemId& item) const;
|
bool IsBold(const wxTreeItemId& item) const;
|
||||||
|
|
||||||
|
|
||||||
// if 'recursively' is FALSE, only immediate children count, otherwise
|
// if 'recursively' is False, only immediate children count, otherwise
|
||||||
// the returned number is the number of all items in this branch
|
// the returned number is the number of all items in this branch
|
||||||
size_t GetChildrenCount(const wxTreeItemId& item,
|
size_t GetChildrenCount(const wxTreeItemId& item,
|
||||||
bool recursively = TRUE) /*const*/;
|
bool recursively = True) /*const*/;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// get the root tree item
|
// get the root tree item
|
||||||
// wxTreeItemId.IsOk() will return FALSE if there is no such item
|
// wxTreeItemId.IsOk() will return False if there is no such item
|
||||||
wxTreeItemId GetRootItem() const;
|
wxTreeItemId GetRootItem() const;
|
||||||
|
|
||||||
// get the item currently selected
|
// get the item currently selected
|
||||||
// wxTreeItemId.IsOk() will return FALSE if there is no such item
|
// wxTreeItemId.IsOk() will return False if there is no such item
|
||||||
wxTreeItemId GetSelection() const;
|
wxTreeItemId GetSelection() const;
|
||||||
|
|
||||||
%extend {
|
%extend {
|
||||||
@ -515,7 +515,7 @@ public:
|
|||||||
num = self->GetSelections(array);
|
num = self->GetSelections(array);
|
||||||
for (x=0; x < num; x++) {
|
for (x=0; x < num; x++) {
|
||||||
wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
|
wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
|
||||||
PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), true);
|
PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), True);
|
||||||
PyList_Append(rval, item);
|
PyList_Append(rval, item);
|
||||||
}
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
@ -524,7 +524,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get the parent of this item
|
// get the parent of this item
|
||||||
// wxTreeItemId.IsOk() will return FALSE if there is no such item
|
// wxTreeItemId.IsOk() will return False if there is no such item
|
||||||
wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
|
wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
|
||||||
|
|
||||||
|
|
||||||
@ -537,8 +537,8 @@ public:
|
|||||||
wxTreeItemId ritem = self->GetFirstChild(item, cookie);
|
wxTreeItemId ritem = self->GetFirstChild(item, cookie);
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyObject* tup = PyTuple_New(2);
|
PyObject* tup = PyTuple_New(2);
|
||||||
PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(&ritem, wxT("wxTreeItemId"), true));
|
PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(&ritem, wxT("wxTreeItemId"), True));
|
||||||
PyTuple_SET_ITEM(tup, 1, wxPyConstructObject(cookie, wxT("wxTreeItemIdValue"), true));
|
PyTuple_SET_ITEM(tup, 1, wxPyConstructObject(cookie, wxT("wxTreeItemIdValue"), True));
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
return tup;
|
return tup;
|
||||||
}
|
}
|
||||||
@ -552,8 +552,8 @@ public:
|
|||||||
wxTreeItemId ritem = self->GetNextChild(item, cookie);
|
wxTreeItemId ritem = self->GetNextChild(item, cookie);
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyObject* tup = PyTuple_New(2);
|
PyObject* tup = PyTuple_New(2);
|
||||||
PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(&ritem, wxT("wxTreeItemId"), true));
|
PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(&ritem, wxT("wxTreeItemId"), True));
|
||||||
PyTuple_SET_ITEM(tup, 1, wxPyConstructObject(cookie, wxT("wxTreeItemIdValue"), true));
|
PyTuple_SET_ITEM(tup, 1, wxPyConstructObject(cookie, wxT("wxTreeItemIdValue"), True));
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
return tup;
|
return tup;
|
||||||
}
|
}
|
||||||
@ -669,7 +669,7 @@ public:
|
|||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
// end editing and accept or discard the changes to item label
|
// end editing and accept or discard the changes to item label
|
||||||
void EndEditLabel(const wxTreeItemId& item, bool discardChanges = FALSE);
|
void EndEditLabel(const wxTreeItemId& item, bool discardChanges = False);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -692,12 +692,12 @@ public:
|
|||||||
|
|
||||||
%extend {
|
%extend {
|
||||||
// get the bounding rectangle of the item (or of its label only)
|
// get the bounding rectangle of the item (or of its label only)
|
||||||
PyObject* GetBoundingRect(const wxTreeItemId& item, bool textOnly = FALSE) {
|
PyObject* GetBoundingRect(const wxTreeItemId& item, bool textOnly = False) {
|
||||||
wxRect rect;
|
wxRect rect;
|
||||||
if (self->GetBoundingRect(item, rect, textOnly)) {
|
if (self->GetBoundingRect(item, rect, textOnly)) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
wxRect* r = new wxRect(rect);
|
wxRect* r = new wxRect(rect);
|
||||||
PyObject* val = wxPyConstructObject((void*)r, wxT("wxRect"), true);
|
PyObject* val = wxPyConstructObject((void*)r, wxT("wxRect"), True);
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public:
|
|||||||
// validators beep by default if invalid key is pressed, these functions
|
// validators beep by default if invalid key is pressed, these functions
|
||||||
// allow to change it
|
// allow to change it
|
||||||
static bool IsSilent();
|
static bool IsSilent();
|
||||||
static void SetBellOnError(int doIt = TRUE);
|
static void SetBellOnError(int doIt = True);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ public:
|
|||||||
self._setOORInfo(self)"
|
self._setOORInfo(self)"
|
||||||
wxPyValidator();
|
wxPyValidator();
|
||||||
|
|
||||||
void _setCallbackInfo(PyObject* self, PyObject* _class, int incref=TRUE);
|
void _setCallbackInfo(PyObject* self, PyObject* _class, int incref=True);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ public:
|
|||||||
|
|
||||||
// find the index of the line we need to show at the top of the window such
|
// find the index of the line we need to show at the top of the window such
|
||||||
// that the last (fully or partially) visible line is the given one
|
// that the last (fully or partially) visible line is the given one
|
||||||
size_t FindFirstFromBottom(size_t lineLast, bool fullyVisible = false)
|
size_t FindFirstFromBottom(size_t lineLast, bool fullyVisible = False)
|
||||||
{ return wxVScrolledWindow::FindFirstFromBottom(lineLast, fullyVisible); }
|
{ return wxVScrolledWindow::FindFirstFromBottom(lineLast, fullyVisible); }
|
||||||
|
|
||||||
// get the total height of the lines between lineMin (inclusive) and
|
// get the total height of the lines between lineMin (inclusive) and
|
||||||
@ -159,7 +159,7 @@ public:
|
|||||||
// scroll to the specified line: it will become the first visible line in
|
// scroll to the specified line: it will become the first visible line in
|
||||||
// the window
|
// the window
|
||||||
//
|
//
|
||||||
// return true if we scrolled the window, false if nothing was done
|
// return True if we scrolled the window, False if nothing was done
|
||||||
bool ScrollToLine(size_t line);
|
bool ScrollToLine(size_t line);
|
||||||
|
|
||||||
// scroll by the specified number of lines/pages
|
// scroll by the specified number of lines/pages
|
||||||
@ -368,16 +368,16 @@ public:
|
|||||||
// selects or deselects the specified item which must be valid (i.e. not
|
// selects or deselects the specified item which must be valid (i.e. not
|
||||||
// equal to wxNOT_FOUND)
|
// equal to wxNOT_FOUND)
|
||||||
//
|
//
|
||||||
// return true if the items selection status has changed or false
|
// return True if the items selection status has changed or False
|
||||||
// otherwise
|
// otherwise
|
||||||
//
|
//
|
||||||
// this function is only valid for the multiple selection listboxes
|
// this function is only valid for the multiple selection listboxes
|
||||||
bool Select(size_t item, bool select = true);
|
bool Select(size_t item, bool select = True);
|
||||||
|
|
||||||
// selects the items in the specified range whose end points may be given
|
// selects the items in the specified range whose end points may be given
|
||||||
// in any order
|
// in any order
|
||||||
//
|
//
|
||||||
// return true if any items selection status has changed, false otherwise
|
// return True if any items selection status has changed, False otherwise
|
||||||
//
|
//
|
||||||
// this function is only valid for the single selection listboxes
|
// this function is only valid for the single selection listboxes
|
||||||
bool SelectRange(size_t from, size_t to);
|
bool SelectRange(size_t from, size_t to);
|
||||||
@ -390,7 +390,7 @@ public:
|
|||||||
// select all items in the listbox
|
// select all items in the listbox
|
||||||
//
|
//
|
||||||
// the return code indicates if any items were affected by this operation
|
// the return code indicates if any items were affected by this operation
|
||||||
// (true) or if nothing has changed (false)
|
// (True) or if nothing has changed (False)
|
||||||
bool SelectAll();
|
bool SelectAll();
|
||||||
|
|
||||||
// unselect all items in the listbox
|
// unselect all items in the listbox
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
class wxWave : public wxObject
|
class wxWave : public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxWave(const wxString& fileName, bool isResource = FALSE) {
|
wxWave(const wxString& fileName, bool isResource = False) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
|
PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
@ -41,8 +41,8 @@ public:
|
|||||||
|
|
||||||
~wxWave() {}
|
~wxWave() {}
|
||||||
|
|
||||||
bool IsOk() const { return FALSE; }
|
bool IsOk() const { return False; }
|
||||||
bool Play(bool async = TRUE, bool looped = FALSE) const { return FALSE; }
|
bool Play(bool async = True, bool looped = False) const { return False; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -53,7 +53,7 @@ public:
|
|||||||
class wxWave /*: public wxObject*/
|
class wxWave /*: public wxObject*/
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxWave(const wxString& fileName, bool isResource = FALSE);
|
wxWave(const wxString& fileName, bool isResource = False);
|
||||||
%extend {
|
%extend {
|
||||||
%name(WaveData) wxWave(const wxString& data) {
|
%name(WaveData) wxWave(const wxString& data) {
|
||||||
return new wxWave(data.Len(), (wxByte*)data.c_str());
|
return new wxWave(data.Len(), (wxByte*)data.c_str());
|
||||||
@ -63,7 +63,7 @@ public:
|
|||||||
~wxWave();
|
~wxWave();
|
||||||
|
|
||||||
bool IsOk() const;
|
bool IsOk() const;
|
||||||
bool Play(bool async = TRUE, bool looped = FALSE) const;
|
bool Play(bool async = True, bool looped = False) const;
|
||||||
|
|
||||||
%pythoncode { def __nonzero__(self): return self.IsOk() }
|
%pythoncode { def __nonzero__(self): return self.IsOk() }
|
||||||
};
|
};
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
%{
|
%{
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
MAKE_CONST_WXSTRING(PanelNameStr);
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
%newgroup
|
%newgroup
|
||||||
|
|
||||||
@ -45,14 +47,14 @@ public:
|
|||||||
// deleting the window
|
// deleting the window
|
||||||
// -------------------
|
// -------------------
|
||||||
|
|
||||||
// ask the window to close itself, return TRUE if the event handler
|
// ask the window to close itself, return True if the event handler
|
||||||
// honoured our request
|
// honoured our request
|
||||||
bool Close( bool force = FALSE );
|
bool Close( bool force = False );
|
||||||
|
|
||||||
// delete window unconditionally (dangerous!), returns TRUE if ok
|
// delete window unconditionally (dangerous!), returns True if ok
|
||||||
virtual bool Destroy();
|
virtual bool Destroy();
|
||||||
|
|
||||||
// delete all children of this window, returns TRUE if ok
|
// delete all children of this window, returns True if ok
|
||||||
bool DestroyChildren();
|
bool DestroyChildren();
|
||||||
|
|
||||||
// is the window being deleted?
|
// is the window being deleted?
|
||||||
@ -127,21 +129,34 @@ public:
|
|||||||
%name(SetClientRect) void SetClientSize(const wxRect& rect);
|
%name(SetClientRect) void SetClientSize(const wxRect& rect);
|
||||||
|
|
||||||
|
|
||||||
// get the window position
|
DocStr(GetPosition, // sets the docstring for both
|
||||||
wxPoint GetPosition() const;
|
"Get the window's position.");
|
||||||
%name(GetPositionTuple) void GetPosition( int *OUTPUT, int *OUTPUT ) const;
|
wxPoint GetPosition();
|
||||||
|
|
||||||
|
DocDeclAName(
|
||||||
|
void, GetPosition(int *OUTPUT, int *OUTPUT),
|
||||||
|
"GetPositionTuple() -> (x,y)",
|
||||||
|
GetPositionTuple);
|
||||||
|
|
||||||
|
|
||||||
// get the window size
|
|
||||||
|
DocStr(GetSize, "Get the window size.");
|
||||||
wxSize GetSize() const;
|
wxSize GetSize() const;
|
||||||
%name(GetSizeTuple) void GetSize( int *OUTPUT, int *OUTPUT ) const;
|
DocDeclAName(
|
||||||
|
void, GetSize( int *OUTPUT, int *OUTPUT ) const,
|
||||||
|
"GetSizeTuple() -> (width, height)",
|
||||||
|
GetSizeTuple);
|
||||||
|
|
||||||
|
|
||||||
// get the window position and size
|
// get the window position and size
|
||||||
wxRect GetRect() const;
|
wxRect GetRect() const;
|
||||||
|
|
||||||
// get the window's client size
|
DocStr(GetClientSize, "Get the window's client size.");
|
||||||
wxSize GetClientSize() const;
|
wxSize GetClientSize() const;
|
||||||
%name(GetClientSizeTuple) void GetClientSize( int *OUTPUT, int *OUTPUT ) const;
|
DocDeclAName(
|
||||||
|
void, GetClientSize( int *OUTPUT, int *OUTPUT ) const,
|
||||||
|
"GetClientSizeTuple() -> (width, height)",
|
||||||
|
GetClientSizeTuple);
|
||||||
|
|
||||||
|
|
||||||
// get the origin of the client area of the window relative to the
|
// get the origin of the client area of the window relative to the
|
||||||
@ -152,10 +167,15 @@ public:
|
|||||||
// get the client rectangle in window (i.e. client) coordinates
|
// get the client rectangle in window (i.e. client) coordinates
|
||||||
wxRect GetClientRect() const;
|
wxRect GetClientRect() const;
|
||||||
|
|
||||||
// get the size best suited for the window (in fact, minimal
|
DocStr(GetBestSize,
|
||||||
// acceptable size using which it will still look "nice")
|
"Get the size best suited for the window (in fact, minimal acceptable size\n"
|
||||||
|
"using which it will still look \"nice\")");
|
||||||
wxSize GetBestSize() const;
|
wxSize GetBestSize() const;
|
||||||
%name(GetBestSizeTuple) void GetBestSize(int *OUTPUT, int *OUTPUT) const;
|
DocDeclAName(
|
||||||
|
void, GetBestSize(int *OUTPUT, int *OUTPUT) const,
|
||||||
|
"GetBestSizeTuple() -> (width, height)",
|
||||||
|
GetBestSizeTuple);
|
||||||
|
|
||||||
|
|
||||||
// There are times (and windows) where 'Best' size and 'Min' size
|
// There are times (and windows) where 'Best' size and 'Min' size
|
||||||
// are vastly out of sync. This should be remedied somehow, but in
|
// are vastly out of sync. This should be remedied somehow, but in
|
||||||
@ -203,16 +223,24 @@ public:
|
|||||||
// Override this method to control the values given to Sizers etc.
|
// Override this method to control the values given to Sizers etc.
|
||||||
virtual wxSize GetMaxSize() const;
|
virtual wxSize GetMaxSize() const;
|
||||||
|
|
||||||
// Methods for accessing the virtual size of a window. For most
|
|
||||||
// windows this is just the client area of the window, but for
|
DocStr(SetVirtualSize,
|
||||||
// some like scrolled windows it is more or less independent of
|
"Set the the virtual size of a window. For most windows this is just the\n"
|
||||||
// the screen window size. You may override the DoXXXVirtual
|
"client area of the window, but for some like scrolled windows it is more or\n"
|
||||||
// methods below for classes where that is is the case.
|
"less independent of the screen window size.");
|
||||||
void SetVirtualSize( const wxSize &size );
|
void SetVirtualSize(const wxSize& size );
|
||||||
%name(SetVirtualSizeWH) void SetVirtualSize( int w, int h );
|
%name(SetVirtualSizeWH) void SetVirtualSize( int w, int h );
|
||||||
|
|
||||||
|
|
||||||
|
DocStr(GetVirtualSize,
|
||||||
|
"Get the the virtual size of the window. For most windows this is just\n"
|
||||||
|
"the client area of the window, but for some like scrolled windows it is\n"
|
||||||
|
"more or less independent of the screen window size.");
|
||||||
wxSize GetVirtualSize() const;
|
wxSize GetVirtualSize() const;
|
||||||
%name(GetVirtualSizeTuple)void GetVirtualSize( int *OUTPUT, int *OUTPUT ) const;
|
DocDeclAName(
|
||||||
|
void, GetVirtualSize( int *OUTPUT, int *OUTPUT ) const,
|
||||||
|
"GetVirtualSizeTuple() -> (width, height)",
|
||||||
|
GetVirtualSizeTuple);
|
||||||
|
|
||||||
|
|
||||||
// TODO: using directors?
|
// TODO: using directors?
|
||||||
@ -232,13 +260,13 @@ public:
|
|||||||
// window state
|
// window state
|
||||||
// ------------
|
// ------------
|
||||||
|
|
||||||
// returns TRUE if window was shown/hidden, FALSE if the nothing was
|
// returns True if window was shown/hidden, False if the nothing was
|
||||||
// done (window was already shown/hidden)
|
// done (window was already shown/hidden)
|
||||||
virtual bool Show( bool show = TRUE );
|
virtual bool Show( bool show = True );
|
||||||
bool Hide();
|
bool Hide();
|
||||||
|
|
||||||
// returns TRUE if window was enabled/disabled, FALSE if nothing done
|
// returns True if window was enabled/disabled, False if nothing done
|
||||||
virtual bool Enable( bool enable = TRUE );
|
virtual bool Enable( bool enable = True );
|
||||||
bool Disable();
|
bool Disable();
|
||||||
|
|
||||||
bool IsShown() const;
|
bool IsShown() const;
|
||||||
@ -263,14 +291,14 @@ public:
|
|||||||
long GetExtraStyle() const;
|
long GetExtraStyle() const;
|
||||||
|
|
||||||
// make the window modal (all other windows unresponsive)
|
// make the window modal (all other windows unresponsive)
|
||||||
virtual void MakeModal(bool modal = TRUE);
|
virtual void MakeModal(bool modal = True);
|
||||||
|
|
||||||
virtual void SetThemeEnabled(bool enableTheme);
|
virtual void SetThemeEnabled(bool enableTheme);
|
||||||
virtual bool GetThemeEnabled() const;
|
virtual bool GetThemeEnabled() const;
|
||||||
|
|
||||||
// controls by default inherit the colours of their parents, if a
|
// controls by default inherit the colours of their parents, if a
|
||||||
// particular control class doesn't want to do it, it can override
|
// particular control class doesn't want to do it, it can override
|
||||||
// ShouldInheritColours() to return false
|
// ShouldInheritColours() to return False
|
||||||
virtual bool ShouldInheritColours() const;
|
virtual bool ShouldInheritColours() const;
|
||||||
|
|
||||||
|
|
||||||
@ -325,8 +353,8 @@ public:
|
|||||||
// is this window a top level one?
|
// is this window a top level one?
|
||||||
virtual bool IsTopLevel() const;
|
virtual bool IsTopLevel() const;
|
||||||
|
|
||||||
// change the real parent of this window, return TRUE if the parent
|
// change the real parent of this window, return True if the parent
|
||||||
// was changed, FALSE otherwise (error or newParent == oldParent)
|
// was changed, False otherwise (error or newParent == oldParent)
|
||||||
virtual bool Reparent( wxWindow *newParent );
|
virtual bool Reparent( wxWindow *newParent );
|
||||||
|
|
||||||
// implementation mostly
|
// implementation mostly
|
||||||
@ -357,11 +385,11 @@ public:
|
|||||||
// push/pop event handler: allows to chain a custom event handler to
|
// push/pop event handler: allows to chain a custom event handler to
|
||||||
// alreasy existing ones
|
// alreasy existing ones
|
||||||
void PushEventHandler( wxEvtHandler *handler );
|
void PushEventHandler( wxEvtHandler *handler );
|
||||||
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
|
wxEvtHandler *PopEventHandler( bool deleteHandler = False );
|
||||||
|
|
||||||
// find the given handler in the event handler chain and remove (but
|
// find the given handler in the event handler chain and remove (but
|
||||||
// not delete) it from the event handler chain, return TRUE if it was
|
// not delete) it from the event handler chain, return True if it was
|
||||||
// found and FALSE otherwise (this also results in an assert failure so
|
// found and False otherwise (this also results in an assert failure so
|
||||||
// this function should only be called when the handler is supposed to
|
// this function should only be called when the handler is supposed to
|
||||||
// be there)
|
// be there)
|
||||||
bool RemoveEventHandler(wxEvtHandler *handler);
|
bool RemoveEventHandler(wxEvtHandler *handler);
|
||||||
@ -394,7 +422,7 @@ public:
|
|||||||
#if wxUSE_HOTKEY
|
#if wxUSE_HOTKEY
|
||||||
return self->RegisterHotKey(hotkeyId, modifiers, keycode);
|
return self->RegisterHotKey(hotkeyId, modifiers, keycode);
|
||||||
#else
|
#else
|
||||||
return FALSE;
|
return False;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,7 +430,7 @@ public:
|
|||||||
#if wxUSE_HOTKEY
|
#if wxUSE_HOTKEY
|
||||||
return self->UnregisterHotKey(hotkeyId);
|
return self->UnregisterHotKey(hotkeyId);
|
||||||
#else
|
#else
|
||||||
return FALSE;
|
return False;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -449,7 +477,7 @@ public:
|
|||||||
|
|
||||||
// mark the specified rectangle (or the whole window) as "dirty" so it
|
// mark the specified rectangle (or the whole window) as "dirty" so it
|
||||||
// will be repainted
|
// will be repainted
|
||||||
virtual void Refresh( bool eraseBackground = TRUE,
|
virtual void Refresh( bool eraseBackground = True,
|
||||||
const wxRect *rect = NULL );
|
const wxRect *rect = NULL );
|
||||||
|
|
||||||
// a less awkward wrapper for Refresh
|
// a less awkward wrapper for Refresh
|
||||||
@ -489,19 +517,19 @@ public:
|
|||||||
// --------------------------
|
// --------------------------
|
||||||
|
|
||||||
// set/retrieve the window colours (system defaults are used by
|
// set/retrieve the window colours (system defaults are used by
|
||||||
// default): Set functions return TRUE if colour was changed
|
// default): Set functions return True if colour was changed
|
||||||
virtual bool SetBackgroundColour( const wxColour &colour );
|
virtual bool SetBackgroundColour( const wxColour &colour );
|
||||||
virtual bool SetForegroundColour( const wxColour &colour );
|
virtual bool SetForegroundColour( const wxColour &colour );
|
||||||
|
|
||||||
wxColour GetBackgroundColour() const;
|
wxColour GetBackgroundColour() const;
|
||||||
wxColour GetForegroundColour() const;
|
wxColour GetForegroundColour() const;
|
||||||
|
|
||||||
// set/retrieve the cursor for this window (SetCursor() returns TRUE
|
// set/retrieve the cursor for this window (SetCursor() returns True
|
||||||
// if the cursor was really changed)
|
// if the cursor was really changed)
|
||||||
virtual bool SetCursor( const wxCursor &cursor );
|
virtual bool SetCursor( const wxCursor &cursor );
|
||||||
wxCursor& GetCursor();
|
wxCursor& GetCursor();
|
||||||
|
|
||||||
// set/retrieve the font for the window (SetFont() returns TRUE if the
|
// set/retrieve the font for the window (SetFont() returns True if the
|
||||||
// font really changed)
|
// font really changed)
|
||||||
virtual bool SetFont( const wxFont &font );
|
virtual bool SetFont( const wxFont &font );
|
||||||
wxFont& GetFont();
|
wxFont& GetFont();
|
||||||
@ -516,13 +544,19 @@ public:
|
|||||||
virtual int GetCharHeight() const;
|
virtual int GetCharHeight() const;
|
||||||
virtual int GetCharWidth() const;
|
virtual int GetCharWidth() const;
|
||||||
|
|
||||||
// get the width/height/... of the text using current or specified
|
|
||||||
// font
|
DocDeclAStr(
|
||||||
virtual void GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT); // x, y
|
void, GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT),
|
||||||
%name(GetFullTextExtent) virtual void GetTextExtent(const wxString& string,
|
"GetTextExtent(wxString string) -> (width, height)",
|
||||||
int *OUTPUT, int *OUTPUT, // x, y
|
"Get the width and height of the text using the current font.");
|
||||||
int *OUTPUT, int* OUTPUT, // descent, externalLeading
|
DocDeclAStrName(
|
||||||
const wxFont* font = NULL);
|
void, GetTextExtent(const wxString& string,
|
||||||
|
int *OUTPUT, int *OUTPUT, int *OUTPUT, int* OUTPUT,
|
||||||
|
const wxFont* font = NULL),
|
||||||
|
"GetFullTextExtent(wxString string, Font font=None) ->\n (width, height, descent, externalLeading)",
|
||||||
|
"Get the width, height, decent and leading of the text using the current or specified font.",
|
||||||
|
GetFullTextExtent);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// client <-> screen coords
|
// client <-> screen coords
|
||||||
@ -554,7 +588,7 @@ public:
|
|||||||
// get border for the flags of this window
|
// get border for the flags of this window
|
||||||
wxBorder GetBorder() const { return GetBorder(GetWindowStyleFlag()); }
|
wxBorder GetBorder() const { return GetBorder(GetWindowStyleFlag()); }
|
||||||
|
|
||||||
// send wxUpdateUIEvents to this window, and children if recurse is TRUE
|
// send wxUpdateUIEvents to this window, and children if recurse is True
|
||||||
virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE);
|
virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE);
|
||||||
|
|
||||||
// TODO: using directors?
|
// TODO: using directors?
|
||||||
@ -589,8 +623,8 @@ public:
|
|||||||
int pos,
|
int pos,
|
||||||
int thumbvisible,
|
int thumbvisible,
|
||||||
int range,
|
int range,
|
||||||
bool refresh = TRUE );
|
bool refresh = True );
|
||||||
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
|
virtual void SetScrollPos( int orient, int pos, bool refresh = True );
|
||||||
virtual int GetScrollPos( int orient ) const;
|
virtual int GetScrollPos( int orient ) const;
|
||||||
virtual int GetScrollThumb( int orient ) const;
|
virtual int GetScrollThumb( int orient ) const;
|
||||||
virtual int GetScrollRange( int orient ) const;
|
virtual int GetScrollRange( int orient ) const;
|
||||||
@ -601,7 +635,7 @@ public:
|
|||||||
|
|
||||||
// scrolls window by line/page: note that not all controls support this
|
// scrolls window by line/page: note that not all controls support this
|
||||||
//
|
//
|
||||||
// return TRUE if the position changed, FALSE otherwise
|
// return True if the position changed, False otherwise
|
||||||
virtual bool ScrollLines(int WXUNUSED(lines));
|
virtual bool ScrollLines(int WXUNUSED(lines));
|
||||||
virtual bool ScrollPages(int WXUNUSED(pages));
|
virtual bool ScrollPages(int WXUNUSED(pages));
|
||||||
|
|
||||||
@ -674,8 +708,8 @@ public:
|
|||||||
virtual bool Layout();
|
virtual bool Layout();
|
||||||
|
|
||||||
// sizers
|
// sizers
|
||||||
void SetSizer(wxSizer *sizer, bool deleteOld = TRUE );
|
void SetSizer(wxSizer *sizer, bool deleteOld = True );
|
||||||
void SetSizerAndFit( wxSizer *sizer, bool deleteOld = TRUE );
|
void SetSizerAndFit( wxSizer *sizer, bool deleteOld = True );
|
||||||
|
|
||||||
wxSizer *GetSizer() const;
|
wxSizer *GetSizer() const;
|
||||||
|
|
||||||
|
@ -190,13 +190,13 @@ public:
|
|||||||
// should be used instead for them
|
// should be used instead for them
|
||||||
|
|
||||||
// corresponds to wxCAL_NO_YEAR_CHANGE bit
|
// corresponds to wxCAL_NO_YEAR_CHANGE bit
|
||||||
void EnableYearChange(bool enable = TRUE);
|
void EnableYearChange(bool enable = True);
|
||||||
|
|
||||||
// corresponds to wxCAL_NO_MONTH_CHANGE bit
|
// corresponds to wxCAL_NO_MONTH_CHANGE bit
|
||||||
void EnableMonthChange(bool enable = TRUE);
|
void EnableMonthChange(bool enable = True);
|
||||||
|
|
||||||
// corresponds to wxCAL_SHOW_HOLIDAYS bit
|
// corresponds to wxCAL_SHOW_HOLIDAYS bit
|
||||||
void EnableHolidayDisplay(bool display = TRUE);
|
void EnableHolidayDisplay(bool display = True);
|
||||||
|
|
||||||
// customization
|
// customization
|
||||||
// -------------
|
// -------------
|
||||||
@ -238,8 +238,8 @@ public:
|
|||||||
wxDateTime::WeekDay *wd = NULL);
|
wxDateTime::WeekDay *wd = NULL);
|
||||||
|
|
||||||
|
|
||||||
bool Enable(bool enable = TRUE);
|
bool Enable(bool enable = True);
|
||||||
bool Show(bool show = TRUE);
|
bool Show(bool show = True);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
%include _dirctrl.i
|
%include _dirctrl.i
|
||||||
%include _pycontrol.i
|
%include _pycontrol.i
|
||||||
%include _cshelp.i
|
%include _cshelp.i
|
||||||
|
%include _dragimg.i
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -49,7 +49,7 @@ wx = _sys.modules[__name__]
|
|||||||
|
|
||||||
%{
|
%{
|
||||||
DECLARE_DEF_STRING(EmptyString);
|
DECLARE_DEF_STRING(EmptyString);
|
||||||
DECLARE_DEF_STRING(PanelNameStr);
|
// DECLARE_DEF_STRING(PanelNameStr);
|
||||||
%}
|
%}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -146,10 +146,10 @@ bool wxPyDrawXXXPoint(wxDC& dc, PyObject* coords) {
|
|||||||
|
|
||||||
if (! wxPy2int_seq_helper(coords, &x, &y)) {
|
if (! wxPy2int_seq_helper(coords, &x, &y)) {
|
||||||
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y) sequences.");
|
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y) sequences.");
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
dc.DrawPoint(x, y);
|
dc.DrawPoint(x, y);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPyDrawXXXLine(wxDC& dc, PyObject* coords) {
|
bool wxPyDrawXXXLine(wxDC& dc, PyObject* coords) {
|
||||||
@ -157,10 +157,10 @@ bool wxPyDrawXXXLine(wxDC& dc, PyObject* coords) {
|
|||||||
|
|
||||||
if (! wxPy4int_seq_helper(coords, &x1, &y1, &x2, &y2)) {
|
if (! wxPy4int_seq_helper(coords, &x1, &y1, &x2, &y2)) {
|
||||||
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x1,y1, x1,y2) sequences.");
|
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x1,y1, x1,y2) sequences.");
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
dc.DrawLine(x1,y1, x2,y2);
|
dc.DrawLine(x1,y1, x2,y2);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPyDrawXXXRectangle(wxDC& dc, PyObject* coords) {
|
bool wxPyDrawXXXRectangle(wxDC& dc, PyObject* coords) {
|
||||||
@ -168,10 +168,10 @@ bool wxPyDrawXXXRectangle(wxDC& dc, PyObject* coords) {
|
|||||||
|
|
||||||
if (! wxPy4int_seq_helper(coords, &x, &y, &w, &h)) {
|
if (! wxPy4int_seq_helper(coords, &x, &y, &w, &h)) {
|
||||||
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y, w,h) sequences.");
|
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y, w,h) sequences.");
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
dc.DrawRectangle(x, y, w, h);
|
dc.DrawRectangle(x, y, w, h);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPyDrawXXXEllipse(wxDC& dc, PyObject* coords) {
|
bool wxPyDrawXXXEllipse(wxDC& dc, PyObject* coords) {
|
||||||
@ -179,10 +179,10 @@ bool wxPyDrawXXXEllipse(wxDC& dc, PyObject* coords) {
|
|||||||
|
|
||||||
if (! wxPy4int_seq_helper(coords, &x, &y, &w, &h)) {
|
if (! wxPy4int_seq_helper(coords, &x, &y, &w, &h)) {
|
||||||
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y, w,h) sequences.");
|
PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y, w,h) sequences.");
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
dc.DrawEllipse(x, y, w, h);
|
dc.DrawEllipse(x, y, w, h);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -193,10 +193,10 @@ bool wxPyDrawXXXPolygon(wxDC& dc, PyObject* coords) {
|
|||||||
points = wxPoint_LIST_helper(coords, &numPoints);
|
points = wxPoint_LIST_helper(coords, &numPoints);
|
||||||
if (! points) {
|
if (! points) {
|
||||||
PyErr_SetString(PyExc_TypeError, "Expected a sequence of sequences of (x,y) sequences.");
|
PyErr_SetString(PyExc_TypeError, "Expected a sequence of sequences of (x,y) sequences.");
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
dc.DrawPolygon(numPoints, points);
|
dc.DrawPolygon(numPoints, points);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,6 @@
|
|||||||
%include _dc.i
|
%include _dc.i
|
||||||
%include _imaglist.i
|
%include _imaglist.i
|
||||||
%include _stockobjs.i
|
%include _stockobjs.i
|
||||||
%include _dragimg.i
|
|
||||||
%include _effects.i
|
%include _effects.i
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ PyObject* wxPyMake_##TYPE(TYPE* source) { \
|
|||||||
/* Otherwise make a new wrapper for it the old fashioned way and \
|
/* Otherwise make a new wrapper for it the old fashioned way and \
|
||||||
give it the OOR treatment */ \
|
give it the OOR treatment */ \
|
||||||
if (! target) { \
|
if (! target) { \
|
||||||
target = wxPyConstructObject(source, wxT(#TYPE), FALSE); \
|
target = wxPyConstructObject(source, wxT(#TYPE), False); \
|
||||||
if (target) \
|
if (target) \
|
||||||
source->SetClientObject(new wxPyOORClientData(target)); \
|
source->SetClientObject(new wxPyOORClientData(target)); \
|
||||||
} \
|
} \
|
||||||
@ -796,7 +796,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
bool EndEdit(int row, int col, wxGrid* grid) {
|
bool EndEdit(int row, int col, wxGrid* grid) {
|
||||||
bool rv = FALSE;
|
bool rv = False;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if (wxPyCBH_findCallback(m_myInst, "EndEdit")) {
|
if (wxPyCBH_findCallback(m_myInst, "EndEdit")) {
|
||||||
PyObject* go = wxPyMake_wxObject(grid);
|
PyObject* go = wxPyMake_wxObject(grid);
|
||||||
@ -954,7 +954,7 @@ public:
|
|||||||
%addtofunc wxGridCellChoiceEditor "self._setOORInfo(self)"
|
%addtofunc wxGridCellChoiceEditor "self._setOORInfo(self)"
|
||||||
wxGridCellChoiceEditor(int LCOUNT = 0,
|
wxGridCellChoiceEditor(int LCOUNT = 0,
|
||||||
const wxString* choices = NULL,
|
const wxString* choices = NULL,
|
||||||
bool allowOthers = FALSE);
|
bool allowOthers = False);
|
||||||
virtual wxString GetValue();
|
virtual wxString GetValue();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1013,8 +1013,8 @@ public:
|
|||||||
void SetFont(const wxFont& font);
|
void SetFont(const wxFont& font);
|
||||||
void SetAlignment(int hAlign, int vAlign);
|
void SetAlignment(int hAlign, int vAlign);
|
||||||
void SetSize(int num_rows, int num_cols);
|
void SetSize(int num_rows, int num_cols);
|
||||||
void SetOverflow( bool allow = TRUE );
|
void SetOverflow( bool allow = True );
|
||||||
void SetReadOnly(bool isReadOnly = TRUE);
|
void SetReadOnly(bool isReadOnly = True);
|
||||||
|
|
||||||
void SetRenderer(wxGridCellRenderer *renderer);
|
void SetRenderer(wxGridCellRenderer *renderer);
|
||||||
void SetEditor(wxGridCellEditor* editor);
|
void SetEditor(wxGridCellEditor* editor);
|
||||||
@ -1438,7 +1438,7 @@ bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) {
|
|||||||
if (! wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxGridCellCoords")))
|
if (! wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxGridCellCoords")))
|
||||||
goto error;
|
goto error;
|
||||||
*obj = ptr;
|
*obj = ptr;
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
// otherwise a 2-tuple of integers is expected
|
// otherwise a 2-tuple of integers is expected
|
||||||
else if (PySequence_Check(source) && PyObject_Length(source) == 2) {
|
else if (PySequence_Check(source) && PyObject_Length(source) == 2) {
|
||||||
@ -1452,12 +1452,12 @@ bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) {
|
|||||||
**obj = wxGridCellCoords(PyInt_AsLong(o1), PyInt_AsLong(o2));
|
**obj = wxGridCellCoords(PyInt_AsLong(o1), PyInt_AsLong(o2));
|
||||||
Py_DECREF(o1);
|
Py_DECREF(o1);
|
||||||
Py_DECREF(o2);
|
Py_DECREF(o2);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
PyErr_SetString(PyExc_TypeError, "Expected a 2-tuple of integers or a wxGridCellCoords object.");
|
PyErr_SetString(PyExc_TypeError, "Expected a 2-tuple of integers or a wxGridCellCoords object.");
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1466,13 +1466,13 @@ bool wxGridCellCoords_typecheck(PyObject* source) {
|
|||||||
|
|
||||||
if (wxPySwigInstance_Check(source) &&
|
if (wxPySwigInstance_Check(source) &&
|
||||||
wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxGridCellCoords")))
|
wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxGridCellCoords")))
|
||||||
return true;
|
return True;
|
||||||
|
|
||||||
PyErr_Clear();
|
PyErr_Clear();
|
||||||
if (PySequence_Check(source) && PySequence_Length(source) == 2)
|
if (PySequence_Check(source) && PySequence_Length(source) == 2)
|
||||||
return true;
|
return True;
|
||||||
|
|
||||||
return false;
|
return False;
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
@ -1553,17 +1553,17 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
wxGridTableBase * GetTable() const;
|
wxGridTableBase * GetTable() const;
|
||||||
bool SetTable( wxGridTableBase *table, bool takeOwnership=FALSE,
|
bool SetTable( wxGridTableBase *table, bool takeOwnership=False,
|
||||||
WXGRIDSELECTIONMODES selmode =
|
WXGRIDSELECTIONMODES selmode =
|
||||||
wxGrid::wxGridSelectCells );
|
wxGrid::wxGridSelectCells );
|
||||||
|
|
||||||
void ClearGrid();
|
void ClearGrid();
|
||||||
bool InsertRows( int pos = 0, int numRows = 1, bool updateLabels=TRUE );
|
bool InsertRows( int pos = 0, int numRows = 1, bool updateLabels=True );
|
||||||
bool AppendRows( int numRows = 1, bool updateLabels=TRUE );
|
bool AppendRows( int numRows = 1, bool updateLabels=True );
|
||||||
bool DeleteRows( int pos = 0, int numRows = 1, bool updateLabels=TRUE );
|
bool DeleteRows( int pos = 0, int numRows = 1, bool updateLabels=True );
|
||||||
bool InsertCols( int pos = 0, int numCols = 1, bool updateLabels=TRUE );
|
bool InsertCols( int pos = 0, int numCols = 1, bool updateLabels=True );
|
||||||
bool AppendCols( int numCols = 1, bool updateLabels=TRUE );
|
bool AppendCols( int numCols = 1, bool updateLabels=True );
|
||||||
bool DeleteCols( int pos = 0, int numCols = 1, bool updateLabels=TRUE );
|
bool DeleteCols( int pos = 0, int numCols = 1, bool updateLabels=True );
|
||||||
|
|
||||||
|
|
||||||
// this function is called when the current cell highlight must be redrawn
|
// this function is called when the current cell highlight must be redrawn
|
||||||
@ -1597,7 +1597,7 @@ public:
|
|||||||
void EndBatch();
|
void EndBatch();
|
||||||
int GetBatchCount();
|
int GetBatchCount();
|
||||||
void ForceRefresh();
|
void ForceRefresh();
|
||||||
void Refresh(bool eraseb=TRUE, const wxRect* rect= NULL);
|
void Refresh(bool eraseb=True, const wxRect* rect= NULL);
|
||||||
|
|
||||||
|
|
||||||
// ------ edit control functions
|
// ------ edit control functions
|
||||||
@ -1605,7 +1605,7 @@ public:
|
|||||||
bool IsEditable();
|
bool IsEditable();
|
||||||
void EnableEditing( bool edit );
|
void EnableEditing( bool edit );
|
||||||
|
|
||||||
void EnableCellEditControl( bool enable = TRUE );
|
void EnableCellEditControl( bool enable = True );
|
||||||
void DisableCellEditControl();
|
void DisableCellEditControl();
|
||||||
bool CanEnableCellControl() const;
|
bool CanEnableCellControl() const;
|
||||||
bool IsCellEditControlEnabled() const;
|
bool IsCellEditControlEnabled() const;
|
||||||
@ -1649,8 +1649,8 @@ public:
|
|||||||
// check to see if a cell is either wholly visible (the default arg) or
|
// check to see if a cell is either wholly visible (the default arg) or
|
||||||
// at least partially visible in the grid window
|
// at least partially visible in the grid window
|
||||||
//
|
//
|
||||||
bool IsVisible( int row, int col, bool wholeCellVisible = TRUE );
|
bool IsVisible( int row, int col, bool wholeCellVisible = True );
|
||||||
// TODO: ??? bool IsVisible( const wxGridCellCoords& coords, bool wholeCellVisible = TRUE );
|
// TODO: ??? bool IsVisible( const wxGridCellCoords& coords, bool wholeCellVisible = True );
|
||||||
void MakeCellVisible( int row, int col );
|
void MakeCellVisible( int row, int col );
|
||||||
// TODO: ??? void MakeCellVisible( const wxGridCellCoords& coords );
|
// TODO: ??? void MakeCellVisible( const wxGridCellCoords& coords );
|
||||||
|
|
||||||
@ -1704,13 +1704,13 @@ public:
|
|||||||
void SetCellHighlightPenWidth(int width);
|
void SetCellHighlightPenWidth(int width);
|
||||||
void SetCellHighlightROPenWidth(int width);
|
void SetCellHighlightROPenWidth(int width);
|
||||||
|
|
||||||
void EnableDragRowSize( bool enable = TRUE );
|
void EnableDragRowSize( bool enable = True );
|
||||||
void DisableDragRowSize();
|
void DisableDragRowSize();
|
||||||
bool CanDragRowSize();
|
bool CanDragRowSize();
|
||||||
void EnableDragColSize( bool enable = TRUE );
|
void EnableDragColSize( bool enable = True );
|
||||||
void DisableDragColSize();
|
void DisableDragColSize();
|
||||||
bool CanDragColSize();
|
bool CanDragColSize();
|
||||||
void EnableDragGridSize(bool enable = TRUE);
|
void EnableDragGridSize(bool enable = True);
|
||||||
void DisableDragGridSize();
|
void DisableDragGridSize();
|
||||||
bool CanDragGridSize();
|
bool CanDragGridSize();
|
||||||
|
|
||||||
@ -1727,7 +1727,7 @@ public:
|
|||||||
void SetColFormatFloat(int col, int width = -1, int precision = -1);
|
void SetColFormatFloat(int col, int width = -1, int precision = -1);
|
||||||
void SetColFormatCustom(int col, const wxString& typeName);
|
void SetColFormatCustom(int col, const wxString& typeName);
|
||||||
|
|
||||||
void EnableGridLines( bool enable = TRUE );
|
void EnableGridLines( bool enable = True );
|
||||||
bool GridLinesEnabled();
|
bool GridLinesEnabled();
|
||||||
|
|
||||||
// ------ row and col formatting
|
// ------ row and col formatting
|
||||||
@ -1748,22 +1748,22 @@ public:
|
|||||||
bool GetCellOverflow( int row, int col );
|
bool GetCellOverflow( int row, int col );
|
||||||
void GetCellSize( int row, int col, int *OUTPUT, int *OUTPUT );
|
void GetCellSize( int row, int col, int *OUTPUT, int *OUTPUT );
|
||||||
|
|
||||||
void SetDefaultRowSize( int height, bool resizeExistingRows = FALSE );
|
void SetDefaultRowSize( int height, bool resizeExistingRows = False );
|
||||||
void SetRowSize( int row, int height );
|
void SetRowSize( int row, int height );
|
||||||
void SetDefaultColSize( int width, bool resizeExistingCols = FALSE );
|
void SetDefaultColSize( int width, bool resizeExistingCols = False );
|
||||||
|
|
||||||
void SetColSize( int col, int width );
|
void SetColSize( int col, int width );
|
||||||
|
|
||||||
// automatically size the column or row to fit to its contents, if
|
// automatically size the column or row to fit to its contents, if
|
||||||
// setAsMin is TRUE, this optimal width will also be set as minimal width
|
// setAsMin is True, this optimal width will also be set as minimal width
|
||||||
// for this column
|
// for this column
|
||||||
void AutoSizeColumn( int col, bool setAsMin = TRUE );
|
void AutoSizeColumn( int col, bool setAsMin = True );
|
||||||
void AutoSizeRow( int row, bool setAsMin = TRUE );
|
void AutoSizeRow( int row, bool setAsMin = True );
|
||||||
|
|
||||||
|
|
||||||
// auto size all columns (very ineffective for big grids!)
|
// auto size all columns (very ineffective for big grids!)
|
||||||
void AutoSizeColumns( bool setAsMin = TRUE );
|
void AutoSizeColumns( bool setAsMin = True );
|
||||||
void AutoSizeRows( bool setAsMin = TRUE );
|
void AutoSizeRows( bool setAsMin = True );
|
||||||
|
|
||||||
// auto size the grid, that is make the columns/rows of the "right" size
|
// auto size the grid, that is make the columns/rows of the "right" size
|
||||||
// and also set the grid size to just fit its contents
|
// and also set the grid size to just fit its contents
|
||||||
@ -1822,19 +1822,19 @@ public:
|
|||||||
void SetCellValue( int row, int col, const wxString& s );
|
void SetCellValue( int row, int col, const wxString& s );
|
||||||
// TODO: ??? void SetCellValue( const wxGridCellCoords& coords, const wxString& s )
|
// TODO: ??? void SetCellValue( const wxGridCellCoords& coords, const wxString& s )
|
||||||
|
|
||||||
// returns TRUE if the cell can't be edited
|
// returns True if the cell can't be edited
|
||||||
bool IsReadOnly(int row, int col) const;
|
bool IsReadOnly(int row, int col) const;
|
||||||
|
|
||||||
// make the cell editable/readonly
|
// make the cell editable/readonly
|
||||||
void SetReadOnly(int row, int col, bool isReadOnly = TRUE);
|
void SetReadOnly(int row, int col, bool isReadOnly = True);
|
||||||
|
|
||||||
// ------ selections of blocks of cells
|
// ------ selections of blocks of cells
|
||||||
//
|
//
|
||||||
void SelectRow( int row, bool addToSelected = FALSE );
|
void SelectRow( int row, bool addToSelected = False );
|
||||||
void SelectCol( int col, bool addToSelected = FALSE );
|
void SelectCol( int col, bool addToSelected = False );
|
||||||
|
|
||||||
void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol,
|
void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol,
|
||||||
bool addToSelected = FALSE );
|
bool addToSelected = False );
|
||||||
// TODO: ??? void SelectBlock( const wxGridCellCoords& topLeft,
|
// TODO: ??? void SelectBlock( const wxGridCellCoords& topLeft,
|
||||||
// TODO: ??? const wxGridCellCoords& bottomRight )
|
// TODO: ??? const wxGridCellCoords& bottomRight )
|
||||||
|
|
||||||
@ -1906,8 +1906,8 @@ class wxGridEvent : public wxNotifyEvent
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxGridEvent(int id, wxEventType type, wxGrid* obj,
|
wxGridEvent(int id, wxEventType type, wxGrid* obj,
|
||||||
int row=-1, int col=-1, int x=-1, int y=-1, bool sel = TRUE,
|
int row=-1, int col=-1, int x=-1, int y=-1, bool sel = True,
|
||||||
bool control=FALSE, bool shift=FALSE, bool alt=FALSE, bool meta=FALSE);
|
bool control=False, bool shift=False, bool alt=False, bool meta=False);
|
||||||
|
|
||||||
virtual int GetRow();
|
virtual int GetRow();
|
||||||
virtual int GetCol();
|
virtual int GetCol();
|
||||||
@ -1926,7 +1926,7 @@ class wxGridSizeEvent : public wxNotifyEvent
|
|||||||
public:
|
public:
|
||||||
wxGridSizeEvent(int id, wxEventType type, wxGrid* obj,
|
wxGridSizeEvent(int id, wxEventType type, wxGrid* obj,
|
||||||
int rowOrCol=-1, int x=-1, int y=-1,
|
int rowOrCol=-1, int x=-1, int y=-1,
|
||||||
bool control=FALSE, bool shift=FALSE, bool alt=FALSE, bool meta=FALSE);
|
bool control=False, bool shift=False, bool alt=False, bool meta=False);
|
||||||
|
|
||||||
int GetRowOrCol();
|
int GetRowOrCol();
|
||||||
wxPoint GetPosition();
|
wxPoint GetPosition();
|
||||||
@ -1944,9 +1944,9 @@ public:
|
|||||||
wxGridRangeSelectEvent(int id, wxEventType type, wxGrid* obj,
|
wxGridRangeSelectEvent(int id, wxEventType type, wxGrid* obj,
|
||||||
const wxGridCellCoords& topLeft,
|
const wxGridCellCoords& topLeft,
|
||||||
const wxGridCellCoords& bottomRight,
|
const wxGridCellCoords& bottomRight,
|
||||||
bool sel = TRUE,
|
bool sel = True,
|
||||||
bool control=FALSE, bool shift=FALSE,
|
bool control=False, bool shift=False,
|
||||||
bool alt=FALSE, bool meta=FALSE);
|
bool alt=False, bool meta=False);
|
||||||
|
|
||||||
wxGridCellCoords GetTopLeftCoords();
|
wxGridCellCoords GetTopLeftCoords();
|
||||||
wxGridCellCoords GetBottomRightCoords();
|
wxGridCellCoords GetBottomRightCoords();
|
||||||
|
@ -41,8 +41,8 @@
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
wxPyApp* wxPythonApp = NULL; // Global instance of application object
|
wxPyApp* wxPythonApp = NULL; // Global instance of application object
|
||||||
bool wxPyDoCleanup = FALSE;
|
bool wxPyDoCleanup = False;
|
||||||
bool wxPyDoingCleanup = FALSE;
|
bool wxPyDoingCleanup = False;
|
||||||
|
|
||||||
|
|
||||||
#ifdef WXP_WITH_THREAD
|
#ifdef WXP_WITH_THREAD
|
||||||
@ -85,7 +85,7 @@ BOOL WINAPI DllMain(
|
|||||||
// the inatance has already been set.
|
// the inatance has already been set.
|
||||||
if (! wxGetInstance())
|
if (! wxGetInstance())
|
||||||
wxSetInstance(hinstDLL);
|
wxSetInstance(hinstDLL);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyApp, wxApp);
|
|||||||
|
|
||||||
wxPyApp::wxPyApp() {
|
wxPyApp::wxPyApp() {
|
||||||
m_assertMode = wxPYAPP_ASSERT_EXCEPTION;
|
m_assertMode = wxPYAPP_ASSERT_EXCEPTION;
|
||||||
m_startupComplete = false;
|
m_startupComplete = False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ wxPyApp::~wxPyApp() {
|
|||||||
|
|
||||||
// This one isn't acutally called... We fake it with _BootstrapApp
|
// This one isn't acutally called... We fake it with _BootstrapApp
|
||||||
bool wxPyApp::OnInit() {
|
bool wxPyApp::OnInit() {
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ int wxPyApp::MainLoop() {
|
|||||||
|
|
||||||
|
|
||||||
bool wxPyApp::OnInitGui() {
|
bool wxPyApp::OnInitGui() {
|
||||||
bool rval=TRUE;
|
bool rval=True;
|
||||||
wxApp::OnInitGui(); // in this case always call the base class version
|
wxApp::OnInitGui(); // in this case always call the base class version
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if (wxPyCBH_findCallback(m_myInst, "OnInitGui"))
|
if (wxPyCBH_findCallback(m_myInst, "OnInitGui"))
|
||||||
@ -359,10 +359,10 @@ void wxPyApp::_BootstrapApp()
|
|||||||
|
|
||||||
// The stock objects were all NULL when they were loaded into
|
// The stock objects were all NULL when they were loaded into
|
||||||
// SWIG generated proxies, so re-init those now...
|
// SWIG generated proxies, so re-init those now...
|
||||||
wxPy_ReinitStockObjects(false);
|
wxPy_ReinitStockObjects(False);
|
||||||
|
|
||||||
// It's now ok to generate exceptions for assertion errors.
|
// It's now ok to generate exceptions for assertion errors.
|
||||||
wxPythonApp->SetStartupComplete(true);
|
wxPythonApp->SetStartupComplete(True);
|
||||||
|
|
||||||
// Call the Python wxApp's OnInit function
|
// Call the Python wxApp's OnInit function
|
||||||
if (wxPyCBH_findCallback(m_myInst, "OnInit")) {
|
if (wxPyCBH_findCallback(m_myInst, "OnInit")) {
|
||||||
@ -376,7 +376,7 @@ void wxPyApp::_BootstrapApp()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Is it okay if there is no OnInit? Probably so...
|
// Is it okay if there is no OnInit? Probably so...
|
||||||
result = true;
|
result = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -464,15 +464,15 @@ void __wxPyPreStart(PyObject* moduleDict)
|
|||||||
wxApp::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, "wxPython");
|
wxApp::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, "wxPython");
|
||||||
|
|
||||||
// Init the stock objects to a non-NULL value so SWIG doesn't create them as None
|
// Init the stock objects to a non-NULL value so SWIG doesn't create them as None
|
||||||
wxPy_ReinitStockObjects(true);
|
wxPy_ReinitStockObjects(True);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void __wxPyCleanup() {
|
void __wxPyCleanup() {
|
||||||
wxPyDoingCleanup = TRUE;
|
wxPyDoingCleanup = True;
|
||||||
if (wxPyDoCleanup) {
|
if (wxPyDoCleanup) {
|
||||||
wxPyDoCleanup = FALSE;
|
wxPyDoCleanup = False;
|
||||||
wxEntryCleanup();
|
wxEntryCleanup();
|
||||||
}
|
}
|
||||||
#ifdef WXP_WITH_THREAD
|
#ifdef WXP_WITH_THREAD
|
||||||
@ -540,7 +540,7 @@ PyObject* __wxPySetDictionary(PyObject* /* self */, PyObject* args)
|
|||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
// Python's PyInstance_Check does not return true for instances of new-style
|
// Python's PyInstance_Check does not return True for instances of new-style
|
||||||
// classes. This should get close enough for both new and old classes but I
|
// classes. This should get close enough for both new and old classes but I
|
||||||
// should re-evaluate the need for doing instance checks...
|
// should re-evaluate the need for doing instance checks...
|
||||||
bool wxPyInstance_Check(PyObject* obj) {
|
bool wxPyInstance_Check(PyObject* obj) {
|
||||||
@ -754,14 +754,14 @@ void wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName) {
|
|||||||
|
|
||||||
PyObject* wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) {
|
PyObject* wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) {
|
||||||
PyObject* target = NULL;
|
PyObject* target = NULL;
|
||||||
bool isEvtHandler = FALSE;
|
bool isEvtHandler = False;
|
||||||
|
|
||||||
if (source) {
|
if (source) {
|
||||||
// If it's derived from wxEvtHandler then there may
|
// If it's derived from wxEvtHandler then there may
|
||||||
// already be a pointer to a Python object that we can use
|
// already be a pointer to a Python object that we can use
|
||||||
// in the OOR data.
|
// in the OOR data.
|
||||||
if (checkEvtHandler && wxIsKindOf(source, wxEvtHandler)) {
|
if (checkEvtHandler && wxIsKindOf(source, wxEvtHandler)) {
|
||||||
isEvtHandler = TRUE;
|
isEvtHandler = True;
|
||||||
wxEvtHandler* eh = (wxEvtHandler*)source;
|
wxEvtHandler* eh = (wxEvtHandler*)source;
|
||||||
wxPyOORClientData* data = (wxPyOORClientData*)eh->GetClientObject();
|
wxPyOORClientData* data = (wxPyOORClientData*)eh->GetClientObject();
|
||||||
if (data) {
|
if (data) {
|
||||||
@ -785,7 +785,7 @@ PyObject* wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) {
|
|||||||
exists = wxPyCheckSwigType(name);
|
exists = wxPyCheckSwigType(name);
|
||||||
}
|
}
|
||||||
if (info) {
|
if (info) {
|
||||||
target = wxPyConstructObject((void*)source, name, FALSE);
|
target = wxPyConstructObject((void*)source, name, False);
|
||||||
if (target && isEvtHandler)
|
if (target && isEvtHandler)
|
||||||
((wxEvtHandler*)source)->SetClientObject(new wxPyOORClientData(target));
|
((wxEvtHandler*)source)->SetClientObject(new wxPyOORClientData(target));
|
||||||
} else {
|
} else {
|
||||||
@ -817,7 +817,7 @@ PyObject* wxPyMake_wxSizer(wxSizer* source) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! target) {
|
if (! target) {
|
||||||
target = wxPyMake_wxObject(source, FALSE);
|
target = wxPyMake_wxObject(source, False);
|
||||||
if (target != Py_None)
|
if (target != Py_None)
|
||||||
((wxSizer*)source)->SetClientObject(new wxPyOORClientData(target));
|
((wxSizer*)source)->SetClientObject(new wxPyOORClientData(target));
|
||||||
}
|
}
|
||||||
@ -946,7 +946,7 @@ bool wxPyInputStream::eof() {
|
|||||||
if (m_wxis)
|
if (m_wxis)
|
||||||
return m_wxis->Eof();
|
return m_wxis->Eof();
|
||||||
else
|
else
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPyInputStream::~wxPyInputStream() {
|
wxPyInputStream::~wxPyInputStream() {
|
||||||
@ -1256,7 +1256,7 @@ void wxPyCallback::EventThunker(wxEvent& event) {
|
|||||||
PyObject* result;
|
PyObject* result;
|
||||||
PyObject* arg;
|
PyObject* arg;
|
||||||
PyObject* tuple;
|
PyObject* tuple;
|
||||||
bool checkSkip = FALSE;
|
bool checkSkip = False;
|
||||||
|
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
wxString className = event.GetClassInfo()->GetClassName();
|
wxString className = event.GetClassInfo()->GetClassName();
|
||||||
@ -1435,7 +1435,7 @@ bool wxPyCallbackHelper::findCallback(const char* name) const {
|
|||||||
|
|
||||||
int wxPyCallbackHelper::callCallback(PyObject* argTuple) const {
|
int wxPyCallbackHelper::callCallback(PyObject* argTuple) const {
|
||||||
PyObject* result;
|
PyObject* result;
|
||||||
int retval = FALSE;
|
int retval = False;
|
||||||
|
|
||||||
result = callCallbackObj(argTuple);
|
result = callCallbackObj(argTuple);
|
||||||
if (result) { // Assumes an integer return type...
|
if (result) { // Assumes an integer return type...
|
||||||
@ -1502,7 +1502,7 @@ void wxPyCBH_delete(wxPyCallbackHelper* cbh) {
|
|||||||
wxPyEvtSelfRef::wxPyEvtSelfRef() {
|
wxPyEvtSelfRef::wxPyEvtSelfRef() {
|
||||||
//m_self = Py_None; // **** We don't do normal ref counting to prevent
|
//m_self = Py_None; // **** We don't do normal ref counting to prevent
|
||||||
//Py_INCREF(m_self); // circular loops...
|
//Py_INCREF(m_self); // circular loops...
|
||||||
m_cloned = FALSE;
|
m_cloned = False;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPyEvtSelfRef::~wxPyEvtSelfRef() {
|
wxPyEvtSelfRef::~wxPyEvtSelfRef() {
|
||||||
@ -1519,7 +1519,7 @@ void wxPyEvtSelfRef::SetSelf(PyObject* self, bool clone) {
|
|||||||
m_self = self;
|
m_self = self;
|
||||||
if (clone) {
|
if (clone) {
|
||||||
Py_INCREF(m_self);
|
Py_INCREF(m_self);
|
||||||
m_cloned = TRUE;
|
m_cloned = True;
|
||||||
}
|
}
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
}
|
}
|
||||||
@ -1542,7 +1542,7 @@ wxPyEvent::wxPyEvent(int winid, wxEventType commandType)
|
|||||||
wxPyEvent::wxPyEvent(const wxPyEvent& evt)
|
wxPyEvent::wxPyEvent(const wxPyEvent& evt)
|
||||||
: wxEvent(evt)
|
: wxEvent(evt)
|
||||||
{
|
{
|
||||||
SetSelf(evt.m_self, TRUE);
|
SetSelf(evt.m_self, True);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1558,7 +1558,7 @@ wxPyCommandEvent::wxPyCommandEvent(wxEventType commandType, int id)
|
|||||||
wxPyCommandEvent::wxPyCommandEvent(const wxPyCommandEvent& evt)
|
wxPyCommandEvent::wxPyCommandEvent(const wxPyCommandEvent& evt)
|
||||||
: wxCommandEvent(evt)
|
: wxCommandEvent(evt)
|
||||||
{
|
{
|
||||||
SetSelf(evt.m_self, TRUE);
|
SetSelf(evt.m_self, True);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1671,13 +1671,13 @@ wxString* wxString_in_helper(PyObject* source) {
|
|||||||
wxString Py2wxString(PyObject* source)
|
wxString Py2wxString(PyObject* source)
|
||||||
{
|
{
|
||||||
wxString target;
|
wxString target;
|
||||||
bool doDecRef = FALSE;
|
bool doDecRef = False;
|
||||||
|
|
||||||
#if PYTHON_API_VERSION >= 1009 // Have Python unicode API
|
#if PYTHON_API_VERSION >= 1009 // Have Python unicode API
|
||||||
if (!PyString_Check(source) && !PyUnicode_Check(source)) {
|
if (!PyString_Check(source) && !PyUnicode_Check(source)) {
|
||||||
// Convert to String if not one already... (TODO: Unicode too?)
|
// Convert to String if not one already... (TODO: Unicode too?)
|
||||||
source = PyObject_Str(source);
|
source = PyObject_Str(source);
|
||||||
doDecRef = TRUE;
|
doDecRef = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
@ -1703,7 +1703,7 @@ wxString Py2wxString(PyObject* source)
|
|||||||
if (!PyString_Check(source)) {
|
if (!PyString_Check(source)) {
|
||||||
// Convert to String if not one already...
|
// Convert to String if not one already...
|
||||||
source = PyObject_Str(source);
|
source = PyObject_Str(source);
|
||||||
doDecRef = TRUE;
|
doDecRef = True;
|
||||||
}
|
}
|
||||||
target = wxString(PyString_AS_STRING(source), PyString_GET_SIZE(source));
|
target = wxString(PyString_AS_STRING(source), PyString_GET_SIZE(source));
|
||||||
#endif
|
#endif
|
||||||
@ -1827,24 +1827,24 @@ static inline bool wxPointFromObjects(PyObject* o1, PyObject* o2, wxPoint* point
|
|||||||
if (PyInt_Check(o1) && PyInt_Check(o2)) {
|
if (PyInt_Check(o1) && PyInt_Check(o2)) {
|
||||||
point->x = PyInt_AS_LONG(o1);
|
point->x = PyInt_AS_LONG(o1);
|
||||||
point->y = PyInt_AS_LONG(o2);
|
point->y = PyInt_AS_LONG(o2);
|
||||||
return true;
|
return True;
|
||||||
}
|
}
|
||||||
if (PyFloat_Check(o1) && PyFloat_Check(o2)) {
|
if (PyFloat_Check(o1) && PyFloat_Check(o2)) {
|
||||||
point->x = (int)PyFloat_AS_DOUBLE(o1);
|
point->x = (int)PyFloat_AS_DOUBLE(o1);
|
||||||
point->y = (int)PyFloat_AS_DOUBLE(o2);
|
point->y = (int)PyFloat_AS_DOUBLE(o2);
|
||||||
return true;
|
return True;
|
||||||
}
|
}
|
||||||
if (wxPySwigInstance_Check(o1) || wxPySwigInstance_Check(o2)) { // TODO: Why???
|
if (wxPySwigInstance_Check(o1) || wxPySwigInstance_Check(o2)) { // TODO: Why???
|
||||||
// Disallow instances because they can cause havok
|
// Disallow instances because they can cause havok
|
||||||
return false;
|
return False;
|
||||||
}
|
}
|
||||||
if (PyNumber_Check(o1) && PyNumber_Check(o2)) {
|
if (PyNumber_Check(o1) && PyNumber_Check(o2)) {
|
||||||
// I believe this excludes instances, so this should be safe without INCREFFing o1 and o2
|
// I believe this excludes instances, so this should be safe without INCREFFing o1 and o2
|
||||||
point->x = PyInt_AsLong(o1);
|
point->x = PyInt_AsLong(o1);
|
||||||
point->y = PyInt_AsLong(o2);
|
point->y = PyInt_AsLong(o2);
|
||||||
return true;
|
return True;
|
||||||
}
|
}
|
||||||
return false;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2070,7 +2070,7 @@ bool wxPy2int_seq_helper(PyObject* source, int* i1, int* i2) {
|
|||||||
PyObject *o1, *o2;
|
PyObject *o1, *o2;
|
||||||
|
|
||||||
if (!PySequence_Check(source) || PySequence_Length(source) != 2)
|
if (!PySequence_Check(source) || PySequence_Length(source) != 2)
|
||||||
return FALSE;
|
return False;
|
||||||
|
|
||||||
if (isFast) {
|
if (isFast) {
|
||||||
o1 = PySequence_Fast_GET_ITEM(source, 0);
|
o1 = PySequence_Fast_GET_ITEM(source, 0);
|
||||||
@ -2088,7 +2088,7 @@ bool wxPy2int_seq_helper(PyObject* source, int* i1, int* i2) {
|
|||||||
Py_DECREF(o1);
|
Py_DECREF(o1);
|
||||||
Py_DECREF(o2);
|
Py_DECREF(o2);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2097,7 +2097,7 @@ bool wxPy4int_seq_helper(PyObject* source, int* i1, int* i2, int* i3, int* i4) {
|
|||||||
PyObject *o1, *o2, *o3, *o4;
|
PyObject *o1, *o2, *o3, *o4;
|
||||||
|
|
||||||
if (!PySequence_Check(source) || PySequence_Length(source) != 4)
|
if (!PySequence_Check(source) || PySequence_Length(source) != 4)
|
||||||
return FALSE;
|
return False;
|
||||||
|
|
||||||
if (isFast) {
|
if (isFast) {
|
||||||
o1 = PySequence_Fast_GET_ITEM(source, 0);
|
o1 = PySequence_Fast_GET_ITEM(source, 0);
|
||||||
@ -2123,7 +2123,7 @@ bool wxPy4int_seq_helper(PyObject* source, int* i1, int* i2, int* i3, int* i4) {
|
|||||||
Py_DECREF(o3);
|
Py_DECREF(o3);
|
||||||
Py_DECREF(o4);
|
Py_DECREF(o4);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2135,13 +2135,13 @@ bool wxPySimple_typecheck(PyObject* source, const wxChar* classname, int seqLen)
|
|||||||
|
|
||||||
if (wxPySwigInstance_Check(source) &&
|
if (wxPySwigInstance_Check(source) &&
|
||||||
wxPyConvertSwigPtr(source, (void **)&ptr, classname))
|
wxPyConvertSwigPtr(source, (void **)&ptr, classname))
|
||||||
return true;
|
return True;
|
||||||
|
|
||||||
PyErr_Clear();
|
PyErr_Clear();
|
||||||
if (PySequence_Check(source) && PySequence_Length(source) == seqLen)
|
if (PySequence_Check(source) && PySequence_Length(source) == seqLen)
|
||||||
return true;
|
return True;
|
||||||
|
|
||||||
return false;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxSize_helper(PyObject* source, wxSize** obj)
|
bool wxSize_helper(PyObject* source, wxSize** obj)
|
||||||
@ -2165,7 +2165,7 @@ bool wxRealPoint_helper(PyObject* source, wxRealPoint** obj) {
|
|||||||
if (! wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxRealPoint")))
|
if (! wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxRealPoint")))
|
||||||
goto error;
|
goto error;
|
||||||
*obj = ptr;
|
*obj = ptr;
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
// otherwise a 2-tuple of floats is expected
|
// otherwise a 2-tuple of floats is expected
|
||||||
else if (PySequence_Check(source) && PyObject_Length(source) == 2) {
|
else if (PySequence_Check(source) && PyObject_Length(source) == 2) {
|
||||||
@ -2179,12 +2179,12 @@ bool wxRealPoint_helper(PyObject* source, wxRealPoint** obj) {
|
|||||||
**obj = wxRealPoint(PyFloat_AsDouble(o1), PyFloat_AsDouble(o2));
|
**obj = wxRealPoint(PyFloat_AsDouble(o1), PyFloat_AsDouble(o2));
|
||||||
Py_DECREF(o1);
|
Py_DECREF(o1);
|
||||||
Py_DECREF(o2);
|
Py_DECREF(o2);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
PyErr_SetString(PyExc_TypeError, "Expected a 2-tuple of floats or a wxRealPoint object.");
|
PyErr_SetString(PyExc_TypeError, "Expected a 2-tuple of floats or a wxRealPoint object.");
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2197,7 +2197,7 @@ bool wxRect_helper(PyObject* source, wxRect** obj) {
|
|||||||
if (! wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxRect")))
|
if (! wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxRect")))
|
||||||
goto error;
|
goto error;
|
||||||
*obj = ptr;
|
*obj = ptr;
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
// otherwise a 4-tuple of integers is expected
|
// otherwise a 4-tuple of integers is expected
|
||||||
else if (PySequence_Check(source) && PyObject_Length(source) == 4) {
|
else if (PySequence_Check(source) && PyObject_Length(source) == 4) {
|
||||||
@ -2219,12 +2219,12 @@ bool wxRect_helper(PyObject* source, wxRect** obj) {
|
|||||||
Py_DECREF(o2);
|
Py_DECREF(o2);
|
||||||
Py_DECREF(o3);
|
Py_DECREF(o3);
|
||||||
Py_DECREF(o4);
|
Py_DECREF(o4);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
PyErr_SetString(PyExc_TypeError, "Expected a 4-tuple of integers or a wxRect object.");
|
PyErr_SetString(PyExc_TypeError, "Expected a 4-tuple of integers or a wxRect object.");
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2237,7 +2237,7 @@ bool wxColour_helper(PyObject* source, wxColour** obj) {
|
|||||||
if (! wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxColour")))
|
if (! wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxColour")))
|
||||||
goto error;
|
goto error;
|
||||||
*obj = ptr;
|
*obj = ptr;
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
// otherwise check for a string
|
// otherwise check for a string
|
||||||
else if (PyString_Check(source) || PyUnicode_Check(source)) {
|
else if (PyString_Check(source) || PyUnicode_Check(source)) {
|
||||||
@ -2250,11 +2250,11 @@ bool wxColour_helper(PyObject* source, wxColour** obj) {
|
|||||||
spec.Mid(5,2).ToLong(&blue, 16);
|
spec.Mid(5,2).ToLong(&blue, 16);
|
||||||
|
|
||||||
**obj = wxColour(red, green, blue);
|
**obj = wxColour(red, green, blue);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
else { // it's a colour name
|
else { // it's a colour name
|
||||||
**obj = wxColour(spec);
|
**obj = wxColour(spec);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// last chance: 3-tuple of integers is expected
|
// last chance: 3-tuple of integers is expected
|
||||||
@ -2272,25 +2272,25 @@ bool wxColour_helper(PyObject* source, wxColour** obj) {
|
|||||||
Py_DECREF(o1);
|
Py_DECREF(o1);
|
||||||
Py_DECREF(o2);
|
Py_DECREF(o2);
|
||||||
Py_DECREF(o3);
|
Py_DECREF(o3);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"Expected a wxColour object or a string containing a colour name or '#RRGGBB'.");
|
"Expected a wxColour object or a string containing a colour name or '#RRGGBB'.");
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool wxColour_typecheck(PyObject* source) {
|
bool wxColour_typecheck(PyObject* source) {
|
||||||
|
|
||||||
if (wxPySimple_typecheck(source, wxT("wxColour"), 3))
|
if (wxPySimple_typecheck(source, wxT("wxColour"), 3))
|
||||||
return true;
|
return True;
|
||||||
|
|
||||||
if (PyString_Check(source) || PyUnicode_Check(source))
|
if (PyString_Check(source) || PyUnicode_Check(source))
|
||||||
return true;
|
return True;
|
||||||
|
|
||||||
return false;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2302,7 +2302,7 @@ bool wxPoint2D_helper(PyObject* source, wxPoint2D** obj) {
|
|||||||
if (! wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxPoint2D")))
|
if (! wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxPoint2D")))
|
||||||
goto error;
|
goto error;
|
||||||
*obj = ptr;
|
*obj = ptr;
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
// otherwise a length-2 sequence of floats is expected
|
// otherwise a length-2 sequence of floats is expected
|
||||||
if (PySequence_Check(source) && PySequence_Length(source) == 2) {
|
if (PySequence_Check(source) && PySequence_Length(source) == 2) {
|
||||||
@ -2317,11 +2317,11 @@ bool wxPoint2D_helper(PyObject* source, wxPoint2D** obj) {
|
|||||||
**obj = wxPoint2D(PyFloat_AsDouble(o1), PyFloat_AsDouble(o2));
|
**obj = wxPoint2D(PyFloat_AsDouble(o1), PyFloat_AsDouble(o2));
|
||||||
Py_DECREF(o1);
|
Py_DECREF(o1);
|
||||||
Py_DECREF(o2);
|
Py_DECREF(o2);
|
||||||
return TRUE;
|
return True;
|
||||||
}
|
}
|
||||||
error:
|
error:
|
||||||
PyErr_SetString(PyExc_TypeError, "Expected a 2-tuple of floats or a wxPoint2D object.");
|
PyErr_SetString(PyExc_TypeError, "Expected a 2-tuple of floats or a wxPoint2D object.");
|
||||||
return FALSE;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ public:
|
|||||||
|
|
||||||
wxString GetName();
|
wxString GetName();
|
||||||
bool HasParam(const wxString& par);
|
bool HasParam(const wxString& par);
|
||||||
wxString GetParam(const wxString& par, int with_commas = FALSE);
|
wxString GetParam(const wxString& par, int with_commas = False);
|
||||||
|
|
||||||
// Can't do this one as-is, but GetParam should be enough...
|
// Can't do this one as-is, but GetParam should be enough...
|
||||||
//int ScanParam(const wxString& par, const char *format, void* param);
|
//int ScanParam(const wxString& par, const char *format, void* param);
|
||||||
@ -508,7 +508,7 @@ public:
|
|||||||
// Can the line be broken before this cell?
|
// Can the line be broken before this cell?
|
||||||
bool IsLinebreakAllowed() const;
|
bool IsLinebreakAllowed() const;
|
||||||
|
|
||||||
// Returns true for simple == terminal cells, i.e. not composite ones.
|
// Returns True for simple == terminal cells, i.e. not composite ones.
|
||||||
// This if for internal usage only and may disappear in future versions!
|
// This if for internal usage only and may disappear in future versions!
|
||||||
bool IsTerminalCell() const;
|
bool IsTerminalCell() const;
|
||||||
|
|
||||||
@ -532,9 +532,9 @@ public:
|
|||||||
// (if it is the root, depth is 0)
|
// (if it is the root, depth is 0)
|
||||||
unsigned GetDepth() const;
|
unsigned GetDepth() const;
|
||||||
|
|
||||||
// Returns true if the cell appears before 'cell' in natural order of
|
// Returns True if the cell appears before 'cell' in natural order of
|
||||||
// cells (= as they are read). If cell A is (grand)parent of cell B,
|
// cells (= as they are read). If cell A is (grand)parent of cell B,
|
||||||
// then both A.IsBefore(B) and B.IsBefore(A) always return true.
|
// then both A.IsBefore(B) and B.IsBefore(A) always return True.
|
||||||
bool IsBefore(wxHtmlCell *cell) const;
|
bool IsBefore(wxHtmlCell *cell) const;
|
||||||
|
|
||||||
// Converts the cell into text representation. If sel != NULL then
|
// Converts the cell into text representation. If sel != NULL then
|
||||||
@ -610,9 +610,9 @@ class wxPyHtmlFilter : public wxHtmlFilter {
|
|||||||
public:
|
public:
|
||||||
wxPyHtmlFilter() : wxHtmlFilter() {}
|
wxPyHtmlFilter() : wxHtmlFilter() {}
|
||||||
|
|
||||||
// returns TRUE if this filter is able to open&read given file
|
// returns True if this filter is able to open&read given file
|
||||||
virtual bool CanRead(const wxFSFile& file) const {
|
virtual bool CanRead(const wxFSFile& file) const {
|
||||||
bool rval = FALSE;
|
bool rval = False;
|
||||||
bool found;
|
bool found;
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
if ((found = wxPyCBH_findCallback(m_myInst, "CanRead"))) {
|
if ((found = wxPyCBH_findCallback(m_myInst, "CanRead"))) {
|
||||||
@ -790,7 +790,7 @@ public:
|
|||||||
// Set HTML page and display it. !! source is HTML document itself,
|
// Set HTML page and display it. !! source is HTML document itself,
|
||||||
// it is NOT address/filename of HTML document. If you want to
|
// it is NOT address/filename of HTML document. If you want to
|
||||||
// specify document location, use LoadPage() istead
|
// specify document location, use LoadPage() istead
|
||||||
// Return value : FALSE if an error occured, TRUE otherwise
|
// Return value : False if an error occured, True otherwise
|
||||||
bool SetPage(const wxString& source);
|
bool SetPage(const wxString& source);
|
||||||
|
|
||||||
// Load HTML page from given location. Location can be either
|
// Load HTML page from given location. Location can be either
|
||||||
@ -851,7 +851,7 @@ public:
|
|||||||
void WriteCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
|
void WriteCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
|
||||||
|
|
||||||
// Goes to previous/next page (in browsing history)
|
// Goes to previous/next page (in browsing history)
|
||||||
// Returns TRUE if successful, FALSE otherwise
|
// Returns True if successful, False otherwise
|
||||||
bool HistoryBack();
|
bool HistoryBack();
|
||||||
bool HistoryForward();
|
bool HistoryForward();
|
||||||
bool HistoryCanBack();
|
bool HistoryCanBack();
|
||||||
@ -898,7 +898,7 @@ public:
|
|||||||
void SetSize(int width, int height);
|
void SetSize(int width, int height);
|
||||||
void SetHtmlText(const wxString& html,
|
void SetHtmlText(const wxString& html,
|
||||||
const wxString& basepath = wxPyEmptyString,
|
const wxString& basepath = wxPyEmptyString,
|
||||||
bool isdir = TRUE);
|
bool isdir = True);
|
||||||
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
|
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
|
||||||
%extend {
|
%extend {
|
||||||
void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
|
void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
|
||||||
@ -909,7 +909,7 @@ public:
|
|||||||
delete [] temp;
|
delete [] temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int Render(int x, int y, int from = 0, int dont_render = FALSE, int to = INT_MAX,
|
int Render(int x, int y, int from = 0, int dont_render = False, int to = INT_MAX,
|
||||||
//int *known_pagebreaks = NULL, int number_of_pages = 0
|
//int *known_pagebreaks = NULL, int number_of_pages = 0
|
||||||
int* choices=NULL, int LCOUNT = 0
|
int* choices=NULL, int LCOUNT = 0
|
||||||
);
|
);
|
||||||
@ -933,7 +933,7 @@ public:
|
|||||||
|
|
||||||
void SetHtmlText(const wxString& html,
|
void SetHtmlText(const wxString& html,
|
||||||
const wxString &basepath = wxPyEmptyString,
|
const wxString &basepath = wxPyEmptyString,
|
||||||
bool isdir = TRUE);
|
bool isdir = True);
|
||||||
void SetHtmlFile(const wxString &htmlfile);
|
void SetHtmlFile(const wxString &htmlfile);
|
||||||
void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
|
void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
|
||||||
void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
|
void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
|
||||||
@ -1120,7 +1120,7 @@ public:
|
|||||||
|
|
||||||
void SetTitleFormat(const wxString& format);
|
void SetTitleFormat(const wxString& format);
|
||||||
void SetTempDir(const wxString& path);
|
void SetTempDir(const wxString& path);
|
||||||
bool AddBook(const wxString& book, int show_wait_msg = FALSE);
|
bool AddBook(const wxString& book, int show_wait_msg = False);
|
||||||
void Display(const wxString& x);
|
void Display(const wxString& x);
|
||||||
%name(DisplayID) void Display(int id);
|
%name(DisplayID) void Display(int id);
|
||||||
void DisplayContents();
|
void DisplayContents();
|
||||||
|
@ -37,140 +37,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// %typemap(python,build) int LCOUNT {
|
|
||||||
// if (_in_choices) {
|
|
||||||
// $target = PyList_Size(_in_choices);
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// $target = 0;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// %typemap(python,in) byte* choices {
|
|
||||||
// $target = byte_LIST_helper($source);
|
|
||||||
// if ($target == NULL) {
|
|
||||||
// return NULL;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// %typemap(python,freearg) byte* choices {
|
|
||||||
// delete [] $source;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // wxDash is a signed char
|
|
||||||
// %typemap(python,in) wxDash* choices {
|
|
||||||
// $target = (wxDash*)byte_LIST_helper($source);
|
|
||||||
// if ($target == NULL) {
|
|
||||||
// return NULL;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// %typemap(python,freearg) wxDash* choices {
|
|
||||||
// delete [] $source;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// %typemap(python,in) int* choices {
|
|
||||||
// $target = int_LIST_helper($source);
|
|
||||||
// if ($target == NULL) {
|
|
||||||
// return NULL;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// %typemap(python,freearg) int* choices {
|
|
||||||
// delete [] $source;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// %typemap(python,in) long* choices {
|
|
||||||
// $target = long_LIST_helper($source);
|
|
||||||
// if ($target == NULL) {
|
|
||||||
// return NULL;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// %typemap(python,freearg) long* choices {
|
|
||||||
// delete [] $source;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// %typemap(python,in) unsigned long* choices {
|
|
||||||
// $target = (unsigned long*)long_LIST_helper($source);
|
|
||||||
// if ($target == NULL) {
|
|
||||||
// return NULL;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// %typemap(python,freearg) unsigned long* choices {
|
|
||||||
// delete [] $source;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// %typemap(python,in) char** choices {
|
|
||||||
// $target = string_LIST_helper($source);
|
|
||||||
// if ($target == NULL) {
|
|
||||||
// return NULL;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// %typemap(python,freearg) char** choices {
|
|
||||||
// delete [] $source;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// %typemap(python,in) wxBitmap** choices {
|
|
||||||
// $target = wxBitmap_LIST_helper($source);
|
|
||||||
// if ($target == NULL) {
|
|
||||||
// return NULL;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// %typemap(python,freearg) wxBitmap** choices {
|
|
||||||
// delete [] $source;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// %typemap(python,in) wxString* choices {
|
|
||||||
// $target = wxString_LIST_helper($source);
|
|
||||||
// if ($target == NULL) {
|
|
||||||
// return NULL;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// %typemap(python,freearg) wxString* choices {
|
|
||||||
// delete [] $source;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// %typemap(python,in) wxAcceleratorEntry* choices {
|
|
||||||
// $target = wxAcceleratorEntry_LIST_helper($source);
|
|
||||||
// if ($target == NULL) {
|
|
||||||
// return NULL;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// %typemap(python,freearg) wxAcceleratorEntry* choices {
|
|
||||||
// delete [] $source;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// %typemap(python,build) int PCOUNT {
|
|
||||||
// $target = NPOINTS;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// %typemap(python,in) wxPoint* points (int NPOINTS) {
|
|
||||||
// $target = wxPoint_LIST_helper($source, &NPOINTS);
|
|
||||||
// if ($target == NULL) {
|
|
||||||
// return NULL;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// %typemap(python,freearg) wxPoint* points {
|
|
||||||
// delete [] $source;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
// wxString typemaps
|
||||||
|
|
||||||
|
|
||||||
%typemap(in) wxString& (bool temp=false) {
|
%typemap(in) wxString& (bool temp=False) {
|
||||||
$1 = wxString_in_helper($input);
|
$1 = wxString_in_helper($input);
|
||||||
if ($1 == NULL) SWIG_fail;
|
if ($1 == NULL) SWIG_fail;
|
||||||
temp = true;
|
temp = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
%typemap(freearg) wxString& {
|
%typemap(freearg) wxString& {
|
||||||
if (temp$argnum)
|
if (temp$argnum)
|
||||||
delete $1;
|
delete $1;
|
||||||
@ -186,7 +61,7 @@
|
|||||||
%#endif
|
%#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
%typemap(python, out) wxString* {
|
%typemap(out) wxString* {
|
||||||
%#if wxUSE_UNICODE
|
%#if wxUSE_UNICODE
|
||||||
$result = PyUnicode_FromWideChar($1->c_str(), $1->Len());
|
$result = PyUnicode_FromWideChar($1->c_str(), $1->Len());
|
||||||
%#else
|
%#else
|
||||||
@ -194,7 +69,7 @@
|
|||||||
%#endif
|
%#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
%typemap(python, varout) wxString {
|
%typemap(varout) wxString {
|
||||||
%#if wxUSE_UNICODE
|
%#if wxUSE_UNICODE
|
||||||
$result = PyUnicode_FromWideChar($1.c_str(), $1.Len());
|
$result = PyUnicode_FromWideChar($1.c_str(), $1.Len());
|
||||||
%#else
|
%#else
|
||||||
@ -203,6 +78,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
%typemap(in) wxString {
|
||||||
|
wxString* sptr = wxString_in_helper($input);
|
||||||
|
if (sptr == NULL) SWIG_fail;
|
||||||
|
$1 = *sptr;
|
||||||
|
delete sptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// //---------------------------------------------------------------------------
|
// //---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -58,12 +58,12 @@ class wxWizardEvent : public wxNotifyEvent
|
|||||||
public:
|
public:
|
||||||
wxWizardEvent(wxEventType type = wxEVT_NULL,
|
wxWizardEvent(wxEventType type = wxEVT_NULL,
|
||||||
int id = -1,
|
int id = -1,
|
||||||
bool direction = TRUE,
|
bool direction = True,
|
||||||
wxWizardPage* page = NULL);
|
wxWizardPage* page = NULL);
|
||||||
|
|
||||||
// for EVT_WIZARD_PAGE_CHANGING, return TRUE if we're going forward or
|
// for EVT_WIZARD_PAGE_CHANGING, return True if we're going forward or
|
||||||
// FALSE otherwise and for EVT_WIZARD_PAGE_CHANGED return TRUE if we came
|
// False otherwise and for EVT_WIZARD_PAGE_CHANGED return True if we came
|
||||||
// from the previous page and FALSE if we returned from the next one
|
// from the previous page and False if we returned from the next one
|
||||||
// (this function doesn't make sense for CANCEL events)
|
// (this function doesn't make sense for CANCEL events)
|
||||||
bool GetDirection() const { return m_direction; }
|
bool GetDirection() const { return m_direction; }
|
||||||
|
|
||||||
@ -319,8 +319,8 @@ public:
|
|||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
|
|
||||||
// executes the wizard starting from the given page, returns TRUE if it was
|
// executes the wizard starting from the given page, returns True if it was
|
||||||
// successfully finished, FALSE if user cancelled it
|
// successfully finished, False if user cancelled it
|
||||||
virtual bool RunWizard(wxWizardPage *firstPage);
|
virtual bool RunWizard(wxWizardPage *firstPage);
|
||||||
|
|
||||||
// get the current page (NULL if RunWizard() isn't running)
|
// get the current page (NULL if RunWizard() isn't running)
|
||||||
@ -355,9 +355,9 @@ public:
|
|||||||
bool IsRunning() const { return m_page != NULL; }
|
bool IsRunning() const { return m_page != NULL; }
|
||||||
|
|
||||||
// show the prev/next page, but call TransferDataFromWindow on the current
|
// show the prev/next page, but call TransferDataFromWindow on the current
|
||||||
// page first and return FALSE without changing the page if
|
// page first and return False without changing the page if
|
||||||
// TransferDataFromWindow() returns FALSE - otherwise, returns TRUE
|
// TransferDataFromWindow() returns False - otherwise, returns True
|
||||||
bool ShowPage(wxWizardPage *page, bool goingForward = TRUE);
|
bool ShowPage(wxWizardPage *page, bool goingForward = True);
|
||||||
|
|
||||||
bool HasNextPage(wxWizardPage* page);
|
bool HasNextPage(wxWizardPage* page);
|
||||||
bool HasPrevPage(wxWizardPage* page);
|
bool HasPrevPage(wxWizardPage* page);
|
||||||
|
Loading…
Reference in New Issue
Block a user