Package wx :: Package lib :: Package agw :: Module speedmeter :: Class BufferedWindow
[frames | no frames]

Type BufferedWindow

object --+            
         |            
    Object --+        
             |        
    EvtHandler --+    
                 |    
            Window --+
                     |
                    BufferedWindow

Known Subclasses:
SpeedMeter

A Buffered window class.

To use it, subclass it and define a Draw(DC) method that takes a DC to draw to. In that method, put the code needed to draw the picture you want. The window will automatically be double buffered, and the screen will be automatically updated when a Paint event is received.

When the drawing needs to change, you app needs to call the UpdateDrawing() method. Since the drawing is stored in a bitmap, you can also save the drawing to file by calling the SaveToFile(self,file_name,file_type) method.


Method Summary
  __init__(self, parent, id, pos, size, style, bufferedstyle)
  Draw(self, dc)
  OnPaint(self, event)
All that is needed here is to draw the buffer to screen.
  OnSize(self, event)
The Buffer init is done here, to make sure the buffer is always the same size as the Window.
  UpdateDrawing(self)
This would get called if the drawing needed to change, for whatever reason.

Property Summary

Instance Method Details

OnPaint(self, event)

All that is needed here is to draw the buffer to screen.

OnSize(self, event)

The Buffer init is done here, to make sure the buffer is always the same size as the Window.

UpdateDrawing(self)

This would get called if the drawing needed to change, for whatever reason.

The idea here is that the drawing is based on some data generated elsewhere in the system. if that data changes, the drawing needs to be updated.


Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:54:40 2009 http://epydoc.sf.net