X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da0ddbd6df973f6c32b0ebb65e4e15514a8cdcf0..0c8392cac2d36d0d211432e71d3b24d3d93c22db:/wxPython/src/mac/htmlhelp.py diff --git a/wxPython/src/mac/htmlhelp.py b/wxPython/src/mac/htmlhelp.py index e5b382edfd..778663be9f 100644 --- a/wxPython/src/mac/htmlhelp.py +++ b/wxPython/src/mac/htmlhelp.py @@ -9,6 +9,8 @@ from windows import * from gdi import * +from fonts import * + from clip_dnd import * from events import * @@ -40,48 +42,48 @@ from printfw import * from sizers import * from filesys import * -class wxHtmlBookRecordPtr(wxObjectPtr): +class wxHtmlBookRecordPtr : def __init__(self,this): self.this = this self.thisown = 0 def GetBookFile(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlBookRecord_GetBookFile,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlBookRecord_GetBookFile(self, *_args, **_kwargs) return val def GetTitle(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlBookRecord_GetTitle,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlBookRecord_GetTitle(self, *_args, **_kwargs) return val def GetStart(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlBookRecord_GetStart,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlBookRecord_GetStart(self, *_args, **_kwargs) return val def GetBasePath(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlBookRecord_GetBasePath,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlBookRecord_GetBasePath(self, *_args, **_kwargs) return val def SetContentsRange(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlBookRecord_SetContentsRange,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlBookRecord_SetContentsRange(self, *_args, **_kwargs) return val def GetContentsStart(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlBookRecord_GetContentsStart,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlBookRecord_GetContentsStart(self, *_args, **_kwargs) return val def GetContentsEnd(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlBookRecord_GetContentsEnd,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlBookRecord_GetContentsEnd(self, *_args, **_kwargs) return val def SetTitle(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlBookRecord_SetTitle,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlBookRecord_SetTitle(self, *_args, **_kwargs) return val def SetBasePath(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlBookRecord_SetBasePath,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlBookRecord_SetBasePath(self, *_args, **_kwargs) return val def SetStart(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlBookRecord_SetStart,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlBookRecord_SetStart(self, *_args, **_kwargs) return val def GetFullPath(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlBookRecord_GetFullPath,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlBookRecord_GetFullPath(self, *_args, **_kwargs) return val def __repr__(self): - return "" % (self.this,) + return "<%s.%s instance; proxy of C++ wxHtmlBookRecord instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) class wxHtmlBookRecord(wxHtmlBookRecordPtr): def __init__(self,*_args,**_kwargs): - self.this = apply(htmlhelpc.new_wxHtmlBookRecord,_args,_kwargs) + self.this = htmlhelpc.new_wxHtmlBookRecord(*_args,**_kwargs) self.thisown = 1 @@ -91,37 +93,24 @@ class wxHtmlContentsItemPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __setattr__(self,name,value): - if name == "m_Level" : - htmlhelpc.wxHtmlContentsItem_m_Level_set(self,value) - return - if name == "m_ID" : - htmlhelpc.wxHtmlContentsItem_m_ID_set(self,value) - return - if name == "m_Name" : - htmlhelpc.wxHtmlContentsItem_m_Name_set(self,value) - return - if name == "m_Page" : - htmlhelpc.wxHtmlContentsItem_m_Page_set(self,value) - return - if name == "m_Book" : - htmlhelpc.wxHtmlContentsItem_m_Book_set(self,value.this) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "m_Level" : - return htmlhelpc.wxHtmlContentsItem_m_Level_get(self) - if name == "m_ID" : - return htmlhelpc.wxHtmlContentsItem_m_ID_get(self) - if name == "m_Name" : - return htmlhelpc.wxHtmlContentsItem_m_Name_get(self) - if name == "m_Page" : - return htmlhelpc.wxHtmlContentsItem_m_Page_get(self) - if name == "m_Book" : - return wxHtmlBookRecordPtr(htmlhelpc.wxHtmlContentsItem_m_Book_get(self)) - raise AttributeError,name + def GetLevel(self, *_args, **_kwargs): + val = htmlhelpc.wxHtmlContentsItem_GetLevel(self, *_args, **_kwargs) + return val + def GetID(self, *_args, **_kwargs): + val = htmlhelpc.wxHtmlContentsItem_GetID(self, *_args, **_kwargs) + return val + def GetName(self, *_args, **_kwargs): + val = htmlhelpc.wxHtmlContentsItem_GetName(self, *_args, **_kwargs) + return val + def GetPage(self, *_args, **_kwargs): + val = htmlhelpc.wxHtmlContentsItem_GetPage(self, *_args, **_kwargs) + return val + def GetBook(self, *_args, **_kwargs): + val = htmlhelpc.wxHtmlContentsItem_GetBook(self, *_args, **_kwargs) + if val: val = wxHtmlBookRecordPtr(val) + return val def __repr__(self): - return "" % (self.this,) + return "<%s.%s instance; proxy of C++ wxHtmlContentsItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) class wxHtmlContentsItem(wxHtmlContentsItemPtr): def __init__(self,this): self.this = this @@ -134,26 +123,26 @@ class wxHtmlSearchStatusPtr : self.this = this self.thisown = 0 def Search(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlSearchStatus_Search,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlSearchStatus_Search(self, *_args, **_kwargs) return val def IsActive(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlSearchStatus_IsActive,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlSearchStatus_IsActive(self, *_args, **_kwargs) return val def GetCurIndex(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlSearchStatus_GetCurIndex,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlSearchStatus_GetCurIndex(self, *_args, **_kwargs) return val def GetMaxIndex(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlSearchStatus_GetMaxIndex,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlSearchStatus_GetMaxIndex(self, *_args, **_kwargs) return val def GetName(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlSearchStatus_GetName,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlSearchStatus_GetName(self, *_args, **_kwargs) return val def GetContentsItem(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlSearchStatus_GetContentsItem,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlSearchStatus_GetContentsItem(self, *_args, **_kwargs) if val: val = wxHtmlContentsItemPtr(val) return val def __repr__(self): - return "" % (self.this,) + return "<%s.%s instance; proxy of C++ wxHtmlSearchStatus instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) class wxHtmlSearchStatus(wxHtmlSearchStatusPtr): def __init__(self,this): self.this = this @@ -165,43 +154,46 @@ class wxHtmlHelpDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,htmlhelpc=htmlhelpc): - if self.thisown == 1 : - htmlhelpc.delete_wxHtmlHelpData(self) + def __del__(self, delfunc=htmlhelpc.delete_wxHtmlHelpData): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetTempDir(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpData_SetTempDir,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpData_SetTempDir(self, *_args, **_kwargs) return val def AddBook(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpData_AddBook,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpData_AddBook(self, *_args, **_kwargs) return val def FindPageByName(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpData_FindPageByName,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpData_FindPageByName(self, *_args, **_kwargs) return val def FindPageById(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpData_FindPageById,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpData_FindPageById(self, *_args, **_kwargs) return val def GetBookRecArray(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpData_GetBookRecArray,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpData_GetBookRecArray(self, *_args, **_kwargs) return val def GetContents(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpData_GetContents,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpData_GetContents(self, *_args, **_kwargs) if val: val = wxHtmlContentsItemPtr(val) return val def GetContentsCnt(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpData_GetContentsCnt,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpData_GetContentsCnt(self, *_args, **_kwargs) return val def GetIndex(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpData_GetIndex,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpData_GetIndex(self, *_args, **_kwargs) if val: val = wxHtmlContentsItemPtr(val) return val def GetIndexCnt(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpData_GetIndexCnt,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpData_GetIndexCnt(self, *_args, **_kwargs) return val def __repr__(self): - return "" % (self.this,) + return "<%s.%s instance; proxy of C++ wxHtmlHelpData instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) class wxHtmlHelpData(wxHtmlHelpDataPtr): def __init__(self,*_args,**_kwargs): - self.this = apply(htmlhelpc.new_wxHtmlHelpData,_args,_kwargs) + self.this = htmlhelpc.new_wxHtmlHelpData(*_args,**_kwargs) self.thisown = 1 @@ -212,41 +204,41 @@ class wxHtmlHelpFramePtr(wxFramePtr): self.this = this self.thisown = 0 def GetData(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpFrame_GetData,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpFrame_GetData(self, *_args, **_kwargs) if val: val = wxHtmlHelpDataPtr(val) return val def SetTitleFormat(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpFrame_SetTitleFormat,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpFrame_SetTitleFormat(self, *_args, **_kwargs) return val def Display(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpFrame_Display,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpFrame_Display(self, *_args, **_kwargs) return val def DisplayID(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpFrame_DisplayID,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpFrame_DisplayID(self, *_args, **_kwargs) return val def DisplayContents(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpFrame_DisplayContents,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpFrame_DisplayContents(self, *_args, **_kwargs) return val def DisplayIndex(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpFrame_DisplayIndex,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpFrame_DisplayIndex(self, *_args, **_kwargs) return val def KeywordSearch(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpFrame_KeywordSearch,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpFrame_KeywordSearch(self, *_args, **_kwargs) return val def UseConfig(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpFrame_UseConfig,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpFrame_UseConfig(self, *_args, **_kwargs) return val def ReadCustomization(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpFrame_ReadCustomization,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpFrame_ReadCustomization(self, *_args, **_kwargs) return val def WriteCustomization(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpFrame_WriteCustomization,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpFrame_WriteCustomization(self, *_args, **_kwargs) return val def __repr__(self): - return "" % (self.this,) + return "<%s.%s instance; proxy of C++ wxHtmlHelpFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) class wxHtmlHelpFrame(wxHtmlHelpFramePtr): def __init__(self,*_args,**_kwargs): - self.this = apply(htmlhelpc.new_wxHtmlHelpFrame,_args,_kwargs) + self.this = htmlhelpc.new_wxHtmlHelpFrame(*_args,**_kwargs) self.thisown = 1 self._setOORInfo(self) @@ -257,51 +249,54 @@ class wxHtmlHelpControllerPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,htmlhelpc=htmlhelpc): - if self.thisown == 1 : - htmlhelpc.delete_wxHtmlHelpController(self) + def __del__(self, delfunc=htmlhelpc.delete_wxHtmlHelpController): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetTitleFormat(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpController_SetTitleFormat,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpController_SetTitleFormat(self, *_args, **_kwargs) return val def SetTempDir(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpController_SetTempDir,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpController_SetTempDir(self, *_args, **_kwargs) return val def AddBook(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpController_AddBook,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpController_AddBook(self, *_args, **_kwargs) return val def Display(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpController_Display,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpController_Display(self, *_args, **_kwargs) return val def DisplayID(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpController_DisplayID,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpController_DisplayID(self, *_args, **_kwargs) return val def DisplayContents(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpController_DisplayContents,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpController_DisplayContents(self, *_args, **_kwargs) return val def DisplayIndex(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpController_DisplayIndex,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpController_DisplayIndex(self, *_args, **_kwargs) return val def KeywordSearch(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpController_KeywordSearch,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpController_KeywordSearch(self, *_args, **_kwargs) return val def UseConfig(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpController_UseConfig,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpController_UseConfig(self, *_args, **_kwargs) return val def ReadCustomization(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpController_ReadCustomization,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpController_ReadCustomization(self, *_args, **_kwargs) return val def WriteCustomization(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpController_WriteCustomization,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpController_WriteCustomization(self, *_args, **_kwargs) return val def GetFrame(self, *_args, **_kwargs): - val = apply(htmlhelpc.wxHtmlHelpController_GetFrame,(self,) + _args, _kwargs) + val = htmlhelpc.wxHtmlHelpController_GetFrame(self, *_args, **_kwargs) if val: val = wxHtmlHelpFramePtr(val) return val def __repr__(self): - return "" % (self.this,) + return "<%s.%s instance; proxy of C++ wxHtmlHelpController instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this) class wxHtmlHelpController(wxHtmlHelpControllerPtr): def __init__(self,*_args,**_kwargs): - self.this = apply(htmlhelpc.new_wxHtmlHelpController,_args,_kwargs) + self.this = htmlhelpc.new_wxHtmlHelpController(*_args,**_kwargs) self.thisown = 1 self._setOORInfo(self)