Added __nonzero__ method to more classes that have a Ok or IsOk

method.  This allows code like "if obj: ..." to be the same as
"if obj.Ok: ..."


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-04-10 19:38:11 +00:00
parent d2d844fa99
commit 88cd49f777
6 changed files with 33 additions and 6 deletions

View File

@@ -107,6 +107,7 @@ public:
void SetPrinterTranslation(long x, long y);
void SetPrintMode(wxPrintMode printMode);
%pragma(python) addtoclass = "def __nonzero__(self): return self.Ok()"
};
//----------------------------------------------------------------------
@@ -181,6 +182,8 @@ public:
void SetPaperId(wxPaperSize id);
void SetPaperSize(const wxSize& size);
void SetPrintData(const wxPrintData& printData);
%pragma(python) addtoclass = "def __nonzero__(self): return self.Ok()"
};
@@ -231,6 +234,8 @@ public:
void SetPrintToFile(bool flag);
void SetSetupDialog(bool flag);
void SetToPage(int page);
%pragma(python) addtoclass = "def __nonzero__(self): return self.Ok()"
};
@@ -386,6 +391,8 @@ public:
void SetFrame(wxFrame *frame);
void SetPrintout(wxPyPrintout *printout);
void SetZoom(int percent);
%pragma(python) addtoclass = "def __nonzero__(self): return self.Ok()"
};
//----------------------------------------------------------------------