Mercurial > dwindows
diff dwtest.c @ 2093:0c7de37977c8
Add a display of all features in dwtest using dw_debug().
Also update the readme to mention dw_feature_get/set().
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 11 Jun 2020 02:26:42 +0000 |
parents | 524cb235a555 |
children | 8de0a767c0e5 |
line wrap: on
line diff
--- a/dwtest.c Thu Jun 11 01:30:37 2020 +0000 +++ b/dwtest.c Thu Jun 11 02:26:42 2020 +0000 @@ -1761,6 +1761,21 @@ return FALSE; } +/* Pretty list of features corresponding to the DWFEATURE enum in dw.h */ +char *DWFeatureList[] = { + "Supports the HTML Widget", + "Supports the DW_SIGNAL_HTML_RESULT callback", + "Supports custom window border sizes", + "Supports window frame transparency", + "Supports Dark Mode user interface", + "Supports auto completion in Multi-line Edit boxes", + "Supports word wrapping in Multi-line Edit boxes", + "Supports striped line display in container widgets", + "Supports Multiple Document Interface window frame", + "Supports status text area on notebook/tabbed controls", + "Supports sending system notifications", + NULL }; + /* * Let's demonstrate the functionality of this library. :) */ @@ -1777,6 +1792,21 @@ ULONG notebookpage7; ULONG notebookpage8; ULONG notebookpage9; + DWFEATURE feat; + + /* Test all the features and display the results */ + for(feat=0;feat<DW_FEATURE_MAX && DWFeatureList[feat];feat++) + { + int result = dw_feature_get(feat); + char *status = "Unsupported"; + + if(result == 0) + status = "Disabled"; + else if(result > 0) + status = "Enabled"; + + dw_debug("%s: %s (%d)", DWFeatureList[feat], status, result); + } /* Initialize the Dynamic Windows engine */ dw_init(TRUE, argc, argv);