X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d0918205aae1b1a45267ad7ddfab8eb00185dce..eec92d76f8798c69f117315a7b41d08b769e31e0:/utils/wxPython/src/gtk/controls.py diff --git a/utils/wxPython/src/gtk/controls.py b/utils/wxPython/src/gtk/controls.py index ab4b2c42c9..df2650c7aa 100644 --- a/utils/wxPython/src/gtk/controls.py +++ b/utils/wxPython/src/gtk/controls.py @@ -7,12 +7,17 @@ from windows import * from gdi import * +from clip_dnd import * + from events import * import wx class wxControlPtr(wxWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Command(self, *_args, **_kwargs): + val = apply(controlsc.wxControl_Command,(self,) + _args, _kwargs) + return val def GetLabel(self, *_args, **_kwargs): val = apply(controlsc.wxControl_GetLabel,(self,) + _args, _kwargs) return val @@ -22,8 +27,10 @@ class wxControlPtr(wxWindowPtr): def __repr__(self): return "" % (self.this,) class wxControl(wxControlPtr): - def __init__(self,this): - self.this = this + def __init__(self,*_args,**_kwargs): + self.this = apply(controlsc.new_wxControl,_args,_kwargs) + self.thisown = 1 + wx._StdWindowCallbacks(self) @@ -35,6 +42,12 @@ class wxButtonPtr(wxControlPtr): def SetDefault(self, *_args, **_kwargs): val = apply(controlsc.wxButton_SetDefault,(self,) + _args, _kwargs) return val + def SetBackgroundColour(self, *_args, **_kwargs): + val = apply(controlsc.wxButton_SetBackgroundColour,(self,) + _args, _kwargs) + return val + def SetForegroundColour(self, *_args, **_kwargs): + val = apply(controlsc.wxButton_SetForegroundColour,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxButton(wxButtonPtr): @@ -349,6 +362,9 @@ class wxListBoxPtr(wxControlPtr): def GetSelections(self, *_args, **_kwargs): val = apply(controlsc.wxListBox_GetSelections,(self,) + _args, _kwargs) return val + def InsertItems(self, *_args, **_kwargs): + val = apply(controlsc.wxListBox_InsertItems,(self,) + _args, _kwargs) + return val def GetString(self, *_args, **_kwargs): val = apply(controlsc.wxListBox_GetString,(self,) + _args, _kwargs) return val @@ -400,6 +416,9 @@ class wxCheckListBoxPtr(wxListBoxPtr): def Check(self, *_args, **_kwargs): val = apply(controlsc.wxCheckListBox_Check,(self,) + _args, _kwargs) return val + def InsertItems(self, *_args, **_kwargs): + val = apply(controlsc.wxCheckListBox_InsertItems,(self,) + _args, _kwargs) + return val def GetItemHeight(self, *_args, **_kwargs): val = apply(controlsc.wxCheckListBox_GetItemHeight,(self,) + _args, _kwargs) return val @@ -517,6 +536,15 @@ class wxTextCtrlPtr(wxControlPtr): def IsEditable(self, *_args, **_kwargs): val = apply(controlsc.wxTextCtrl_IsEditable,(self,) + _args, _kwargs) return val + def Undo(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_Undo,(self,) + _args, _kwargs) + return val + def Redo(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_Redo,(self,) + _args, _kwargs) + return val + def write(self, *_args, **_kwargs): + val = apply(controlsc.wxTextCtrl_write,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxTextCtrl(wxTextCtrlPtr): @@ -766,7 +794,14 @@ class wxSlider(wxSliderPtr): #-------------- FUNCTION WRAPPERS ------------------ +def wxButton_GetDefaultSize(*_args, **_kwargs): + val = apply(controlsc.wxButton_GetDefaultSize,_args,_kwargs) + if val: val = wxSizePtr(val); val.thisown = 1 + return val + #-------------- VARIABLE WRAPPERS ------------------ +cvar = controlsc.cvar +wxDefaultValidator = wxValidatorPtr(controlsc.cvar.wxDefaultValidator)