Public Member Functions | |
| def | __getitem__ |
| def | __init__ |
| def | __setitem__ |
| def | __str__ |
| def | insertColsToLeft |
| def | insertRowsAbove |
Public Attributes | |
| maxCol | |
| maxRow | |
Private Member Functions | |
| def | __checkkey |
| def | __moveCell |
| def | __moveCells |
Private Attributes | |
| _defaultVal | |
Grid of single characters for drawing ascii art. Keys are (row,col)
Definition at line 3 of file CharGrid.py.
| def diarc::ascii_view::CharGrid::CharGrid::__init__ | ( | self | ) |
Definition at line 6 of file CharGrid.py.
| def diarc::ascii_view::CharGrid::CharGrid::__checkkey | ( | self, | |
| key | |||
| ) | [private] |
Make sure key is a valid key
Definition at line 11 of file CharGrid.py.
| def diarc::ascii_view::CharGrid::CharGrid::__getitem__ | ( | self, | |
| key | |||
| ) |
Get a single character from the grid
Definition at line 20 of file CharGrid.py.
| def diarc::ascii_view::CharGrid::CharGrid::__moveCell | ( | self, | |
| srcKey, | |||
| keys, | |||
| direction | |||
| ) | [private] |
Called by __moveCells - recursively moves cells to move srcKey cell
Definition at line 71 of file CharGrid.py.
| def diarc::ascii_view::CharGrid::CharGrid::__moveCells | ( | self, | |
| keys, | |||
| direction | |||
| ) | [private] |
Called by insertRowAbove... Moves all cells in 'keys' in 'direction'. Each key is 'keys' specified by (row,col). Direction specified by (rowOffset,colOffset).
Definition at line 62 of file CharGrid.py.
| def diarc::ascii_view::CharGrid::CharGrid::__setitem__ | ( | self, | |
| key, | |||
| val | |||
| ) |
Set a single character or string into the grid starting at key
Definition at line 32 of file CharGrid.py.
| def diarc::ascii_view::CharGrid::CharGrid::__str__ | ( | self | ) |
Definition at line 86 of file CharGrid.py.
| def diarc::ascii_view::CharGrid::CharGrid::insertColsToLeft | ( | self, | |
| col, | |||
| num | |||
| ) |
add a new column to the left of 'col' (shifting existing cols right
Definition at line 57 of file CharGrid.py.
| def diarc::ascii_view::CharGrid::CharGrid::insertRowsAbove | ( | self, | |
| row, | |||
| num | |||
| ) |
add a new row above 'row' (shifting existing rows down)
Definition at line 52 of file CharGrid.py.
Definition at line 6 of file CharGrid.py.
Definition at line 6 of file CharGrid.py.
Definition at line 6 of file CharGrid.py.