X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d0918205aae1b1a45267ad7ddfab8eb00185dce..85bc0351f76f6d3f00460a167fc108b900e0725c:/utils/wxPython/src/gtk/controls.py diff --git a/utils/wxPython/src/gtk/controls.py b/utils/wxPython/src/gtk/controls.py index ab4b2c42c9..f0c8a8c0de 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): @@ -544,6 +572,9 @@ class wxScrollBarPtr(wxControlPtr): def GetThumbSize(self, *_args, **_kwargs): val = apply(controlsc.wxScrollBar_GetThumbSize,(self,) + _args, _kwargs) return val + def GetThumbLength(self, *_args, **_kwargs): + val = apply(controlsc.wxScrollBar_GetThumbLength,(self,) + _args, _kwargs) + return val def SetThumbPosition(self, *_args, **_kwargs): val = apply(controlsc.wxScrollBar_SetThumbPosition,(self,) + _args, _kwargs) return val @@ -766,7 +797,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)