]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/grid.py
bitwise vs. logical operator
[wxWidgets.git] / wxPython / src / msw / grid.py
index c3ce9b7097ec65ad3469b89bd2e6c2ed9ceaba52..4c0838bf04eef682e6dea39df4f483daa9305f15 100644 (file)
@@ -111,6 +111,21 @@ class GridCellRenderer(GridCellWorker):
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
     def __init__(self): raise AttributeError, "No constructor defined"
     __repr__ = _swig_repr
+    def Draw(*args, **kwargs):
+        """
+        Draw(self, Grid grid, GridCellAttr attr, DC dc, Rect rect, int row, 
+            int col, bool isSelected)
+        """
+        return _grid.GridCellRenderer_Draw(*args, **kwargs)
+
+    def GetBestSize(*args, **kwargs):
+        """GetBestSize(self, Grid grid, GridCellAttr attr, DC dc, int row, int col) -> Size"""
+        return _grid.GridCellRenderer_GetBestSize(*args, **kwargs)
+
+    def Clone(*args, **kwargs):
+        """Clone(self) -> GridCellRenderer"""
+        return _grid.GridCellRenderer_Clone(*args, **kwargs)
+
 _grid.GridCellRenderer_swigregister(GridCellRenderer)
 
 class PyGridCellRenderer(GridCellRenderer):
@@ -120,7 +135,7 @@ class PyGridCellRenderer(GridCellRenderer):
     def __init__(self, *args, **kwargs): 
         """__init__(self) -> PyGridCellRenderer"""
         _grid.PyGridCellRenderer_swiginit(self,_grid.new_PyGridCellRenderer(*args, **kwargs))
-        self._setCallbackInfo(self, PyGridCellRenderer);self._setOORInfo(self)
+        self._setOORInfo(self);PyGridCellRenderer._setCallbackInfo(self, self, PyGridCellRenderer)
 
     def _setCallbackInfo(*args, **kwargs):
         """_setCallbackInfo(self, PyObject self, PyObject _class)"""
@@ -184,6 +199,8 @@ class GridCellFloatRenderer(GridCellStringRenderer):
         """SetPrecision(self, int precision)"""
         return _grid.GridCellFloatRenderer_SetPrecision(*args, **kwargs)
 
+    Precision = property(GetPrecision,SetPrecision,doc="See `GetPrecision` and `SetPrecision`") 
+    Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`") 
 _grid.GridCellFloatRenderer_swigregister(GridCellFloatRenderer)
 
 class GridCellBoolRenderer(GridCellRenderer):
@@ -305,10 +322,11 @@ class GridCellEditor(GridCellWorker):
 
     def Destroy(*args, **kwargs):
         """Destroy(self)"""
-        val = _grid.GridCellEditor_Destroy(*args, **kwargs)
-        args[0].thisown = 0
-        return val
+        args[0].this.own(False)
+        return _grid.GridCellEditor_Destroy(*args, **kwargs)
 
+    CellAttr = property(GetCellAttr,SetCellAttr,doc="See `GetCellAttr` and `SetCellAttr`") 
+    Control = property(GetControl,SetControl,doc="See `GetControl` and `SetControl`") 
 _grid.GridCellEditor_swigregister(GridCellEditor)
 
 class PyGridCellEditor(GridCellEditor):
@@ -318,7 +336,7 @@ class PyGridCellEditor(GridCellEditor):
     def __init__(self, *args, **kwargs): 
         """__init__(self) -> PyGridCellEditor"""
         _grid.PyGridCellEditor_swiginit(self,_grid.new_PyGridCellEditor(*args, **kwargs))
-        self._setCallbackInfo(self, PyGridCellEditor);self._setOORInfo(self)
+        self._setOORInfo(self);PyGridCellEditor._setCallbackInfo(self, self, PyGridCellEditor)
 
     def _setCallbackInfo(*args, **kwargs):
         """_setCallbackInfo(self, PyObject self, PyObject _class)"""
@@ -388,6 +406,7 @@ class GridCellTextEditor(GridCellEditor):
         """GetValue(self) -> String"""
         return _grid.GridCellTextEditor_GetValue(*args, **kwargs)
 
+    Value = property(GetValue,doc="See `GetValue`") 
 _grid.GridCellTextEditor_swigregister(GridCellTextEditor)
 
 class GridCellNumberEditor(GridCellTextEditor):
@@ -421,11 +440,26 @@ class GridCellBoolEditor(GridCellEditor):
         _grid.GridCellBoolEditor_swiginit(self,_grid.new_GridCellBoolEditor(*args, **kwargs))
         self._setOORInfo(self)
 
-    def GetValue(*args, **kwargs):
-        """GetValue(self) -> String"""
-        return _grid.GridCellBoolEditor_GetValue(*args, **kwargs)
+    def UseStringValues(*args, **kwargs):
+        """UseStringValues(String valueTrue=OneString, String valueFalse=EmptyString)"""
+        return _grid.GridCellBoolEditor_UseStringValues(*args, **kwargs)
+
+    UseStringValues = staticmethod(UseStringValues)
+    def IsTrueValue(*args, **kwargs):
+        """IsTrueValue(String value) -> bool"""
+        return _grid.GridCellBoolEditor_IsTrueValue(*args, **kwargs)
 
+    IsTrueValue = staticmethod(IsTrueValue)
 _grid.GridCellBoolEditor_swigregister(GridCellBoolEditor)
+OneString = cvar.OneString
+
+def GridCellBoolEditor_UseStringValues(*args, **kwargs):
+  """GridCellBoolEditor_UseStringValues(String valueTrue=OneString, String valueFalse=EmptyString)"""
+  return _grid.GridCellBoolEditor_UseStringValues(*args, **kwargs)
+
+def GridCellBoolEditor_IsTrueValue(*args, **kwargs):
+  """GridCellBoolEditor_IsTrueValue(String value) -> bool"""
+  return _grid.GridCellBoolEditor_IsTrueValue(*args, **kwargs)
 
 class GridCellChoiceEditor(GridCellEditor):
     """Proxy of C++ GridCellChoiceEditor class"""
@@ -436,10 +470,6 @@ class GridCellChoiceEditor(GridCellEditor):
         _grid.GridCellChoiceEditor_swiginit(self,_grid.new_GridCellChoiceEditor(*args, **kwargs))
         self._setOORInfo(self)
 
-    def GetValue(*args, **kwargs):
-        """GetValue(self) -> String"""
-        return _grid.GridCellChoiceEditor_GetValue(*args, **kwargs)
-
 _grid.GridCellChoiceEditor_swigregister(GridCellChoiceEditor)
 
 class GridCellEnumEditor(GridCellChoiceEditor):
@@ -617,6 +647,13 @@ class GridCellAttr(object):
         """SetDefAttr(self, GridCellAttr defAttr)"""
         return _grid.GridCellAttr_SetDefAttr(*args, **kwargs)
 
+    Alignment = property(GetAlignment,SetAlignment,doc="See `GetAlignment` and `SetAlignment`") 
+    BackgroundColour = property(GetBackgroundColour,SetBackgroundColour,doc="See `GetBackgroundColour` and `SetBackgroundColour`") 
+    Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`") 
+    Kind = property(GetKind,SetKind,doc="See `GetKind` and `SetKind`") 
+    Overflow = property(GetOverflow,SetOverflow,doc="See `GetOverflow` and `SetOverflow`") 
+    Size = property(GetSize,SetSize,doc="See `GetSize` and `SetSize`") 
+    TextColour = property(GetTextColour,SetTextColour,doc="See `GetTextColour` and `SetTextColour`") 
 _grid.GridCellAttr_swigregister(GridCellAttr)
 
 class GridCellAttrProvider(object):
@@ -665,7 +702,7 @@ class PyGridCellAttrProvider(GridCellAttrProvider):
     def __init__(self, *args, **kwargs): 
         """__init__(self) -> PyGridCellAttrProvider"""
         _grid.PyGridCellAttrProvider_swiginit(self,_grid.new_PyGridCellAttrProvider(*args, **kwargs))
-        self._setCallbackInfo(self, PyGridCellAttrProvider)
+        PyGridCellAttrProvider._setCallbackInfo(self, self, PyGridCellAttrProvider)
 
     def _setCallbackInfo(*args, **kwargs):
         """_setCallbackInfo(self, PyObject self, PyObject _class)"""
@@ -856,6 +893,10 @@ class GridTableBase(_core.Object):
         """SetColAttr(self, GridCellAttr attr, int col)"""
         return _grid.GridTableBase_SetColAttr(*args, **kwargs)
 
+    AttrProvider = property(GetAttrProvider,SetAttrProvider,doc="See `GetAttrProvider` and `SetAttrProvider`") 
+    NumberCols = property(GetNumberCols,doc="See `GetNumberCols`") 
+    NumberRows = property(GetNumberRows,doc="See `GetNumberRows`") 
+    View = property(GetView,SetView,doc="See `GetView` and `SetView`") 
 _grid.GridTableBase_swigregister(GridTableBase)
 
 class PyGridTableBase(GridTableBase):
@@ -865,7 +906,7 @@ class PyGridTableBase(GridTableBase):
     def __init__(self, *args, **kwargs): 
         """__init__(self) -> PyGridTableBase"""
         _grid.PyGridTableBase_swiginit(self,_grid.new_PyGridTableBase(*args, **kwargs))
-        self._setCallbackInfo(self, PyGridTableBase);self._setOORInfo(self)
+        self._setOORInfo(self);PyGridTableBase._setCallbackInfo(self, self, PyGridTableBase)
 
     def _setCallbackInfo(*args, **kwargs):
         """_setCallbackInfo(self, PyObject self, PyObject _class)"""
@@ -877,9 +918,8 @@ class PyGridTableBase(GridTableBase):
 
         Deletes the C++ object this Python object is a proxy for.
         """
-        val = _grid.PyGridTableBase_Destroy(*args, **kwargs)
-        args[0].thisown = 0
-        return val
+        args[0].this.own(False)
+        return _grid.PyGridTableBase_Destroy(*args, **kwargs)
 
     def base_GetTypeName(*args, **kw):
         return PyGridTableBase.GetTypeName(*args, **kw)
@@ -1038,6 +1078,10 @@ class GridTableMessage(object):
         """GetCommandInt2(self) -> int"""
         return _grid.GridTableMessage_GetCommandInt2(*args, **kwargs)
 
+    CommandInt = property(GetCommandInt,SetCommandInt,doc="See `GetCommandInt` and `SetCommandInt`") 
+    CommandInt2 = property(GetCommandInt2,SetCommandInt2,doc="See `GetCommandInt2` and `SetCommandInt2`") 
+    Id = property(GetId,SetId,doc="See `GetId` and `SetId`") 
+    TableObject = property(GetTableObject,SetTableObject,doc="See `GetTableObject` and `SetTableObject`") 
 _grid.GridTableMessage_swigregister(GridTableMessage)
 
 class GridCellCoords(object):
@@ -1099,6 +1143,8 @@ class GridCellCoords(object):
         elif index == 1: self.SetCol(val)
         else: raise IndexError
 
+    Col = property(GetCol,SetCol,doc="See `GetCol` and `SetCol`") 
+    Row = property(GetRow,SetRow,doc="See `GetRow` and `SetRow`") 
 _grid.GridCellCoords_swigregister(GridCellCoords)
 
 class Grid(_windows.ScrolledWindow):
@@ -1625,7 +1671,7 @@ class Grid(_windows.ScrolledWindow):
         return _grid.Grid_GetDefaultCellAlignment(*args, **kwargs)
 
     def GetCellAlignment(*args, **kwargs):
-        """GetCellAlignment() -> (horiz, vert)"""
+        """GetCellAlignment(int row, int col) -> (horiz, vert)"""
         return _grid.Grid_GetCellAlignment(*args, **kwargs)
 
     def GetDefaultCellOverflow(*args, **kwargs):
@@ -1977,6 +2023,53 @@ class Grid(_windows.ScrolledWindow):
         return _grid.Grid_GetClassDefaultAttributes(*args, **kwargs)
 
     GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
+    BatchCount = property(GetBatchCount,doc="See `GetBatchCount`") 
+    CellHighlightColour = property(GetCellHighlightColour,SetCellHighlightColour,doc="See `GetCellHighlightColour` and `SetCellHighlightColour`") 
+    CellHighlightPenWidth = property(GetCellHighlightPenWidth,SetCellHighlightPenWidth,doc="See `GetCellHighlightPenWidth` and `SetCellHighlightPenWidth`") 
+    CellHighlightROPenWidth = property(GetCellHighlightROPenWidth,SetCellHighlightROPenWidth,doc="See `GetCellHighlightROPenWidth` and `SetCellHighlightROPenWidth`") 
+    CellSize = property(GetCellSize,SetCellSize,doc="See `GetCellSize` and `SetCellSize`") 
+    ColLabelAlignment = property(GetColLabelAlignment,SetColLabelAlignment,doc="See `GetColLabelAlignment` and `SetColLabelAlignment`") 
+    ColLabelSize = property(GetColLabelSize,SetColLabelSize,doc="See `GetColLabelSize` and `SetColLabelSize`") 
+    ColLabelTextOrientation = property(GetColLabelTextOrientation,SetColLabelTextOrientation,doc="See `GetColLabelTextOrientation` and `SetColLabelTextOrientation`") 
+    ColMinimalAcceptableWidth = property(GetColMinimalAcceptableWidth,SetColMinimalAcceptableWidth,doc="See `GetColMinimalAcceptableWidth` and `SetColMinimalAcceptableWidth`") 
+    DefaultCellAlignment = property(GetDefaultCellAlignment,SetDefaultCellAlignment,doc="See `GetDefaultCellAlignment` and `SetDefaultCellAlignment`") 
+    DefaultCellBackgroundColour = property(GetDefaultCellBackgroundColour,SetDefaultCellBackgroundColour,doc="See `GetDefaultCellBackgroundColour` and `SetDefaultCellBackgroundColour`") 
+    DefaultCellFont = property(GetDefaultCellFont,SetDefaultCellFont,doc="See `GetDefaultCellFont` and `SetDefaultCellFont`") 
+    DefaultCellOverflow = property(GetDefaultCellOverflow,SetDefaultCellOverflow,doc="See `GetDefaultCellOverflow` and `SetDefaultCellOverflow`") 
+    DefaultCellTextColour = property(GetDefaultCellTextColour,SetDefaultCellTextColour,doc="See `GetDefaultCellTextColour` and `SetDefaultCellTextColour`") 
+    DefaultColLabelSize = property(GetDefaultColLabelSize,doc="See `GetDefaultColLabelSize`") 
+    DefaultColSize = property(GetDefaultColSize,SetDefaultColSize,doc="See `GetDefaultColSize` and `SetDefaultColSize`") 
+    DefaultEditor = property(GetDefaultEditor,SetDefaultEditor,doc="See `GetDefaultEditor` and `SetDefaultEditor`") 
+    DefaultGridLinePen = property(GetDefaultGridLinePen,doc="See `GetDefaultGridLinePen`") 
+    DefaultRenderer = property(GetDefaultRenderer,SetDefaultRenderer,doc="See `GetDefaultRenderer` and `SetDefaultRenderer`") 
+    DefaultRowLabelSize = property(GetDefaultRowLabelSize,doc="See `GetDefaultRowLabelSize`") 
+    DefaultRowSize = property(GetDefaultRowSize,SetDefaultRowSize,doc="See `GetDefaultRowSize` and `SetDefaultRowSize`") 
+    GridColLabelWindow = property(GetGridColLabelWindow,doc="See `GetGridColLabelWindow`") 
+    GridCornerLabelWindow = property(GetGridCornerLabelWindow,doc="See `GetGridCornerLabelWindow`") 
+    GridCursorCol = property(GetGridCursorCol,doc="See `GetGridCursorCol`") 
+    GridCursorRow = property(GetGridCursorRow,doc="See `GetGridCursorRow`") 
+    GridLineColour = property(GetGridLineColour,SetGridLineColour,doc="See `GetGridLineColour` and `SetGridLineColour`") 
+    GridRowLabelWindow = property(GetGridRowLabelWindow,doc="See `GetGridRowLabelWindow`") 
+    GridWindow = property(GetGridWindow,doc="See `GetGridWindow`") 
+    LabelBackgroundColour = property(GetLabelBackgroundColour,SetLabelBackgroundColour,doc="See `GetLabelBackgroundColour` and `SetLabelBackgroundColour`") 
+    LabelFont = property(GetLabelFont,SetLabelFont,doc="See `GetLabelFont` and `SetLabelFont`") 
+    LabelTextColour = property(GetLabelTextColour,SetLabelTextColour,doc="See `GetLabelTextColour` and `SetLabelTextColour`") 
+    NumberCols = property(GetNumberCols,doc="See `GetNumberCols`") 
+    NumberRows = property(GetNumberRows,doc="See `GetNumberRows`") 
+    RowLabelAlignment = property(GetRowLabelAlignment,SetRowLabelAlignment,doc="See `GetRowLabelAlignment` and `SetRowLabelAlignment`") 
+    RowLabelSize = property(GetRowLabelSize,SetRowLabelSize,doc="See `GetRowLabelSize` and `SetRowLabelSize`") 
+    RowMinimalAcceptableHeight = property(GetRowMinimalAcceptableHeight,SetRowMinimalAcceptableHeight,doc="See `GetRowMinimalAcceptableHeight` and `SetRowMinimalAcceptableHeight`") 
+    ScrollLineX = property(GetScrollLineX,SetScrollLineX,doc="See `GetScrollLineX` and `SetScrollLineX`") 
+    ScrollLineY = property(GetScrollLineY,SetScrollLineY,doc="See `GetScrollLineY` and `SetScrollLineY`") 
+    SelectedCells = property(GetSelectedCells,doc="See `GetSelectedCells`") 
+    SelectedCols = property(GetSelectedCols,doc="See `GetSelectedCols`") 
+    SelectedRows = property(GetSelectedRows,doc="See `GetSelectedRows`") 
+    SelectionBackground = property(GetSelectionBackground,SetSelectionBackground,doc="See `GetSelectionBackground` and `SetSelectionBackground`") 
+    SelectionBlockBottomRight = property(GetSelectionBlockBottomRight,doc="See `GetSelectionBlockBottomRight`") 
+    SelectionBlockTopLeft = property(GetSelectionBlockTopLeft,doc="See `GetSelectionBlockTopLeft`") 
+    SelectionForeground = property(GetSelectionForeground,SetSelectionForeground,doc="See `GetSelectionForeground` and `SetSelectionForeground`") 
+    SelectionMode = property(GetSelectionMode,SetSelectionMode,doc="See `GetSelectionMode` and `SetSelectionMode`") 
+    Table = property(GetTable,SetTable,doc="See `GetTable` and `SetTable`") 
 _grid.Grid_swigregister(Grid)
 
 def PreGrid(*args, **kwargs):
@@ -2049,6 +2142,9 @@ class GridEvent(_core.NotifyEvent):
         """CmdDown(self) -> bool"""
         return _grid.GridEvent_CmdDown(*args, **kwargs)
 
+    Col = property(GetCol,doc="See `GetCol`") 
+    Position = property(GetPosition,doc="See `GetPosition`") 
+    Row = property(GetRow,doc="See `GetRow`") 
 _grid.GridEvent_swigregister(GridEvent)
 
 class GridSizeEvent(_core.NotifyEvent):
@@ -2090,6 +2186,8 @@ class GridSizeEvent(_core.NotifyEvent):
         """CmdDown(self) -> bool"""
         return _grid.GridSizeEvent_CmdDown(*args, **kwargs)
 
+    Position = property(GetPosition,doc="See `GetPosition`") 
+    RowOrCol = property(GetRowOrCol,doc="See `GetRowOrCol`") 
 _grid.GridSizeEvent_swigregister(GridSizeEvent)
 
 class GridRangeSelectEvent(_core.NotifyEvent):
@@ -2152,6 +2250,12 @@ class GridRangeSelectEvent(_core.NotifyEvent):
         """CmdDown(self) -> bool"""
         return _grid.GridRangeSelectEvent_CmdDown(*args, **kwargs)
 
+    BottomRightCoords = property(GetBottomRightCoords,doc="See `GetBottomRightCoords`") 
+    BottomRow = property(GetBottomRow,doc="See `GetBottomRow`") 
+    LeftCol = property(GetLeftCol,doc="See `GetLeftCol`") 
+    RightCol = property(GetRightCol,doc="See `GetRightCol`") 
+    TopLeftCoords = property(GetTopLeftCoords,doc="See `GetTopLeftCoords`") 
+    TopRow = property(GetTopRow,doc="See `GetTopRow`") 
 _grid.GridRangeSelectEvent_swigregister(GridRangeSelectEvent)
 
 class GridEditorCreatedEvent(_core.CommandEvent):
@@ -2188,6 +2292,9 @@ class GridEditorCreatedEvent(_core.CommandEvent):
         """SetControl(self, Control ctrl)"""
         return _grid.GridEditorCreatedEvent_SetControl(*args, **kwargs)
 
+    Col = property(GetCol,SetCol,doc="See `GetCol` and `SetCol`") 
+    Control = property(GetControl,SetControl,doc="See `GetControl` and `SetControl`") 
+    Row = property(GetRow,SetRow,doc="See `GetRow` and `SetRow`") 
 _grid.GridEditorCreatedEvent_swigregister(GridEditorCreatedEvent)
 
 wxEVT_GRID_CELL_LEFT_CLICK = _grid.wxEVT_GRID_CELL_LEFT_CLICK