pyui.sheet
index
c:\projects\pyuicvs\pyui\sheet.py

# PyUI
# Copyright (C) 2001-2002 Sean C. Riley

# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.

# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.

# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

 
Modules
            
pyui
 
Classes
            
pyui.base.Base
Sheet
pyui.widgets.Edit(pyui.base.Base)
SheetEntry
SheetInfo
 
class Sheet(pyui.base.Base)
      Spreadsheet-like widget that contains cells that have values. The <handler>
passed in will be called when a cell value is changed with (x, y, value)
as arguments. handler is not called when a vale is set for the first time.
 
   Methods defined here:
__init__(self, changeHandler=None, insertHandler=None)
calcSize(self)
calculateVisibility(self)
checkHighestColumn(self, colNum)
checkHighestRow(self, rowNum)
clear(self)
draw(self, renderer)
findCellAt(self, x, y)
getCellCoordinates(self, colNum, rowNum)
getCellValue(self, x, y)
getColumnReadOnly(self, x)
getColumnTitle(self, x)
getColumnWidth(self, x)
getRowHeight(self, y)
getRowReadOnly(self, y)
getRowTitle(self, y)
getWidthAndHeightFor(self, x, y)
onLMouseDown(self, event)
onLMouseUp(self, event)
onMouseMove(self, event)
onScroll(self, event)
resize(self, width, height)
setCellValue(self, x, y, value)
setColumnReadOnly(self, x)
setColumnTitle(self, colNum, title)
setColumnWidth(self, colNum, width)
setRowHeight(self, rowNum, height)
setRowReadOnly(self, y)
setRowTitle(self, rowNum, title)

Data and non-method functions defined here:
__doc__ = 'Spreadsheet-like widget that contains cells that...alled when a vale is set for the first 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.sheet'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
defaultColumnWidth = 40
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.
defaultRowHeight = 16
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.

Methods inherited from pyui.base.Base:
__del__(self)
addChild(self, child)
Add a child widget.
addPopup(self, popup)
checkHit(self, pos)
clearDirty(self)
Clears this widgets dirty flag.
destroy(self)
Call this to remove all references to the widget from the system.
getFocus(self)
Acquire the gui system's focus. only one Base may have the focus
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.
pack(self)
used by panels & layout managers
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.base.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.
widgetLabel = 'Base'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
 
class SheetEntry(pyui.widgets.Edit)
       
  
Method resolution order:
SheetEntry
pyui.widgets.Edit
pyui.base.Base

Methods defined here:
__init__(self, sheet)
activateAt(self, col, row)
deactivate(self)
loseFocus(self)
onEnter(self, box, gotoNext=1)
onKeyDown(self, event)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'pyui.sheet'
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.Edit:
_pyuiChar(self, event)
_pyuiClicked(self, event)
_pyuiKeyDown(self, event)
_pyuiMouseDown(self, event)
_pyuiMouseMotion(self, event)
_pyuiMouseUp(self, event)
deleteSelected(self)
draw(self, renderer)
findMousePos(self, pos)
getFocus(self)
setText(self, text)
external function to set the text and move the caret to the end

Data and non-method functions inherited from pyui.widgets.Edit:
canTab = 1
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.
widgetLabel = 'Edit'
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.base.Base:
__del__(self)
addChild(self, child)
Add a child widget.
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.
destroy(self)
Call this to remove all references to the widget from the system.
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.
move(self, dx, dy)
move relative to current position.
moveto(self, x, y)
move to absolute position.
pack(self)
used by panels & layout managers
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)
resize(self, w, h)
 resize absolute size of the widget
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
 
class SheetInfo
       
   Methods defined here:
__init__(self, start, span, title, readonly)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'pyui.sheet'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
 
Data
             __file__ = r'.\pyui\sheet.pyc'
__name__ = 'pyui.sheet'