Python: module pyui.grid

pyui.grid | index c:\ninja\projects\pyui\pyui\grid.py

`A scrollable grid class for PyUI. The elements in the grid are PyUI widgets.`

Modules
`` |  |
copy | pyui |  |

Classes
`` |  | pyui.widgets.Panel(pyui.widgets.Base) CellPanel ColumnHeaders GridPanel RowHeaders
class CellPanel(pyui.widgets.Panel)
`` | `The inner cell grid of a GridPanel.`
| Method resolution order: CellPanel pyui.widgets.Panel pyui.widgets.Base Methods defined here: __init__(self, vWidth, vHeight) clear(self) draw(self, renderer) `only draw the visible widgets.` findCellAt(self, posX, posY) `find the cell at x,y` findCoordinatesAt(self, posX, posY) getCellAt(self, x, y) onScroll(self, event) putCellAt(self, widget, x, y) removeCellAt(self, x, y) resize(self, width, height) setupAllCells(self) setupCell(self, widget, x, y) `this moves and positions the cell. it also sets "gridPosition" so the cell knows where in the grid it lives.` Data and non-method functions defined here: __doc__ = 'The inner cell grid of a GridPanel.\n ' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` __module__ = 'pyui.grid' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` Methods inherited from pyui.widgets.Panel: addChild(self, child, option=None) destroy(self) getFocus(self) nextTab(self, step=1) onKeyDown(self, event) pack(self) setLayout(self, layout) Methods inherited from pyui.widgets.Base: __del__(self) addPopup(self, popup) calcSize(self) `This sets up self.rect to be absolute co-ordinates. also sets up self.windowRect to be relative to the upper left of the parent Window` checkHit(self, pos) clearDirty(self) `Clears this widgets dirty flag.` getToolTipInfo(self, pos) `return a tuple of the text and rectangle for the tooltip for when the mouse is in <pos> within the window. This uses the member variable toolTipInfo if it is populated.` handleEvent(self, event) `event processing for base objects` hasFocus(self) hit(self, pos) `Check for a hit using absolute coordinates.` loseFocus(self) `lose the gui system's focus.` move(self, dx, dy) `move relative to current position.` moveto(self, x, y) `move to absolute position.` postEvent(self, eventType) `Post an event to be processed next time through the event loop` registerEvent(self, eventType, handler) `Setup handler for an event` removeChild(self, child) setDirty(self, collide=1) `Sets this widget to redraw itself and notifies window.` setParent(self, parent) `Set the parent of this widget` setShow(self, value) setWindow(self, window) unregisterEvent(self, eventType) `Remove handler for an event` Data and non-method functions inherited from pyui.widgets.Base: canTab = 0 `int(x[, base]) -> integer Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the optional base. It is an error to supply a base when converting a non-string.`
class ColumnHeaders(pyui.widgets.Panel)
`` | `The column headers for the GridPanel.`
| Method resolution order: ColumnHeaders pyui.widgets.Panel pyui.widgets.Base Methods defined here: __init__(self, numColumns) setColumnName(self, columnNum, name) Data and non-method functions defined here: __doc__ = 'The column headers for the GridPanel.\n ' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` __module__ = 'pyui.grid' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` Methods inherited from pyui.widgets.Panel: addChild(self, child, option=None) destroy(self) draw(self, renderer) `draw the panel's children` getFocus(self) nextTab(self, step=1) onKeyDown(self, event) pack(self) resize(self, w, h) setLayout(self, layout) Methods inherited from pyui.widgets.Base: __del__(self) addPopup(self, popup) calcSize(self) `This sets up self.rect to be absolute co-ordinates. also sets up self.windowRect to be relative to the upper left of the parent Window` checkHit(self, pos) clearDirty(self) `Clears this widgets dirty flag.` getToolTipInfo(self, pos) `return a tuple of the text and rectangle for the tooltip for when the mouse is in <pos> within the window. This uses the member variable toolTipInfo if it is populated.` handleEvent(self, event) `event processing for base objects` hasFocus(self) hit(self, pos) `Check for a hit using absolute coordinates.` loseFocus(self) `lose the gui system's focus.` move(self, dx, dy) `move relative to current position.` moveto(self, x, y) `move to absolute position.` postEvent(self, eventType) `Post an event to be processed next time through the event loop` registerEvent(self, eventType, handler) `Setup handler for an event` removeChild(self, child) setDirty(self, collide=1) `Sets this widget to redraw itself and notifies window.` setParent(self, parent) `Set the parent of this widget` setShow(self, value) setWindow(self, window) unregisterEvent(self, eventType) `Remove handler for an event` Data and non-method functions inherited from pyui.widgets.Base: canTab = 0 `int(x[, base]) -> integer Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the optional base. It is an error to supply a base when converting a non-string.`
class GridPanel(pyui.widgets.Panel)
`` | `A scrollable grid class. I have a grid of cells of which only some will be visible at any time.`
| Method resolution order: GridPanel pyui.widgets.Panel pyui.widgets.Base Methods defined here: __init__(self, visibleWidth, visibleHeight, useColumnHeaders=1, useRowHeaders=1) clear(self) findCellAt(self, posX, posY) `Find the cell at the x,y pixel position. Pass-through to the inner grid panel.` findCoordinatesAt(self, posX, posY) `convert screen co-ordinates into grid co-ordinates.` getCellAt(self, x, y) `return a cell at the co-ordinates.` putCellAt(self, widget, x, y) `put a widget into the grid at the co-ordinates.` removeCellAt(self, x, y) `remove a widget from the grid` resize(self, w, h) setColumnName(self, columnNum, name) setRowName(self, rowNum, name) Data and non-method functions defined here: __doc__ = 'A scrollable grid class. I have a grid of cells ...h only some will\n be visible at any time.\n ' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` __module__ = 'pyui.grid' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` Methods inherited from pyui.widgets.Panel: addChild(self, child, option=None) destroy(self) draw(self, renderer) `draw the panel's children` getFocus(self) nextTab(self, step=1) onKeyDown(self, event) pack(self) setLayout(self, layout) Methods inherited from pyui.widgets.Base: __del__(self) addPopup(self, popup) calcSize(self) `This sets up self.rect to be absolute co-ordinates. also sets up self.windowRect to be relative to the upper left of the parent Window` checkHit(self, pos) clearDirty(self) `Clears this widgets dirty flag.` getToolTipInfo(self, pos) `return a tuple of the text and rectangle for the tooltip for when the mouse is in <pos> within the window. This uses the member variable toolTipInfo if it is populated.` handleEvent(self, event) `event processing for base objects` hasFocus(self) hit(self, pos) `Check for a hit using absolute coordinates.` loseFocus(self) `lose the gui system's focus.` move(self, dx, dy) `move relative to current position.` moveto(self, x, y) `move to absolute position.` postEvent(self, eventType) `Post an event to be processed next time through the event loop` registerEvent(self, eventType, handler) `Setup handler for an event` removeChild(self, child) setDirty(self, collide=1) `Sets this widget to redraw itself and notifies window.` setParent(self, parent) `Set the parent of this widget` setShow(self, value) setWindow(self, window) unregisterEvent(self, eventType) `Remove handler for an event` Data and non-method functions inherited from pyui.widgets.Base: canTab = 0 `int(x[, base]) -> integer Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the optional base. It is an error to supply a base when converting a non-string.`
class RowHeaders(pyui.widgets.Panel)
`` | `The row headers for the GridPanel.`
| Method resolution order: RowHeaders pyui.widgets.Panel pyui.widgets.Base Methods defined here: __init__(self, numRows) setRowName(self, rowNum, name) Data and non-method functions defined here: __doc__ = 'The row headers for the GridPanel.\n ' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` __module__ = 'pyui.grid' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` Methods inherited from pyui.widgets.Panel: addChild(self, child, option=None) destroy(self) draw(self, renderer) `draw the panel's children` getFocus(self) nextTab(self, step=1) onKeyDown(self, event) pack(self) resize(self, w, h) setLayout(self, layout) Methods inherited from pyui.widgets.Base: __del__(self) addPopup(self, popup) calcSize(self) `This sets up self.rect to be absolute co-ordinates. also sets up self.windowRect to be relative to the upper left of the parent Window` checkHit(self, pos) clearDirty(self) `Clears this widgets dirty flag.` getToolTipInfo(self, pos) `return a tuple of the text and rectangle for the tooltip for when the mouse is in <pos> within the window. This uses the member variable toolTipInfo if it is populated.` handleEvent(self, event) `event processing for base objects` hasFocus(self) hit(self, pos) `Check for a hit using absolute coordinates.` loseFocus(self) `lose the gui system's focus.` move(self, dx, dy) `move relative to current position.` moveto(self, x, y) `move to absolute position.` postEvent(self, eventType) `Post an event to be processed next time through the event loop` registerEvent(self, eventType, handler) `Setup handler for an event` removeChild(self, child) setDirty(self, collide=1) `Sets this widget to redraw itself and notifies window.` setParent(self, parent) `Set the parent of this widget` setShow(self, value) setWindow(self, window) unregisterEvent(self, eventType) `Remove handler for an event` Data and non-method functions inherited from pyui.widgets.Base: canTab = 0 `int(x[, base]) -> integer Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the optional base. It is an error to supply a base when converting a non-string.`

Data
`` |  | __file__ = r'.\pyui\grid.pyc' __name__ = 'pyui.grid'