X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0220cbc1695d01a55964f31987f2fe78cf212ca1..51566b0bc96dc1b15a11cc7878504789bd7cf16e:/wxPython/src/gtk/help.py diff --git a/wxPython/src/gtk/help.py b/wxPython/src/gtk/help.py index 9da1a4e532..ac1612ba19 100644 --- a/wxPython/src/gtk/help.py +++ b/wxPython/src/gtk/help.py @@ -7,6 +7,8 @@ from misc import * from gdi import * +from fonts import * + from clip_dnd import * from controls import * @@ -26,9 +28,6 @@ def EVT_DETAILED_HELP(win, id, func): def EVT_DETAILED_HELP_RANGE(win, id, id2, func): win.Connect(id, id2, wxEVT_DETAILED_HELP, func) -def EVT_CONTEXT_MENU(win, func): - win.Connect(-1, -1, wxEVT_CONTEXT_MENU, func) - class wxHelpEventPtr(wxCommandEventPtr): def __init__(self,this): self.this = this @@ -62,34 +61,16 @@ class wxHelpEvent(wxHelpEventPtr): -class wxContextMenuEventPtr(wxCommandEventPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def GetPosition(self, *_args, **_kwargs): - val = apply(helpc.wxContextMenuEvent_GetPosition,(self,) + _args, _kwargs) - if val: val = wxPointPtr(val) - return val - def SetPosition(self, *_args, **_kwargs): - val = apply(helpc.wxContextMenuEvent_SetPosition,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxContextMenuEvent(wxContextMenuEventPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(helpc.new_wxContextMenuEvent,_args,_kwargs) - self.thisown = 1 - - - - class wxContextHelpPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,helpc=helpc): - if self.thisown == 1 : - helpc.delete_wxContextHelp(self) + def __del__(self, delfunc=helpc.delete_wxContextHelp): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def BeginContextHelp(self, *_args, **_kwargs): val = apply(helpc.wxContextHelp_BeginContextHelp,(self,) + _args, _kwargs) return val @@ -186,7 +167,6 @@ wxDIALOG_EX_CONTEXTHELP = helpc.wxDIALOG_EX_CONTEXTHELP wxID_CONTEXT_HELP = helpc.wxID_CONTEXT_HELP wxEVT_HELP = helpc.wxEVT_HELP wxEVT_DETAILED_HELP = helpc.wxEVT_DETAILED_HELP -wxEVT_CONTEXT_MENU = helpc.wxEVT_CONTEXT_MENU #-------------- USER INCLUDE ----------------------- @@ -194,4 +174,4 @@ wxEVT_CONTEXT_MENU = helpc.wxEVT_CONTEXT_MENU # Stuff these names into the wx namespace so wxPyConstructObject can find them import wx wx.wxHelpEventPtr = wxHelpEventPtr -wx.wxContextMenuEventPtr = wxContextMenuEventPtr +wx.wxContextHelpButtonPtr = wxContextHelpButtonPtr