Index: About.py
===================================================================
--- About.py	(revision 72610)
+++ About.py	(working copy)
@@ -63,8 +63,12 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = MyAboutBox(None)
+    captcallback(win, imgpath, imgname)
+        
+#---------------------------------------------------------------------------
 
-
 if __name__ == '__main__':
     app = wx.PySimpleApp()
     dlg = MyAboutBox(None)
Index: AboutBox.py
===================================================================
--- AboutBox.py	(revision 72610)
+++ AboutBox.py	(working copy)
@@ -14,6 +14,9 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         # First we create and fill the info object
         info = wx.AboutDialogInfo()
         info.Name = "Hello World"
@@ -37,7 +40,7 @@
         info.License = wordwrap(licenseText, 500, wx.ClientDC(self))
 
         # Then we call wx.AboutBox giving it that info object
-        wx.AboutBox(info)
+        return wx.AboutBox(info)
         
 
 #----------------------------------------------------------------------
@@ -48,8 +51,6 @@
 
 #----------------------------------------------------------------------
 
-
-
 overview = """<html><body>
 <h2><center>wx.AboutBox</center></h2>
 
Index: ActiveX_PDFWindow.py
===================================================================
--- ActiveX_PDFWindow.py	(revision 72610)
+++ ActiveX_PDFWindow.py	(working copy)
@@ -167,7 +167,14 @@
                            'Sorry', wx.ICON_WARNING)
         return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = """\
 <html><body>
 <h2>wx.lib.pdfwin.PDFWindow</h2>
Index: AdjustChannels.py
===================================================================
--- AdjustChannels.py	(revision 72610)
+++ AdjustChannels.py	(working copy)
@@ -138,6 +138,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """<html><body>
 <h2>Adjust Channels</h2>
Index: AlphaDrawing.py
===================================================================
--- AlphaDrawing.py	(revision 72610)
+++ AlphaDrawing.py	(working copy)
@@ -51,6 +51,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: AnalogClock.py
===================================================================
--- AnalogClock.py	(revision 72610)
+++ AnalogClock.py	(working copy)
@@ -126,8 +126,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
+
 overview = """<html>
 <PRE><FONT SIZE=-1>
 """ + ac.__doc__.replace("<", "").replace(">", "") + """
Index: AnimateCtrl.py
===================================================================
--- AnimateCtrl.py	(revision 72610)
+++ AnimateCtrl.py	(working copy)
@@ -40,8 +40,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
+
 overview = """<html><body>
 <h2><center>wx.animate.AnimationCtrl</center></h2>
 
Index: ArtProvider.py
===================================================================
--- ArtProvider.py	(revision 72610)
+++ ArtProvider.py	(working copy)
@@ -248,7 +248,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
+
+
 overview = """<html><body>
 <h2><center>wx.ArtProvider</center></h2>
 
Index: AUI_DockingWindowMgr.py
===================================================================
--- AUI_DockingWindowMgr.py	(revision 72610)
+++ AUI_DockingWindowMgr.py	(working copy)
@@ -1101,8 +1101,12 @@
         self.Bind(wx.EVT_BUTTON, self.OnButton, b)
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         frame = PyAUIFrame(self, wx.ID_ANY, "wx.aui wxPython Demo", size=(750, 590))
         frame.Show()
+        return frame
 
 #----------------------------------------------------------------------
 
@@ -1112,8 +1116,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
-
 overview = """\
 <html><body>
 <h3>wx.aui, the Advanced User Interface module</h3>
Index: AUI_MDI.py
===================================================================
--- AUI_MDI.py	(revision 72610)
+++ AUI_MDI.py	(working copy)
@@ -76,10 +76,13 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         pf = ParentFrame(self)
         pf.Show()
+        return pf
         
-        
 
 #----------------------------------------------------------------------
 
@@ -89,8 +92,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>wx.aui.AuiMDI</center></h2>
 
Index: AUI_Notebook.py
===================================================================
--- AUI_Notebook.py	(revision 72610)
+++ AUI_Notebook.py	(working copy)
@@ -40,6 +40,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win.Update()
+    wx.Sleep(1)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: BitmapButton.py
===================================================================
--- BitmapButton.py	(revision 72610)
+++ BitmapButton.py	(working copy)
@@ -63,7 +63,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
+
 overview = """<html><body>
 <h2>BitmapButton</h2>
 
Index: BitmapComboBox.py
===================================================================
--- BitmapComboBox.py	(revision 72610)
+++ BitmapComboBox.py	(working copy)
@@ -41,8 +41,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
+
 overview = """<html><body>
 <h2><center>wx.combo.BitmapComboBox</center></h2>
 
Index: BitmapFromBuffer.py
===================================================================
--- BitmapFromBuffer.py	(revision 72610)
+++ BitmapFromBuffer.py	(working copy)
@@ -115,8 +115,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
+
 overview = """<html><body>
 <h2><center>BitmapFromBuffer</center></h2>
 
Index: Button.py
===================================================================
--- Button.py	(revision 72610)
+++ Button.py	(working copy)
@@ -57,7 +57,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
+
 overview = """<html><body>
 <h2>Button</h2>
 
Index: Cairo.py
===================================================================
--- Cairo.py	(revision 72610)
+++ Cairo.py	(working copy)
@@ -166,6 +166,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 if haveCairo:
     extra = "\n<h3>wx.lib.wxcairo</h3>\n%s" % (
         wx.lib.wxcairo.__doc__.replace('\n\n', '\n<p>'))
Index: Cairo_Snippets.py
===================================================================
--- Cairo_Snippets.py	(revision 72610)
+++ Cairo_Snippets.py	(working copy)
@@ -87,6 +87,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 if haveCairo:
     extra = "\n<h3>wx.lib.wxcairo</h3>\n%s" % (
         wx.lib.wxcairo.__doc__.replace('\n\n', '\n<p>'))
Index: Calendar.py
===================================================================
--- Calendar.py	(revision 72610)
+++ Calendar.py	(working copy)
@@ -635,7 +635,14 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
+
+
 overview = """\
 This control provides a Calendar control class for displaying and selecting dates.  
 In addition, the class is extended and can be used for printing/previewing.
Index: CalendarCtrl.py
===================================================================
--- CalendarCtrl.py	(revision 72610)
+++ CalendarCtrl.py	(working copy)
@@ -99,7 +99,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
+
 overview = """\
 <html><body>
 <h2>CalendarCtrl</h2>
Index: CheckBox.py
===================================================================
--- CheckBox.py	(revision 72610)
+++ CheckBox.py	(working copy)
@@ -57,6 +57,11 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 A checkbox is a labelled box which is either on (checkmark is visible) or off 
Index: CheckListBox.py
===================================================================
--- CheckListBox.py	(revision 72610)
+++ CheckListBox.py	(working copy)
@@ -54,7 +54,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
+
 overview = """\
 A checklistbox is like a Listbox, but allows items to be checked or unchecked rather
 than relying on extended selection (e.g. shift-select) to select multiple items in
Index: CheckListCtrlMixin.py
===================================================================
--- CheckListCtrlMixin.py	(revision 72610)
+++ CheckListCtrlMixin.py	(working copy)
@@ -76,6 +76,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: Choice.py
===================================================================
--- Choice.py	(revision 72610)
+++ Choice.py	(working copy)
@@ -33,6 +33,12 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = """
 A Choice control is used to select one of a list of strings. Unlike a listbox, 
 only the current selection is visible until the user pulls down the menu of 
Index: Choicebook.py
===================================================================
--- Choicebook.py	(revision 72610)
+++ Choicebook.py	(working copy)
@@ -57,7 +57,13 @@
 
 #----------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
+
 overview = """\
 <html><body>
 <h2>wx.Choicebook</h2>
Index: CollapsiblePane.py
===================================================================
--- CollapsiblePane.py	(revision 72610)
+++ CollapsiblePane.py	(working copy)
@@ -104,6 +104,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: ColourDB.py
===================================================================
--- ColourDB.py	(revision 72610)
+++ ColourDB.py	(working copy)
@@ -165,6 +165,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = """
 <html>
 <body>
Index: ColourDialog.py
===================================================================
--- ColourDialog.py	(revision 72610)
+++ ColourDialog.py	(working copy)
@@ -13,12 +13,7 @@
 
 
     def OnButton(self, evt):
-        dlg = wx.ColourDialog(self)
-
-        # Ensure the full colour dialog is displayed, 
-        # not the abbreviated version.
-        dlg.GetColourData().SetChooseFull(True)
-
+        dlg = self.DoButton()
         if dlg.ShowModal() == wx.ID_OK:
 
             # If the user selected OK, then the dialog's wx.ColourData will
@@ -32,18 +27,34 @@
         # Once the dialog is destroyed, Mr. wx.ColourData is no longer your
         # friend. Don't use it again!
         dlg.Destroy()
+        
+    def DoButton(self):
+        dlg = wx.ColourDialog(self)
 
+        # Ensure the full colour dialog is displayed, 
+        # not the abbreviated version.
+        dlg.GetColourData().SetChooseFull(True)
+        dlg.CenterOnParent()
+        dlg.Show()
+        return dlg
+    
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
-
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
 
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
+
+
 overview = """\
 This class represents the colour chooser dialog.
 
Index: ColourSelect.py
===================================================================
--- ColourSelect.py	(revision 72610)
+++ ColourSelect.py	(working copy)
@@ -101,9 +101,13 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
-
 overview = """\
 A coloured button that when clicked allows the user to select a colour from the wxColourDialog.
 """
Index: ComboBox.py
===================================================================
--- ComboBox.py	(revision 72610)
+++ ComboBox.py	(working copy)
@@ -78,7 +78,13 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
+
 overview = """\
 A ComboBox is like a combination of an edit control and a listbox. It can be 
 displayed as static list with editable or read-only text field; or a drop-down 
Index: ComboCtrl.py
===================================================================
--- ComboCtrl.py	(revision 72610)
+++ ComboCtrl.py	(working copy)
@@ -455,6 +455,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: ComboTreeBox.py
===================================================================
--- ComboTreeBox.py	(revision 72610)
+++ ComboTreeBox.py	(working copy)
@@ -47,15 +47,19 @@
 
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestComboTreeBox(nb, log)
     return win
 
-
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
 
+#----------------------------------------------------------------------
+
+
 overview = wx.lib.combotreebox.__doc__
 
 
Index: CommandLinkButton.py
===================================================================
--- CommandLinkButton.py	(revision 72610)
+++ CommandLinkButton.py	(working copy)
@@ -25,8 +25,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
+
 overview = """<html><body>
 <h2><center>wx.CommandLinkButton</center></h2>
 
Index: ContextHelp.py
===================================================================
--- ContextHelp.py	(revision 72610)
+++ ContextHelp.py	(working copy)
@@ -82,8 +82,8 @@
     # Here, we print a note about it, generate our own tip window, and, 
     # unlike last time, we don't pass it on to the underlying provider.
     def OnCtxHelp2(self, evt):
-         self.log.write("OnCtxHelp2: %s\n" % evt)
-         tip = wx.TipWindow(self, "This is a wx.TipWindow")
+        self.log.write("OnCtxHelp2: %s\n" % evt)
+        tip = wx.TipWindow(self, "This is a wx.TipWindow")
 
 
 #----------------------------------------------------------------------
@@ -92,7 +92,12 @@
     win = TestPanel(nb, log)
     return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
 #----------------------------------------------------------------------
 
 
Index: Cursor.py
===================================================================
--- Cursor.py	(revision 72610)
+++ Cursor.py	(working copy)
@@ -120,8 +120,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
 
+#----------------------------------------------------------------------
 
+
+
 overview = """<html><body>
 <h2><center>wx.Cursor</center></h2>
 
Index: CustomDragAndDrop.py
===================================================================
--- CustomDragAndDrop.py	(revision 72610)
+++ CustomDragAndDrop.py	(working copy)
@@ -297,7 +297,15 @@
     win = CustomDnDPanel(nb, log)
     return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
+
 if __name__ == '__main__':
     import sys
     
Index: DatePickerCtrl.py
===================================================================
--- DatePickerCtrl.py	(revision 72610)
+++ DatePickerCtrl.py	(working copy)
@@ -40,8 +40,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
 
+#----------------------------------------------------------------------
 
+
 overview = """<html><body>
 <h2><center>wx.DatePickerCtrl</center></h2>
 
Index: Dialog.py
===================================================================
--- Dialog.py	(revision 72610)
+++ Dialog.py	(working copy)
@@ -100,11 +100,7 @@
         
 
     def OnButton(self, evt):
-        dlg = TestDialog(self, -1, "Sample Dialog", size=(350, 200),
-                         style=wx.DEFAULT_DIALOG_STYLE,
-                         )
-        dlg.CenterOnScreen()
-
+        dlg = self.DoButton()
         # this does not return until the dialog is closed.
         val = dlg.ShowModal()
     
@@ -114,8 +110,14 @@
             self.log.WriteText("You pressed Cancel\n")
 
         dlg.Destroy()
-        
 
+    def DoButton(self):
+        dlg = TestDialog(self, -1, "Sample Dialog", size=(350, 200),
+                         style=wx.DEFAULT_DIALOG_STYLE,
+                         )
+        dlg.CenterOnScreen()
+        return dlg
+
     def OnShowWindowModal(self, evt):
         dlg = TestDialog(self, -1, "Sample Dialog", size=(350, 200),
                          style=wx.DEFAULT_DIALOG_STYLE)
@@ -137,14 +139,18 @@
 
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
-
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 wxPython offers quite a few general purpose dialogs for useful data input from
Index: DialogUnits.py
===================================================================
--- DialogUnits.py	(revision 72610)
+++ DialogUnits.py	(working copy)
@@ -108,8 +108,19 @@
     win = MyFrame(frame, -1, "This is a test")
     frame.otherWin = win
     win.Show(True)
+    return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win.Update()
+    wx.Sleep(1)
+    captcallback(win, imgpath, imgname)
+
+#----------------------------------------------------------------------
+
+
 overview = """\
 A simple example that shows how to use Dialog Units.
 """
Index: DirDialog.py
===================================================================
--- DirDialog.py	(revision 72610)
+++ DirDialog.py	(working copy)
@@ -13,13 +13,7 @@
 
 
     def OnButton(self, evt):
-        # In this case we include a "New directory" button. 
-        dlg = wx.DirDialog(self, "Choose a directory:",
-                          style=wx.DD_DEFAULT_STYLE
-                           #| wx.DD_DIR_MUST_EXIST
-                           #| wx.DD_CHANGE_DIR
-                           )
-
+        dlg = self.DoButton()
         # If the user selects OK, then we process the dialog's data.
         # This is done by getting the path data from the dialog - BEFORE
         # we destroy it. 
@@ -28,19 +22,31 @@
 
         # Only destroy a dialog after you're done with it.
         dlg.Destroy()
+        
+    def DoButton(self):
+        # In this case we include a "New directory" button. 
+        dlg = wx.DirDialog(self, "Choose a directory:",
+                          style=wx.DD_DEFAULT_STYLE
+                           #| wx.DD_DIR_MUST_EXIST
+                           #| wx.DD_CHANGE_DIR
+                           )
 
+        return dlg
 
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
-
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
 
+#----------------------------------------------------------------------
 
 
 overview = """\
Index: DragAndDrop.py
===================================================================
--- DragAndDrop.py	(revision 72610)
+++ DragAndDrop.py	(working copy)
@@ -234,7 +234,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
 
+#----------------------------------------------------------------------
+
+
 overview = """\
 <html>
 <body>
Index: DragImage.py
===================================================================
--- DragImage.py	(revision 72610)
+++ DragImage.py	(working copy)
@@ -291,9 +291,15 @@
     return win
 
 #----------------------------------------------------------------------
+    
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
 
+#----------------------------------------------------------------------
 
 
+
 overview = """\
 DragImage is used when you wish to drag an object on the screen, and a simple 
 cursor is not enough.
Index: DragScroller.py
===================================================================
--- DragScroller.py	(revision 72610)
+++ DragScroller.py	(working copy)
@@ -7,6 +7,14 @@
     win = DragScrollerExample(nb, -1)
     return win
 
+#----------------------------------------------------------------------
+
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+
+#----------------------------------------------------------------------
+
 class DragScrollerExample(wx.ScrolledWindow):
     def __init__(self, parent, id=-1):
         wx.ScrolledWindow.__init__(self, parent, id)
Index: DrawXXXList.py
===================================================================
--- DrawXXXList.py	(revision 72610)
+++ DrawXXXList.py	(working copy)
@@ -405,7 +405,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
 
+#----------------------------------------------------------------------
+
+
 overview = """\
 
 Some methods have been added to wx.DC to help with optimization of
Index: DVC_CustomRenderer.py
===================================================================
--- DVC_CustomRenderer.py	(revision 72610)
+++ DVC_CustomRenderer.py	(working copy)
@@ -161,8 +161,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
 
+#----------------------------------------------------------------------
 
+
 overview = """<html><body>
 <h2><center>DemoName</center></h2>
 
Index: DVC_DataViewModel.py
===================================================================
--- DVC_DataViewModel.py	(revision 72610)
+++ DVC_DataViewModel.py	(working copy)
@@ -331,8 +331,15 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    wx.Sleep(1)
+    captcallback(win, imgpath, imgname)
 
+#----------------------------------------------------------------------
 
+
+
 overview = """<html><body>
 <h2><center>DataViewCtrl with custom DataViewModel</center></h2>
 
Index: DVC_IndexListModel.py
===================================================================
--- DVC_IndexListModel.py	(revision 72610)
+++ DVC_IndexListModel.py	(working copy)
@@ -230,8 +230,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
 
+#----------------------------------------------------------------------
 
+
 overview = """<html><body>
 <h2><center>DataViewCtrl with DataViewIndexListModel</center></h2>
 
Index: DVC_ListCtrl.py
===================================================================
--- DVC_ListCtrl.py	(revision 72610)
+++ DVC_ListCtrl.py	(working copy)
@@ -45,8 +45,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
 
+#----------------------------------------------------------------------
 
+
+
 overview = """<html><body>
 <h2><center>DataViewListCtrl</center></h2>
 
Index: DVC_TreeCtrl.py
===================================================================
--- DVC_TreeCtrl.py	(revision 72610)
+++ DVC_TreeCtrl.py	(working copy)
@@ -52,8 +52,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
 
+#----------------------------------------------------------------------
 
+
+
 overview = """<html><body>
 <h2><center>DataViewTreeCtrl</center></h2>
 
Index: DynamicSashWindow.py
===================================================================
--- DynamicSashWindow.py	(revision 72610)
+++ DynamicSashWindow.py	(working copy)
@@ -113,6 +113,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
+
 overview = """\
 <html><body>
 <h2>DynamicSashWindow</h2>
Index: EditableListBox.py
===================================================================
--- EditableListBox.py	(revision 72610)
+++ EditableListBox.py	(working copy)
@@ -32,6 +32,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = """\
Index: Editor.py
===================================================================
--- Editor.py	(revision 72610)
+++ Editor.py	(working copy)
@@ -34,7 +34,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
+
 overview = """
 The Editor class implements a simple text editor using wxPython.  You
 can create a custom editor by subclassing Editor.  Even though much of
Index: EventManager.py
===================================================================
--- EventManager.py	(revision 72610)
+++ EventManager.py	(working copy)
@@ -203,6 +203,12 @@
     return win
 
 #----------------------------------------------------------------------
+# TODO: figure out AssertionError on this one
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 
Index: ExpandoTextCtrl.py
===================================================================
--- ExpandoTextCtrl.py	(revision 72610)
+++ ExpandoTextCtrl.py	(working copy)
@@ -124,10 +124,13 @@
         b = wx.Button(self, -1, " Test ExpandoTextCtrl ", (50,50))
         self.Bind(wx.EVT_BUTTON, self.OnButton, b)
 
-
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         self.win = TestFrame(self, self.log)
         self.win.Show(True)
+        return self.win
 
   
 #----------------------------------------------------------------------
@@ -138,8 +141,15 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
 
+
 overview = """<html><body>
 <h2><center>ExpandoTextCtrl</center></h2>
 
Index: FancyText.py
===================================================================
--- FancyText.py	(revision 72610)
+++ FancyText.py	(working copy)
@@ -33,8 +33,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
+
 overview = \
 """
 <html>
Index: FileBrowseButton.py
===================================================================
--- FileBrowseButton.py	(revision 72610)
+++ FileBrowseButton.py	(working copy)
@@ -66,9 +66,15 @@
     win = TestPanel(nb, -1, log)
     return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
 #----------------------------------------------------------------------
 
+
 overview = """<html><body>
 <h2>class FileBrowseButton:</h2>
 <small><pre>
Index: FileDialog.py
===================================================================
--- FileDialog.py	(revision 72610)
+++ FileDialog.py	(working copy)
@@ -27,23 +27,7 @@
 
 
     def OnButton(self, evt):
-        self.log.WriteText("CWD: %s\n" % os.getcwd())
-
-        # Create the dialog. In this case the current directory is forced as the starting
-        # directory for the dialog, and no default file name is forced. This can easilly
-        # be changed in your program. This is an 'open' dialog, and allows multitple
-        # file selections as well.
-        #
-        # Finally, if the directory is changed in the process of getting files, this
-        # dialog is set up to change the current working directory to the path chosen.
-        dlg = wx.FileDialog(
-            self, message="Choose a file",
-            defaultDir=os.getcwd(), 
-            defaultFile="",
-            wildcard=wildcard,
-            style=wx.OPEN | wx.MULTIPLE | wx.CHANGE_DIR
-            )
-
+        dlg = self.DoButton()
         # Show the dialog and retrieve the user response. If it is the OK response, 
         # process the data.
         if dlg.ShowModal() == wx.ID_OK:
@@ -61,28 +45,30 @@
         # Destroy the dialog. Don't do this until you are done with it!
         # BAD things can happen otherwise!
         dlg.Destroy()
-
-
-
-    def OnButton2(self, evt):
+        
+    def DoButton(self):
         self.log.WriteText("CWD: %s\n" % os.getcwd())
 
         # Create the dialog. In this case the current directory is forced as the starting
         # directory for the dialog, and no default file name is forced. This can easilly
-        # be changed in your program. This is an 'save' dialog.
+        # be changed in your program. This is an 'open' dialog, and allows multitple
+        # file selections as well.
         #
-        # Unlike the 'open dialog' example found elsewhere, this example does NOT
-        # force the current working directory to change if the user chooses a different
-        # directory than the one initially set.
+        # Finally, if the directory is changed in the process of getting files, this
+        # dialog is set up to change the current working directory to the path chosen.
         dlg = wx.FileDialog(
-            self, message="Save file as ...", defaultDir=os.getcwd(), 
-            defaultFile="", wildcard=wildcard, style=wx.SAVE
+            self, message="Choose a file",
+            defaultDir=os.getcwd(), 
+            defaultFile="",
+            wildcard=wildcard,
+            style=wx.OPEN | wx.MULTIPLE | wx.CHANGE_DIR
             )
 
-        # This sets the default filter that the user will initially see. Otherwise,
-        # the first filter in the list will be used by default.
-        dlg.SetFilterIndex(2)
+        dlg.Center()
+        return dlg
 
+    def OnButton2(self, evt):
+        dlg = self.DoButton2()
         # Show the dialog and retrieve the user response. If it is the OK response, 
         # process the data.
         if dlg.ShowModal() == wx.ID_OK:
@@ -110,19 +96,49 @@
         # Destroy the dialog. Don't do this until you are done with it!
         # BAD things can happen otherwise!
         dlg.Destroy()
-
         
+    def DoButton2(self):
+        self.log.WriteText("CWD: %s\n" % os.getcwd())
 
+        # Create the dialog. In this case the current directory is forced as the starting
+        # directory for the dialog, and no default file name is forced. This can easilly
+        # be changed in your program. This is an 'save' dialog.
+        #
+        # Unlike the 'open dialog' example found elsewhere, this example does NOT
+        # force the current working directory to change if the user chooses a different
+        # directory than the one initially set.
+        dlg = wx.FileDialog(
+            self, message="Save file as ...", defaultDir=os.getcwd(), 
+            defaultFile="", wildcard=wildcard, style=wx.SAVE
+            )
+
+        # This sets the default filter that the user will initially see. Otherwise,
+        # the first filter in the list will be used by default.
+        dlg.SetFilterIndex(2)
+        dlg.Center()
+
+        return dlg        
+
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    # TODO: doen't show unless I use ShowModal?
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, sleep=2)
+    win2 = win.DoButton2()
+    captcallback(win2, imgpath, (imgname + "_1"), addwin=win, sleep=2)
+    
+#---------------------------------------------------------------------------
 
+
+
 overview = """\
 This class provides the file selection dialog. It incorporates OS-native features
 depending on the OS in use, and can be used both for open and save operations. 
Index: FileHistory.py
===================================================================
--- FileHistory.py	(revision 72610)
+++ FileHistory.py	(working copy)
@@ -117,6 +117,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: FindReplaceDialog.py
===================================================================
--- FindReplaceDialog.py	(revision 72610)
+++ FindReplaceDialog.py	(working copy)
@@ -39,19 +39,25 @@
         self.frbtn.Disable()
 
     def OnShowFind(self, evt):
+        self.DoShowFind()
+        
+    def DoShowFind(self):
         self.DisableButtons()
         dlg = wx.FindReplaceDialog(self, self.findData, "Find")
         self.BindFindEvents(dlg)
         dlg.Show(True)
+        return dlg
 
-
     def OnShowFindReplace(self, evt):
+        self.DoShowFindReplace()
+        
+    def DoShowFindReplace(self):
         self.DisableButtons()
         dlg = wx.FindReplaceDialog(self, self.findData, "Find & Replace", wx.FR_REPLACEDIALOG)
         self.BindFindEvents(dlg)
         dlg.Show(True)
+        return dlg
 
-
     def OnFind(self, evt):
         #print repr(evt.GetFindString()), repr(self.findData.GetFindString())
         map = {
@@ -91,9 +97,21 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
 
+    # this dialog does not report correct width/height, therefor wh=True
+    win1 = win.DoShowFind()
+    captcallback(win1, imgpath, imgname, wh=True)
 
+    win2 = win.DoShowFindReplace()
+    captcallback(win2, imgpath, (imgname + "_1"), addwin=win, wh=True)
+    
+#----------------------------------------------------------------------
 
+
+
+
 overview = """\
 FindReplaceDialog is a standard modeless dialog which is used to allow the user 
 to search for some text (and possibly replace it with something else). The actual 
Index: FloatBar.py
===================================================================
--- FloatBar.py	(revision 72610)
+++ FloatBar.py	(working copy)
@@ -104,19 +104,28 @@
             dlg.ShowModal()
             dlg.Destroy()
         else:
-            win = TestFloatBar(self, self.log)
-            win.Show(True)
+            self.DoButton()
+        
+    def DoButton(self):
+        win = TestFloatBar(self, self.log)
+        win.Show(True)
+        return win
 
-
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
+
 overview = """\
 FloatBar is a subclass of wx.ToolBar, implemented in Python, which
 can be detached from its frame.
Index: FloatCanvas.py
===================================================================
--- FloatCanvas.py	(revision 72610)
+++ FloatCanvas.py	(working copy)
@@ -1937,17 +1937,32 @@
                 self.Layout()
 
             def OnButton(self, evt):
+                self.DoButton()
+                
+            def DoButton(self):
                 DrawFrame = BuildDrawFrame()
                 frame = DrawFrame(None, -1, "FloatCanvas Drawing Window",wx.DefaultPosition,(500,500))
 
                 #win = wx.lib.plot.TestFrame(self, -1, "PlotCanvas Demo")
                 frame.Show()
                 frame.DrawTest()
+                
+                return frame
 
     def runTest(frame, nb, log):
         win = TestPanel(nb, log)
         return win
+    
+    #----------------------------------------------------------------------       
 
+    def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+        win = runTest(scparent, nb, log)
+        win1 = win.DoButton()
+        imgname = "lib.floatcanvas"
+        captcallback(win1, imgpath, imgname, addwin=win)
+       
+   #----------------------------------------------------------------------   
+
     # import to get the doc
     from wx.lib import floatcanvas
     overview = floatcanvas.__doc__
Index: FontDialog.py
===================================================================
--- FontDialog.py	(revision 72610)
+++ FontDialog.py	(working copy)
@@ -82,6 +82,13 @@
 
 
     def OnSelectFont(self, evt):
+        dlg = self.DoSelectFont()
+
+        # Don't destroy the dialog until you get everything you need from the
+        # dialog!
+        dlg.Destroy()
+        
+    def DoSelectFont(self):
         data = wx.FontData()
         data.EnableEffects(True)
         data.SetColour(self.curClr)         # set colour
@@ -101,12 +108,10 @@
             self.curFont = font
             self.curClr = colour
             self.UpdateUI()
+        
+        return dlg
 
-        # Don't destroy the dialog until you get everything you need from the
-        # dialog!
-        dlg.Destroy()
 
-
 #---------------------------------------------------------------------------
 
 def runTest(frame, nb, log):
@@ -115,7 +120,13 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
+
 overview = """\
 This class allows you to use the system font selection dialog 
 from within your program. Generally speaking, this allows you
Index: FontEnumerator.py
===================================================================
--- FontEnumerator.py	(revision 72610)
+++ FontEnumerator.py	(working copy)
@@ -62,8 +62,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 wxFontEnumerator enumerates either all available fonts on the system or only
 the ones with given attributes - either only fixed-width (suited for use in
Index: Frame.py
===================================================================
--- Frame.py	(revision 72610)
+++ Frame.py	(working copy)
@@ -36,22 +36,28 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         win = MyFrame(self, -1, "This is a wx.Frame", size=(350, 200),
                   style = wx.DEFAULT_FRAME_STYLE)
         win.Show(True)
+        return win
 
-        
-
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
-
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 A Frame is a window whose size and position can (usually) be changed by 
Index: Gauge.py
===================================================================
--- Gauge.py	(revision 72610)
+++ Gauge.py	(working copy)
@@ -39,6 +39,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 A Gauge is a horizontal or vertical bar which shows a quantity in a graphical
Index: GenericButtons.py
===================================================================
--- GenericButtons.py	(revision 72610)
+++ GenericButtons.py	(working copy)
@@ -174,6 +174,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = buttons.__doc__
 
Index: GenericDirCtrl.py
===================================================================
--- GenericDirCtrl.py	(revision 72610)
+++ GenericDirCtrl.py	(working copy)
@@ -50,6 +50,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 This control can be used to place a directory listing (with optional files)
Index: GetMouseState.py
===================================================================
--- GetMouseState.py	(revision 72610)
+++ GetMouseState.py	(working copy)
@@ -134,6 +134,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: GIFAnimationCtrl.py
===================================================================
--- GIFAnimationCtrl.py	(revision 72610)
+++ GIFAnimationCtrl.py	(working copy)
@@ -40,8 +40,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    wx.Sleep(1)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>wx.animate.GIFAnimationCtrl</center></h2>
 
Index: GLCanvas.py
===================================================================
--- GLCanvas.py	(revision 72610)
+++ GLCanvas.py	(working copy)
@@ -73,7 +73,31 @@
             canvas = canvasClass(frame)
             frame.Show(True)
 
+    def DoCube(self):
+        if not haveGLCanvas:
+            dlg = wx.MessageDialog(self,
+                                   'The GLCanvas class has not been included with this build of wxPython!',
+                                   'Sorry', wx.OK | wx.ICON_WARNING)
+            dlg.ShowModal()
+            dlg.Destroy()
 
+        elif not haveOpenGL:
+            dlg = wx.MessageDialog(self,
+                                   'The OpenGL package was not found.  You can get it at\n'
+                                   'http://PyOpenGL.sourceforge.net/',
+                                   'Sorry', wx.OK | wx.ICON_WARNING)
+            dlg.ShowModal()
+            dlg.Destroy()
+
+        else:
+            canvasClassName = "CubeCanvas"
+            canvasClass = eval(canvasClassName)
+            frame = wx.Frame(None, -1, canvasClassName, size=(400,400))
+            canvas = canvasClass(frame)
+            frame.Show(True)
+            return frame
+
+
 class MyCanvasBase(glcanvas.GLCanvas):
     def __init__(self, parent):
         glcanvas.GLCanvas.__init__(self, parent, -1)
@@ -259,20 +283,22 @@
         self.SwapBuffers()
 
 
-
-
 #----------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = ButtonPanel(nb, log)
     return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoCube()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
 
-
-
 overview = """\
 """
 
Index: GraphicsContext.py
===================================================================
--- GraphicsContext.py	(revision 72610)
+++ GraphicsContext.py	(working copy)
@@ -191,8 +191,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>wx.GraphicsContext and wx.GraphicsPath</center></h2>
 
Index: GraphicsGradient.py
===================================================================
--- GraphicsGradient.py	(revision 72610)
+++ GraphicsGradient.py	(working copy)
@@ -244,8 +244,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center> Gradients on a GraphicsContext </center></h2>
 
Index: Grid.py
===================================================================
--- Grid.py	(revision 72610)
+++ Grid.py	(working copy)
@@ -50,6 +50,19 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    count = 1
+    for mod in buttonDefs.values():
+        modName = mod[0]
+        module = __import__(modName)
+        frame = module.TestFrame(None, log)
+        frame.Show(True)
+        frame.Update()
+        wx.Sleep(1)
+        captcallback(frame, imgpath, (imgname + "_%s" % count))
+        count += 1
+    
+#----------------------------------------------------------------------
 
 
 overview = """\
Index: GridBagSizer.py
===================================================================
--- GridBagSizer.py	(revision 72610)
+++ GridBagSizer.py	(working copy)
@@ -135,23 +135,28 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         win = TestFrame()
         win.Show(True)
+        return win
 
-
-
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
 #----------------------------------------------------------------------
 
-
-
 overview = """<html><body>
 <h2><center>wx.GridBagSizer</center></h2>
 
Index: HTML2_WebView.py
===================================================================
--- HTML2_WebView.py	(revision 72610)
+++ HTML2_WebView.py	(working copy)
@@ -135,8 +135,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    # TODO: page is not loaded before capture is done
+    captcallback(win, imgpath, imgname, sleep=2)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>DemoName</center></h2>
 
Index: HtmlWindow.py
===================================================================
--- HtmlWindow.py	(revision 72610)
+++ HtmlWindow.py	(working copy)
@@ -191,10 +191,15 @@
     win = TestHtmlPanel(nb, frame, log)
     return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    # TODO: page is not loaded before capture is done
+    captcallback(win, imgpath, imgname, sleep=2)
+    
 #----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2>wx.HtmlWindow</h2>
 
Index: I18N.py
===================================================================
--- I18N.py	(revision 72610)
+++ I18N.py	(working copy)
@@ -209,6 +209,7 @@
     def OnClearTranslatedText(self, event):
         self.translatedST.SetLabel('')        
 
+#-------------------------------------------------------------------------------
 
 def runTest(frame, nb, log):
     win = LanguageSelectPanel(nb, log) 
@@ -216,6 +217,12 @@
 
 #-------------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#-------------------------------------------------------------------------------
+
 overview = """<html><body>
 <h2>Internationalization (I18N)</h2>
 <p>
Index: Image.py
===================================================================
--- Image.py	(revision 72610)
+++ Image.py	(working copy)
@@ -44,6 +44,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = """\
Index: ImageAlpha.py
===================================================================
--- ImageAlpha.py	(revision 72610)
+++ ImageAlpha.py	(working copy)
@@ -61,8 +61,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>Images with Alpha</center></h2>
 
Index: ImageBrowser.py
===================================================================
--- ImageBrowser.py	(revision 72610)
+++ ImageBrowser.py	(working copy)
@@ -27,6 +27,15 @@
 
 
     def OnButton(self, evt):
+        dlg = self.DoButton()
+        if dlg.ShowModal() == wx.ID_OK:
+            # show the selected file
+            self.log.WriteText("You Selected File: " + dlg.GetFile())        
+        else:
+            self.log.WriteText("You pressed Cancel\n")
+        dlg.Destroy()
+        
+    def DoButton(self):
         # get current working directory
         dir = os.getcwd()
 
@@ -37,26 +46,25 @@
         dlg = ib.ImageDialog(self, initial_dir)
 
         dlg.Centre()
+        dlg.Show()
 
-        if dlg.ShowModal() == wx.ID_OK:
-            # show the selected file
-            self.log.WriteText("You Selected File: " + dlg.GetFile())        
-        else:
-            self.log.WriteText("You pressed Cancel\n")
+        return dlg
 
-        dlg.Destroy()
 
-
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
-
     
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 """
Index: ImageFromStream.py
===================================================================
--- ImageFromStream.py	(revision 72610)
+++ ImageFromStream.py	(working copy)
@@ -33,6 +33,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 At long last there is finally a way to load any supported image type
Index: Img2PyArtProvider.py
===================================================================
--- Img2PyArtProvider.py	(revision 72610)
+++ Img2PyArtProvider.py	(working copy)
@@ -73,8 +73,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>Img2PyArtProvider</center></h2>
 
Index: InfoBar.py
===================================================================
--- InfoBar.py	(revision 72610)
+++ InfoBar.py	(working copy)
@@ -60,11 +60,13 @@
 
 
     def OnShowMessage(self, evt):
+        self.DoShowMessage()
+        
+    def DoShowMessage(self):
         msg = self.message.GetValue()
         flag = flags[self.flags.GetSelection()][0]
         self.info.ShowMessage(msg, flag)
 
-
     def OnDismiss(self, evt):
         self.info.Dismiss()
 
@@ -92,8 +94,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win.DoShowMessage()
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>wx.InfoBar</center></h2>
 
Index: IntCtrl.py
===================================================================
--- IntCtrl.py	(revision 72610)
+++ IntCtrl.py	(working copy)
@@ -131,6 +131,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = """<html><body>
 <P>
 <B>IntCtrl</B> provides a control that takes and returns integers as
Index: ItemsPicker.py
===================================================================
--- ItemsPicker.py	(revision 72610)
+++ ItemsPicker.py	(working copy)
@@ -73,6 +73,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: Joystick.py
===================================================================
--- Joystick.py	(revision 72610)
+++ Joystick.py	(working copy)
@@ -981,7 +981,12 @@
                            'Sorry', wx.ICON_WARNING)
         return win
     
+#----------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
 #----------------------------------------------------------------------------
 
 overview = """\
Index: KeyEvents.py
===================================================================
--- KeyEvents.py	(revision 72610)
+++ KeyEvents.py	(working copy)
@@ -409,8 +409,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>wxKeyEvents</center></h2>
 
Index: LayoutAnchors.py
===================================================================
--- LayoutAnchors.py	(revision 72610)
+++ LayoutAnchors.py	(working copy)
@@ -185,19 +185,27 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         win = AnchorsDemoFrame(self)
         win.Show(True)
+        return win
 
-
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
 overview = """<html><body>
 <h2>LayoutAnchors</h2>
Index: LayoutConstraints.py
===================================================================
--- LayoutConstraints.py	(revision 72610)
+++ LayoutConstraints.py	(working copy)
@@ -100,8 +100,13 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    wx.Sleep(1)
+    captcallback(win, imgpath, imgname)
+    
+#---------------------------------------------------------------------------
 
-
 overview = """\
 <html><body>
 Objects of this class can be associated with a window to define its
Index: Layoutf.py
===================================================================
--- Layoutf.py	(revision 72610)
+++ Layoutf.py	(working copy)
@@ -59,6 +59,12 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#---------------------------------------------------------------------------
+
 overview = layoutf.Layoutf.__doc__
 
 if __name__ == '__main__':
Index: LEDNumberCtrl.py
===================================================================
--- LEDNumberCtrl.py	(revision 72610)
+++ LEDNumberCtrl.py	(working copy)
@@ -48,6 +48,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = """\
 <html>
 <body>
Index: Listbook.py
===================================================================
--- Listbook.py	(revision 72610)
+++ Listbook.py	(working copy)
@@ -82,6 +82,11 @@
 
 #----------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------------
 
 overview = """\
 <html><body>
Index: ListBox.py
===================================================================
--- ListBox.py	(revision 72610)
+++ ListBox.py	(working copy)
@@ -140,9 +140,13 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#---------------------------------------------------------------------------
 
 
-
 overview = """<html><body>
 A listbox is used to select one or more of a list of
 strings. The strings are displayed in a scrolling box, with the
Index: ListCtrl.py
===================================================================
--- ListCtrl.py	(revision 72610)
+++ ListCtrl.py	(working copy)
@@ -373,6 +373,11 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#---------------------------------------------------------------------------
 
 overview = """\
 <html>
Index: ListCtrl_edit.py
===================================================================
--- ListCtrl_edit.py	(revision 72610)
+++ ListCtrl_edit.py	(working copy)
@@ -121,6 +121,11 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 <html>
Index: ListCtrl_virtual.py
===================================================================
--- ListCtrl_virtual.py	(revision 72610)
+++ ListCtrl_virtual.py	(working copy)
@@ -127,6 +127,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 This example demonstrates the ListCtrl's Virtual List features. A Virtual list
Index: Mask.py
===================================================================
--- Mask.py	(revision 72610)
+++ Mask.py	(working copy)
@@ -116,6 +116,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 This class encapsulates a monochrome mask bitmap, where the masked area is black 
Index: MaskedEditControls.py
===================================================================
--- MaskedEditControls.py	(revision 72610)
+++ MaskedEditControls.py	(working copy)
@@ -625,13 +625,23 @@
     testWin = TestMaskedTextCtrls(nb, -1, log)
     return testWin
 
+#----------------------------------------------------------------------------
+
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname, sleep=3)
+    
+#----------------------------------------------------------------------------
+
 def RunStandalone():
     app = wx.PySimpleApp()
     frame = wx.Frame(None, -1, "Test MaskedEditCtrls", size=(640, 480))
     win = TestMaskedTextCtrls(frame, -1, sys.stdout)
     frame.Show(True)
     app.MainLoop()
+
 #----------------------------------------------------------------------------
+
 import wx.lib.masked.maskededit as maskededit
 # strip out module header used for pydoc:
 demodoc = '\n'.join(maskededit.__doc__.split('\n')[2:])
Index: MaskedNumCtrl.py
===================================================================
--- MaskedNumCtrl.py	(revision 72610)
+++ MaskedNumCtrl.py	(working copy)
@@ -346,6 +346,13 @@
     return win
 
 #----------------------------------------------------------------------
+
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+
+#----------------------------------------------------------------------
+
 import wx.lib.masked.numctrl as mnum
 overview = """<html>
 <PRE><FONT SIZE=-1>
Index: MDIDemo.py
===================================================================
--- MDIDemo.py	(revision 72610)
+++ MDIDemo.py	(working copy)
@@ -71,6 +71,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    frame = MyParentFrame()
+    frame.Show(True)
+    captcallback(frame, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 if __name__ == '__main__':
     class MyApp(wx.App):
         def OnInit(self):
Index: MDISashDemo.py
===================================================================
--- MDISashDemo.py	(revision 72610)
+++ MDISashDemo.py	(working copy)
@@ -136,10 +136,17 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    frame = MyParentFrame()
+    frame.Show(True)
+    captcallback(frame, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 if __name__ == '__main__':
     class MyApp(wx.App):
         def OnInit(self):
-            wx.InitAllImageHandlers()
+            #wx.InitAllImageHandlers()
             frame = MyParentFrame()
             frame.Show(True)
             self.SetTopWindow(frame)
Index: MDIWindows.py
===================================================================
--- MDIWindows.py	(revision 72610)
+++ MDIWindows.py	(working copy)
@@ -59,8 +59,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    wx.Sleep(1)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>Multiple Document Interface</center></h2>
 
Index: MediaCtrl.py
===================================================================
--- MediaCtrl.py	(revision 72610)
+++ MediaCtrl.py	(working copy)
@@ -160,6 +160,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname, sleep=3)
+    
+#----------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: Menu.py
===================================================================
--- Menu.py	(revision 72610)
+++ Menu.py	(working copy)
@@ -248,8 +248,12 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         win = MyFrame(self, -1, self.log)
         win.Show(True)
+        return win
 
 
 #---------------------------------------------------------------------------
@@ -261,6 +265,12 @@
 
 #-------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 A demo of using wx.MenuBar and wx.Menu in various ways.
Index: MessageDialog.py
===================================================================
--- MessageDialog.py	(revision 72610)
+++ MessageDialog.py	(working copy)
@@ -13,27 +13,35 @@
 
 
     def OnButton(self, evt):
+        dlg = self.DoButton()
+        
+        dlg.ShowModal()
+        dlg.Destroy()
+        
+    def DoButton(self):
         dlg = wx.MessageDialog(self, 'Hello from Python and wxPython!',
                                'A Message Box',
                                wx.OK | wx.ICON_INFORMATION
                                #wx.YES_NO | wx.NO_DEFAULT | wx.CANCEL | wx.ICON_INFORMATION
                                )
-        dlg.ShowModal()
-        dlg.Destroy()
+        return dlg
 
-
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
-
 #---------------------------------------------------------------------------
 
+# TODO: get a huge size back from this which creates an PyAssertionError invalid bitmap
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
-
 overview = """\
 <html><body>
 <h2>wx.MessageDialog</h2>
Index: MimeTypesManager.py
===================================================================
--- MimeTypesManager.py	(revision 72610)
+++ MimeTypesManager.py	(working copy)
@@ -326,6 +326,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = """\
 
 The <b>wx.MimeTypesManager</b> class allows the application to retrieve the 
Index: MiniFrame.py
===================================================================
--- MiniFrame.py	(revision 72610)
+++ MiniFrame.py	(working copy)
@@ -35,23 +35,31 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         win = MyMiniFrame(self, "This is a wx.MiniFrame",
                           style=wx.DEFAULT_FRAME_STYLE | wx.TINY_CAPTION_HORIZ)
         win.SetSize((200, 200))
         win.CenterOnParent(wx.BOTH)
         win.Show(True)
+        return win
 
         
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
-
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 A MiniFrame is a Frame with a small title bar. It is suitable for floating 
Index: MouseGestures.py
===================================================================
--- MouseGestures.py	(revision 72610)
+++ MouseGestures.py	(working copy)
@@ -174,6 +174,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 <html>
Index: MultiChoiceDialog.py
===================================================================
--- MultiChoiceDialog.py	(revision 72610)
+++ MultiChoiceDialog.py	(working copy)
@@ -13,6 +13,15 @@
 
 
     def OnButton(self, evt):
+        dlg = self.DoButton()
+        if (dlg.ShowModal() == wx.ID_OK):
+            selections = dlg.GetSelections()
+            strings = [lst[x] for x in selections]
+            self.log.write("Selections: %s -> %s\n" % (selections, strings))
+
+        dlg.Destroy()
+        
+    def DoButton(self):
         lst = [ 'apple', 'pear', 'banana', 'coconut', 'orange', 'grape', 'pineapple',
                 'blueberry', 'raspberry', 'blackberry', 'snozzleberry',
                 'etc', 'etc..', 'etc...' ]
@@ -21,15 +30,8 @@
                                    "Pick some fruit from\nthis list",
                                    "wx.MultiChoiceDialog", lst)
 
-        if (dlg.ShowModal() == wx.ID_OK):
-            selections = dlg.GetSelections()
-            strings = [lst[x] for x in selections]
-            self.log.write("Selections: %s -> %s\n" % (selections, strings))
+        return dlg
 
-        dlg.Destroy()
-
-
-
 #---------------------------------------------------------------------------
 
 def runTest(frame, nb, log):
@@ -38,8 +40,13 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
-
 overview = """\
 <html>
 <body>
Index: MultipleChoiceDialog.py
===================================================================
--- MultipleChoiceDialog.py	(revision 72610)
+++ MultipleChoiceDialog.py	(working copy)
@@ -14,6 +14,13 @@
 
 
     def OnButton(self, evt):
+        dlg = self.DoButton()
+        if (dlg.ShowModal() == wx.ID_OK):
+            self.log.write("Selection: %s -> %s\n" % (dlg.GetValue(), dlg.GetValueString()))
+
+        dlg.Destroy()
+        
+    def DoButton(self):
         lst = [ 'apple', 'pear', 'banana', 'coconut', 'orange', 'grape', 'pineapple',
                 'blueberry', 'raspberry', 'blackberry', 'snozzleberry',
                 'etc', 'etc..', 'etc...' ]
@@ -23,13 +30,9 @@
                                     "Pick some from\n this list\nblah blah...",
                                     "m.s.d.", lst)
 
-        if (dlg.ShowModal() == wx.ID_OK):
-            self.log.write("Selection: %s -> %s\n" % (dlg.GetValue(), dlg.GetValueString()))
+        return dlg
 
-        dlg.Destroy()
 
-
-
 #---------------------------------------------------------------------------
 
 def runTest(frame, nb, log):
@@ -38,8 +41,15 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    win.Hide()
+    win.Close()
+    
+#----------------------------------------------------------------------
 
-
 overview = """\
 <html>
 <body>
Index: MultiSash.py
===================================================================
--- MultiSash.py	(revision 72610)
+++ MultiSash.py	(working copy)
@@ -71,8 +71,13 @@
 
     return multi
 
-#----------------------------------------------------------------------
+#---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#---------------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: MultiSplitterWindow.py
===================================================================
--- MultiSplitterWindow.py	(revision 72610)
+++ MultiSplitterWindow.py	(working copy)
@@ -145,8 +145,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>MultiSplitterWindow</center></h2>
 
Index: MVCTree.py
===================================================================
--- MVCTree.py	(revision 72610)
+++ MVCTree.py	(working copy)
@@ -50,7 +50,14 @@
     #f.Show(True)
     #return None
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = """\
 
 MVCTree is a control which handles hierarchical data. It is
Index: Notebook.py
===================================================================
--- Notebook.py	(revision 72610)
+++ Notebook.py	(working copy)
@@ -105,6 +105,11 @@
 
 #----------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 <html><body>
Index: OGL.py
===================================================================
--- OGL.py	(revision 72610)
+++ OGL.py	(working copy)
@@ -408,6 +408,11 @@
     
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """<html><body>
 <h2>Object Graphics Library</h2>
Index: OwnerDrawnComboBox.py
===================================================================
--- OwnerDrawnComboBox.py	(revision 72610)
+++ OwnerDrawnComboBox.py	(working copy)
@@ -130,8 +130,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>wx.combo.OwnerDrawnComboBox</center></h2>
 
Index: PageSetupDialog.py
===================================================================
--- PageSetupDialog.py	(revision 72610)
+++ PageSetupDialog.py	(working copy)
@@ -13,6 +13,15 @@
 
 
     def OnButton(self, evt):
+        dlg = self.DoButton()
+        if dlg.ShowModal() == wx.ID_OK:
+            data = dlg.GetPageSetupData()
+            tl = data.GetMarginTopLeft()
+            br = data.GetMarginBottomRight()
+            self.log.WriteText('Margins are: %s %s\n' % (str(tl), str(br)))
+        dlg.Destroy()
+        
+    def DoButton(self):
         data = wx.PageSetupDialogData()
         data.SetMarginTopLeft( (15, 15) )
         data.SetMarginBottomRight( (15, 15) )
@@ -21,26 +30,17 @@
 
         dlg = wx.PageSetupDialog(self, data)
 
-        if dlg.ShowModal() == wx.ID_OK:
-            data = dlg.GetPageSetupData()
-            tl = data.GetMarginTopLeft()
-            br = data.GetMarginBottomRight()
-            self.log.WriteText('Margins are: %s %s\n' % (str(tl), str(br)))
+        return dlg
 
-        dlg.Destroy()
 
-
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
-
 #---------------------------------------------------------------------------
 
-
 overview = """\
 This class represents the page setup common dialog. The page setup dialog is standard 
 from Windows 95 on, replacing the print setup dialog (which is retained in Windows 
Index: PDFViewer.py
===================================================================
--- PDFViewer.py	(revision 72610)
+++ PDFViewer.py	(working copy)
@@ -57,6 +57,14 @@
                            'Sorry', wx.ICON_WARNING)
         return win
 
+#----------------------------------------------------------------------
+
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = """\
 <html><body>
 <h2>wx.lib.pdfviewer</h2>
Index: PenAndBrushStyles.py
===================================================================
--- PenAndBrushStyles.py	(revision 72610)
+++ PenAndBrushStyles.py	(working copy)
@@ -159,8 +159,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>Pen and Brush Styles</center></h2>
 
Index: Pickers.py
===================================================================
--- Pickers.py	(revision 72610)
+++ Pickers.py	(working copy)
@@ -97,8 +97,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>Picker Controls</center></h2>
 
Index: PlateButton.py
===================================================================
--- PlateButton.py	(revision 72610)
+++ PlateButton.py	(working copy)
@@ -248,6 +248,14 @@
     win = TestPanel(nb, log)
     return win
 
+#----------------------------------------------------------------------
+
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 class TestLog:
     def __init__(self):
         pass
Index: PopupControl.py
===================================================================
--- PopupControl.py	(revision 72610)
+++ PopupControl.py	(working copy)
@@ -75,6 +75,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = """<html><body>
 <h2><center>PopupControl</center></h2>
 
Index: PopupMenu.py
===================================================================
--- PopupMenu.py	(revision 72610)
+++ PopupMenu.py	(working copy)
@@ -139,6 +139,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: PopupWindow.py
===================================================================
--- PopupWindow.py	(revision 72610)
+++ PopupWindow.py	(working copy)
@@ -126,8 +126,8 @@
         b = wx.Button(self, -1, "Show wx.PopupWindow", (25, 50))
         self.Bind(wx.EVT_BUTTON, self.OnShowPopup, b)
 
-        b = wx.Button(self, -1, "Show wx.PopupTransientWindow", (25, 95))
-        self.Bind(wx.EVT_BUTTON, self.OnShowPopupTransient, b)
+        self.bTrans = wx.Button(self, -1, "Show wx.PopupTransientWindow", (25, 95))
+        self.Bind(wx.EVT_BUTTON, self.OnShowPopupTransient, self.bTrans)
 
         # This isn't working so well, not sure why. Commented out for
         # now.
@@ -151,18 +151,22 @@
 
 
     def OnShowPopupTransient(self, evt):
+        self.DoShowPopupTransient()
+        
+    def DoShowPopupTransient(self):
         win = TestTransientPopup(self,
                                  wx.SIMPLE_BORDER,
                                  self.log)
 
         # Show the popup right below or above the button
         # depending on available screen space...
-        btn = evt.GetEventObject()
+        btn = self.bTrans
         pos = btn.ClientToScreen( (0,0) )
         sz =  btn.GetSize()
         win.Position(pos, (0, sz[1]))
 
         win.Popup()
+        return win
 
 
     def OnShowPopupListbox(self, evt):
@@ -214,6 +218,14 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    winT = win.DoShowPopupTransient()
+    wx.Sleep(1)
+    winT.Update()
+    captcallback(win, imgpath, imgname)
+    
+#---------------------------------------------------------------------------
 
 overview = """\
 """
Index: PrintDialog.py
===================================================================
--- PrintDialog.py	(revision 72610)
+++ PrintDialog.py	(working copy)
@@ -13,6 +13,14 @@
 
 
     def OnButton(self, evt):
+        dlg = self.DoButton()
+        if dlg.ShowModal() == wx.ID_OK:
+            data = dlg.GetPrintDialogData()
+            self.log.WriteText('GetAllPages: %d\n' % data.GetAllPages())
+
+        dlg.Destroy()
+        
+    def DoButton(self):
         data = wx.PrintDialogData()
 
         data.EnableSelection(True)
@@ -24,14 +32,8 @@
 
         dlg = wx.PrintDialog(self, data)
 
-        if dlg.ShowModal() == wx.ID_OK:
-            data = dlg.GetPrintDialogData()
-            self.log.WriteText('GetAllPages: %d\n' % data.GetAllPages())
+        return dlg
 
-        dlg.Destroy()
-
-
-
 #---------------------------------------------------------------------------
 
 
@@ -41,6 +43,12 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#---------------------------------------------------------------------------
 
 overview = """\
 This class represents the print and print setup common dialogs. You may obtain 
Index: Process.py
===================================================================
--- Process.py	(revision 72610)
+++ Process.py	(working copy)
@@ -130,10 +130,14 @@
     win = TestPanel(nb, -1, log)
     return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
 #----------------------------------------------------------------------
 
-
 overview = """\
 <html><body>
 <h2>wx.Process</h2>
Index: ProgressDialog.py
===================================================================
--- ProgressDialog.py	(revision 72610)
+++ ProgressDialog.py	(working copy)
@@ -22,6 +22,11 @@
 
 
     def OnButton(self, evt):
+        dlg = self.DoButton()
+                
+        dlg.Destroy()
+        
+    def DoButton(self):
         max = 80
 
         dlg = wx.ProgressDialog("Progress dialog example",
@@ -51,18 +56,24 @@
             else:
                 (keepGoing, skip) = dlg.Update(count)
 
-                
-        dlg.Destroy()
+        dlg.Center()
+        dlg.Show()
+        return dlg
 
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    # TODO: doesn't show unless I use ShowModal?
+    captcallback(win, imgpath, imgname)
+    
+#---------------------------------------------------------------------------
 
 overview = """\
 <html><body>
Index: PropertyGrid.py
===================================================================
--- PropertyGrid.py	(revision 72610)
+++ PropertyGrid.py	(working copy)
@@ -1024,6 +1024,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 <html><body>
Index: PseudoDC.py
===================================================================
--- PseudoDC.py	(revision 72610)
+++ PseudoDC.py	(working copy)
@@ -293,8 +293,12 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#---------------------------------------------------------------------------
 
-
 overview = """
 <html>
 <body>
Index: PyColourChooser.py
===================================================================
--- PyColourChooser.py	(revision 72610)
+++ PyColourChooser.py	(working copy)
@@ -24,6 +24,11 @@
 
 #---------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+#---------------------------------------------------------------
+
 overview = """
 The PyColourChooser component creates a colour chooser window
 that is similar to the Microsoft Windows colour chooser dialog.
Index: PyCrust.py
===================================================================
--- PyCrust.py	(revision 72610)
+++ PyCrust.py	(working copy)
@@ -11,6 +11,14 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    import wx
+    win = runTest(scparent, nb, log)
+    wx.Sleep(1)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = py.filling.__doc__ + "\n\n" + py.crust.__doc__
 
 if __name__ == '__main__':
Index: PyPlot.py
===================================================================
--- PyPlot.py	(revision 72610)
+++ PyPlot.py	(working copy)
@@ -31,12 +31,15 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         win = wx.lib.plot.TestFrame(self, -1, "PlotCanvas Demo")
         win.Show()
+        return win
 
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     if not hadImportError:
         win = TestPanel(nb, log)
@@ -52,7 +55,14 @@
     
     return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    win1.OnPlotDraw1(None)
+    captcallback(win1, imgpath, imgname, addwin=win)
+
 #----------------------------------------------------------------------
 
 if hadImportError:
Index: PyShell.py
===================================================================
--- PyShell.py	(revision 72610)
+++ PyShell.py	(working copy)
@@ -11,6 +11,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = py.shell.__doc__
 
 
Index: PythonEvents.py
===================================================================
--- PythonEvents.py	(revision 72610)
+++ PythonEvents.py	(working copy)
@@ -91,7 +91,6 @@
 
 #----------------------------------------------------------------------
 
-
 overview = """\
 This demo is a contrived example of defining an event class in wxPython and 
 sending it up the containment hierarchy for processing.
Index: RadioBox.py
===================================================================
--- RadioBox.py	(revision 72610)
+++ RadioBox.py	(working copy)
@@ -48,7 +48,13 @@
     win = TestRadioBox(nb, log)
     return win
 
+#---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#---------------------------------------------------------------------------
 
 overview = """\
 A RadioBox is used to select one of a number of mutually exclusive
Index: RadioButton.py
===================================================================
--- RadioButton.py	(revision 72610)
+++ RadioButton.py	(working copy)
@@ -103,6 +103,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 <html><body>
Index: RawBitmapAccess.py
===================================================================
--- RawBitmapAccess.py	(revision 72610)
+++ RawBitmapAccess.py	(working copy)
@@ -164,8 +164,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>Raw Bitmap Access</center></h2>
 
Index: RendererNative.py
===================================================================
--- RendererNative.py	(revision 72610)
+++ RendererNative.py	(working copy)
@@ -124,6 +124,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = """<html><body>
 <h2><center>wx.RendererNative</center></h2>
 <p>wx.RendererNative is a class which virtualizes drawing. It abstracts the 
Index: ResizeWidget.py
===================================================================
--- ResizeWidget.py	(revision 72610)
+++ ResizeWidget.py	(working copy)
@@ -59,8 +59,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>ResizeWidget</center></h2>
 <p>%s</p>
Index: RichTextCtrl.py
===================================================================
--- RichTextCtrl.py	(revision 72610)
+++ RichTextCtrl.py	(working copy)
@@ -694,6 +694,9 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         win = RichTextFrame(self, -1, "wx.richtext.RichTextCtrl",
                             size=(700, 500),
                             style = wx.DEFAULT_FRAME_STYLE)
@@ -702,9 +705,8 @@
         # give easy access to the demo's PyShell if it's running
         self.rtfrm = win
         self.rtc = win.rtc
+        return win
 
-
-
 #----------------------------------------------------------------------
 
 def runTest(frame, nb, log):
@@ -713,8 +715,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>wx.richtext.RichTextCtrl</center></h2>
 
Index: RightTextCtrl.py
===================================================================
--- RightTextCtrl.py	(revision 72610)
+++ RightTextCtrl.py	(working copy)
@@ -53,6 +53,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = right.__doc__
 
 
Index: RowColSizer.py
===================================================================
--- RowColSizer.py	(revision 72610)
+++ RowColSizer.py	(working copy)
@@ -79,10 +79,14 @@
     win = TestPanel(nb)
     return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
 #----------------------------------------------------------------------
 
-
 overview = rcs.__doc__
 
 if __name__ == '__main__':
Index: SashWindow.py
===================================================================
--- SashWindow.py	(revision 72610)
+++ SashWindow.py	(working copy)
@@ -129,6 +129,11 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 wx.SashLayoutWindow responds to OnCalculateLayout events generated by 
Index: ScrolledMessageDialog.py
===================================================================
--- ScrolledMessageDialog.py	(revision 72610)
+++ ScrolledMessageDialog.py	(working copy)
@@ -14,26 +14,34 @@
 
 
     def OnButton(self, evt):
+        dlg = self.DoButton()
+        dlg.ShowModal()
+        dlg.Destroy()
+        
+    def DoButton(self):
         f = open("Main.py", "r")
         msg = f.read()
         f.close()
 
         dlg = wx.lib.dialogs.ScrolledMessageDialog(self, msg, "message test")
-        dlg.ShowModal()
+        dlg.Show()
+        return dlg
 
-
-
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#---------------------------------------------------------------------------
 
-
 overview = """\
 
 <code><b>ScrolledMessageDialog</b>(parent, msg, caption, pos=wx.DefaultPosition, size=(500,300))</code>
Index: ScrolledPanel.py
===================================================================
--- ScrolledPanel.py	(revision 72610)
+++ ScrolledPanel.py	(working copy)
@@ -100,15 +100,18 @@
 
 #----------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 ScrolledPanel fills a "hole" in the implementation of wx.ScrolledWindow,
 providing automatic scrollbar and scrolling behavior and the tab traversal
Index: ScrolledWindow.py
===================================================================
--- ScrolledWindow.py	(revision 72610)
+++ ScrolledWindow.py	(working copy)
@@ -240,8 +240,12 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#---------------------------------------------------------------------------
 
-
 overview = """
 <html>
 <body>
Index: SearchCtrl.py
===================================================================
--- SearchCtrl.py	(revision 72610)
+++ SearchCtrl.py	(working copy)
@@ -89,6 +89,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: ShapedWindow.py
===================================================================
--- ShapedWindow.py	(revision 72610)
+++ ShapedWindow.py	(working copy)
@@ -102,8 +102,12 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+    
+    def DoButton(self):
         win = TestFrame(self, self.log)
         win.Show(True)
+        return win
 
 #---------------------------------------------------------------------------
 
@@ -114,8 +118,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>Shaped Window</center></h2>
 
Index: SingleChoiceDialog.py
===================================================================
--- SingleChoiceDialog.py	(revision 72610)
+++ SingleChoiceDialog.py	(working copy)
@@ -13,30 +13,36 @@
 
 
     def OnButton(self, evt):
+        dlg = self.DoButton()
+        if dlg.ShowModal() == wx.ID_OK:
+            self.log.WriteText('You selected: %s\n' % dlg.GetStringSelection())
+
+        dlg.Destroy()
+        
+    def DoButton(self):
         dlg = wx.SingleChoiceDialog(
                 self, 'Test Single Choice', 'The Caption',
                 ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight'], 
                 wx.CHOICEDLG_STYLE
                 )
+        return dlg
 
-        if dlg.ShowModal() == wx.ID_OK:
-            self.log.WriteText('You selected: %s\n' % dlg.GetStringSelection())
-
-        dlg.Destroy()
-
-
-
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
+
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
 
-
 overview = """\
 This class represents a dialog that shows a list of strings, and allows the user
 to select one. Double-clicking on a list item is equivalent to single-clicking
Index: SizedControls.py
===================================================================
--- SizedControls.py	(revision 72610)
+++ SizedControls.py	(working copy)
@@ -337,10 +337,7 @@
         
 
     def OnFormButton(self, evt):
-
-        dlg = FormDialog(self, -1)
-        dlg.CenterOnScreen()
-
+        dlg = self.DoFormButton()
         # this does not return until the dialog is closed.
         val = dlg.ShowModal()
     
@@ -350,12 +347,15 @@
             self.log.WriteText("You pressed Cancel\n")
 
         dlg.Destroy()
+
+    def DoFormButton(self):
+        dlg = FormDialog(self, -1)
+        dlg.CenterOnScreen()
+        dlg.Show()
+        return dlg
         
     def OnFormScrolledButton(self, evt):
-
-        dlg = ScrolledFormDialog(self, -1)
-        dlg.CenterOnScreen()
-
+        dlg = self.DoFormScrolledButton()
         # this does not return until the dialog is closed.
         val = dlg.ShowModal()
     
@@ -366,11 +366,14 @@
 
         dlg.Destroy()
 
-    def OnErrorButton(self, evt):
-            
-        dlg = ErrorDialog(self, -1)
+    def DoFormScrolledButton(self):
+        dlg = ScrolledFormDialog(self, -1)
         dlg.CenterOnScreen()
+        dlg.Show()
+        return dlg
 
+    def OnErrorButton(self, evt):
+        dlg = self.DoErrorButton()
         # this does not return until the dialog is closed.
         val = dlg.ShowModal()
     
@@ -380,19 +383,48 @@
             self.log.WriteText("You pressed Cancel\n")
 
         dlg.Destroy()
+    
+    def DoErrorButton(self):    
+        dlg = ErrorDialog(self, -1)
+        dlg.CenterOnScreen()
+        dlg.Show()
+        return dlg
         
     def OnGridButton(self, evt):
-            
+        self.DoGridButton()
+        
+    def DoGridButton(self):
         dlg = GridFrame(self, -1)
         dlg.CenterOnScreen()
 
         dlg.Show()
+        return dlg
         
+#----------------------------------------------------------------------
+
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+
+    win1 = win.DoFormButton()
+    captcallback(win1, imgpath, imgname)
+
+    win2 = win.DoFormScrolledButton()
+    captcallback(win2, imgpath, imgname + "_1")
+
+    win3 = win.DoGridButton()
+    captcallback(win3, imgpath, imgname + "_2")
+
+    win4 = win.DoErrorButton()
+    captcallback(win4, imgpath, imgname + "_3", addwin=win)
+    
+#----------------------------------------------------------------------
+
 if __name__ == '__main__':
     import sys,os
     import run
Index: Slider.py
===================================================================
--- Slider.py	(revision 72610)
+++ Slider.py	(working copy)
@@ -28,9 +28,13 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
-
 overview = """\
 A slider is a control with a handle which can be pulled back and forth to 
 change the value.
Index: SpinButton.py
===================================================================
--- SpinButton.py	(revision 72610)
+++ SpinButton.py	(working copy)
@@ -41,6 +41,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 A wx.SpinButton has two small up and down (or left and right) arrow buttons. 
Index: SpinCtrl.py
===================================================================
--- SpinCtrl.py	(revision 72610)
+++ SpinCtrl.py	(working copy)
@@ -33,6 +33,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 wx.SpinCtrl combines wx.TextCtrl and wx.SpinButton in one control.
Index: SpinCtrlDouble.py
===================================================================
--- SpinCtrlDouble.py	(revision 72610)
+++ SpinCtrlDouble.py	(working copy)
@@ -21,8 +21,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>wx.SpinCtrlDouble</center></h2>
 
Index: SplitterWindow.py
===================================================================
--- SplitterWindow.py	(revision 72610)
+++ SplitterWindow.py	(working copy)
@@ -47,6 +47,11 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 This class manages up to two subwindows. The current view can be split
Index: SplitTree.py
===================================================================
--- SplitTree.py	(revision 72610)
+++ SplitTree.py	(working copy)
@@ -127,6 +127,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 This demo shows a collection of classes that were designed to operate
Index: StandardPaths.py
===================================================================
--- StandardPaths.py	(revision 72610)
+++ StandardPaths.py	(working copy)
@@ -90,6 +90,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = """<html><body>
Index: StaticBitmap.py
===================================================================
--- StaticBitmap.py	(revision 72610)
+++ StaticBitmap.py	(working copy)
@@ -42,6 +42,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 overview = """\
 A StaticBitmap control displays a bitmap.
 
Index: StaticBox.py
===================================================================
--- StaticBox.py	(revision 72610)
+++ StaticBox.py	(working copy)
@@ -28,8 +28,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>wx.StaticBox</center></h2>
 
Index: StaticText.py
===================================================================
--- StaticText.py	(revision 72610)
+++ StaticText.py	(working copy)
@@ -51,9 +51,13 @@
     panel = TestPanel(nb)
     return panel
 
-
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = '''\
 A StaticText control displays one or more lines of read-only text.
Index: StatusBar.py
===================================================================
--- StatusBar.py	(revision 72610)
+++ StatusBar.py	(working copy)
@@ -106,19 +106,28 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         win = TestCustomStatusBar(self, self.log)
         win.Show(True)
+        return win
 
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
-
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    wx.Sleep(1)
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 A status bar is a narrow window that can be placed along the bottom of
Index: StockButtons.py
===================================================================
--- StockButtons.py	(revision 72610)
+++ StockButtons.py	(working copy)
@@ -83,8 +83,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>Stock Buttons</center></h2>
 
Index: StyledTextCtrl_1.py
===================================================================
--- StyledTextCtrl_1.py	(revision 72610)
+++ StyledTextCtrl_1.py	(working copy)
@@ -298,6 +298,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 <html><body>
Index: StyledTextCtrl_2.py
===================================================================
--- StyledTextCtrl_2.py	(revision 72610)
+++ StyledTextCtrl_2.py	(working copy)
@@ -381,11 +381,14 @@
 
     return p
 
+#----------------------------------------------------------------------
 
-
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
 #----------------------------------------------------------------------
 
-
 overview = """\
 <html><body>
 Once again, no docs yet.  <b>Sorry.</b>  But <a href="data/stc.h.html">this</a>
Index: SystemSettings.py
===================================================================
--- SystemSettings.py	(revision 72610)
+++ SystemSettings.py	(working copy)
@@ -296,6 +296,14 @@
     win = TestPanel(nb, log)
     return win
 
+#----------------------------------------------------------------------
+
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 class TestLog:
     def __init__(self):
         pass
Index: TextCtrl.py
===================================================================
--- TextCtrl.py	(revision 72610)
+++ TextCtrl.py	(working copy)
@@ -161,6 +161,11 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 overview = """\
 A TextCtrl allows text to be displayed and (possibly) edited. It may be single 
Index: TextEntryDialog.py
===================================================================
--- TextEntryDialog.py	(revision 72610)
+++ TextEntryDialog.py	(working copy)
@@ -13,31 +13,35 @@
 
 
     def OnButton(self, evt):
+        dlg = self.DoButton()
+        if dlg.ShowModal() == wx.ID_OK:
+            self.log.WriteText('You entered: %s\n' % dlg.GetValue())
+
+        dlg.Destroy()
+        
+    def DoButton(self):
         dlg = wx.TextEntryDialog(
                 self, 'What is your favorite programming language?',
                 'Eh??', 'Python')
 
         dlg.SetValue("Python is the best!")
+        return dlg
 
-        if dlg.ShowModal() == wx.ID_OK:
-            self.log.WriteText('You entered: %s\n' % dlg.GetValue())
-
-        dlg.Destroy()
-
-
-
-
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#----------------------------------------------------------------------
 
-
 overview = """\
 This class represents a dialog that requests a one-line text string from the user. 
 It is implemented as a generic wxWindows dialog. Along with the usual wx.Dialog 
Index: Throbber.py
===================================================================
--- Throbber.py	(revision 72610)
+++ Throbber.py	(working copy)
@@ -232,8 +232,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h4><center>Throbber</center></h4>
 <p>%s</p>
Index: Ticker.py
===================================================================
--- Ticker.py	(revision 72610)
+++ Ticker.py	(working copy)
@@ -138,6 +138,11 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
 
 overview = wx.lib.ticker.__doc__
Index: TimeCtrl.py
===================================================================
--- TimeCtrl.py	(revision 72610)
+++ TimeCtrl.py	(working copy)
@@ -226,6 +226,13 @@
     return win
 
 #----------------------------------------------------------------------
+
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 import wx.lib.masked.timectrl as timectl
 overview = """<html>
 <PRE><FONT SIZE=-1>
Index: Timer.py
===================================================================
--- Timer.py	(revision 72610)
+++ Timer.py	(working copy)
@@ -239,7 +239,12 @@
     win = TestPanel(nb, log)
     return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
 #----------------------------------------------------------------------
 
 overview = """<html><body>
Index: ToggleButton.py
===================================================================
--- ToggleButton.py	(revision 72610)
+++ ToggleButton.py	(working copy)
@@ -35,10 +35,14 @@
     win = TestPanel(nb, log)
     return win
     
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
 #----------------------------------------------------------------------
 
-
 overview = """\
 wx.ToggleButton is a button that stays pressed when clicked by the user. 
 In other words, it is similar to wxCheckBox in functionality but looks like a 
Index: ToolBar.py
===================================================================
--- ToolBar.py	(revision 72610)
+++ ToolBar.py	(working copy)
@@ -198,23 +198,31 @@
 
 
     def OnButton(self, evt):
+        self.DoButton()
+        
+    def DoButton(self):
         win = TestToolBar(self, self.log)
         win.Show(True)
         self.frame = win
+        return win
 
 
 #---------------------------------------------------------------------------
 
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    win1 = win.DoButton()
+    captcallback(win1, imgpath, imgname, addwin=win)
+    
+#---------------------------------------------------------------------------
 
 
-
 overview = """\
 wx.ToolBar is a narrow strip of icons on one side of a frame (top, bottom, sides)
 that acts much like a menu does, except it is always visible. Additionally, actual
Index: Toolbook.py
===================================================================
--- Toolbook.py	(revision 72610)
+++ Toolbook.py	(working copy)
@@ -89,6 +89,11 @@
 
 #----------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------------
 
 overview = """\
 <html><body>
Index: Treebook.py
===================================================================
--- Treebook.py	(revision 72610)
+++ Treebook.py	(working copy)
@@ -103,6 +103,11 @@
 
 #----------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname, sleep=2)
+    
+#----------------------------------------------------------------------------
 
 overview = """\
 <html><body>
Index: TreeCtrl.py
===================================================================
--- TreeCtrl.py	(revision 72610)
+++ TreeCtrl.py	(working copy)
@@ -191,10 +191,14 @@
 
 #---------------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#---------------------------------------------------------------------------
 
 
 
-
 overview = """\
 A TreeCtrl presents information as a hierarchy, with items that may be 
 expanded to show further items. Items in a tree control are referenced by 
Index: TreeListCtrl.py
===================================================================
--- TreeListCtrl.py	(revision 72610)
+++ TreeListCtrl.py	(working copy)
@@ -101,8 +101,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>TreeListCtrl</center></h2>
 
Index: TreeMixin.py
===================================================================
--- TreeMixin.py	(revision 72610)
+++ TreeMixin.py	(working copy)
@@ -254,11 +254,20 @@
         self.notebook.RefreshItems()
 
 
+#----------------------------------------------------------------------
+
 def runTest(frame, nb, log):
     win = TestPanel(nb, log)
     return win
 
+#----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
+
 if __name__ == '__main__':
     import sys, os, run
     run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
Index: VListBox.py
===================================================================
--- VListBox.py	(revision 72610)
+++ VListBox.py	(working copy)
@@ -147,8 +147,12 @@
 
 #----------------------------------------------------------------------
 
+def runScreenCapture(scparent, nb, log, captcallback, imgpath, imgname):
+    win = runTest(scparent, nb, log)
+    captcallback(win, imgpath, imgname)
+    
+#----------------------------------------------------------------------
 
-
 overview = """<html><body>
 <h2><center>wx.VListBox and wx.HtmlListBox</center></h2>
 <hr>
