+/**
+ @class AutoCaptureMechanism
+
+ AutoCaptureMechanism provides an easy-to-use and adjustable facility to take the screenshots
+ for all controls fully automaticly and correctly. It also provides an advanced feature to
+ union screenshots of different states/modes of a control.
+
+ @section tag_filename_convention Screenshot File Name Convention
+
+ All screenshots are generated as PNG files. For a control named wxName, its screenshot file
+ name would be "name.png", e.g. "button.png" for wxButton. This is the protocol with the
+ doxygen document of wxWidgets.
+
+ By default, screenshots are generated under the subdirectory "screenshots" of current working
+ directory. During updating or adding new screenshots, first make sure screenshots are generated
+ correctly, and then copy them to the following subdirectory of docs/doxygen/images:
+
+ "wxmsw" for MS Windows, "wxgtk" for Linux and "wxmac" for Mac OS.
+
+ @section tag_gui_assumption The Assumption of GUI
+
+ Unfortunately, this class have an assumption about the structure of GUI:
+ It must have the follwoing top-down structure:
+
+ wxNotebook->wxPanel->wxSizer->wxControl
+
+ That means, in the wxNotebook associated with this class, controls that needs to be
+ taken screenshots are placed on different panels(for grouping) and layed out by wxSizers.
+
+ @section tag_tutorial Tutorial
+
+ In the contruction, you should associate a wxNotebook with this class, in that wxNotebook,
+ controls that needs to be captured are placed on different panels(for grouping).
+
+ When you register controls, you should do it in order: Register the controls on the first
+ panel(using RegisterControl()), and then register a page turn(using RegisterPageTurn()),
+ so this class can turn a page of the wxNotebook to present the second page. And then
+ you register the controls on the second panel, then a page turn, and so on.
+
+ When you are done, simply call CaptureAll(), then screenshots of all controls will be
+ automaticly generated.
+
+ @section tag_autoadjust Make Use of Auto Adjustments
+
+ First take a look at the document of RegisterControl(), enum AdjustFlags and
+ GlobalAdjustFlags.
+
+ And then, ScreenshotFrame::OnCaptureAllControls() is a good example of making use of
+ auto adjustment. Taking a look at it will get you started.
+
+ @section tag_developer_note Notes for Developers
+
+ @subsection tag_cnc CaptureAll() and Capture()
+
+ The implementation of Auto Adjustments is in CaptureAll() and Capture(), the code is
+ short, quite readable and well commented, please read the codes before any modification.
+
+ If you need the class to do something sepcial for you, consider introducing a new flag
+ and implement it in them. For an operation performed on multiple controls, implemente
+ its logic in CaptureAll(), otherwise in the private member Capture().
+
+ @subsection tag_yield_issue wxYield Issues
+
+ Not quite a good habit, but this class made a lot of use of wxYield()/wxYieldIfNeeded().
+ They are used to ensure the update of GUI(e.g. the page turn of wxNotebook) is done
+ before any further screenshot-taking, or to do the timing(in Delay()). Without their use,
+ there would be subtle bugs.
+
+ I've read documents about wxYield() and understand the down side of it before using it.
+ But I didn't find a better approach to do those things, and I used them carefully. So
+ please DO NOT remove any of these wxYield()s unless you're sure that it won't cause problems
+ on all of MS Windows XP/Vista, Linux(Ubuntu/Fedora), Mac OS Tiger/Leopard. And please
+ help me to find a better approach, thank you :)
+*/