Module fileview
[show private | hide private]
[frames | no frames]

Module fileview

Classes
FileView  
FileViewDisplayItem  
MediaDataObject  
MediaEntry  
MyFileDropTarget  

Function Summary
  DrawTextWithLimit(dc, x, y, text, widthavailable, guardspace, term)
Draws text and if it will overflow the width available, truncates and puts ...

Function Details

DrawTextWithLimit(dc, x, y, text, widthavailable, guardspace, term='...')

Draws text and if it will overflow the width available, truncates and puts ... at the end
Parameters:
x - start position for text
y - start position for text
text - the string to draw
widthavailable - the total amount of space available
guardspace - if the text is longer than widthavailable then this amount of space is reclaimed from the right handside and term put there instead. Consequently this value should be at least the width of term
term - the string that is placed in the guardspace if it gets truncated. Make sure guardspace is at least the width of this string!
Returns:
The extent of the text that was drawn in the end as a tuple of (width, height)

Generated by Epydoc 2.1 on Fri Aug 15 18:58:36 2008 http://epydoc.sf.net