X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/185d7c3ee4c6e4a9ddaf811ae38e57d68a0fdff3..4649b5eded522cdc6d76aae074f98a2c162fd648:/wxPython/src/msw/events.py?ds=inline diff --git a/wxPython/src/msw/events.py b/wxPython/src/msw/events.py index 3d61ae0ddf..85de45a1f6 100644 --- a/wxPython/src/msw/events.py +++ b/wxPython/src/msw/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 @@ -135,6 +135,9 @@ class wxCommandEventPtr(wxEventPtr): def SetInt(self, *_args, **_kwargs): val = apply(eventsc.wxCommandEvent_SetInt,(self,) + _args, _kwargs) return val + def GetClientData(self, *_args, **_kwargs): + val = apply(eventsc.wxCommandEvent_GetClientData,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxCommandEvent(wxCommandEventPtr): @@ -298,6 +301,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 +338,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 +367,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 +494,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 +546,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 +643,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): @@ -835,7 +863,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,) @@ -873,7 +900,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,) @@ -891,7 +917,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,) @@ -920,6 +945,29 @@ class wxTimerEvent(wxTimerEventPtr): +class wxTextUrlEventPtr(wxCommandEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetMouseEvent(self, *_args, **_kwargs): + val = apply(eventsc.wxTextUrlEvent_GetMouseEvent,(self,) + _args, _kwargs) + return val + def GetURLStart(self, *_args, **_kwargs): + val = apply(eventsc.wxTextUrlEvent_GetURLStart,(self,) + _args, _kwargs) + return val + def GetURLEnd(self, *_args, **_kwargs): + val = apply(eventsc.wxTextUrlEvent_GetURLEnd,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxTextUrlEvent(wxTextUrlEventPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(eventsc.new_wxTextUrlEvent,_args,_kwargs) + self.thisown = 1 + + + + class wxPyEventPtr(wxEventPtr): def __init__(self,this): self.this = this @@ -972,6 +1020,8 @@ class wxPyCommandEvent(wxPyCommandEventPtr): #-------------- FUNCTION WRAPPERS ------------------ +wxNewEventType = eventsc.wxNewEventType + #-------------- VARIABLE WRAPPERS ------------------