all demos added because exec() don't need main form to exit_all

This commit is contained in:
qPCR4vir
2016-03-05 03:17:49 +01:00
parent 7125ab8f48
commit 2c04ba7bf3
5 changed files with 68 additions and 58 deletions

View File

@@ -96,15 +96,11 @@
///////////////////
// Support for NANA_AUTOMATIC_GUI_TESTING
// Will cause the program to self-test the GUI.
// If NANA_ADD_DEF_AUTOMATIC_GUI_TESTING is also defined a default automatic GUI test
// Will cause the program to self-test the GUI. A default automatic GUI test
// will be added to all programs which don't have yet one defined. This default test will simple
// wait 10 sec. (time to construct, show and execute the GUI) and then exit normally.
//
//#define NANA_AUTOMATIC_GUI_TESTING
//#if defined(NANA_AUTOMATIC_GUI_TESTING)
//#define NANA_ADD_DEF_AUTOMATIC_GUI_TESTING
//#endif
#define NANA_AUTOMATIC_GUI_TESTING

View File

@@ -66,9 +66,8 @@ namespace nana
/// from the underlying OS, interpreting and sending it with suitable arguments
/// to the nana widgets that registered a response in the corresponding event.
/// It also accept arguments to be used in case of automatic GUI testing.
/// Other Way the arguments are ignored. It seems that only works in simple
/// programs with only one active form ??
void exec(form *main_form = nullptr, ///< used to close the program
/// Other Way the arguments are ignored.
void exec(
unsigned wait = 1, ///< for the GUI to be constructed, in seconds
unsigned wait_end = 1, ///< for the GUI to be destructed, in seconds
std::function<void()> = {} ///< emit events to mimics user actions and may asert results