X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..37d6243357b65ce2a2fa7a35b848ebefb88a3912:/wxPython/src/msw/events.py diff --git a/wxPython/src/msw/events.py b/wxPython/src/msw/events.py index e5ca31ceb0..8dbc2d265c 100644 --- a/wxPython/src/msw/events.py +++ b/wxPython/src/msw/events.py @@ -105,6 +105,9 @@ class wxCommandEventPtr(wxEventPtr): def __init__(self,this): self.this = this self.thisown = 0 + def IsChecked(self, *_args, **_kwargs): + val = apply(eventsc.wxCommandEvent_IsChecked,(self,) + _args, _kwargs) + return val def Checked(self, *_args, **_kwargs): val = apply(eventsc.wxCommandEvent_Checked,(self,) + _args, _kwargs) return val @@ -295,6 +298,55 @@ class wxMouseEventPtr(wxEventPtr): def GetY(self, *_args, **_kwargs): val = apply(eventsc.wxMouseEvent_GetY,(self,) + _args, _kwargs) return val + def __setattr__(self,name,value): + if name == "m_x" : + eventsc.wxMouseEvent_m_x_set(self,value) + return + if name == "m_y" : + eventsc.wxMouseEvent_m_y_set(self,value) + return + if name == "m_leftDown" : + eventsc.wxMouseEvent_m_leftDown_set(self,value) + return + if name == "m_middleDown" : + eventsc.wxMouseEvent_m_middleDown_set(self,value) + return + if name == "m_rightDown" : + eventsc.wxMouseEvent_m_rightDown_set(self,value) + return + if name == "m_controlDown" : + eventsc.wxMouseEvent_m_controlDown_set(self,value) + return + if name == "m_shiftDown" : + eventsc.wxMouseEvent_m_shiftDown_set(self,value) + return + if name == "m_altDown" : + eventsc.wxMouseEvent_m_altDown_set(self,value) + return + if name == "m_metaDown" : + eventsc.wxMouseEvent_m_metaDown_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_x" : + return eventsc.wxMouseEvent_m_x_get(self) + if name == "m_y" : + return eventsc.wxMouseEvent_m_y_get(self) + if name == "m_leftDown" : + return eventsc.wxMouseEvent_m_leftDown_get(self) + if name == "m_middleDown" : + return eventsc.wxMouseEvent_m_middleDown_get(self) + if name == "m_rightDown" : + return eventsc.wxMouseEvent_m_rightDown_get(self) + if name == "m_controlDown" : + return eventsc.wxMouseEvent_m_controlDown_get(self) + if name == "m_shiftDown" : + return eventsc.wxMouseEvent_m_shiftDown_get(self) + if name == "m_altDown" : + return eventsc.wxMouseEvent_m_altDown_get(self) + if name == "m_metaDown" : + return eventsc.wxMouseEvent_m_metaDown_get(self) + raise AttributeError,name def __repr__(self): return "" % (self.this,) class wxMouseEvent(wxMouseEventPtr): @@ -343,6 +395,50 @@ class wxKeyEventPtr(wxEventPtr): def GetPositionTuple(self, *_args, **_kwargs): val = apply(eventsc.wxKeyEvent_GetPositionTuple,(self,) + _args, _kwargs) return val + def __setattr__(self,name,value): + if name == "m_x" : + eventsc.wxKeyEvent_m_x_set(self,value) + return + if name == "m_y" : + eventsc.wxKeyEvent_m_y_set(self,value) + return + if name == "m_keyCode" : + eventsc.wxKeyEvent_m_keyCode_set(self,value) + return + if name == "m_controlDown" : + eventsc.wxKeyEvent_m_controlDown_set(self,value) + return + if name == "m_shiftDown" : + eventsc.wxKeyEvent_m_shiftDown_set(self,value) + return + if name == "m_altDown" : + eventsc.wxKeyEvent_m_altDown_set(self,value) + return + if name == "m_metaDown" : + eventsc.wxKeyEvent_m_metaDown_set(self,value) + return + if name == "m_scanCode" : + eventsc.wxKeyEvent_m_scanCode_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_x" : + return eventsc.wxKeyEvent_m_x_get(self) + if name == "m_y" : + return eventsc.wxKeyEvent_m_y_get(self) + if name == "m_keyCode" : + return eventsc.wxKeyEvent_m_keyCode_get(self) + if name == "m_controlDown" : + return eventsc.wxKeyEvent_m_controlDown_get(self) + if name == "m_shiftDown" : + return eventsc.wxKeyEvent_m_shiftDown_get(self) + if name == "m_altDown" : + return eventsc.wxKeyEvent_m_altDown_get(self) + if name == "m_metaDown" : + return eventsc.wxKeyEvent_m_metaDown_get(self) + if name == "m_scanCode" : + return eventsc.wxKeyEvent_m_scanCode_get(self) + raise AttributeError,name def __repr__(self): return "" % (self.this,) class wxKeyEvent(wxKeyEventPtr): @@ -714,6 +810,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 @@ -873,6 +972,8 @@ class wxPyCommandEvent(wxPyCommandEventPtr): #-------------- FUNCTION WRAPPERS ------------------ +wxNewEventType = eventsc.wxNewEventType + #-------------- VARIABLE WRAPPERS ------------------