X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c368d904fc27d35ae1e533155e2154dc496432e4..70541533c8e108249a82fbe2bc05ccfb73bf028d:/wxPython/src/gtk/events.py diff --git a/wxPython/src/gtk/events.py b/wxPython/src/gtk/events.py index 4a44a50011..23b0f69519 100644 --- a/wxPython/src/gtk/events.py +++ b/wxPython/src/gtk/events.py @@ -4,7 +4,7 @@ import eventsc from misc import * from gdi import * -class wxEventPtr : +class wxEventPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -298,6 +298,15 @@ class wxMouseEventPtr(wxEventPtr): def GetY(self, *_args, **_kwargs): val = apply(eventsc.wxMouseEvent_GetY,(self,) + _args, _kwargs) return val + def GetWheelRotation(self, *_args, **_kwargs): + val = apply(eventsc.wxMouseEvent_GetWheelRotation,(self,) + _args, _kwargs) + return val + def GetWheelDelta(self, *_args, **_kwargs): + val = apply(eventsc.wxMouseEvent_GetWheelDelta,(self,) + _args, _kwargs) + return val + def GetLinesPerAction(self, *_args, **_kwargs): + val = apply(eventsc.wxMouseEvent_GetLinesPerAction,(self,) + _args, _kwargs) + return val def __setattr__(self,name,value): if name == "m_x" : eventsc.wxMouseEvent_m_x_set(self,value) @@ -326,6 +335,15 @@ class wxMouseEventPtr(wxEventPtr): if name == "m_metaDown" : eventsc.wxMouseEvent_m_metaDown_set(self,value) return + if name == "m_wheelRotation" : + eventsc.wxMouseEvent_m_wheelRotation_set(self,value) + return + if name == "m_wheelDelta" : + eventsc.wxMouseEvent_m_wheelDelta_set(self,value) + return + if name == "m_linesPerAction" : + eventsc.wxMouseEvent_m_linesPerAction_set(self,value) + return self.__dict__[name] = value def __getattr__(self,name): if name == "m_x" : @@ -346,6 +364,12 @@ class wxMouseEventPtr(wxEventPtr): return eventsc.wxMouseEvent_m_altDown_get(self) if name == "m_metaDown" : return eventsc.wxMouseEvent_m_metaDown_get(self) + if name == "m_wheelRotation" : + return eventsc.wxMouseEvent_m_wheelRotation_get(self) + if name == "m_wheelDelta" : + return eventsc.wxMouseEvent_m_wheelDelta_get(self) + if name == "m_linesPerAction" : + return eventsc.wxMouseEvent_m_linesPerAction_get(self) raise AttributeError,name def __repr__(self): return "" % (self.this,) @@ -467,7 +491,6 @@ class wxNavigationKeyEventPtr(wxEventPtr): return val def GetCurrentFocus(self, *_args, **_kwargs): val = apply(eventsc.wxNavigationKeyEvent_GetCurrentFocus,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def SetCurrentFocus(self, *_args, **_kwargs): val = apply(eventsc.wxNavigationKeyEvent_SetCurrentFocus,(self,) + _args, _kwargs) @@ -520,7 +543,6 @@ class wxEraseEventPtr(wxEventPtr): self.thisown = 0 def GetDC(self, *_args, **_kwargs): val = apply(eventsc.wxEraseEvent_GetDC,(self,) + _args, _kwargs) - if val: val = wxDCPtr(val) return val def __repr__(self): return "" % (self.this,) @@ -618,6 +640,9 @@ class wxIconizeEventPtr(wxEventPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Iconized(self, *_args, **_kwargs): + val = apply(eventsc.wxIconizeEvent_Iconized,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxIconizeEvent(wxIconizeEventPtr): @@ -810,6 +835,9 @@ class wxNotifyEventPtr(wxCommandEventPtr): def IsAllowed(self, *_args, **_kwargs): val = apply(eventsc.wxNotifyEvent_IsAllowed,(self,) + _args, _kwargs) return val + def Allow(self, *_args, **_kwargs): + val = apply(eventsc.wxNotifyEvent_Allow,(self,) + _args, _kwargs) + return val def Veto(self, *_args, **_kwargs): val = apply(eventsc.wxNotifyEvent_Veto,(self,) + _args, _kwargs) return val @@ -832,7 +860,6 @@ class wxPaletteChangedEventPtr(wxEventPtr): return val def GetChangedWindow(self, *_args, **_kwargs): val = apply(eventsc.wxPaletteChangedEvent_GetChangedWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def __repr__(self): return "" % (self.this,) @@ -870,7 +897,6 @@ class wxWindowCreateEventPtr(wxCommandEventPtr): self.thisown = 0 def GetWindow(self, *_args, **_kwargs): val = apply(eventsc.wxWindowCreateEvent_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def __repr__(self): return "" % (self.this,) @@ -888,7 +914,6 @@ class wxWindowDestroyEventPtr(wxCommandEventPtr): self.thisown = 0 def GetWindow(self, *_args, **_kwargs): val = apply(eventsc.wxWindowDestroyEvent_GetWindow,(self,) + _args, _kwargs) - if val: val = wxWindowPtr(val) return val def __repr__(self): return "" % (self.this,) @@ -969,6 +994,8 @@ class wxPyCommandEvent(wxPyCommandEventPtr): #-------------- FUNCTION WRAPPERS ------------------ +wxNewEventType = eventsc.wxNewEventType + #-------------- VARIABLE WRAPPERS ------------------