X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ca6a5f04692678cd2d9f3ea0843fc3f5a0b254f..cd4915e2c915d6c7611b38fa5182e2d84d1ca669:/wxPython/src/gtk/windows.py diff --git a/wxPython/src/gtk/windows.py b/wxPython/src/gtk/windows.py index 935946452f..192b4f3e57 100644 --- a/wxPython/src/gtk/windows.py +++ b/wxPython/src/gtk/windows.py @@ -62,8 +62,9 @@ class wxEvtHandlerPtr : _prop_list_ = {} class wxEvtHandler(wxEvtHandlerPtr): - def __init__(self,this): - self.this = this + def __init__(self,*_args,**_kwargs): + self.this = apply(windowsc.new_wxEvtHandler,_args,_kwargs) + self.thisown = 1 @@ -85,12 +86,6 @@ class wxValidatorPtr(wxEvtHandlerPtr): return val def __repr__(self): return "" % (self.this,) - - _prop_list_ = { - 'window' : ('GetWindow', 'SetWindow'), - } - _prop_list_.update(wxEvtHandler._prop_list_) - class wxValidator(wxValidatorPtr): def __init__(self,*_args,**_kwargs): self.this = apply(windowsc.new_wxValidator,_args,_kwargs) @@ -417,6 +412,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def SetPosition(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetPosition,(self,) + _args, _kwargs) return val + def SetRect(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_SetRect,(self,) + _args, _kwargs) + return val def SetSizeHints(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetSizeHints,(self,) + _args, _kwargs) return val @@ -519,43 +517,24 @@ class wxWindowPtr(wxEvtHandlerPtr): return val def __repr__(self): return "" % (self.this,) - # replaces broken shadow method + # replaces broken shadow methods def GetCaret(self, *_args, **_kwargs): from misc2 import wxCaretPtr val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs) if val: val = wxCaretPtr(val) return val - - - _prop_list_ = { - 'size' : ('GetSize', 'SetSize'), - 'enabled' : ('IsEnabled', 'Enable'), - 'background' : ('GetBackgroundColour', 'SetBackgroundColour'), - 'foreground' : ('GetForegroundColour', 'SetForegroundColour'), - 'children' : ('GetChildren', None), - 'charHeight' : ('GetCharHeight', None), - 'charWidth' : ('GetCharWidth', None), - 'clientSize' : ('GetClientSize', 'SetClientSize'), - 'font' : ('GetFont', 'SetFont'), - 'grandParent' : ('GetGrandParent', None), - 'handle' : ('GetHandle', None), - 'label' : ('GetLabel', 'SetLabel'), - 'name' : ('GetName', 'SetName'), - 'parent' : ('GetParent', None), - 'position' : ('GetPosition', 'SetPosition'), - 'title' : ('GetTitle', 'SetTitle'), - 'style' : ('GetWindowStyleFlag', 'SetWindowStyleFlag'), - 'visible' : ('IsShown', 'Show'), - 'toolTip' : ('GetToolTip', 'SetToolTip'), - 'sizer' : ('GetSizer', 'SetSizer'), - 'validator' : ('GetValidator', 'SetValidator'), - 'dropTarget' : ('GetDropTarget', 'SetDropTarget'), - 'caret' : ('GetCaret', 'SetCaret'), - 'autoLayout' : ('GetAutoLayout', 'SetAutoLayout'), - 'constraints' : ('GetConstraints', 'SetConstraints'), - - } - _prop_list_.update(wxEvtHandler._prop_list_) + + def GetSizer(self, *_args, **_kwargs): + from sizers import wxSizerPtr + val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs) + if val: val = wxSizerPtr(val) + return val + + def GetToolTip(self, *_args, **_kwargs): + from misc2 import wxToolTipPtr + val = apply(windowsc.wxWindow_GetToolTip,(self,) + _args, _kwargs) + if val: val = wxToolTipPtr(val) + return val class wxWindow(wxWindowPtr): def __init__(self,*_args,**_kwargs): @@ -1002,12 +981,19 @@ wxValidator_IsSilent = windowsc.wxValidator_IsSilent wxValidator_SetBellOnError = windowsc.wxValidator_SetBellOnError +def wxWindow_FindFocus(*_args, **_kwargs): + val = apply(windowsc.wxWindow_FindFocus,_args,_kwargs) + if val: val = wxWindowPtr(val) + return val + wxWindow_NewControlId = windowsc.wxWindow_NewControlId wxWindow_NextControlId = windowsc.wxWindow_NextControlId wxWindow_PrevControlId = windowsc.wxWindow_PrevControlId +wxMenuItem_GetLabelFromText = windowsc.wxMenuItem_GetLabelFromText + #-------------- VARIABLE WRAPPERS ------------------