X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9c039d08bfbb59c0abcbc705fb49f9b2cb321edf..d24a34bb5d3f17472179b38bcb0be253551fce65:/utils/wxPython/src/msw/windows2.py?ds=sidebyside diff --git a/utils/wxPython/src/msw/windows2.py b/utils/wxPython/src/msw/windows2.py index 56e77137b7..f5d4c0cdb9 100644 --- a/utils/wxPython/src/msw/windows2.py +++ b/utils/wxPython/src/msw/windows2.py @@ -10,11 +10,14 @@ from windows import * from controls import * from events import * -import wxp +import wx class wxGridCellPtr : def __init__(self,this): self.this = this self.thisown = 0 + def __del__(self): + if self.thisown == 1 : + windows2c.delete_wxGridCell(self.this) def GetTextValue(self): val = windows2c.wxGridCell_GetTextValue(self.this) return val @@ -62,8 +65,9 @@ class wxGridCellPtr : def __repr__(self): return "" class wxGridCell(wxGridCellPtr): - def __init__(self,this): - self.this = this + def __init__(self) : + self.this = windows2c.new_wxGridCell() + self.thisown = 1 @@ -151,6 +155,7 @@ class wxGridPtr(wxPanelPtr): def GetCurrentRect(self): val = windows2c.wxGrid_GetCurrentRect(self.this) val = wxRectPtr(val) + val.thisown = 1 return val def GetCursorColumn(self): val = windows2c.wxGrid_GetCursorColumn(self.this) @@ -212,6 +217,9 @@ class wxGridPtr(wxPanelPtr): def InsertRows(self,*args): val = apply(windows2c.wxGrid_InsertRows,(self.this,)+args) return val + def OnActivate(self,arg0): + val = windows2c.wxGrid_OnActivate(self.this,arg0) + return val def SetCellAlignment(self,arg0,arg1,arg2): val = windows2c.wxGrid_SetCellAlignment(self.this,arg0,arg1,arg2) return val @@ -287,12 +295,73 @@ class wxGrid(wxGridPtr): args = tuple(argl) self.this = apply(windows2c.new_wxGrid,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) + wx._checkForCallback(self, 'OnSelectCell', wxEVT_GRID_SELECT_CELL) + wx._checkForCallback(self, 'OnCreateCell', wxEVT_GRID_CREATE_CELL) + wx._checkForCallback(self, 'OnChangeLabels', wxEVT_GRID_CHANGE_LABELS) + wx._checkForCallback(self, 'OnChangeSelectionLabel', wxEVT_GRID_CHANGE_SEL_LABEL) + wx._checkForCallback(self, 'OnCellChange', wxEVT_GRID_CELL_CHANGE) + wx._checkForCallback(self, 'OnCellLeftClick', wxEVT_GRID_CELL_LCLICK) + wx._checkForCallback(self, 'OnCellRightClick', wxEVT_GRID_CELL_RCLICK) + wx._checkForCallback(self, 'OnLabelLeftClick', wxEVT_GRID_LABEL_LCLICK) + wx._checkForCallback(self, 'OnLabelRightClick', wxEVT_GRID_LABEL_RCLICK) + + + + +class wxGridEventPtr(wxEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __setattr__(self,name,value): + if name == "m_row" : + windows2c.wxGridEvent_m_row_set(self.this,value) + return + if name == "m_col" : + windows2c.wxGridEvent_m_col_set(self.this,value) + return + if name == "m_x" : + windows2c.wxGridEvent_m_x_set(self.this,value) + return + if name == "m_y" : + windows2c.wxGridEvent_m_y_set(self.this,value) + return + if name == "m_control" : + windows2c.wxGridEvent_m_control_set(self.this,value) + return + if name == "m_shift" : + windows2c.wxGridEvent_m_shift_set(self.this,value) + return + if name == "m_cell" : + windows2c.wxGridEvent_m_cell_set(self.this,value.this) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_row" : + return windows2c.wxGridEvent_m_row_get(self.this) + if name == "m_col" : + return windows2c.wxGridEvent_m_col_get(self.this) + if name == "m_x" : + return windows2c.wxGridEvent_m_x_get(self.this) + if name == "m_y" : + return windows2c.wxGridEvent_m_y_get(self.this) + if name == "m_control" : + return windows2c.wxGridEvent_m_control_get(self.this) + if name == "m_shift" : + return windows2c.wxGridEvent_m_shift_get(self.this) + if name == "m_cell" : + return wxGridCellPtr(windows2c.wxGridEvent_m_cell_get(self.this)) + raise AttributeError,name + def __repr__(self): + return "" +class wxGridEvent(wxGridEventPtr): + def __init__(self,this): + self.this = this -class wxNotebookEventPtr(wxCommandEventPtr): +class wxNotebookEventPtr(wxNotifyEventPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -302,6 +371,12 @@ class wxNotebookEventPtr(wxCommandEventPtr): def GetOldSelection(self): val = windows2c.wxNotebookEvent_GetOldSelection(self.this) return val + def SetOldSelection(self,arg0): + val = windows2c.wxNotebookEvent_SetOldSelection(self.this,arg0) + return val + def SetSelection(self,arg0): + val = windows2c.wxNotebookEvent_SetSelection(self.this,arg0) + return val def __repr__(self): return "" class wxNotebookEvent(wxNotebookEventPtr): @@ -334,10 +409,11 @@ class wxNotebookPtr(wxControlPtr): val = windows2c.wxNotebook_GetPageText(self.this,arg0) return val def SetImageList(self,arg0): - val = windows2c.wxNotebook_SetImageList(self.this,arg0) + val = windows2c.wxNotebook_SetImageList(self.this,arg0.this) return val def GetImageList(self): val = windows2c.wxNotebook_GetImageList(self.this) + val = wxImageListPtr(val) return val def GetPageImage(self,arg0): val = windows2c.wxNotebook_GetPageImage(self.this,arg0) @@ -351,6 +427,9 @@ class wxNotebookPtr(wxControlPtr): def DeletePage(self,arg0): val = windows2c.wxNotebook_DeletePage(self.this,arg0) return val + def RemovePage(self,arg0): + val = windows2c.wxNotebook_RemovePage(self.this,arg0) + return val def DeleteAllPages(self): val = windows2c.wxNotebook_DeleteAllPages(self.this) return val @@ -362,6 +441,10 @@ class wxNotebookPtr(wxControlPtr): return val def GetPage(self,arg0): val = windows2c.wxNotebook_GetPage(self.this,arg0) + val = wxWindowPtr(val) + return val + def ResizeChildren(self): + val = windows2c.wxNotebook_ResizeChildren(self.this) return val def __repr__(self): return "" @@ -375,7 +458,36 @@ class wxNotebook(wxNotebookPtr): args = tuple(argl) self.this = apply(windows2c.new_wxNotebook,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) + + + + +class wxSplitterEventPtr(wxCommandEventPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetSashPosition(self): + val = windows2c.wxSplitterEvent_GetSashPosition(self.this) + return val + def GetX(self): + val = windows2c.wxSplitterEvent_GetX(self.this) + return val + def GetY(self): + val = windows2c.wxSplitterEvent_GetY(self.this) + return val + def GetWindowBeingRemoved(self): + val = windows2c.wxSplitterEvent_GetWindowBeingRemoved(self.this) + val = wxWindowPtr(val) + return val + def SetSashPosition(self,arg0): + val = windows2c.wxSplitterEvent_SetSashPosition(self.this,arg0) + return val + def __repr__(self): + return "" +class wxSplitterEvent(wxSplitterEventPtr): + def __init__(self,this): + self.this = this @@ -384,12 +496,18 @@ class wxSplitterWindowPtr(wxWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetBorderSize(self): + val = windows2c.wxSplitterWindow_GetBorderSize(self.this) + return val def GetMinimumPaneSize(self): val = windows2c.wxSplitterWindow_GetMinimumPaneSize(self.this) return val def GetSashPosition(self): val = windows2c.wxSplitterWindow_GetSashPosition(self.this) return val + def GetSashSize(self): + val = windows2c.wxSplitterWindow_GetSashSize(self.this) + return val def GetSplitMode(self): val = windows2c.wxSplitterWindow_GetSplitMode(self.this) return val @@ -407,9 +525,15 @@ class wxSplitterWindowPtr(wxWindowPtr): def IsSplit(self): val = windows2c.wxSplitterWindow_IsSplit(self.this) return val + def SetBorderSize(self,arg0): + val = windows2c.wxSplitterWindow_SetBorderSize(self.this,arg0) + return val def SetSashPosition(self,arg0,*args): val = apply(windows2c.wxSplitterWindow_SetSashPosition,(self.this,arg0,)+args) return val + def SetSashSize(self,arg0): + val = windows2c.wxSplitterWindow_SetSashSize(self.this,arg0) + return val def SetMinimumPaneSize(self,arg0): val = windows2c.wxSplitterWindow_SetMinimumPaneSize(self.this,arg0) return val @@ -441,7 +565,40 @@ class wxSplitterWindow(wxSplitterWindowPtr): args = tuple(argl) self.this = apply(windows2c.new_wxSplitterWindow,(arg0.this,arg1,)+args) self.thisown = 1 - wxp._StdWindowCallbacks(self) + wx._StdWindowCallbacks(self) + + + + +class wxTaskBarIconPtr(wxEvtHandlerPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self): + if self.thisown == 1 : + windows2c.delete_wxTaskBarIcon(self.this) + def SetIcon(self,arg0,*args): + val = apply(windows2c.wxTaskBarIcon_SetIcon,(self.this,arg0.this,)+args) + return val + def RemoveIcon(self): + val = windows2c.wxTaskBarIcon_RemoveIcon(self.this) + return val + def PopupMenu(self,arg0): + val = windows2c.wxTaskBarIcon_PopupMenu(self.this,arg0.this) + return val + def __repr__(self): + return "" +class wxTaskBarIcon(wxTaskBarIconPtr): + def __init__(self) : + self.this = windows2c.new_wxTaskBarIcon() + self.thisown = 1 + wx._checkForCallback(self, 'OnMouseMove', wxEVT_TASKBAR_MOVE) + wx._checkForCallback(self, 'OnLButtonDown', wxEVT_TASKBAR_LEFT_DOWN) + wx._checkForCallback(self, 'OnLButtonUp', wxEVT_TASKBAR_LEFT_UP) + wx._checkForCallback(self, 'OnRButtonDown', wxEVT_TASKBAR_RIGHT_DOWN) + wx._checkForCallback(self, 'OnRButtonUp', wxEVT_TASKBAR_RIGHT_UP) + wx._checkForCallback(self, 'OnLButtonDClick',wxEVT_TASKBAR_LEFT_DCLICK) + wx._checkForCallback(self, 'OnRButtonDClick',wxEVT_TASKBAR_RIGHT_DCLICK) @@ -457,3 +614,19 @@ class wxSplitterWindow(wxSplitterWindowPtr): wxGRID_TEXT_CTRL = windows2c.wxGRID_TEXT_CTRL wxGRID_HSCROLL = windows2c.wxGRID_HSCROLL wxGRID_VSCROLL = windows2c.wxGRID_VSCROLL +wxEVT_GRID_SELECT_CELL = windows2c.wxEVT_GRID_SELECT_CELL +wxEVT_GRID_CREATE_CELL = windows2c.wxEVT_GRID_CREATE_CELL +wxEVT_GRID_CHANGE_LABELS = windows2c.wxEVT_GRID_CHANGE_LABELS +wxEVT_GRID_CHANGE_SEL_LABEL = windows2c.wxEVT_GRID_CHANGE_SEL_LABEL +wxEVT_GRID_CELL_CHANGE = windows2c.wxEVT_GRID_CELL_CHANGE +wxEVT_GRID_CELL_LCLICK = windows2c.wxEVT_GRID_CELL_LCLICK +wxEVT_GRID_CELL_RCLICK = windows2c.wxEVT_GRID_CELL_RCLICK +wxEVT_GRID_LABEL_LCLICK = windows2c.wxEVT_GRID_LABEL_LCLICK +wxEVT_GRID_LABEL_RCLICK = windows2c.wxEVT_GRID_LABEL_RCLICK +wxEVT_TASKBAR_MOVE = windows2c.wxEVT_TASKBAR_MOVE +wxEVT_TASKBAR_LEFT_DOWN = windows2c.wxEVT_TASKBAR_LEFT_DOWN +wxEVT_TASKBAR_LEFT_UP = windows2c.wxEVT_TASKBAR_LEFT_UP +wxEVT_TASKBAR_RIGHT_DOWN = windows2c.wxEVT_TASKBAR_RIGHT_DOWN +wxEVT_TASKBAR_RIGHT_UP = windows2c.wxEVT_TASKBAR_RIGHT_UP +wxEVT_TASKBAR_LEFT_DCLICK = windows2c.wxEVT_TASKBAR_LEFT_DCLICK +wxEVT_TASKBAR_RIGHT_DCLICK = windows2c.wxEVT_TASKBAR_RIGHT_DCLICK