Poodletooth-iLand/panda/python/Lib/site-packages/wx/grid.pi
Master Jumblespeed d882959bfa switch to remote
2015-05-18 22:11:33 -04:00

3922 lines
100 KiB
Text
Executable file

# -*- coding: utf-8 -*-
#---------------------------------------------------------------------------
# This file is generated by wxPython's PI generator. Do not edit by hand.
#
# (The *.pi files are used by WingIDE to provide more information than it is
# able to glean from introspection of extension types and methods.)
#
# Copyright: (c) 2013 by Total Control Software
# License: wxWindows License
#---------------------------------------------------------------------------
#-- begin-_grid --#
import wx
#-- end-_grid --#
#-- begin-grid --#
GridNameStr = ""
GRID_FLOAT_FORMAT_FIXED = 0
GRID_FLOAT_FORMAT_SCIENTIFIC = 0
GRID_FLOAT_FORMAT_COMPACT = 0
GRID_FLOAT_FORMAT_UPPER = 0
GRID_FLOAT_FORMAT_DEFAULT = 0
GRIDTABLE_REQUEST_VIEW_GET_VALUES = 0
GRIDTABLE_REQUEST_VIEW_SEND_VALUES = 0
GRIDTABLE_NOTIFY_ROWS_INSERTED = 0
GRIDTABLE_NOTIFY_ROWS_APPENDED = 0
GRIDTABLE_NOTIFY_ROWS_DELETED = 0
GRIDTABLE_NOTIFY_COLS_INSERTED = 0
GRIDTABLE_NOTIFY_COLS_APPENDED = 0
GRIDTABLE_NOTIFY_COLS_DELETED = 0
GRID_DRAW_ROWS_HEADER = 0
GRID_DRAW_COLS_HEADER = 0
GRID_DRAW_CELL_LINES = 0
GRID_DRAW_BOX_RECT = 0
GRID_DRAW_SELECTION = 0
GRID_DRAW_DEFAULT = 0
wxEVT_GRID_CELL_LEFT_CLICK = 0
wxEVT_GRID_CELL_RIGHT_CLICK = 0
wxEVT_GRID_CELL_LEFT_DCLICK = 0
wxEVT_GRID_CELL_RIGHT_DCLICK = 0
wxEVT_GRID_LABEL_LEFT_CLICK = 0
wxEVT_GRID_LABEL_RIGHT_CLICK = 0
wxEVT_GRID_LABEL_LEFT_DCLICK = 0
wxEVT_GRID_LABEL_RIGHT_DCLICK = 0
wxEVT_GRID_ROW_SIZE = 0
wxEVT_GRID_COL_SIZE = 0
wxEVT_GRID_COL_AUTO_SIZE = 0
wxEVT_GRID_RANGE_SELECT = 0
wxEVT_GRID_CELL_CHANGING = 0
wxEVT_GRID_CELL_CHANGED = 0
wxEVT_GRID_SELECT_CELL = 0
wxEVT_GRID_EDITOR_SHOWN = 0
wxEVT_GRID_EDITOR_HIDDEN = 0
wxEVT_GRID_EDITOR_CREATED = 0
wxEVT_GRID_CELL_BEGIN_DRAG = 0
wxEVT_GRID_COL_MOVE = 0
wxEVT_GRID_COL_SORT = 0
wxEVT_GRID_TABBING = 0
class GridCellCoords(object):
"""
GridCellCoords()
GridCellCoords(row, col)
Represents coordinates of a grid cell.
"""
def __init__(self, *args, **kw):
"""
GridCellCoords()
GridCellCoords(row, col)
Represents coordinates of a grid cell.
"""
def GetRow(self):
"""
GetRow() -> int
Return the row of the coordinate.
"""
def SetRow(self, n):
"""
SetRow(n)
Set the row of the coordinate.
"""
def GetCol(self):
"""
GetCol() -> int
Return the column of the coordinate.
"""
def SetCol(self, n):
"""
SetCol(n)
Set the column of the coordinate.
"""
def Set(self, row, col):
"""
Set(row, col)
Set the row and column of the coordinate.
"""
def __eq__(self):
"""
"""
def __ne__(self):
"""
"""
Col = property(None, None)
Row = property(None, None)
def Get(self):
"""
Get() -> (row,col)
Return the row and col properties as a tuple.
"""
def __str__(self):
"""
"""
def __repr__(self):
"""
"""
def __len__(self):
"""
"""
def __nonzero__(self):
"""
"""
def __reduce__(self):
"""
"""
def __getitem__(self, idx):
"""
"""
def __setitem__(self, idx, val):
"""
"""
__safe_for_unpickling__ = True
# end of class GridCellCoords
class GridCellRenderer(wx.ClientDataContainer, wx.RefCounter):
"""
GridCellRenderer()
This class is responsible for actually drawing the cell in the grid.
"""
def __init__(self):
"""
GridCellRenderer()
This class is responsible for actually drawing the cell in the grid.
"""
def Clone(self):
"""
Clone() -> GridCellRenderer
This function must be implemented in derived classes to return a copy
of itself.
"""
def Draw(self, grid, attr, dc, rect, row, col, isSelected):
"""
Draw(grid, attr, dc, rect, row, col, isSelected)
Draw the given cell on the provided DC inside the given rectangle
using the style specified by the attribute and the default or selected
state corresponding to the isSelected value.
"""
def GetBestSize(self, grid, attr, dc, row, col):
"""
GetBestSize(grid, attr, dc, row, col) -> wx.Size
Get the preferred size of the cell for its contents.
"""
# end of class GridCellRenderer
class GridCellAutoWrapStringRenderer(GridCellStringRenderer):
"""
GridCellAutoWrapStringRenderer()
This class may be used to format string data in a cell.
"""
def __init__(self):
"""
GridCellAutoWrapStringRenderer()
This class may be used to format string data in a cell.
"""
# end of class GridCellAutoWrapStringRenderer
class GridCellBoolRenderer(GridCellRenderer):
"""
GridCellBoolRenderer()
This class may be used to format boolean data in a cell.
"""
def __init__(self):
"""
GridCellBoolRenderer()
This class may be used to format boolean data in a cell.
"""
# end of class GridCellBoolRenderer
class GridCellDateTimeRenderer(GridCellStringRenderer):
"""
GridCellDateTimeRenderer(outformat=wx.DefaultDateTimeFormat, informat=wx.DefaultDateTimeFormat)
This class may be used to format a date/time data in a cell.
"""
def __init__(self, outformat=wx.DefaultDateTimeFormat, informat=wx.DefaultDateTimeFormat):
"""
GridCellDateTimeRenderer(outformat=wx.DefaultDateTimeFormat, informat=wx.DefaultDateTimeFormat)
This class may be used to format a date/time data in a cell.
"""
def SetParameters(self, params):
"""
SetParameters(params)
Sets the strptime()-like format string which will be used to parse the
date/time.
"""
# end of class GridCellDateTimeRenderer
class GridCellEnumRenderer(GridCellStringRenderer):
"""
GridCellEnumRenderer(choices=wx.EmptyString)
This class may be used to render in a cell a number as a textual
equivalent.
"""
def __init__(self, choices=wx.EmptyString):
"""
GridCellEnumRenderer(choices=wx.EmptyString)
This class may be used to render in a cell a number as a textual
equivalent.
"""
def SetParameters(self, params):
"""
SetParameters(params)
Sets the comma separated string content of the enum.
"""
# end of class GridCellEnumRenderer
class GridCellFloatRenderer(GridCellStringRenderer):
"""
GridCellFloatRenderer(width=-1, precision=-1, format=GRID_FLOAT_FORMAT_DEFAULT)
This class may be used to format floating point data in a cell.
"""
def __init__(self, width=-1, precision=-1, format=GRID_FLOAT_FORMAT_DEFAULT):
"""
GridCellFloatRenderer(width=-1, precision=-1, format=GRID_FLOAT_FORMAT_DEFAULT)
This class may be used to format floating point data in a cell.
"""
def GetFormat(self):
"""
GetFormat() -> int
Returns the specifier used to format the data to string.
"""
def GetPrecision(self):
"""
GetPrecision() -> int
Returns the precision.
"""
def GetWidth(self):
"""
GetWidth() -> int
Returns the width.
"""
def SetFormat(self, format):
"""
SetFormat(format)
Set the format to use for display the number.
"""
def SetParameters(self, params):
"""
SetParameters(params)
The parameters string format is "width[,precision[,format]]" where
format should be chosen between f|e|g|E|G (f is used by default)
"""
def SetPrecision(self, precision):
"""
SetPrecision(precision)
Sets the precision.
"""
def SetWidth(self, width):
"""
SetWidth(width)
Sets the width.
"""
Format = property(None, None)
Precision = property(None, None)
Width = property(None, None)
# end of class GridCellFloatRenderer
class GridCellNumberRenderer(GridCellStringRenderer):
"""
GridCellNumberRenderer()
This class may be used to format integer data in a cell.
"""
def __init__(self):
"""
GridCellNumberRenderer()
This class may be used to format integer data in a cell.
"""
# end of class GridCellNumberRenderer
class GridCellStringRenderer(GridCellRenderer):
"""
GridCellStringRenderer()
This class may be used to format string data in a cell; it is the
default for string cells.
"""
def __init__(self):
"""
GridCellStringRenderer()
This class may be used to format string data in a cell; it is the
default for string cells.
"""
# end of class GridCellStringRenderer
class GridCellEditor(wx.ClientDataContainer, wx.RefCounter):
"""
GridCellEditor()
This class is responsible for providing and manipulating the in-place
edit controls for the grid.
"""
def __init__(self):
"""
GridCellEditor()
This class is responsible for providing and manipulating the in-place
edit controls for the grid.
"""
def BeginEdit(self, row, col, grid):
"""
BeginEdit(row, col, grid)
Fetch the value from the table and prepare the edit control to begin
editing.
"""
def Clone(self):
"""
Clone() -> GridCellEditor
Create a new object which is the copy of this one.
"""
def Create(self, parent, id, evtHandler):
"""
Create(parent, id, evtHandler)
Creates the actual edit control.
"""
def Destroy(self):
"""
Destroy()
Final cleanup.
"""
def EndEdit(self, row, col, grid, oldval):
"""
EndEdit(row, col, grid, oldval)
End editing the cell.
This function must check if the current value of the editing cell
is valid and different from the original value in its string
form. If not then simply return None. If it has changed then
this method should save the new value so that ApplyEdit can
apply it later and the string representation of the new value
should be returned.
Notice that this method shoiuld not modify the grid as the
change could still be vetoed.
"""
def ApplyEdit(self, row, col, grid):
"""
ApplyEdit(row, col, grid)
Effectively save the changes in the grid.
"""
def HandleReturn(self, event):
"""
HandleReturn(event)
Some types of controls on some platforms may need some help with the
Return key.
"""
def IsCreated(self):
"""
IsCreated() -> bool
Returns true if the edit control has been created.
"""
def PaintBackground(self, dc, rectCell, attr):
"""
PaintBackground(dc, rectCell, attr)
Draws the part of the cell not occupied by the control: the base class
version just fills it with background colour from the attribute.
"""
def Reset(self):
"""
Reset()
Reset the value in the control back to its starting value.
"""
def SetSize(self, rect):
"""
SetSize(rect)
Size and position the edit control.
"""
def Show(self, show, attr=None):
"""
Show(show, attr=None)
Show or hide the edit control, use the specified attributes to set
colours/fonts for it.
"""
def StartingClick(self):
"""
StartingClick()
If the editor is enabled by clicking on the cell, this method will be
called.
"""
def StartingKey(self, event):
"""
StartingKey(event)
If the editor is enabled by pressing keys on the grid, this will be
called to let the editor do something about that first key if desired.
"""
def GetValue(self):
"""
GetValue() -> String
Returns the value currently in the editor control.
"""
def GetControl(self):
"""
GetControl() -> wx.Control
Get the wxControl used by this editor.
"""
def SetControl(self, control):
"""
SetControl(control)
Set the wxControl that will be used by this cell editor for editing
the value.
"""
Control = property(None, None)
Value = property(None, None)
# end of class GridCellEditor
class GridCellAutoWrapStringEditor(GridCellTextEditor):
"""
GridCellAutoWrapStringEditor()
Grid cell editor for wrappable string/text data.
"""
def __init__(self):
"""
GridCellAutoWrapStringEditor()
Grid cell editor for wrappable string/text data.
"""
def EndEdit(self, row, col, grid, oldval):
"""
EndEdit(row, col, grid, oldval)
End editing the cell.
This function must check if the current value of the editing cell
is valid and different from the original value in its string
form. If not then simply return None. If it has changed then
this method should save the new value so that ApplyEdit can
apply it later and the string representation of the new value
should be returned.
Notice that this method shoiuld not modify the grid as the
change could still be vetoed.
"""
# end of class GridCellAutoWrapStringEditor
class GridCellBoolEditor(GridCellEditor):
"""
GridCellBoolEditor()
Grid cell editor for boolean data.
"""
def __init__(self):
"""
GridCellBoolEditor()
Grid cell editor for boolean data.
"""
@staticmethod
def IsTrueValue(value):
"""
IsTrueValue(value) -> bool
Returns true if the given value is equal to the string representation
of the truth value we currently use (see UseStringValues()).
"""
@staticmethod
def UseStringValues(valueTrue="1", valueFalse=wx.EmptyString):
"""
UseStringValues(valueTrue="1", valueFalse=wx.EmptyString)
This method allows you to customize the values returned by GetValue()
for the cell using this editor.
"""
def EndEdit(self, row, col, grid, oldval):
"""
EndEdit(row, col, grid, oldval)
End editing the cell.
This function must check if the current value of the editing cell
is valid and different from the original value in its string
form. If not then simply return None. If it has changed then
this method should save the new value so that ApplyEdit can
apply it later and the string representation of the new value
should be returned.
Notice that this method shoiuld not modify the grid as the
change could still be vetoed.
"""
# end of class GridCellBoolEditor
class GridCellChoiceEditor(GridCellEditor):
"""
GridCellChoiceEditor(choices, allowOthers=False)
Grid cell editor for string data providing the user a choice from a
list of strings.
"""
def __init__(self, *args, **kw):
"""
GridCellChoiceEditor(choices, allowOthers=False)
Grid cell editor for string data providing the user a choice from a
list of strings.
"""
def SetParameters(self, params):
"""
SetParameters(params)
Parameters string format is "item1[,item2[...,itemN]]".
"""
def EndEdit(self, row, col, grid, oldval):
"""
EndEdit(row, col, grid, oldval)
End editing the cell.
This function must check if the current value of the editing cell
is valid and different from the original value in its string
form. If not then simply return None. If it has changed then
this method should save the new value so that ApplyEdit can
apply it later and the string representation of the new value
should be returned.
Notice that this method shoiuld not modify the grid as the
change could still be vetoed.
"""
# end of class GridCellChoiceEditor
class GridCellEnumEditor(GridCellChoiceEditor):
"""
GridCellEnumEditor(choices=wx.EmptyString)
Grid cell editor which displays an enum number as a textual equivalent
(eg.
"""
def __init__(self, choices=wx.EmptyString):
"""
GridCellEnumEditor(choices=wx.EmptyString)
Grid cell editor which displays an enum number as a textual equivalent
(eg.
"""
def EndEdit(self, row, col, grid, oldval):
"""
EndEdit(row, col, grid, oldval)
End editing the cell.
This function must check if the current value of the editing cell
is valid and different from the original value in its string
form. If not then simply return None. If it has changed then
this method should save the new value so that ApplyEdit can
apply it later and the string representation of the new value
should be returned.
Notice that this method shoiuld not modify the grid as the
change could still be vetoed.
"""
# end of class GridCellEnumEditor
class GridCellTextEditor(GridCellEditor):
"""
GridCellTextEditor(maxChars=0)
Grid cell editor for string/text data.
"""
def __init__(self, maxChars=0):
"""
GridCellTextEditor(maxChars=0)
Grid cell editor for string/text data.
"""
def SetParameters(self, params):
"""
SetParameters(params)
The parameters string format is "n" where n is a number representing
the maximum width.
"""
def SetValidator(self, validator):
"""
SetValidator(validator)
Set validator to validate user input.
"""
def EndEdit(self, row, col, grid, oldval):
"""
EndEdit(row, col, grid, oldval)
End editing the cell.
This function must check if the current value of the editing cell
is valid and different from the original value in its string
form. If not then simply return None. If it has changed then
this method should save the new value so that ApplyEdit can
apply it later and the string representation of the new value
should be returned.
Notice that this method shoiuld not modify the grid as the
change could still be vetoed.
"""
# end of class GridCellTextEditor
class GridCellFloatEditor(GridCellTextEditor):
"""
GridCellFloatEditor(width=-1, precision=-1, format=GRID_FLOAT_FORMAT_DEFAULT)
The editor for floating point numbers data.
"""
def __init__(self, width=-1, precision=-1, format=GRID_FLOAT_FORMAT_DEFAULT):
"""
GridCellFloatEditor(width=-1, precision=-1, format=GRID_FLOAT_FORMAT_DEFAULT)
The editor for floating point numbers data.
"""
def SetParameters(self, params):
"""
SetParameters(params)
The parameters string format is "width[,precision[,format]]" where
format should be chosen between f|e|g|E|G (f is used by default)
"""
def EndEdit(self, row, col, grid, oldval):
"""
EndEdit(row, col, grid, oldval)
End editing the cell.
This function must check if the current value of the editing cell
is valid and different from the original value in its string
form. If not then simply return None. If it has changed then
this method should save the new value so that ApplyEdit can
apply it later and the string representation of the new value
should be returned.
Notice that this method shoiuld not modify the grid as the
change could still be vetoed.
"""
# end of class GridCellFloatEditor
class GridCellNumberEditor(GridCellTextEditor):
"""
GridCellNumberEditor(min=-1, max=-1)
Grid cell editor for numeric integer data.
"""
def __init__(self, min=-1, max=-1):
"""
GridCellNumberEditor(min=-1, max=-1)
Grid cell editor for numeric integer data.
"""
def SetParameters(self, params):
"""
SetParameters(params)
Parameters string format is "min,max".
"""
def EndEdit(self, row, col, grid, oldval):
"""
EndEdit(row, col, grid, oldval)
End editing the cell.
This function must check if the current value of the editing cell
is valid and different from the original value in its string
form. If not then simply return None. If it has changed then
this method should save the new value so that ApplyEdit can
apply it later and the string representation of the new value
should be returned.
Notice that this method shoiuld not modify the grid as the
change could still be vetoed.
"""
# end of class GridCellNumberEditor
class GridCellAttr(wx.ClientDataContainer, wx.RefCounter):
"""
GridCellAttr(attrDefault=None)
GridCellAttr(colText, colBack, font, hAlign, vAlign)
This class can be used to alter the cells' appearance in the grid by
changing their attributes from the defaults.
"""
Any = 0
Cell = 0
Row = 0
Col = 0
def __init__(self, *args, **kw):
"""
GridCellAttr(attrDefault=None)
GridCellAttr(colText, colBack, font, hAlign, vAlign)
This class can be used to alter the cells' appearance in the grid by
changing their attributes from the defaults.
"""
def Clone(self):
"""
Clone() -> GridCellAttr
Creates a new copy of this object.
"""
def DecRef(self):
"""
DecRef()
This class is reference counted: it is created with ref count of 1, so
calling DecRef() once will delete it.
"""
def GetAlignment(self):
"""
GetAlignment() -> (hAlign, vAlign)
Get the alignment to use for the cell with the given attribute.
"""
def GetBackgroundColour(self):
"""
GetBackgroundColour() -> wx.Colour
Returns the background colour.
"""
def GetEditor(self, grid, row, col):
"""
GetEditor(grid, row, col) -> GridCellEditor
Returns the cell editor.
"""
def GetFont(self):
"""
GetFont() -> wx.Font
Returns the font.
"""
def GetNonDefaultAlignment(self):
"""
GetNonDefaultAlignment() -> (hAlign, vAlign)
Get the alignment defined by this attribute.
"""
def GetRenderer(self, grid, row, col):
"""
GetRenderer(grid, row, col) -> GridCellRenderer
Returns the cell renderer.
"""
def GetTextColour(self):
"""
GetTextColour() -> wx.Colour
Returns the text colour.
"""
def HasAlignment(self):
"""
HasAlignment() -> bool
Returns true if this attribute has a valid alignment set.
"""
def HasBackgroundColour(self):
"""
HasBackgroundColour() -> bool
Returns true if this attribute has a valid background colour set.
"""
def HasEditor(self):
"""
HasEditor() -> bool
Returns true if this attribute has a valid cell editor set.
"""
def HasFont(self):
"""
HasFont() -> bool
Returns true if this attribute has a valid font set.
"""
def HasRenderer(self):
"""
HasRenderer() -> bool
Returns true if this attribute has a valid cell renderer set.
"""
def HasTextColour(self):
"""
HasTextColour() -> bool
Returns true if this attribute has a valid text colour set.
"""
def IncRef(self):
"""
IncRef()
This class is reference counted: it is created with ref count of 1, so
calling DecRef() once will delete it.
"""
def IsReadOnly(self):
"""
IsReadOnly() -> bool
Returns true if this cell is set as read-only.
"""
def SetAlignment(self, hAlign, vAlign):
"""
SetAlignment(hAlign, vAlign)
Sets the alignment.
"""
def SetBackgroundColour(self, colBack):
"""
SetBackgroundColour(colBack)
Sets the background colour.
"""
def SetDefAttr(self, defAttr):
"""
SetDefAttr(defAttr)
"""
def SetEditor(self, editor):
"""
SetEditor(editor)
Sets the editor to be used with the cells with this attribute.
"""
def SetFont(self, font):
"""
SetFont(font)
Sets the font.
"""
def SetReadOnly(self, isReadOnly=True):
"""
SetReadOnly(isReadOnly=True)
Sets the cell as read-only.
"""
def SetRenderer(self, renderer):
"""
SetRenderer(renderer)
Sets the renderer to be used for cells with this attribute.
"""
def SetTextColour(self, colText):
"""
SetTextColour(colText)
Sets the text colour.
"""
BackgroundColour = property(None, None)
Font = property(None, None)
TextColour = property(None, None)
# end of class GridCellAttr
class GridCornerHeaderRenderer(object):
"""
Base class for corner window renderer.
"""
def DrawBorder(self, grid, dc, rect):
"""
DrawBorder(grid, dc, rect)
Called by the grid to draw the corner window border.
"""
# end of class GridCornerHeaderRenderer
class GridHeaderLabelsRenderer(GridCornerHeaderRenderer):
"""
Common base class for row and column headers renderers.
"""
def DrawLabel(self, grid, dc, value, rect, horizAlign, vertAlign, textOrientation):
"""
DrawLabel(grid, dc, value, rect, horizAlign, vertAlign, textOrientation)
Called by the grid to draw the specified label.
"""
# end of class GridHeaderLabelsRenderer
class GridRowHeaderRenderer(GridHeaderLabelsRenderer):
"""
Base class for row headers renderer.
"""
# end of class GridRowHeaderRenderer
class GridColumnHeaderRenderer(GridHeaderLabelsRenderer):
"""
Base class for column headers renderer.
"""
# end of class GridColumnHeaderRenderer
class GridRowHeaderRendererDefault(GridRowHeaderRenderer):
"""
Default row header renderer.
"""
def DrawBorder(self, grid, dc, rect):
"""
DrawBorder(grid, dc, rect)
Implement border drawing for the row labels.
"""
# end of class GridRowHeaderRendererDefault
class GridColumnHeaderRendererDefault(GridColumnHeaderRenderer):
"""
Default column header renderer.
"""
def DrawBorder(self, grid, dc, rect):
"""
DrawBorder(grid, dc, rect)
Implement border drawing for the column labels.
"""
# end of class GridColumnHeaderRendererDefault
class GridCornerHeaderRendererDefault(GridCornerHeaderRenderer):
"""
Default corner window renderer.
"""
def DrawBorder(self, grid, dc, rect):
"""
DrawBorder(grid, dc, rect)
Implement border drawing for the corner window.
"""
# end of class GridCornerHeaderRendererDefault
class GridCellAttrProvider(wx.ClientDataContainer):
"""
GridCellAttrProvider()
Class providing attributes to be used for the grid cells.
"""
def __init__(self):
"""
GridCellAttrProvider()
Class providing attributes to be used for the grid cells.
"""
def SetAttr(self, attr, row, col):
"""
SetAttr(attr, row, col)
Setting attributes.
"""
def SetRowAttr(self, attr, row):
"""
SetRowAttr(attr, row)
Set attribute for the specified row.
"""
def SetColAttr(self, attr, col):
"""
SetColAttr(attr, col)
Set attribute for the specified column.
"""
def GetColumnHeaderRenderer(self, col):
"""
GetColumnHeaderRenderer(col) -> GridColumnHeaderRenderer
Getting header renderers.
"""
def GetRowHeaderRenderer(self, row):
"""
GetRowHeaderRenderer(row) -> GridRowHeaderRenderer
Return the renderer used for drawing row headers.
"""
def GetCornerRenderer(self):
"""
GetCornerRenderer() -> GridCornerHeaderRenderer
Return the renderer used for drawing the corner window.
"""
def GetAttr(self, row, col, kind):
"""
GetAttr(row, col, kind) -> GridCellAttr
Get the attribute to use for the specified cell.
"""
CornerRenderer = property(None, None)
# end of class GridCellAttrProvider
class GridTableBase(wx.Object):
"""
GridTableBase()
The almost abstract base class for grid tables.
"""
def __init__(self):
"""
GridTableBase()
The almost abstract base class for grid tables.
"""
def IsEmptyCell(self, row, col):
"""
IsEmptyCell(row, col) -> bool
May be overridden to implement testing for empty cells.
"""
def IsEmpty(self, coords):
"""
IsEmpty(coords) -> bool
Same as IsEmptyCell() but taking wxGridCellCoords.
"""
def GetValue(self, row, col):
"""
GetValue(row, col) -> String
Must be overridden to implement accessing the table values as text.
"""
def SetValue(self, row, col, value):
"""
SetValue(row, col, value)
Must be overridden to implement setting the table values as text.
"""
def GetTypeName(self, row, col):
"""
GetTypeName(row, col) -> String
Returns the type of the value in the given cell.
"""
def CanGetValueAs(self, row, col, typeName):
"""
CanGetValueAs(row, col, typeName) -> bool
Returns true if the value of the given cell can be accessed as if it
were of the specified type.
"""
def CanSetValueAs(self, row, col, typeName):
"""
CanSetValueAs(row, col, typeName) -> bool
Returns true if the value of the given cell can be set as if it were
of the specified type.
"""
def GetValueAsLong(self, row, col):
"""
GetValueAsLong(row, col) -> long
Returns the value of the given cell as a long.
"""
def GetValueAsDouble(self, row, col):
"""
GetValueAsDouble(row, col) -> double
Returns the value of the given cell as a double.
"""
def GetValueAsBool(self, row, col):
"""
GetValueAsBool(row, col) -> bool
Returns the value of the given cell as a boolean.
"""
def GetValueAsCustom(self, row, col, typeName):
"""
GetValueAsCustom(row, col, typeName) -> void
Returns the value of the given cell as a user-defined type.
"""
def SetValueAsLong(self, row, col, value):
"""
SetValueAsLong(row, col, value)
Sets the value of the given cell as a long.
"""
def SetValueAsDouble(self, row, col, value):
"""
SetValueAsDouble(row, col, value)
Sets the value of the given cell as a double.
"""
def SetValueAsBool(self, row, col, value):
"""
SetValueAsBool(row, col, value)
Sets the value of the given cell as a boolean.
"""
def SetValueAsCustom(self, row, col, typeName, value):
"""
SetValueAsCustom(row, col, typeName, value)
Sets the value of the given cell as a user-defined type.
"""
def Clear(self):
"""
Clear()
Clear the table contents.
"""
def InsertRows(self, pos=0, numRows=1):
"""
InsertRows(pos=0, numRows=1) -> bool
Insert additional rows into the table.
"""
def AppendRows(self, numRows=1):
"""
AppendRows(numRows=1) -> bool
Append additional rows at the end of the table.
"""
def DeleteRows(self, pos=0, numRows=1):
"""
DeleteRows(pos=0, numRows=1) -> bool
Delete rows from the table.
"""
def InsertCols(self, pos=0, numCols=1):
"""
InsertCols(pos=0, numCols=1) -> bool
Exactly the same as InsertRows() but for columns.
"""
def AppendCols(self, numCols=1):
"""
AppendCols(numCols=1) -> bool
Exactly the same as AppendRows() but for columns.
"""
def DeleteCols(self, pos=0, numCols=1):
"""
DeleteCols(pos=0, numCols=1) -> bool
Exactly the same as DeleteRows() but for columns.
"""
def GetRowLabelValue(self, row):
"""
GetRowLabelValue(row) -> String
Return the label of the specified row.
"""
def GetColLabelValue(self, col):
"""
GetColLabelValue(col) -> String
Return the label of the specified column.
"""
def SetRowLabelValue(self, row, label):
"""
SetRowLabelValue(row, label)
Set the given label for the specified row.
"""
def SetColLabelValue(self, col, label):
"""
SetColLabelValue(col, label)
Exactly the same as SetRowLabelValue() but for columns.
"""
def SetAttrProvider(self, attrProvider):
"""
SetAttrProvider(attrProvider)
Associate this attributes provider with the table.
"""
def GetAttrProvider(self):
"""
GetAttrProvider() -> GridCellAttrProvider
Returns the attribute provider currently being used.
"""
def GetAttr(self, row, col, kind):
"""
GetAttr(row, col, kind) -> GridCellAttr
Return the attribute for the given cell.
"""
def SetAttr(self, attr, row, col):
"""
SetAttr(attr, row, col)
Set attribute of the specified cell.
"""
def SetRowAttr(self, attr, row):
"""
SetRowAttr(attr, row)
Set attribute of the specified row.
"""
def SetColAttr(self, attr, col):
"""
SetColAttr(attr, col)
Set attribute of the specified column.
"""
def GetNumberRows(self):
"""
GetNumberRows() -> int
Must be overridden to return the number of rows in the table.
"""
def GetNumberCols(self):
"""
GetNumberCols() -> int
Must be overridden to return the number of columns in the table.
"""
def GetRowsCount(self):
"""
GetRowsCount() -> int
Return the number of rows in the table.
"""
def GetColsCount(self):
"""
GetColsCount() -> int
Return the number of columns in the table.
"""
def SetView(self, grid):
"""
SetView(grid)
Called by the grid when the table is associated with it.
"""
def GetView(self):
"""
GetView() -> Grid
Returns the last grid passed to SetView().
"""
def CanHaveAttributes(self):
"""
CanHaveAttributes() -> bool
Returns true if this table supports attributes or false otherwise.
"""
AttrProvider = property(None, None)
ColsCount = property(None, None)
NumberCols = property(None, None)
NumberRows = property(None, None)
RowsCount = property(None, None)
View = property(None, None)
# end of class GridTableBase
class GridTableMessage(object):
"""
GridTableMessage()
GridTableMessage(table, id, comInt1=-1, comInt2=-1)
A simple class used to pass messages from the table to the grid.
"""
def __init__(self, *args, **kw):
"""
GridTableMessage()
GridTableMessage(table, id, comInt1=-1, comInt2=-1)
A simple class used to pass messages from the table to the grid.
"""
def SetTableObject(self, table):
"""
SetTableObject(table)
"""
def GetTableObject(self):
"""
GetTableObject() -> GridTableBase
"""
def SetId(self, id):
"""
SetId(id)
"""
def GetId(self):
"""
GetId() -> int
"""
def SetCommandInt(self, comInt1):
"""
SetCommandInt(comInt1)
"""
def GetCommandInt(self):
"""
GetCommandInt() -> int
"""
def SetCommandInt2(self, comInt2):
"""
SetCommandInt2(comInt2)
"""
def GetCommandInt2(self):
"""
GetCommandInt2() -> int
"""
CommandInt = property(None, None)
CommandInt2 = property(None, None)
Id = property(None, None)
TableObject = property(None, None)
# end of class GridTableMessage
class GridStringTable(GridTableBase):
"""
GridStringTable()
GridStringTable(numRows, numCols)
Simplest type of data table for a grid for small tables of strings
that are stored in memory.
"""
def __init__(self, *args, **kw):
"""
GridStringTable()
GridStringTable(numRows, numCols)
Simplest type of data table for a grid for small tables of strings
that are stored in memory.
"""
def GetNumberRows(self):
"""
GetNumberRows() -> int
Must be overridden to return the number of rows in the table.
"""
def GetNumberCols(self):
"""
GetNumberCols() -> int
Must be overridden to return the number of columns in the table.
"""
def GetValue(self, row, col):
"""
GetValue(row, col) -> String
Must be overridden to implement accessing the table values as text.
"""
def SetValue(self, row, col, value):
"""
SetValue(row, col, value)
Must be overridden to implement setting the table values as text.
"""
def Clear(self):
"""
Clear()
Clear the table contents.
"""
def InsertRows(self, pos=0, numRows=1):
"""
InsertRows(pos=0, numRows=1) -> bool
Insert additional rows into the table.
"""
def AppendRows(self, numRows=1):
"""
AppendRows(numRows=1) -> bool
Append additional rows at the end of the table.
"""
def DeleteRows(self, pos=0, numRows=1):
"""
DeleteRows(pos=0, numRows=1) -> bool
Delete rows from the table.
"""
def InsertCols(self, pos=0, numCols=1):
"""
InsertCols(pos=0, numCols=1) -> bool
Exactly the same as InsertRows() but for columns.
"""
def AppendCols(self, numCols=1):
"""
AppendCols(numCols=1) -> bool
Exactly the same as AppendRows() but for columns.
"""
def DeleteCols(self, pos=0, numCols=1):
"""
DeleteCols(pos=0, numCols=1) -> bool
Exactly the same as DeleteRows() but for columns.
"""
def SetRowLabelValue(self, row, label):
"""
SetRowLabelValue(row, label)
Set the given label for the specified row.
"""
def SetColLabelValue(self, col, label):
"""
SetColLabelValue(col, label)
Exactly the same as SetRowLabelValue() but for columns.
"""
def GetRowLabelValue(self, row):
"""
GetRowLabelValue(row) -> String
Return the label of the specified row.
"""
def GetColLabelValue(self, col):
"""
GetColLabelValue(col) -> String
Return the label of the specified column.
"""
NumberCols = property(None, None)
NumberRows = property(None, None)
# end of class GridStringTable
class GridSizesInfo(object):
"""
GridSizesInfo()
GridSizesInfo(defSize, allSizes)
wxGridSizesInfo stores information about sizes of all wxGrid rows or
columns.
"""
def __init__(self, *args, **kw):
"""
GridSizesInfo()
GridSizesInfo(defSize, allSizes)
wxGridSizesInfo stores information about sizes of all wxGrid rows or
columns.
"""
m_sizeDefault = property(None, None)
def GetSize(self, pos):
"""
GetSize(pos) -> int
Get the element size.
"""
# end of class GridSizesInfo
class Grid(wx.ScrolledWindow):
"""
Grid()
Grid(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.WANTS_CHARS, name=GridNameStr)
wxGrid and its related classes are used for displaying and editing
tabular data.
"""
GridSelectCells = 0
GridSelectRows = 0
GridSelectColumns = 0
GridSelectRowsOrColumns = 0
CellSpan_Inside = 0
CellSpan_None = 0
CellSpan_Main = 0
Tab_Stop = 0
Tab_Wrap = 0
Tab_Leave = 0
def __init__(self, *args, **kw):
"""
Grid()
Grid(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.WANTS_CHARS, name=GridNameStr)
wxGrid and its related classes are used for displaying and editing
tabular data.
"""
def Create(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.WANTS_CHARS, name=GridNameStr):
"""
Create(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.WANTS_CHARS, name=GridNameStr) -> bool
Creates the grid window for an object initialized using the default
constructor.
"""
def CreateGrid(self, numRows, numCols, selmode=GridSelectCells):
"""
CreateGrid(numRows, numCols, selmode=GridSelectCells) -> bool
Creates a grid with the specified initial number of rows and columns.
"""
def _SetTable(self, table, takeOwnership=False, selmode=GridSelectCells):
"""
_SetTable(table, takeOwnership=False, selmode=GridSelectCells) -> bool
Passes a pointer to a custom grid table to be used by the grid.
"""
def ProcessTableMessage(self, msg):
"""
ProcessTableMessage(msg) -> bool
Receive and handle a message from the table.
"""
def EnableGridLines(self, enable=True):
"""
EnableGridLines(enable=True)
Turns the drawing of grid lines on or off.
"""
def GetColGridLinePen(self, col):
"""
GetColGridLinePen(col) -> wx.Pen
Returns the pen used for vertical grid lines.
"""
def GetDefaultGridLinePen(self):
"""
GetDefaultGridLinePen() -> wx.Pen
Returns the pen used for grid lines.
"""
def GetGridLineColour(self):
"""
GetGridLineColour() -> wx.Colour
Returns the colour used for grid lines.
"""
def GetRowGridLinePen(self, row):
"""
GetRowGridLinePen(row) -> wx.Pen
Returns the pen used for horizontal grid lines.
"""
def GridLinesEnabled(self):
"""
GridLinesEnabled() -> bool
Returns true if drawing of grid lines is turned on, false otherwise.
"""
def SetGridLineColour(self, colour):
"""
SetGridLineColour(colour)
Sets the colour used to draw grid lines.
"""
def GetColLabelAlignment(self):
"""
GetColLabelAlignment() -> (horiz, vert)
Sets the arguments to the current column label alignment values.
"""
def GetColLabelTextOrientation(self):
"""
GetColLabelTextOrientation() -> int
Returns the orientation of the column labels (either wxHORIZONTAL or
wxVERTICAL).
"""
def GetColLabelValue(self, col):
"""
GetColLabelValue(col) -> String
Returns the specified column label.
"""
def GetLabelBackgroundColour(self):
"""
GetLabelBackgroundColour() -> wx.Colour
Returns the colour used for the background of row and column labels.
"""
def GetLabelFont(self):
"""
GetLabelFont() -> wx.Font
Returns the font used for row and column labels.
"""
def GetLabelTextColour(self):
"""
GetLabelTextColour() -> wx.Colour
Returns the colour used for row and column label text.
"""
def GetRowLabelAlignment(self):
"""
GetRowLabelAlignment() -> (horiz, vert)
Returns the alignment used for row labels.
"""
def GetRowLabelValue(self, row):
"""
GetRowLabelValue(row) -> String
Returns the specified row label.
"""
def HideColLabels(self):
"""
HideColLabels()
Hides the column labels by calling SetColLabelSize() with a size of 0.
"""
def HideRowLabels(self):
"""
HideRowLabels()
Hides the row labels by calling SetRowLabelSize() with a size of 0.
"""
def SetColLabelAlignment(self, horiz, vert):
"""
SetColLabelAlignment(horiz, vert)
Sets the horizontal and vertical alignment of column label text.
"""
def SetColLabelTextOrientation(self, textOrientation):
"""
SetColLabelTextOrientation(textOrientation)
Sets the orientation of the column labels (either wxHORIZONTAL or
wxVERTICAL).
"""
def SetColLabelValue(self, col, value):
"""
SetColLabelValue(col, value)
Set the value for the given column label.
"""
def SetLabelBackgroundColour(self, colour):
"""
SetLabelBackgroundColour(colour)
Sets the background colour for row and column labels.
"""
def SetLabelFont(self, font):
"""
SetLabelFont(font)
Sets the font for row and column labels.
"""
def SetLabelTextColour(self, colour):
"""
SetLabelTextColour(colour)
Sets the colour for row and column label text.
"""
def SetRowLabelAlignment(self, horiz, vert):
"""
SetRowLabelAlignment(horiz, vert)
Sets the horizontal and vertical alignment of row label text.
"""
def SetRowLabelValue(self, row, value):
"""
SetRowLabelValue(row, value)
Sets the value for the given row label.
"""
def SetUseNativeColLabels(self, native=True):
"""
SetUseNativeColLabels(native=True)
Call this in order to make the column labels use a native look by
using wxRendererNative::DrawHeaderButton() internally.
"""
def UseNativeColHeader(self, native=True):
"""
UseNativeColHeader(native=True)
Enable the use of native header window for column labels.
"""
def GetCellAlignment(self, row, col):
"""
GetCellAlignment(row, col) -> (horiz, vert)
Sets the arguments to the horizontal and vertical text alignment
values for the grid cell at the specified location.
"""
def GetCellBackgroundColour(self, row, col):
"""
GetCellBackgroundColour(row, col) -> wx.Colour
Returns the background colour of the cell at the specified location.
"""
def GetCellFont(self, row, col):
"""
GetCellFont(row, col) -> wx.Font
Returns the font for text in the grid cell at the specified location.
"""
def GetCellTextColour(self, row, col):
"""
GetCellTextColour(row, col) -> wx.Colour
Returns the text colour for the grid cell at the specified location.
"""
def GetDefaultCellAlignment(self):
"""
GetDefaultCellAlignment() -> (horiz, vert)
Returns the default cell alignment.
"""
def GetDefaultCellBackgroundColour(self):
"""
GetDefaultCellBackgroundColour() -> wx.Colour
Returns the current default background colour for grid cells.
"""
def GetDefaultCellFont(self):
"""
GetDefaultCellFont() -> wx.Font
Returns the current default font for grid cell text.
"""
def GetDefaultCellTextColour(self):
"""
GetDefaultCellTextColour() -> wx.Colour
Returns the current default colour for grid cell text.
"""
def SetCellAlignment(self, *args, **kw):
"""
SetCellAlignment(row, col, horiz, vert)
SetCellAlignment(align, row, col)
Sets the horizontal and vertical alignment for grid cell text at the
specified location.
"""
def SetCellBackgroundColour(self, row, col, colour):
"""
SetCellBackgroundColour(row, col, colour)
Set the background colour for the given cell or all cells by default.
"""
def SetCellFont(self, row, col, font):
"""
SetCellFont(row, col, font)
Sets the font for text in the grid cell at the specified location.
"""
def SetCellTextColour(self, *args, **kw):
"""
SetCellTextColour(row, col, colour)
SetCellTextColour(val, row, col)
SetCellTextColour(colour)
Sets the text colour for the given cell.
"""
def SetDefaultCellAlignment(self, horiz, vert):
"""
SetDefaultCellAlignment(horiz, vert)
Sets the default horizontal and vertical alignment for grid cell text.
"""
def SetDefaultCellBackgroundColour(self, colour):
"""
SetDefaultCellBackgroundColour(colour)
Sets the default background colour for grid cells.
"""
def SetDefaultCellFont(self, font):
"""
SetDefaultCellFont(font)
Sets the default font to be used for grid cell text.
"""
def SetDefaultCellTextColour(self, colour):
"""
SetDefaultCellTextColour(colour)
Sets the current default colour for grid cell text.
"""
def CanEnableCellControl(self):
"""
CanEnableCellControl() -> bool
Returns true if the in-place edit control for the current grid cell
can be used and false otherwise.
"""
def DisableCellEditControl(self):
"""
DisableCellEditControl()
Disables in-place editing of grid cells.
"""
def EnableCellEditControl(self, enable=True):
"""
EnableCellEditControl(enable=True)
Enables or disables in-place editing of grid cell data.
"""
def EnableEditing(self, edit):
"""
EnableEditing(edit)
Makes the grid globally editable or read-only.
"""
def GetCellEditor(self, row, col):
"""
GetCellEditor(row, col) -> GridCellEditor
Returns a pointer to the editor for the cell at the specified
location.
"""
def GetCellRenderer(self, row, col):
"""
GetCellRenderer(row, col) -> GridCellRenderer
Returns a pointer to the renderer for the grid cell at the specified
location.
"""
def GetCellValue(self, *args, **kw):
"""
GetCellValue(row, col) -> String
GetCellValue(coords) -> String
Returns the string contained in the cell at the specified location.
"""
def GetDefaultEditor(self):
"""
GetDefaultEditor() -> GridCellEditor
Returns a pointer to the current default grid cell editor.
"""
def GetDefaultEditorForCell(self, *args, **kw):
"""
GetDefaultEditorForCell(row, col) -> GridCellEditor
GetDefaultEditorForCell(c) -> GridCellEditor
Returns the default editor for the specified cell.
"""
def GetDefaultEditorForType(self, typeName):
"""
GetDefaultEditorForType(typeName) -> GridCellEditor
Returns the default editor for the cells containing values of the
given type.
"""
def GetDefaultRenderer(self):
"""
GetDefaultRenderer() -> GridCellRenderer
Returns a pointer to the current default grid cell renderer.
"""
def GetDefaultRendererForCell(self, row, col):
"""
GetDefaultRendererForCell(row, col) -> GridCellRenderer
Returns the default renderer for the given cell.
"""
def GetDefaultRendererForType(self, typeName):
"""
GetDefaultRendererForType(typeName) -> GridCellRenderer
Returns the default renderer for the cell containing values of the
given type.
"""
def HideCellEditControl(self):
"""
HideCellEditControl()
Hides the in-place cell edit control.
"""
def IsCellEditControlEnabled(self):
"""
IsCellEditControlEnabled() -> bool
Returns true if the in-place edit control is currently enabled.
"""
def IsCurrentCellReadOnly(self):
"""
IsCurrentCellReadOnly() -> bool
Returns true if the current cell is read-only.
"""
def IsEditable(self):
"""
IsEditable() -> bool
Returns false if the whole grid has been set as read-only or true
otherwise.
"""
def IsReadOnly(self, row, col):
"""
IsReadOnly(row, col) -> bool
Returns true if the cell at the specified location can't be edited.
"""
def RegisterDataType(self, typeName, renderer, editor):
"""
RegisterDataType(typeName, renderer, editor)
Register a new data type.
"""
def SaveEditControlValue(self):
"""
SaveEditControlValue()
Sets the value of the current grid cell to the current in-place edit
control value.
"""
def SetCellEditor(self, row, col, editor):
"""
SetCellEditor(row, col, editor)
Sets the editor for the grid cell at the specified location.
"""
def SetCellRenderer(self, row, col, renderer):
"""
SetCellRenderer(row, col, renderer)
Sets the renderer for the grid cell at the specified location.
"""
def SetCellValue(self, *args, **kw):
"""
SetCellValue(row, col, s)
SetCellValue(coords, s)
Sets the string value for the cell at the specified location.
"""
def SetColFormatBool(self, col):
"""
SetColFormatBool(col)
Sets the specified column to display boolean values.
"""
def SetColFormatCustom(self, col, typeName):
"""
SetColFormatCustom(col, typeName)
Sets the specified column to display data in a custom format.
"""
def SetColFormatFloat(self, col, width=-1, precision=-1):
"""
SetColFormatFloat(col, width=-1, precision=-1)
Sets the specified column to display floating point values with the
given width and precision.
"""
def SetColFormatNumber(self, col):
"""
SetColFormatNumber(col)
Sets the specified column to display integer values.
"""
def SetDefaultEditor(self, editor):
"""
SetDefaultEditor(editor)
Sets the default editor for grid cells.
"""
def SetDefaultRenderer(self, renderer):
"""
SetDefaultRenderer(renderer)
Sets the default renderer for grid cells.
"""
def SetReadOnly(self, row, col, isReadOnly=True):
"""
SetReadOnly(row, col, isReadOnly=True)
Makes the cell at the specified location read-only or editable.
"""
def ShowCellEditControl(self):
"""
ShowCellEditControl()
Displays the in-place cell edit control for the current cell.
"""
def AutoSize(self):
"""
AutoSize()
Automatically sets the height and width of all rows and columns to fit
their contents.
"""
def AutoSizeColLabelSize(self, col):
"""
AutoSizeColLabelSize(col)
Automatically adjusts width of the column to fit its label.
"""
def AutoSizeColumn(self, col, setAsMin=True):
"""
AutoSizeColumn(col, setAsMin=True)
Automatically sizes the column to fit its contents.
"""
def AutoSizeColumns(self, setAsMin=True):
"""
AutoSizeColumns(setAsMin=True)
Automatically sizes all columns to fit their contents.
"""
def AutoSizeRow(self, row, setAsMin=True):
"""
AutoSizeRow(row, setAsMin=True)
Automatically sizes the row to fit its contents.
"""
def AutoSizeRowLabelSize(self, col):
"""
AutoSizeRowLabelSize(col)
Automatically adjusts height of the row to fit its label.
"""
def AutoSizeRows(self, setAsMin=True):
"""
AutoSizeRows(setAsMin=True)
Automatically sizes all rows to fit their contents.
"""
def GetCellOverflow(self, row, col):
"""
GetCellOverflow(row, col) -> bool
Returns true if the cell value can overflow.
"""
def GetColLabelSize(self):
"""
GetColLabelSize() -> int
Returns the current height of the column labels.
"""
def GetColMinimalAcceptableWidth(self):
"""
GetColMinimalAcceptableWidth() -> int
Returns the minimal width to which a column may be resized.
"""
def GetColSize(self, col):
"""
GetColSize(col) -> int
Returns the width of the specified column.
"""
def IsColShown(self, col):
"""
IsColShown(col) -> bool
Returns true if the specified column is not currently hidden.
"""
def GetDefaultCellOverflow(self):
"""
GetDefaultCellOverflow() -> bool
Returns true if the cells can overflow by default.
"""
def GetDefaultColLabelSize(self):
"""
GetDefaultColLabelSize() -> int
Returns the default height for column labels.
"""
def GetDefaultColSize(self):
"""
GetDefaultColSize() -> int
Returns the current default width for grid columns.
"""
def GetDefaultRowLabelSize(self):
"""
GetDefaultRowLabelSize() -> int
Returns the default width for the row labels.
"""
def GetDefaultRowSize(self):
"""
GetDefaultRowSize() -> int
Returns the current default height for grid rows.
"""
def GetRowMinimalAcceptableHeight(self):
"""
GetRowMinimalAcceptableHeight() -> int
Returns the minimal size to which rows can be resized.
"""
def GetRowLabelSize(self):
"""
GetRowLabelSize() -> int
Returns the current width of the row labels.
"""
def GetRowSize(self, row):
"""
GetRowSize(row) -> int
Returns the height of the specified row.
"""
def IsRowShown(self, row):
"""
IsRowShown(row) -> bool
Returns true if the specified row is not currently hidden.
"""
def SetCellOverflow(self, row, col, allow):
"""
SetCellOverflow(row, col, allow)
Sets the overflow permission of the cell.
"""
def SetColLabelSize(self, height):
"""
SetColLabelSize(height)
Sets the height of the column labels.
"""
def SetColMinimalAcceptableWidth(self, width):
"""
SetColMinimalAcceptableWidth(width)
Sets the minimal width to which the user can resize columns.
"""
def SetColMinimalWidth(self, col, width):
"""
SetColMinimalWidth(col, width)
Sets the minimal width for the specified column col.
"""
def SetColSize(self, col, width):
"""
SetColSize(col, width)
Sets the width of the specified column.
"""
def HideCol(self, col):
"""
HideCol(col)
Hides the specified column.
"""
def ShowCol(self, col):
"""
ShowCol(col)
Shows the previously hidden column by resizing it to non-0 size.
"""
def SetDefaultCellOverflow(self, allow):
"""
SetDefaultCellOverflow(allow)
Sets the default overflow permission of the cells.
"""
def SetDefaultColSize(self, width, resizeExistingCols=False):
"""
SetDefaultColSize(width, resizeExistingCols=False)
Sets the default width for columns in the grid.
"""
def SetDefaultRowSize(self, height, resizeExistingRows=False):
"""
SetDefaultRowSize(height, resizeExistingRows=False)
Sets the default height for rows in the grid.
"""
def SetRowLabelSize(self, width):
"""
SetRowLabelSize(width)
Sets the width of the row labels.
"""
def SetRowMinimalAcceptableHeight(self, height):
"""
SetRowMinimalAcceptableHeight(height)
Sets the minimal row height used by default.
"""
def SetRowMinimalHeight(self, row, height):
"""
SetRowMinimalHeight(row, height)
Sets the minimal height for the specified row.
"""
def SetRowSize(self, row, height):
"""
SetRowSize(row, height)
Sets the height of the specified row.
"""
def HideRow(self, col):
"""
HideRow(col)
Hides the specified row.
"""
def ShowRow(self, col):
"""
ShowRow(col)
Shows the previously hidden row.
"""
def GetColSizes(self):
"""
GetColSizes() -> GridSizesInfo
Get size information for all columns at once.
"""
def GetRowSizes(self):
"""
GetRowSizes() -> GridSizesInfo
Get size information for all row at once.
"""
def SetColSizes(self, sizeInfo):
"""
SetColSizes(sizeInfo)
Restore all columns sizes.
"""
def SetRowSizes(self, sizeInfo):
"""
SetRowSizes(sizeInfo)
Restore all rows sizes.
"""
def SetCellSize(self, row, col, num_rows, num_cols):
"""
SetCellSize(row, col, num_rows, num_cols)
Set the size of the cell.
"""
def GetCellSize(self, *args, **kw):
"""
GetCellSize(row, col, num_rows, num_cols) -> CellSpan
GetCellSize(coords) -> wx.Size
Get the size of the cell in number of cells covered by it.
"""
def CanDragCell(self):
"""
CanDragCell() -> bool
Return true if the dragging of cells is enabled or false otherwise.
"""
def CanDragColMove(self):
"""
CanDragColMove() -> bool
Returns true if columns can be moved by dragging with the mouse.
"""
def CanDragColSize(self, col):
"""
CanDragColSize(col) -> bool
Returns true if the given column can be resized by dragging with the
mouse.
"""
def CanDragGridSize(self):
"""
CanDragGridSize() -> bool
Return true if the dragging of grid lines to resize rows and columns
is enabled or false otherwise.
"""
def CanDragRowSize(self, row):
"""
CanDragRowSize(row) -> bool
Returns true if the given row can be resized by dragging with the
mouse.
"""
def DisableColResize(self, col):
"""
DisableColResize(col)
Disable interactive resizing of the specified column.
"""
def DisableRowResize(self, row):
"""
DisableRowResize(row)
Disable interactive resizing of the specified row.
"""
def DisableDragColMove(self):
"""
DisableDragColMove()
Disables column moving by dragging with the mouse.
"""
def DisableDragColSize(self):
"""
DisableDragColSize()
Disables column sizing by dragging with the mouse.
"""
def DisableDragGridSize(self):
"""
DisableDragGridSize()
Disable mouse dragging of grid lines to resize rows and columns.
"""
def DisableDragRowSize(self):
"""
DisableDragRowSize()
Disables row sizing by dragging with the mouse.
"""
def EnableDragCell(self, enable=True):
"""
EnableDragCell(enable=True)
Enables or disables cell dragging with the mouse.
"""
def EnableDragColMove(self, enable=True):
"""
EnableDragColMove(enable=True)
Enables or disables column moving by dragging with the mouse.
"""
def EnableDragColSize(self, enable=True):
"""
EnableDragColSize(enable=True)
Enables or disables column sizing by dragging with the mouse.
"""
def EnableDragGridSize(self, enable=True):
"""
EnableDragGridSize(enable=True)
Enables or disables row and column resizing by dragging gridlines with
the mouse.
"""
def EnableDragRowSize(self, enable=True):
"""
EnableDragRowSize(enable=True)
Enables or disables row sizing by dragging with the mouse.
"""
def GetColAt(self, colPos):
"""
GetColAt(colPos) -> int
Returns the column ID of the specified column position.
"""
def GetColPos(self, colID):
"""
GetColPos(colID) -> int
Returns the position of the specified column.
"""
def SetColPos(self, colID, newPos):
"""
SetColPos(colID, newPos)
Sets the position of the specified column.
"""
def SetColumnsOrder(self, order):
"""
SetColumnsOrder(order)
Sets the positions of all columns at once.
"""
def ResetColPos(self):
"""
ResetColPos()
Resets the position of the columns to the default.
"""
def GetGridCursorCol(self):
"""
GetGridCursorCol() -> int
Returns the current grid cell column position.
"""
def GetGridCursorRow(self):
"""
GetGridCursorRow() -> int
Returns the current grid cell row position.
"""
def GoToCell(self, *args, **kw):
"""
GoToCell(row, col)
GoToCell(coords)
Make the given cell current and ensure it is visible.
"""
def MoveCursorDown(self, expandSelection):
"""
MoveCursorDown(expandSelection) -> bool
Moves the grid cursor down by one row.
"""
def MoveCursorDownBlock(self, expandSelection):
"""
MoveCursorDownBlock(expandSelection) -> bool
Moves the grid cursor down in the current column such that it skips to
the beginning or end of a block of non-empty cells.
"""
def MoveCursorLeft(self, expandSelection):
"""
MoveCursorLeft(expandSelection) -> bool
Moves the grid cursor left by one column.
"""
def MoveCursorLeftBlock(self, expandSelection):
"""
MoveCursorLeftBlock(expandSelection) -> bool
Moves the grid cursor left in the current row such that it skips to
the beginning or end of a block of non-empty cells.
"""
def MoveCursorRight(self, expandSelection):
"""
MoveCursorRight(expandSelection) -> bool
Moves the grid cursor right by one column.
"""
def MoveCursorRightBlock(self, expandSelection):
"""
MoveCursorRightBlock(expandSelection) -> bool
Moves the grid cursor right in the current row such that it skips to
the beginning or end of a block of non-empty cells.
"""
def MoveCursorUp(self, expandSelection):
"""
MoveCursorUp(expandSelection) -> bool
Moves the grid cursor up by one row.
"""
def MoveCursorUpBlock(self, expandSelection):
"""
MoveCursorUpBlock(expandSelection) -> bool
Moves the grid cursor up in the current column such that it skips to
the beginning or end of a block of non-empty cells.
"""
def MovePageDown(self):
"""
MovePageDown() -> bool
Moves the grid cursor down by some number of rows so that the previous
bottom visible row becomes the top visible row.
"""
def MovePageUp(self):
"""
MovePageUp() -> bool
Moves the grid cursor up by some number of rows so that the previous
top visible row becomes the bottom visible row.
"""
def SetGridCursor(self, *args, **kw):
"""
SetGridCursor(row, col)
SetGridCursor(coords)
Set the grid cursor to the specified cell.
"""
def SetTabBehaviour(self, behaviour):
"""
SetTabBehaviour(behaviour)
Set the grid's behaviour when the user presses the TAB key.
"""
def ClearSelection(self):
"""
ClearSelection()
Deselects all cells that are currently selected.
"""
def GetSelectedCells(self):
"""
GetSelectedCells() -> GridCellCoordsArray
Returns an array of individually selected cells.
"""
def GetSelectedCols(self):
"""
GetSelectedCols() -> ArrayInt
Returns an array of selected columns.
"""
def GetSelectedRows(self):
"""
GetSelectedRows() -> ArrayInt
Returns an array of selected rows.
"""
def GetSelectionBackground(self):
"""
GetSelectionBackground() -> wx.Colour
Returns the colour used for drawing the selection background.
"""
def GetSelectionBlockBottomRight(self):
"""
GetSelectionBlockBottomRight() -> GridCellCoordsArray
Returns an array of the bottom right corners of blocks of selected
cells.
"""
def GetSelectionBlockTopLeft(self):
"""
GetSelectionBlockTopLeft() -> GridCellCoordsArray
Returns an array of the top left corners of blocks of selected cells.
"""
def GetSelectionForeground(self):
"""
GetSelectionForeground() -> wx.Colour
Returns the colour used for drawing the selection foreground.
"""
def GetSelectionMode(self):
"""
GetSelectionMode() -> GridSelectionModes
Returns the current selection mode.
"""
def IsInSelection(self, *args, **kw):
"""
IsInSelection(row, col) -> bool
IsInSelection(coords) -> bool
Returns true if the given cell is selected.
"""
def IsSelection(self):
"""
IsSelection() -> bool
Returns true if there are currently any selected cells, rows, columns
or blocks.
"""
def SelectAll(self):
"""
SelectAll()
Selects all cells in the grid.
"""
def SelectBlock(self, *args, **kw):
"""
SelectBlock(topRow, leftCol, bottomRow, rightCol, addToSelected=False)
SelectBlock(topLeft, bottomRight, addToSelected=False)
Selects a rectangular block of cells.
"""
def SelectCol(self, col, addToSelected=False):
"""
SelectCol(col, addToSelected=False)
Selects the specified column.
"""
def SelectRow(self, row, addToSelected=False):
"""
SelectRow(row, addToSelected=False)
Selects the specified row.
"""
def SetSelectionBackground(self, c):
"""
SetSelectionBackground(c)
Set the colour to be used for drawing the selection background.
"""
def SetSelectionForeground(self, c):
"""
SetSelectionForeground(c)
Set the colour to be used for drawing the selection foreground.
"""
def SetSelectionMode(self, selmode):
"""
SetSelectionMode(selmode)
Set the selection behaviour of the grid.
"""
def GetScrollLineX(self):
"""
GetScrollLineX() -> int
Returns the number of pixels per horizontal scroll increment.
"""
def GetScrollLineY(self):
"""
GetScrollLineY() -> int
Returns the number of pixels per vertical scroll increment.
"""
def IsVisible(self, *args, **kw):
"""
IsVisible(row, col, wholeCellVisible=True) -> bool
IsVisible(coords, wholeCellVisible=True) -> bool
Returns true if a cell is either entirely or at least partially
visible in the grid window.
"""
def MakeCellVisible(self, *args, **kw):
"""
MakeCellVisible(row, col)
MakeCellVisible(coords)
Brings the specified cell into the visible grid cell area with minimal
scrolling.
"""
def SetScrollLineX(self, x):
"""
SetScrollLineX(x)
Sets the number of pixels per horizontal scroll increment.
"""
def SetScrollLineY(self, y):
"""
SetScrollLineY(y)
Sets the number of pixels per vertical scroll increment.
"""
def BlockToDeviceRect(self, topLeft, bottomRight):
"""
BlockToDeviceRect(topLeft, bottomRight) -> wx.Rect
Convert grid cell coordinates to grid window pixel coordinates.
"""
def CellToRect(self, *args, **kw):
"""
CellToRect(row, col) -> wx.Rect
CellToRect(coords) -> wx.Rect
Return the rectangle corresponding to the grid cell's size and
position in logical coordinates.
"""
def XToCol(self, x, clipToMinMax=False):
"""
XToCol(x, clipToMinMax=False) -> int
Returns the column at the given pixel position.
"""
def XToEdgeOfCol(self, x):
"""
XToEdgeOfCol(x) -> int
Returns the column whose right hand edge is close to the given logical
x position.
"""
def XYToCell(self, *args, **kw):
"""
XYToCell(x, y) -> GridCellCoords
XYToCell(pos) -> GridCellCoords
Translates logical pixel coordinates to the grid cell coordinates.
"""
def YToEdgeOfRow(self, y):
"""
YToEdgeOfRow(y) -> int
Returns the row whose bottom edge is close to the given logical y
position.
"""
def YToRow(self, y, clipToMinMax=False):
"""
YToRow(y, clipToMinMax=False) -> int
Returns the grid row that corresponds to the logical y coordinate.
"""
def AppendCols(self, numCols=1, updateLabels=True):
"""
AppendCols(numCols=1, updateLabels=True) -> bool
Appends one or more new columns to the right of the grid.
"""
def AppendRows(self, numRows=1, updateLabels=True):
"""
AppendRows(numRows=1, updateLabels=True) -> bool
Appends one or more new rows to the bottom of the grid.
"""
def AreHorzGridLinesClipped(self):
"""
AreHorzGridLinesClipped() -> bool
Return true if the horizontal grid lines stop at the last column
boundary or false if they continue to the end of the window.
"""
def AreVertGridLinesClipped(self):
"""
AreVertGridLinesClipped() -> bool
Return true if the vertical grid lines stop at the last row boundary
or false if they continue to the end of the window.
"""
def BeginBatch(self):
"""
BeginBatch()
Increments the grid's batch count.
"""
def ClearGrid(self):
"""
ClearGrid()
Clears all data in the underlying grid table and repaints the grid.
"""
def ClipHorzGridLines(self, clip):
"""
ClipHorzGridLines(clip)
Change whether the horizontal grid lines are clipped by the end of the
last column.
"""
def ClipVertGridLines(self, clip):
"""
ClipVertGridLines(clip)
Change whether the vertical grid lines are clipped by the end of the
last row.
"""
def DeleteCols(self, pos=0, numCols=1, updateLabels=True):
"""
DeleteCols(pos=0, numCols=1, updateLabels=True) -> bool
Deletes one or more columns from a grid starting at the specified
position.
"""
def DeleteRows(self, pos=0, numRows=1, updateLabels=True):
"""
DeleteRows(pos=0, numRows=1, updateLabels=True) -> bool
Deletes one or more rows from a grid starting at the specified
position.
"""
def EndBatch(self):
"""
EndBatch()
Decrements the grid's batch count.
"""
def Fit(self):
"""
Fit()
Overridden wxWindow method.
"""
def ForceRefresh(self):
"""
ForceRefresh()
Causes immediate repainting of the grid.
"""
def GetBatchCount(self):
"""
GetBatchCount() -> int
Returns the number of times that BeginBatch() has been called without
(yet) matching calls to EndBatch().
"""
def GetNumberCols(self):
"""
GetNumberCols() -> int
Returns the total number of grid columns.
"""
def GetNumberRows(self):
"""
GetNumberRows() -> int
Returns the total number of grid rows.
"""
def GetOrCreateCellAttr(self, row, col):
"""
GetOrCreateCellAttr(row, col) -> GridCellAttr
Returns the attribute for the given cell creating one if necessary.
"""
def GetTable(self):
"""
GetTable() -> GridTableBase
Returns a base pointer to the current table object.
"""
def InsertCols(self, pos=0, numCols=1, updateLabels=True):
"""
InsertCols(pos=0, numCols=1, updateLabels=True) -> bool
Inserts one or more new columns into a grid with the first new column
at the specified position.
"""
def InsertRows(self, pos=0, numRows=1, updateLabels=True):
"""
InsertRows(pos=0, numRows=1, updateLabels=True) -> bool
Inserts one or more new rows into a grid with the first new row at the
specified position.
"""
def RefreshAttr(self, row, col):
"""
RefreshAttr(row, col)
Invalidates the cached attribute for the given cell.
"""
def Render(self, dc, pos=wx.DefaultPosition, size=wx.DefaultSize, topLeft=GridCellCoords(-1,-1), bottomRight=GridCellCoords(-1,-1), style=GRID_DRAW_DEFAULT):
"""
Render(dc, pos=wx.DefaultPosition, size=wx.DefaultSize, topLeft=GridCellCoords(-1,-1), bottomRight=GridCellCoords(-1,-1), style=GRID_DRAW_DEFAULT)
Draws part or all of a wxGrid on a wxDC for printing or display.
"""
def SetColAttr(self, col, attr):
"""
SetColAttr(col, attr)
Sets the cell attributes for all cells in the specified column.
"""
def SetMargins(self, extraWidth, extraHeight):
"""
SetMargins(extraWidth, extraHeight)
Sets the extra margins used around the grid area.
"""
def SetRowAttr(self, row, attr):
"""
SetRowAttr(row, attr)
Sets the cell attributes for all cells in the specified row.
"""
def CalcRowLabelsExposed(self, reg):
"""
CalcRowLabelsExposed(reg) -> ArrayInt
Appends one or more new columns to the right of the grid.
"""
def CalcColLabelsExposed(self, reg):
"""
CalcColLabelsExposed(reg) -> ArrayInt
Appends one or more new columns to the right of the grid.
"""
def CalcCellsExposed(self, reg):
"""
CalcCellsExposed(reg) -> GridCellCoordsArray
Appends one or more new columns to the right of the grid.
"""
def GetSortingColumn(self):
"""
GetSortingColumn() -> int
Return the column in which the sorting indicator is currently
displayed.
"""
def IsSortingBy(self, col):
"""
IsSortingBy(col) -> bool
Return true if this column is currently used for sorting.
"""
def IsSortOrderAscending(self):
"""
IsSortOrderAscending() -> bool
Return true if the current sorting order is ascending or false if it
is descending.
"""
def SetSortingColumn(self, col, ascending=True):
"""
SetSortingColumn(col, ascending=True)
Set the column to display the sorting indicator in and its direction.
"""
def UnsetSortingColumn(self):
"""
UnsetSortingColumn()
Remove any currently shown sorting indicator.
"""
def GetGridWindow(self):
"""
GetGridWindow() -> wx.Window
Return the main grid window containing the grid cells.
"""
def GetGridRowLabelWindow(self):
"""
GetGridRowLabelWindow() -> wx.Window
Return the row labels window.
"""
def GetGridColLabelWindow(self):
"""
GetGridColLabelWindow() -> wx.Window
Return the column labels window.
"""
def GetGridCornerLabelWindow(self):
"""
GetGridCornerLabelWindow() -> wx.Window
Return the window in the top left grid corner.
"""
def GetGridColHeader(self):
"""
GetGridColHeader() -> wx.HeaderCtrl
Return the header control used for column labels display.
"""
def DrawCellHighlight(self, dc, attr):
"""
DrawCellHighlight(dc, attr)
"""
def DrawRowLabels(self, dc, rows):
"""
DrawRowLabels(dc, rows)
"""
def DrawRowLabel(self, dc, row):
"""
DrawRowLabel(dc, row)
"""
def DrawColLabels(self, dc, cols):
"""
DrawColLabels(dc, cols)
"""
def DrawColLabel(self, dc, col):
"""
DrawColLabel(dc, col)
"""
def DrawCornerLabel(self, dc):
"""
DrawCornerLabel(dc)
"""
def DrawTextRectangle(self, *args, **kw):
"""
DrawTextRectangle(dc, text, rect, horizontalAlignment=wx.ALIGN_LEFT, verticalAlignment=wx.ALIGN_TOP, textOrientation=wx.HORIZONTAL)
DrawTextRectangle(dc, lines, rect, horizontalAlignment=wx.ALIGN_LEFT, verticalAlignment=wx.ALIGN_TOP, textOrientation=wx.HORIZONTAL)
"""
def GetCellHighlightColour(self):
"""
GetCellHighlightColour() -> wx.Colour
"""
def GetCellHighlightPenWidth(self):
"""
GetCellHighlightPenWidth() -> int
"""
def GetCellHighlightROPenWidth(self):
"""
GetCellHighlightROPenWidth() -> int
"""
def SetCellHighlightColour(self):
"""
SetCellHighlightColour()
"""
def SetCellHighlightPenWidth(self, width):
"""
SetCellHighlightPenWidth(width)
"""
def SetCellHighlightROPenWidth(self, width):
"""
SetCellHighlightROPenWidth(width)
"""
def SetTable(self, table, takeOwnership=False, selmode=Grid.GridSelectCells):
"""
Set the Grid Table to be used by this grid.
"""
BatchCount = property(None, None)
CellHighlightColour = property(None, None)
CellHighlightPenWidth = property(None, None)
CellHighlightROPenWidth = property(None, None)
ColLabelSize = property(None, None)
ColLabelTextOrientation = property(None, None)
ColMinimalAcceptableWidth = property(None, None)
ColSizes = property(None, None)
DefaultCellBackgroundColour = property(None, None)
DefaultCellFont = property(None, None)
DefaultCellOverflow = property(None, None)
DefaultCellTextColour = property(None, None)
DefaultColLabelSize = property(None, None)
DefaultColSize = property(None, None)
DefaultEditor = property(None, None)
DefaultGridLinePen = property(None, None)
DefaultRenderer = property(None, None)
DefaultRowLabelSize = property(None, None)
DefaultRowSize = property(None, None)
GridColHeader = property(None, None)
GridColLabelWindow = property(None, None)
GridCornerLabelWindow = property(None, None)
GridCursorCol = property(None, None)
GridCursorRow = property(None, None)
GridLineColour = property(None, None)
GridRowLabelWindow = property(None, None)
GridWindow = property(None, None)
LabelBackgroundColour = property(None, None)
LabelFont = property(None, None)
LabelTextColour = property(None, None)
NumberCols = property(None, None)
NumberRows = property(None, None)
RowLabelSize = property(None, None)
RowMinimalAcceptableHeight = property(None, None)
RowSizes = property(None, None)
ScrollLineX = property(None, None)
ScrollLineY = property(None, None)
SelectedCells = property(None, None)
SelectedCols = property(None, None)
SelectedRows = property(None, None)
SelectionBackground = property(None, None)
SelectionBlockBottomRight = property(None, None)
SelectionBlockTopLeft = property(None, None)
SelectionForeground = property(None, None)
SelectionMode = property(None, None)
SortingColumn = property(None, None)
Table = property(None, None)
def CanHaveAttributes(self):
"""
CanHaveAttributes() -> bool
Returns true if this grid has support for cell attributes.
"""
def GetColMinimalWidth(self, col):
"""
GetColMinimalWidth(col) -> int
Get the minimal width of the given column/row.
"""
def GetColRight(self, col):
"""
GetColRight(col) -> int
Returns the coordinate of the right border specified column.
"""
def GetColLeft(self, col):
"""
GetColLeft(col) -> int
Returns the coordinate of the left border specified column.
"""
def GetRowMinimalHeight(self, col):
"""
GetRowMinimalHeight(col) -> int
Returns the minimal size for the given column.
"""
# end of class Grid
class GridUpdateLocker(object):
"""
GridUpdateLocker(grid=None)
This small class can be used to prevent wxGrid from redrawing during
its lifetime by calling wxGrid::BeginBatch() in its constructor and
wxGrid::EndBatch() in its destructor.
"""
def __init__(self, grid=None):
"""
GridUpdateLocker(grid=None)
This small class can be used to prevent wxGrid from redrawing during
its lifetime by calling wxGrid::BeginBatch() in its constructor and
wxGrid::EndBatch() in its destructor.
"""
def Create(self, grid):
"""
Create(grid)
This method can be called if the object had been constructed using the
default constructor.
"""
def __enter__(self):
"""
"""
def __exit__(self, exc_type, exc_val, exc_tb):
"""
"""
# end of class GridUpdateLocker
class GridEvent(wx.NotifyEvent):
"""
GridEvent()
GridEvent(id, type, obj, row=-1, col=-1, x=-1, y=-1, sel=True, kbd=wx.KeyboardState())
This event class contains information about various grid events.
"""
def __init__(self, *args, **kw):
"""
GridEvent()
GridEvent(id, type, obj, row=-1, col=-1, x=-1, y=-1, sel=True, kbd=wx.KeyboardState())
This event class contains information about various grid events.
"""
def AltDown(self):
"""
AltDown() -> bool
Returns true if the Alt key was down at the time of the event.
"""
def ControlDown(self):
"""
ControlDown() -> bool
Returns true if the Control key was down at the time of the event.
"""
def GetCol(self):
"""
GetCol() -> int
Column at which the event occurred.
"""
def GetPosition(self):
"""
GetPosition() -> wx.Point
Position in pixels at which the event occurred.
"""
def GetRow(self):
"""
GetRow() -> int
Row at which the event occurred.
"""
def MetaDown(self):
"""
MetaDown() -> bool
Returns true if the Meta key was down at the time of the event.
"""
def Selecting(self):
"""
Selecting() -> bool
Returns true if the user is selecting grid cells, or false if
deselecting.
"""
def ShiftDown(self):
"""
ShiftDown() -> bool
Returns true if the Shift key was down at the time of the event.
"""
EVT_GRID_CELL_LEFT_CLICK = wx.PyEventBinder( wxEVT_GRID_CELL_LEFT_CLICK )
EVT_GRID_CELL_RIGHT_CLICK = wx.PyEventBinder( wxEVT_GRID_CELL_RIGHT_CLICK )
EVT_GRID_CELL_LEFT_DCLICK = wx.PyEventBinder( wxEVT_GRID_CELL_LEFT_DCLICK )
EVT_GRID_CELL_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_GRID_CELL_RIGHT_DCLICK )
EVT_GRID_LABEL_LEFT_CLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_LEFT_CLICK )
EVT_GRID_LABEL_RIGHT_CLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_RIGHT_CLICK )
EVT_GRID_LABEL_LEFT_DCLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_LEFT_DCLICK )
EVT_GRID_LABEL_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_RIGHT_DCLICK )
EVT_GRID_ROW_SIZE = wx.PyEventBinder( wxEVT_GRID_ROW_SIZE )
EVT_GRID_COL_SIZE = wx.PyEventBinder( wxEVT_GRID_COL_SIZE )
EVT_GRID_RANGE_SELECT = wx.PyEventBinder( wxEVT_GRID_RANGE_SELECT )
EVT_GRID_CELL_CHANGING = wx.PyEventBinder( wxEVT_GRID_CELL_CHANGING )
EVT_GRID_CELL_CHANGED = wx.PyEventBinder( wxEVT_GRID_CELL_CHANGED )
EVT_GRID_SELECT_CELL = wx.PyEventBinder( wxEVT_GRID_SELECT_CELL )
EVT_GRID_EDITOR_SHOWN = wx.PyEventBinder( wxEVT_GRID_EDITOR_SHOWN )
EVT_GRID_EDITOR_HIDDEN = wx.PyEventBinder( wxEVT_GRID_EDITOR_HIDDEN )
EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED )
EVT_GRID_CELL_BEGIN_DRAG = wx.PyEventBinder( wxEVT_GRID_CELL_BEGIN_DRAG )
EVT_GRID_COL_MOVE = wx.PyEventBinder( wxEVT_GRID_COL_MOVE )
EVT_GRID_COL_SORT = wx.PyEventBinder( wxEVT_GRID_COL_SORT )
EVT_GRID_TABBING = wx.PyEventBinder( wxEVT_GRID_TABBING )
# The same as above but with the ability to specify an identifier
EVT_GRID_CMD_CELL_LEFT_CLICK = wx.PyEventBinder( wxEVT_GRID_CELL_LEFT_CLICK, 1 )
EVT_GRID_CMD_CELL_RIGHT_CLICK = wx.PyEventBinder( wxEVT_GRID_CELL_RIGHT_CLICK, 1 )
EVT_GRID_CMD_CELL_LEFT_DCLICK = wx.PyEventBinder( wxEVT_GRID_CELL_LEFT_DCLICK, 1 )
EVT_GRID_CMD_CELL_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_GRID_CELL_RIGHT_DCLICK, 1 )
EVT_GRID_CMD_LABEL_LEFT_CLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_LEFT_CLICK, 1 )
EVT_GRID_CMD_LABEL_RIGHT_CLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_RIGHT_CLICK, 1 )
EVT_GRID_CMD_LABEL_LEFT_DCLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_LEFT_DCLICK, 1 )
EVT_GRID_CMD_LABEL_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_RIGHT_DCLICK, 1 )
EVT_GRID_CMD_ROW_SIZE = wx.PyEventBinder( wxEVT_GRID_ROW_SIZE, 1 )
EVT_GRID_CMD_COL_SIZE = wx.PyEventBinder( wxEVT_GRID_COL_SIZE, 1 )
EVT_GRID_CMD_RANGE_SELECT = wx.PyEventBinder( wxEVT_GRID_RANGE_SELECT, 1 )
EVT_GRID_CMD_CELL_CHANGING = wx.PyEventBinder( wxEVT_GRID_CELL_CHANGING, 1 )
EVT_GRID_CMD_CELL_CHANGED = wx.PyEventBinder( wxEVT_GRID_CELL_CHANGED, 1 )
EVT_GRID_CMD_SELECT_CELL = wx.PyEventBinder( wxEVT_GRID_SELECT_CELL, 1 )
EVT_GRID_CMD_EDITOR_SHOWN = wx.PyEventBinder( wxEVT_GRID_EDITOR_SHOWN, 1 )
EVT_GRID_CMD_EDITOR_HIDDEN = wx.PyEventBinder( wxEVT_GRID_EDITOR_HIDDEN, 1 )
EVT_GRID_CMD_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED, 1 )
EVT_GRID_CMD_CELL_BEGIN_DRAG = wx.PyEventBinder( wxEVT_GRID_CELL_BEGIN_DRAG, 1 )
EVT_GRID_CMD_COL_MOVE = wx.PyEventBinder( wxEVT_GRID_COL_MOVE, 1 )
EVT_GRID_CMD_COL_SORT = wx.PyEventBinder( wxEVT_GRID_COL_SORT, 1 )
EVT_GRID_CMD_TABBING = wx.PyEventBinder( wxEVT_GRID_TABBING, 1 )
Col = property(None, None)
Position = property(None, None)
Row = property(None, None)
# end of class GridEvent
class GridSizeEvent(wx.NotifyEvent):
"""
GridSizeEvent()
GridSizeEvent(id, type, obj, rowOrCol=-1, x=-1, y=-1, kbd=wx.KeyboardState())
This event class contains information about a row/column resize event.
"""
def __init__(self, *args, **kw):
"""
GridSizeEvent()
GridSizeEvent(id, type, obj, rowOrCol=-1, x=-1, y=-1, kbd=wx.KeyboardState())
This event class contains information about a row/column resize event.
"""
def AltDown(self):
"""
AltDown() -> bool
Returns true if the Alt key was down at the time of the event.
"""
def ControlDown(self):
"""
ControlDown() -> bool
Returns true if the Control key was down at the time of the event.
"""
def GetPosition(self):
"""
GetPosition() -> wx.Point
Position in pixels at which the event occurred.
"""
def GetRowOrCol(self):
"""
GetRowOrCol() -> int
Row or column at that was resized.
"""
def MetaDown(self):
"""
MetaDown() -> bool
Returns true if the Meta key was down at the time of the event.
"""
def ShiftDown(self):
"""
ShiftDown() -> bool
Returns true if the Shift key was down at the time of the event.
"""
Position = property(None, None)
RowOrCol = property(None, None)
# end of class GridSizeEvent
class GridRangeSelectEvent(wx.NotifyEvent):
"""
GridRangeSelectEvent()
GridRangeSelectEvent(id, type, obj, topLeft, bottomRight, sel=True, kbd=wx.KeyboardState())
"""
def __init__(self, *args, **kw):
"""
GridRangeSelectEvent()
GridRangeSelectEvent(id, type, obj, topLeft, bottomRight, sel=True, kbd=wx.KeyboardState())
"""
def AltDown(self):
"""
AltDown() -> bool
Returns true if the Alt key was down at the time of the event.
"""
def ControlDown(self):
"""
ControlDown() -> bool
Returns true if the Control key was down at the time of the event.
"""
def GetBottomRightCoords(self):
"""
GetBottomRightCoords() -> GridCellCoords
Top left corner of the rectangular area that was (de)selected.
"""
def GetBottomRow(self):
"""
GetBottomRow() -> int
Bottom row of the rectangular area that was (de)selected.
"""
def GetLeftCol(self):
"""
GetLeftCol() -> int
Left column of the rectangular area that was (de)selected.
"""
def GetRightCol(self):
"""
GetRightCol() -> int
Right column of the rectangular area that was (de)selected.
"""
def GetTopLeftCoords(self):
"""
GetTopLeftCoords() -> GridCellCoords
Top left corner of the rectangular area that was (de)selected.
"""
def GetTopRow(self):
"""
GetTopRow() -> int
Top row of the rectangular area that was (de)selected.
"""
def MetaDown(self):
"""
MetaDown() -> bool
Returns true if the Meta key was down at the time of the event.
"""
def Selecting(self):
"""
Selecting() -> bool
Returns true if the area was selected, false otherwise.
"""
def ShiftDown(self):
"""
ShiftDown() -> bool
Returns true if the Shift key was down at the time of the event.
"""
BottomRightCoords = property(None, None)
BottomRow = property(None, None)
LeftCol = property(None, None)
RightCol = property(None, None)
TopLeftCoords = property(None, None)
TopRow = property(None, None)
# end of class GridRangeSelectEvent
class GridEditorCreatedEvent(wx.CommandEvent):
"""
GridEditorCreatedEvent()
GridEditorCreatedEvent(id, type, obj, row, col, ctrl)
"""
def __init__(self, *args, **kw):
"""
GridEditorCreatedEvent()
GridEditorCreatedEvent(id, type, obj, row, col, ctrl)
"""
def GetCol(self):
"""
GetCol() -> int
Returns the column at which the event occurred.
"""
def GetControl(self):
"""
GetControl() -> wx.Control
Returns the edit control.
"""
def GetRow(self):
"""
GetRow() -> int
Returns the row at which the event occurred.
"""
def SetCol(self, col):
"""
SetCol(col)
Sets the column at which the event occurred.
"""
def SetControl(self, ctrl):
"""
SetControl(ctrl)
Sets the edit control.
"""
def SetRow(self, row):
"""
SetRow(row)
Sets the row at which the event occurred.
"""
Col = property(None, None)
Control = property(None, None)
Row = property(None, None)
# end of class GridEditorCreatedEvent
GRID_VALUE_STRING = "string"
GRID_VALUE_BOOL = "bool"
GRID_VALUE_NUMBER = "long"
GRID_VALUE_FLOAT = "double"
GRID_VALUE_CHOICE = "choice"
GRID_VALUE_TEXT = "string"
GRID_VALUE_LONG = "long"
GRID_VALUE_CHOICEINT = "choiceint"
GRID_VALUE_DATETIME = "datetime"
PyGridCellRenderer = wx.deprecated(GridCellRenderer, 'Use GridCellRenderer instead.')
PyGridCellEditor = wx.deprecated(GridCellEditor, 'Use GridCellEditor instead.')
PyGridCellAttrProvider = wx.deprecated(GridCellAttrProvider, 'Use GridCellAttrProvider instead.')
PyGridTableBase = wx.deprecated(GridTableBase, 'Use GridTableBase instead.')
#-- end-grid --#