X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..e04fe03d0f0d5cda7f9c2712ed3a65988839002c:/wxPython/src/gtk/htmlhelp.py diff --git a/wxPython/src/gtk/htmlhelp.py b/wxPython/src/gtk/htmlhelp.py index a3634b13aa..778663be9f 100644 --- a/wxPython/src/gtk/htmlhelp.py +++ b/wxPython/src/gtk/htmlhelp.py @@ -9,10 +9,16 @@ from windows import * from gdi import * +from fonts import * + from clip_dnd import * from events import * +from streams import * + +from utils import * + from mdi import * from frames import * @@ -34,81 +40,50 @@ from image import * from printfw import * from sizers import * -class wxHtmlHelpFrameCfgPtr : - def __init__(self,this): - self.this = this - self.thisown = 0 - def __setattr__(self,name,value): - if name == "x" : - htmlhelpc.wxHtmlHelpFrameCfg_x_set(self,value) - return - if name == "y" : - htmlhelpc.wxHtmlHelpFrameCfg_y_set(self,value) - return - if name == "w" : - htmlhelpc.wxHtmlHelpFrameCfg_w_set(self,value) - return - if name == "h" : - htmlhelpc.wxHtmlHelpFrameCfg_h_set(self,value) - return - if name == "sashpos" : - htmlhelpc.wxHtmlHelpFrameCfg_sashpos_set(self,value) - return - if name == "navig_on" : - htmlhelpc.wxHtmlHelpFrameCfg_navig_on_set(self,value) - return - self.__dict__[name] = value - def __getattr__(self,name): - if name == "x" : - return htmlhelpc.wxHtmlHelpFrameCfg_x_get(self) - if name == "y" : - return htmlhelpc.wxHtmlHelpFrameCfg_y_get(self) - if name == "w" : - return htmlhelpc.wxHtmlHelpFrameCfg_w_get(self) - if name == "h" : - return htmlhelpc.wxHtmlHelpFrameCfg_h_get(self) - if name == "sashpos" : - return htmlhelpc.wxHtmlHelpFrameCfg_sashpos_get(self) - if name == "navig_on" : - return htmlhelpc.wxHtmlHelpFrameCfg_navig_on_get(self) - raise AttributeError,name - def __repr__(self): - return "" % (self.this,) -class wxHtmlHelpFrameCfg(wxHtmlHelpFrameCfgPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(htmlhelpc.new_wxHtmlHelpFrameCfg,_args,_kwargs) - self.thisown = 1 - - - +from filesys import * class wxHtmlBookRecordPtr : def __init__(self,this): self.this = this self.thisown = 0 + def 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 = htmlhelpc.wxHtmlBookRecord_SetTitle(self, *_args, **_kwargs) + return val + def SetBasePath(self, *_args, **_kwargs): + val = htmlhelpc.wxHtmlBookRecord_SetBasePath(self, *_args, **_kwargs) + return val + def SetStart(self, *_args, **_kwargs): + val = htmlhelpc.wxHtmlBookRecord_SetStart(self, *_args, **_kwargs) + return val + def 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 @@ -118,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 @@ -161,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 @@ -192,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 @@ -239,42 +204,43 @@ 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) @@ -283,52 +249,56 @@ 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) @@ -341,16 +311,12 @@ class wxHtmlHelpController(wxHtmlHelpControllerPtr): #-------------- VARIABLE WRAPPERS ------------------ -wxID_HTML_PANEL = htmlhelpc.wxID_HTML_PANEL -wxID_HTML_BACK = htmlhelpc.wxID_HTML_BACK -wxID_HTML_FORWARD = htmlhelpc.wxID_HTML_FORWARD -wxID_HTML_TREECTRL = htmlhelpc.wxID_HTML_TREECTRL -wxID_HTML_INDEXPAGE = htmlhelpc.wxID_HTML_INDEXPAGE -wxID_HTML_INDEXLIST = htmlhelpc.wxID_HTML_INDEXLIST -wxID_HTML_NOTEBOOK = htmlhelpc.wxID_HTML_NOTEBOOK -wxID_HTML_SEARCHPAGE = htmlhelpc.wxID_HTML_SEARCHPAGE -wxID_HTML_SEARCHTEXT = htmlhelpc.wxID_HTML_SEARCHTEXT -wxID_HTML_SEARCHLIST = htmlhelpc.wxID_HTML_SEARCHLIST -wxID_HTML_SEARCHBUTTON = htmlhelpc.wxID_HTML_SEARCHBUTTON -wxID_HTML_SEARCHCHOICE = htmlhelpc.wxID_HTML_SEARCHCHOICE -wxID_HTML_HELPFRAME = htmlhelpc.wxID_HTML_HELPFRAME +wxHF_TOOLBAR = htmlhelpc.wxHF_TOOLBAR +wxHF_FLATTOOLBAR = htmlhelpc.wxHF_FLATTOOLBAR +wxHF_CONTENTS = htmlhelpc.wxHF_CONTENTS +wxHF_INDEX = htmlhelpc.wxHF_INDEX +wxHF_SEARCH = htmlhelpc.wxHF_SEARCH +wxHF_BOOKMARKS = htmlhelpc.wxHF_BOOKMARKS +wxHF_OPENFILES = htmlhelpc.wxHF_OPENFILES +wxHF_PRINT = htmlhelpc.wxHF_PRINT +wxHF_DEFAULTSTYLE = htmlhelpc.wxHF_DEFAULTSTYLE